[DRAFT] An approach to linting the translations#166
[DRAFT] An approach to linting the translations#166Quuxplusone wants to merge 1 commit intozenorogue:masterfrom
Conversation
|
Have you seen |
I had not seen it, no. IIUC, There's some low-hanging fruit in there, too; e.g. the translation files are inconsistent between |
|
Could someone please explain why all of the translations are in one file for all target languages and why they are so disorganized? This contradicts the majority of implementations I've seen so far. For both clarity and ease of file management, it is always better to have a single file for each language IMHO. |
|
What do you mean? Each language already has its own file, e.g., |
|
@josephcsible But the question still stands as to why this is the case with this specific file, as its ambiguous structure is the exact reason for my bewilderment. |
|
|
|
@josephcsible This strategy's obvious structure has most likely contributed to its success. |
As noted in #154, it's very easy to "break" the translations files. If we wanted, we could try to automate the detection of broken translations, by comparing the strings in
language-??.cppagainst the strings in the actual program source code. I wrote a little proof-of-concept, using a Python script to extract the string literals from the program. Runmaketo see the very spammy output:I don't expect this to be merged as-is. But it might serve as a jumping-off point for someone either to polish this automated detector, or to go through its spammy output and make a pull request fixing the low-hanging fruit. E.g. changing
"%1 takes %his1 revenge on %the2!"into"%The1 takes %his1 revenge on %the2!"