Update 0.H strings from experimental #75948
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
None
Purpose of change
Since a lot of translation effort goes on in master instead of releases on Transifex, pull any changed strings from master and generate updated .po files.
Translation file changes are intended
Describe the solution
I wrote some TS code to do the job using smhg/gettext-parser for the .po file reading and generation. The code loads .po files from two folders, see if there's changed non-empty strings for the same context and key, and generates a new PO. The strings from master were grabbed on 2024-08-21.
Because the library doesn't preserve comment order and therefore the diffs are very hard to read, I've generated a .log file for each language for auditing the changes. This hopefully allows sufficient spot checking of the .po files.
I've eyed through a few I can at least sort of read and the process looks like it does the right thing, but I'd appreciate more eyes on this.
Describe alternatives you've considered
Using lang/merge_po.sh to get a more readable diff. I tried this but it moved messages around so that didn't seem like an improvement. I can still definitely do that if that's desired.
Leave strings as is and not do this PR
Testing
Check that compile_mo.sh can still compile the .po files, load the game with a couple of different languages and see game still works and those updated strings are there in the UI.
Additional context
Running the script:
example snippet from is.po.log:
es_ES.po_log.txt
pl.po_log.txt
es_AR.po_log.txt
fr.po_log.txt
pt_BR.po_log.txt
de.po_log.txt
ko.po_log.txt
zh_TW.po_log.txt
uk_UA.po_log.txt
it_IT.po_log.txt
tr.po_log.txt
ro.po_log.txt
nb.po_log.txt
cs.po_log.txt
nl.po_log.txt
sr.po_log.txt
el.po_log.txt
is.po_log.txt
id.po_log.txt
da.po_log.txt