gameboy Posted November 15, 2018 Report Share Posted November 15, 2018 Today, I tested the latest SVN21931. When I was playing a single player game in the game, this error message came up: ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:945:2 onSimulationUpdate@gui/session/session.js:875:2 __eventhandler105 (simulationupdate)@session simulationupdate:0:1 ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:945:2 onSimulationUpdate@gui/session/session.js:875:2 __eventhandler105 (simulationupdate)@session simulationupdate:0:1 ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:945:2 onSimulationUpdate@gui/session/session.js:875:2 __eventhandler105 (simulationupdate)@session simulationupdate:0:1 ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:945:2 onSimulationUpdate@gui/session/session.js:875:2 __eventhandler105 (simulationupdate)@session simulationupdate:0:1 Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted November 15, 2018 Report Share Posted November 15, 2018 So which "hotkey" where you trying to use and did you check the config file for it's definition you have been around long enough to do that Enjoy the Choice 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 I think this error appears in a document with the relevant keywords not removed, please help me. Quote Link to comment Share on other sites More sharing options...
Guest Posted November 15, 2018 Report Share Posted November 15, 2018 Patched, modded or anything similiar? Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 No other mods are used, and any patching patches. commands.txt Quote Link to comment Share on other sites More sharing options...
Guest Posted November 15, 2018 Report Share Posted November 15, 2018 (edited) Which language did you use (ingame)? Could very well be a mistranslation. And as far as I can tell, its not english right (judging from the bot names)? Edited November 15, 2018 by Guest Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 (edited) I use Chinese. My friend Jonathan and I study in China. The language he uses in the game is Chinese. Is this a keystroke error? Do you know where this mistake happened, or a document? Edited November 15, 2018 by gameboy Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 @stanislas69 @Imarok Quote Link to comment Share on other sites More sharing options...
Silier Posted November 15, 2018 Report Share Posted November 15, 2018 @gameboy could you tell us to which action is key, you tried to use, bonded? Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 (edited) I occupied the enemy's city hall by repairing the key to the house. I used the repair function to repair the damaged city center. savegame-0032.0adsave savegame-0031.0adsave @Angen Edited November 15, 2018 by gameboy Quote Link to comment Share on other sites More sharing options...
elexis Posted November 15, 2018 Report Share Posted November 15, 2018 1 hour ago, (-_-) said: Could very well be a mistranslation That ^, because in 4 hours ago, gameboy said: tooltips.js:399 there is "Add another worker to speed up the repairs by %(second)s second." and 4 hours ago, gameboy said: [sprintf] property 'hotkey' does not exist using Quote grep -R '"Add another worker to speed up the repairs by %(second)s second."' -A5 | grep hotkey gives one result: Quote zh.public-gui-other.po-msgstr[0] "%(hotkey)s: 切换至历史" Entirely: Quote #: gui/common/tooltips.js:402 #, javascript-format msgid "Add another worker to speed up the repairs by %(second)s second." msgid_plural "" "Add another worker to speed up the repairs by %(second)s seconds." msgstr[0] "%(hotkey)s: 切换至历史" So someone added a broken translation that should be fixed as soon as possible on transifex. Gratis bonus fact, the translation was copied from: Quote #: gui/reference/structree/structree.js:49 #, javascript-format msgid "%(hotkey)s: Switch to History." msgstr "%(hotkey)s: 切换至历史" Now who wants to write the script that checks all *.po files for this mistake systematically, so that players don't have to randomly discover it (or even the trac ticket)? Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 @elexis My friend Elexis, thank you for your help. How do we fix this problem? Quote Link to comment Share on other sites More sharing options...
elexis Posted November 15, 2018 Report Share Posted November 15, 2018 Register at http://transifex.com/ and translate "Add another worker to speed up the repairs by %(second)s seconds" correctly. It should be in the "public-gui-other" section. Quote Link to comment Share on other sites More sharing options...
gameboy Posted November 15, 2018 Author Report Share Posted November 15, 2018 @elexis Thank you, my friend, I have given the solution. I have fixed the problem. #: gui/common/tooltips.js:402 #, javascript-format msgid "Add another worker to speed up the repairs by %(second)s second." msgid_plural "" "Add another worker to speed up the repairs by %(second)s seconds." msgstr[0] "增加一另个工人,在 %(second)s 秒后修复。" Quote Link to comment Share on other sites More sharing options...
elexis Posted November 15, 2018 Report Share Posted November 15, 2018 1 hour ago, gameboy said: "增加一另个工人,在 %(second)s 秒后修复。" @gameboy please post this on https://www.transifex.com/wildfire-games/0ad/, otherwise the bug will reappear soon Quote Link to comment Share on other sites More sharing options...
elexis Posted November 16, 2018 Report Share Posted November 16, 2018 14 hours ago, elexis said: Now who wants to write the script that checks all *.po files for this mistake systematically, so that players don't have to randomly discover it (or even the trac ticket)? That's me. A nice one day task with regards to the first implementation: D1674. Using this script I found there are three further strings that throw errors upon use that noone found yet: Quote sk.public-gui-other.po: The sprintf argument %(trained)s used by the translation “Štatistika jednotiek (%(trained)s / %(killed)s / %(captured)s / %(lost)s)” isn't a present in the template string “Siege” “”zh_TW.public-gui-other.po: The sprintf argument %(endWarning)s used by the translation “ %(endWarning)s 您似乎正使用非著色器(shader 一種特定功能)的顯示晶片。這個選項將會在未來的 0 A.D. 版本中移除以便啟用更多的進階圖形特色。我們建議您盡速升級您的顯示卡到較新、相容著色器語言的。” isn't a present in the template string “%(warning)s You appear to be using non-shader (fixed function) graphics. This option will be removed in a future 0 A.D. release, to allow for more advanced graphics features. We advise upgrading your graphics card to a more recent, shader-compatible model.” “”ar.public-gui-other.po: The sprintf argument %(civ)s used by the translation “%(civ)s :الانتقال لشجرة البنية” isn't a present in the template string “%(hotkey)s: Switch to Structure Tree.” “” The nice thing is we know that we can find all of them by running a short script, i.e. there are certainly not more than these three. Now who wants to update transifex? 1 Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted November 16, 2018 Report Share Posted November 16, 2018 Since there are three separate languages this post might not get noticed by the relevant people so a more general announcement with a suitable title would be appropriate. Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
Guest Posted November 16, 2018 Report Share Posted November 16, 2018 (Might want to just delete the translations from transifex. If such a thing is possible) Quote Link to comment Share on other sites More sharing options...
Silier Posted November 16, 2018 Report Share Posted November 16, 2018 (edited) I cannot find in which section on transfix is public-gui-other its frustrating Ok, found and fixed ( just sk files ) Edited November 16, 2018 by Angen 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.