Opened 8 years ago
Last modified 5 years ago
#3665 new defect
GuiInterface-notifications are not translated
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 (8)
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).
comment:7 by , 7 years ago
Equally, it would be preferable if chatHelper.js
would be able to pass resource codes and just use the GUI translation functions for concatenating resources and allow us to not have to pass english resource strings in the simulation, refs Phab:D625
comment:8 by , 5 years ago
Should include a fix for:
‘Unable to ungarrison unit(s)’ should use plural translation.
‘Some unit(s) can't go back to work’ should use plural translation.
Or, if these issues are out of the scope of the current issue, a separate issue for these should be created once the current issue is fixed, since the issues reported at Trasifex would depend on the current issue being fixed first.
In 17614: