1. Describe the feature
Add a single check to the LanguagePatcher.InsertCustomLines method so when registering the Nautilus localization and overriding a string for a key, we check whether there is such a key in the vanilla dictionary and we only refer to fallback if it's not.
// In LanguagePatcher.InsertCustomLines
foreach (KeyValuePair<string, string> fallbackString in fallbackStrings)
{
if (currentStrings.TryGetValue(fallbackString.Key, out string currentValue))
{
strings[fallbackString.Key] = currentValue;
}
else if (!strings.ContainsKey(fallbackString.Key)) // <--- HERE
{
strings[fallbackString.Key] = fallbackString.Value;
}
}
2. Purpose
When registering localization, Nautilus can override a vanilla (already existing) key. This is useful, but using it breaks this key for all languages except those for which it was added via Nautilus localization -> all lines refer to English Fallback.
Example:
We add files or localization lines via code
//English.json
{
// New tooltip for metal salvage
"Tooltip_ScrapMetal": "Salvage from the Aurora, used in Salvage Analyzer."
}
//French.json
{
// New tooltip for metal salvage
"Tooltip_ScrapMetal": "Récupération d'Aurora, utilisée dans l'analyseur de récupération."
}
-> causes "Tooltip_ScrapMetal" key to be in English in all languages except French.
If the mod isn't planned to be translated into literally all languages, but supports only a few, it is much more reasonable to leave the vanilla lines so as not to spoil the impression and feeling of the game, because the English line on the vanilla item looks like an issue.
I suggest and strongly request that to be added. I really believe this should not happen, because it brings nothing good to localization if you are not planning to translate your mod into literally every supported language.
1. Describe the feature
Add a single check to the
LanguagePatcher.InsertCustomLinesmethod so when registering the Nautilus localization and overriding a string for a key, we check whether there is such a key in the vanilla dictionary and we only refer to fallback if it's not.2. Purpose
When registering localization, Nautilus can override a vanilla (already existing) key. This is useful, but using it breaks this key for all languages except those for which it was added via Nautilus localization -> all lines refer to English Fallback.
Example:
We add files or localization lines via code
-> causes
"Tooltip_ScrapMetal"key to be in English in all languages except French.If the mod isn't planned to be translated into literally all languages, but supports only a few, it is much more reasonable to leave the vanilla lines so as not to spoil the impression and feeling of the game, because the English line on the vanilla item looks like an issue.
I suggest and strongly request that to be added. I really believe this should not happen, because it brings nothing good to localization if you are not planning to translate your mod into literally every supported language.