Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Localizer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,21 @@ private static void LocalizeTexts(string localizationFile, IEnumerable<string> f

Console.WriteLine($"Localizing {texts.Count} texts in {filesToLocalize.Count} files..");
var resUsedTexts = 0;
for (var textIndex = 1; textIndex < texts.Count; textIndex++)
for (var textIndex = 0; textIndex < texts.Count; textIndex++)
{
if (textIndex % 100 == 0)
{
Console.WriteLine($"Localized {textIndex}/{texts.Count} texts..");
Console.WriteLine($"Localized {textIndex + 1}/{texts.Count} texts..");
}

var text = texts[textIndex - 1];
var text = texts[textIndex];
var textToLocalize = $"{{=!}}{text}";
(string ID, string Text) localizedText;

if (_existingLocalizations.ContainsValue(text))
{
var localizationID = _existingLocalizations.FirstOrDefault(el => el.Value == text).Key;
localizedText = (localizationID, text.Replace("{=!}", $"{{={localizationID}}}"));
localizedText = (localizationID, textToLocalize.Replace("{=!}", $"{{={localizationID}}}"));

resUsedTexts++;
}
Expand Down