Game localization string hard-coded into UI LUA code

mnf

King
Joined
Jan 31, 2006
Messages
659
UI\ToolTips\PlotToolTip.lua, line 312

resourceString = resourceString .. "[COLOR:Civ6Red] ( " .. Locale.Lookup("LOC_TOOLTIP_REQUIRES") .. " " .. Locale.Lookup(techType.Name) .. ")[ENDCOLOR]";

The hard-coded space is giving me trouble in maintaining pleasing aesthetics in the translation.

As a general rule, never hard-code spaces into any string. While the "western" cultures take spaces for granted, you should know that there are languages that don't use spaces. Chinese being a good example. So in this case, instead of seeing "需要灌溉" on my tooltip for "Requires Irrigation", I'm seeing "需要 灌溉", which is an eye-sore in a language that simply don't use spaces between words.

The reason why I'm translating Traditional Chinese again, is that the official translation itself can be considered a huge bug. There are inconsistencies in the translation that confuse players, things that don't conform to custom usage making them hard to understand (sometimes completely losing its meaning), sentences that are unnatural making it difficult to enjoy the game.

China would have everyone believe that Chinese is all the same, just two different scripts. No. There are distinct and wildly varying vocabulary and custom usages that make Traditional and Simplified Chinese instantly recognizable by native speakers even if you write the one in the script of the other.

Note that I'm now talking about the Civilopedia. I'm talking about in-game strings that we see every minute of our time playing this game, which are arguably much more important than the Civilopedia.

But I'm not complaining. I welcome that fact that this is the first time the game is releasing with proper internationalization support. I'm extremely happy about it. And that is the whole reason I'm re-doing the translation myself.

So please make sure your UI designers know that spaces are not a given. Your system already supports placeables (aka placeholders) like {1_TechOrCivicName}. There should be a string:

LOC_TOOLTIP_TECHORCIVICREQUIRED
"[COLOR:Civ6Red](Requires {1_TechOrCivicName})[ENDCOLOR]"
"[COLOR:Civ6Red](需要{1_TechOrCivicName})[ENDCOLOR]"

Note how the Chinese translation doesn't have a space. Note also how by hard-coding the space, you now show "( Requires Irrigation)" in your tooltip for the English version as well. And also note how the Chinese brackets are different; they are double-byte. You harm the quality of your translations by doing this.

The spaces and punctuations are all part of a language, and that needs to be "translated" too!

---

On an unrelated note, while the i18n system is fine as a first step, it would be even better if you maintained your string file structure in the localization as well. Having a huge hodgepodge of strings in no seemingly meaningful order all stuffed into one big XML is making localization much more difficult than it needs to be. It's the equivalent of seeing spaghetti code for programmers.
 
Back
Top Bottom