Skip to content

BaseJsonTextsGenerator.UpdateOutOfDateTranslations method

Keeps the list of the translations that are out of date, as the text of their key changed after they were made, in a file next to the texts of the project, which is ignored at runtime like the template. A translation is kept in the language files as it is, as an old one is still better than the one of the template, and it is listed with the text it was made for until someone changes it. An entry is removed when the translation is changed or emptied, the text is back to the old one, or the key is gone, and the file is removed when nothing is left.

public static int UpdateOutOfDateTranslations(string stalePath, 
    SortedDictionary<string, string> baseTexts, Dictionary<string, string> oldTexts, 
    Dictionary<string, SortedDictionary<string, string?>> translations)
parameter description
stalePath The path of the file.
baseTexts The current texts of the template.
oldTexts The texts of the template of the previous run.
translations The translations after the update, by language.

Return Value

The number of translations that are out of date.

See Also