Page MenuHomeWildfire Games

Treat code between `[]` and `{}` as one blob for translations.
Needs ReviewPublic

Authored by bb on Oct 12 2020, 11:11 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This a more proper fix to D2451

Test Plan

Check no other translation changed by this patch, than the no-context one in the other revision (so run the script and compare). Note that running the translation script in current svn changes some more things (at least here), but those appear unrelated.

Yell at someone to port the scripts to python3 asap

Event Timeline

bb created this revision.Oct 12 2020, 11:11 PM

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(dbghelp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(file_stats.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(vfs_path.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1644/display/redirect

bb requested review of this revision.Oct 12 2020, 11:23 PM

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1646/display/redirect

bb edited the test plan for this revision. (Show Details)Oct 13 2020, 10:00 PM

I'm wondering if this can't be fixed by using template literals: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
(though I don't really understand why you need it, if you could provide an example - haven't figured it out really from the diff before either)

Yell at someone to port the scripts to python3 asap

Feel free to review D2757

bb added a comment.Oct 25 2020, 9:30 PM

I'm wondering if this can't be fixed by using template literals: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals

Don't really see the relevance

(though I don't really understand why you need it, if you could provide an example - haven't figured it out really from the diff before either)

See revision summary for example. More generally, the current script sees any string between the brackets after translate even if they are not really translatable strings, but rather strings used for array/object/inlined function construction or (as the example) for accessing array/object values.

Yell at someone to port the scripts to python3 asap

Feel free to review D2757

aye, didn't find that diff for some reason while searching.