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 elexis)

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 leper, 8 years ago

In 17614:

Translate some notification messages. Refs #3665.

comment:2 by leper, 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:3 by elexis, 8 years ago

In 17796:

Translate some untranslated strings, refs #3665.
Add a chat message if the control-all units cheat was used, refs #2676.

in reply to:  2 comment:4 by elexis, 8 years ago

For pluralforms, translateObjectKeys will need plural-translation support :-/

comment:5 by elexis, 8 years ago

Component: UI & SimulationI18n & L10n

comment:6 by elexis, 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).

Note: See TracTickets for help on using tickets.