Opened 8 years ago
Last modified 5 years ago
#3665 new defect
GuiInterface-notifications are not translated — at Version 6
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Backlog |
Component: | Internationalization & Localization | Keywords: | |
Cc: | Patch: |
Description (last modified by )
There are many local chat notifications which are not translated, for example:
cmpGuiInterface.PushNotification({ "type": "chat", "players": [input.player], "message": "This building only has " + techs.length + " technologies." });
A correct example would be:
cmpGUIInterface.PushNotification({ "players": [1,2,3,4,5,6,7,8], "message": markForTranslation("The first wave will start in 15 minutes!"), "translateMessage": true });
See also wiki:Internationalization#InternationalizingJavaScriptSimulationFiles
Change History (6)
comment:1 by , 8 years ago
follow-up: 4 comment:2 by , 8 years ago
All remaining untranslated notifications are in Cheat.js
and Commands.js
. I'm not sure if we should keep the notifications in the former (some do not really add anything IMO). For the ones in Commands.js
it would be nice to only push one notification in some of the commands instead of multiple. We should also (for notifyUnloadFailure
and notifyBackToWorkFailure
) improve the message and use proper plural forms where needed.
comment:4 by , 8 years ago
For pluralforms, translateObjectKeys
will need plural-translation support :-/
comment:5 by , 8 years ago
Component: | UI & Simulation → I18n & L10n |
---|
comment:6 by , 7 years ago
Description: | modified (diff) |
---|
Another problematic GUI interface notification translation can be found in SubtractResourcesOrNotify
of Player.js
that hardcodes a string for 4 different resource types, while it should use getLocalizedResourceAmounts
(as of r19757).
In 17614: