feat: add actionable message on lint-locale failure (#12748)

Before this PR:
![image](/attachments/dd1a8f68-8b87-41e5-86e0-4ba59cedf4f4)

After this PR:
![image](/attachments/51007bbd-cf3c-4828-b5fc-9aecc9c958bd)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12748
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Ellen Εμίλια Άννα Zscheile <fogti@noreply.codeberg.org>
This commit is contained in:
oliverpool
2026-05-27 11:48:07 +02:00
committed by 0ko
parent 8a72b70f5f
commit 1b1ede13f9
+19
View File
@@ -191,5 +191,24 @@ func main() {
} }
} }
if exitCode != 0 {
fmt.Println(dmp.DiffPrettyText([]diffmatchpatch.Diff{{
Type: diffmatchpatch.DiffEqual,
Text: "Please adjust the locale files as suggested above (",
}, {
Type: diffmatchpatch.DiffDelete,
Text: "red",
}, {
Type: diffmatchpatch.DiffEqual,
Text: ": removal, ",
}, {
Type: diffmatchpatch.DiffInsert,
Text: "green",
}, {
Type: diffmatchpatch.DiffEqual,
Text: ": insertion)",
}}))
}
os.Exit(exitCode) os.Exit(exitCode)
} }