New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabled UI localisation for the Red Alert mod #8675
Conversation
My main complaint from the last two versions of this PR still hasn't applies: We are getting way ahead of ourselves by replacing the yaml strings without having any mechanism in place for the giant bundle of hardcoded UI strings. I'm still against against doing this until we at least have a mechanism to translate those. |
Please lets have at least two PRs finishing our translation support before we run the chrome extraction command:
This chrome string translation is automated, so can be done at any time. By doing it now, before the translation support is ready, you are just forcing additional overheads on everyone who touches the yaml files and we won't even have proper translations to justify that extra work. |
@@ -1,2 +1,450 @@ | |||
english: | |||
english: English | |||
|
|||
# mods/ra/chrome/install.yaml: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these will need to live in Mods.Common.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, install.yaml
is very mod specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also it seems language files don't merge so this is not possible yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am referring to the whole file, not specifically the install strings.
I added translation support for most of the internal widget logic strings now. |
This falls under point 1, and will need to be fixed before we do the extraction. Otherwise you are forcing more trouble and manual work down the road. |
@@ -86,8 +86,8 @@ public static SoundDevice[] AvailableDevices() | |||
{ | |||
var defaultDevices = new[] | |||
{ | |||
new SoundDevice("AL", null, "Default Output"), | |||
new SoundDevice("Null", null, "Output Disabled") | |||
new SoundDevice("AL", null, FieldLoader.Translate("SOUND-DEFAULT")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in IRC before you did any of these changes - FieldLoader has nothing conceptually to do with translations (except that it uses them), so it is not an appropriate class to do the translations. This should be done via ModData instead.
We're also going to need to think about how we deal with map-provided translations (for scripting via Lua, and maybe also map names?), as that will impact the design of our ModData Translate functions. |
To get started on this. Using the automation from #5152. Also reverts a99d7fe.