Skip to content

Free, open-source Windows optimization tool for performance, privacy, and simplicity.

i18n: audit localization quality, fix es/pt/vi defects, add placeholder-integrity test

fatDuck09ca4f5f1d62
diff --git a/optimizerDuck.Test/Services/Configuration/LanguageManagerTests.cs b/optimizerDuck.Test/Services/Configuration/LanguageManagerTests.cs
index d559597..e1a2d1a 100644
--- a/optimizerDuck.Test/Services/Configuration/LanguageManagerTests.cs
+++ b/optimizerDuck.Test/Services/Configuration/LanguageManagerTests.cs
@@ -212,4 +212,44 @@ public class LanguageManagerTests : IDisposable
Assert.True(missing.Count == 0, "Missing translations:\n" + string.Join("\n", missing));
}
+
+ [Fact]
+ public void EveryLocale_PreservesNeutralPlaceholderSets()
+ {
+ var neutral = Translations
+ .ResourceManager.GetResourceSet(CultureInfo.InvariantCulture, true, false)!
+ .Cast<DictionaryEntry>()
+ .ToDictionary(e => (string)e.Key, e => (string?)e.Value);
+ var indexPattern = new System.Text.RegularExpressions.Regex(@"\{(\d+)\}");
+ var bad = new List<string>();
+ foreach (var lang in SupportedLanguages.All)
+ {
+ var satellite =
+ Translations
+ .ResourceManager.GetResourceSet(lang.Culture, true, false)
+ ?.Cast<DictionaryEntry>()
+ .ToDictionary(e => (string)e.Key, e => (string?)e.Value)
+ ?? new Dictionary<string, string?>();
+ foreach (var (key, neutralValue) in neutral)
+ {
+ var expected = indexPattern
+ .Matches(neutralValue ?? string.Empty)
+ .Select(m => m.Groups[1].Value)
+ .OrderBy(i => i)
+ .ToList();
+ if (expected.Count == 0)
+ continue;
+ if (!satellite.TryGetValue(key, out var localizedValue))
+ continue;
+ var actual = indexPattern
+ .Matches(localizedValue ?? string.Empty)
+ .Select(m => m.Groups[1].Value)
+ .OrderBy(i => i)
+ .ToList();
+ if (!expected.SequenceEqual(actual))
+ bad.Add($"{lang.Culture.Name}:{key}");
+ }
+ }
+ Assert.True(bad.Count == 0, "Placeholder mismatches:\n" + string.Join("\n", bad));
+ }
}
diff --git a/optimizerDuck/Resources/Languages/Translations.es-ES.resx b/optimizerDuck/Resources/Languages/Translations.es-ES.resx
index 04723e1..395110d 100644
--- a/optimizerDuck/Resources/Languages/Translations.es-ES.resx
+++ b/optimizerDuck/Resources/Languages/Translations.es-ES.resx
@@ -573,13 +573,13 @@
<data name="Revert.Error.StepFailed" xml:space="preserve">
- <value>El paso de reversión fallo</value>
+ <value>El paso de reversión falló</value>
</data>
<data name="Revert.UsbPower.Description" xml:space="preserve">
- <value>Restaurar estados de energia de suspención selectiva de USB </value>
+ <value>Restaurar estados de energia de suspención selectiva de USB</value>
</data>
@@ -587,7 +587,7 @@
<data name="Optimization.Apply.Processing" xml:space="preserve">
- <value>Aplicando canbios...</value>
+ <value>Aplicando cambios...</value>
</data>
@@ -720,7 +720,7 @@
<data name="Settings.Advanced.ClearRevertDatas.Title" xml:space="preserve">
- <value>Limpiar todos los datos revertidos </value>
+ <value>Limpiar todos los datos revertidos</value>
</data>
@@ -1831,7 +1831,7 @@ Esto garantiza que siempre puedas volver atrás si algo sale mal.</value>
<data name="RestorePoint.Snackbar.Error.Title" xml:space="preserve">
- <value>No se pudo crear o activar Restaurar Sistema</value>
+ <value>No se pudo crear o activar Restaurar Sistema.</value>
</data>
diff --git a/optimizerDuck/Resources/Languages/Translations.pt-BR.resx b/optimizerDuck/Resources/Languages/Translations.pt-BR.resx
index f6f7383..31a075e 100644
--- a/optimizerDuck/Resources/Languages/Translations.pt-BR.resx
+++ b/optimizerDuck/Resources/Languages/Translations.pt-BR.resx
@@ -645,7 +645,7 @@
<value>Desativar Controle de Clock de Vídeo AMD</value>
</data>
<data name="Optimizer.Gpu.AmdDisableVideoClockGating.ShortDescription" xml:space="preserve">
- <value>Define DisableVCEPowerGating=1, DisableVceClockGating=1, EnableUvdClockGating=0 para a AMD</value>
+ <value>Define DisableVCEPowerGating=1, DisableVceClockGating=1, EnableUvdClockGating=0 para os mecanismos de vídeo AMD (VCE/UVD) para melhorar a estabilidade de codificação/decodificação. Aumenta o consumo de energia na reprodução de vídeo.</value>
</data>
<data name="Optimizer.Gpu.AmdDisableAspm.Name" xml:space="preserve">
<value>Desativar AMD ASPM</value>
@@ -694,7 +694,7 @@
<value>Mostra ou oculta o botão Widgets na barra de tarefas. Os Widgets dão acesso rápido a notícias, clima e atualizações.</value>
</data>
<data name="Customize.Preferences.TaskbarWidgets.Recommendation.Reason" xml:space="preserve">
- <value>Turning off widgets removes the background web service that fetches news and weather, reducing idle network and memory usage.</value>
+ <value>Desativar os widgets remove o serviço Web em segundo plano que busca notícias e previsão do tempo, reduzindo o uso de rede e memória em inatividade.</value>
</data>
<data name="Customize.Preferences.TaskbarAlignment.Name" xml:space="preserve">
<value>Alinhamento da Barra de Tarefas</value>
diff --git a/optimizerDuck/Resources/Languages/Translations.vi-VN.resx b/optimizerDuck/Resources/Languages/Translations.vi-VN.resx
index bc6b3a1..774e14f 100644
--- a/optimizerDuck/Resources/Languages/Translations.vi-VN.resx
+++ b/optimizerDuck/Resources/Languages/Translations.vi-VN.resx
@@ -1390,7 +1390,7 @@ Cập nhật ngay để trải nghiệm các tính năng mới, cải tiến và
<value>Hành vi lối tắt</value>
</data>
<data name="Customize.Desktop.ShowThisPc.Name" xml:space="preserve">
- <value>"This PC"</value>
+ <value>This PC</value>
</data>
<data name="Customize.Desktop.ShowThisPc.Description" xml:space="preserve">
<value>Hiển thị hoặc ẩn biểu tượng This PC trên màn hình nền.</value>