(32ba1d322) When editing an item label or a room name, the text is colored gray/green according to whether the text can be translated (= if a matching text tag is found in the language files). There's also now a "text picker menu" that can be used to pick the text from a list of translatable texts. TODO: use this in ItemComponent.Msg and CustomInterface button/tickbox labels.

This commit is contained in:
Joonas Rikkonen
2019-04-15 12:07:27 +03:00
parent 40ef1c018d
commit ed38e60d13
6 changed files with 143 additions and 10 deletions
@@ -62,6 +62,20 @@ namespace Barotrauma
return textList;
}
public List<KeyValuePair<string, string>> GetAllTagTextPairs()
{
var pairs = new List<KeyValuePair<string, string>>();
foreach (KeyValuePair<string, List<string>> kvp in texts)
{
foreach (string line in kvp.Value)
{
pairs.Add(new KeyValuePair<string, string>(kvp.Key, line));
}
}
return pairs;
}
#if DEBUG
public void CheckForDuplicates(int index)
{