diff --git a/src/Localization/Game.es.resx b/src/Localization/Game.es.resx index 851f903a0f..9dd191d917 100644 --- a/src/Localization/Game.es.resx +++ b/src/Localization/Game.es.resx @@ -664,11 +664,11 @@ legacy_id=167 - ESP + ENE legacy_id=168 - STA + VIT legacy_id=169 @@ -2129,11 +2129,11 @@ legacy_id=575 - Aumenta el daño de %d%% of + Aumenta el daño un %d%% legacy_id=577 - Absorber daño %d%% of + Absorbe el %d%% del daño legacy_id=578 diff --git a/src/Localization/Game.id.resx b/src/Localization/Game.id.resx index c1ca3aa1ae..60fa441030 100644 --- a/src/Localization/Game.id.resx +++ b/src/Localization/Game.id.resx @@ -664,7 +664,7 @@ legacy_id=167 - Bahasa Inggris + ENG legacy_id=168 @@ -2129,11 +2129,11 @@ legacy_id=575 - Meningkatkan Kerusakan %d%% of + Meningkatkan Kerusakan %d%% legacy_id=577 - Menyerap Kerusakan %d%% of + Menyerap %d%% Kerusakan legacy_id=578 @@ -6357,7 +6357,7 @@ legacy_id=1737 - Memerintah + Kepemimpinan legacy_id=1738,1900 diff --git a/src/Localization/Game.ja.resx b/src/Localization/Game.ja.resx index d96b87b299..184ac42af8 100644 --- a/src/Localization/Game.ja.resx +++ b/src/Localization/Game.ja.resx @@ -5200,7 +5200,7 @@ legacy_id=1462 - 攻撃力+25上昇效果 + 攻撃力+25上昇効果 legacy_id=1463 @@ -6424,7 +6424,7 @@ legacy_id=1786 - 強化段階別效果上昇 + 強化段階別効果上昇 legacy_id=1787 @@ -6596,7 +6596,7 @@ legacy_id=1839 - +效果制限 + +効果制限 legacy_id=1840 diff --git a/src/Localization/Game.pt.resx b/src/Localization/Game.pt.resx index f3208fcff3..d3e2938463 100644 --- a/src/Localization/Game.pt.resx +++ b/src/Localization/Game.pt.resx @@ -664,11 +664,11 @@ legacy_id=167 - POR + ENE legacy_id=168 - STA + VIT legacy_id=169 @@ -2129,11 +2129,11 @@ legacy_id=575 - Aumentar o dano de %d%% of + Aumenta o dano em %d%% legacy_id=577 - Absorver Dano %d%% of + Absorve %d%% do dano legacy_id=578 diff --git a/src/Localization/Game.ru.resx b/src/Localization/Game.ru.resx index 8ce1359596..98051ead54 100644 --- a/src/Localization/Game.ru.resx +++ b/src/Localization/Game.ru.resx @@ -656,19 +656,19 @@ legacy_id=165 - СТР + СИЛ legacy_id=166 - ОИИ + ЛВК legacy_id=167 - АНГЛ + ЭНЕ legacy_id=168 - СТА + ВЫН legacy_id=169 @@ -2129,11 +2129,11 @@ legacy_id=575 - Увеличение урона %d%% of + Увеличение урона на %d%% legacy_id=577 - Поглощение %d%% of урона + Поглощение %d%% урона legacy_id=578 @@ -6357,7 +6357,7 @@ legacy_id=1737 - Команда + Командование legacy_id=1738,1900 diff --git a/src/Localization/Game.tl.resx b/src/Localization/Game.tl.resx index 94c822c08c..21c1fbfb8a 100644 --- a/src/Localization/Game.tl.resx +++ b/src/Localization/Game.tl.resx @@ -2129,11 +2129,11 @@ legacy_id=575 - Dagdagan ang %d%% of Pinsala + Dagdagan ang Pinsala nang %d%% legacy_id=577 - Isipsip ang %d%% of Pinsala + Isipsip ang %d%% ng Pinsala legacy_id=578 @@ -6357,7 +6357,7 @@ legacy_id=1737 - Utos + Pamumuno legacy_id=1738,1900 diff --git a/src/Localization/Game.uk.resx b/src/Localization/Game.uk.resx index 0a68309bc4..36c4b90d1a 100644 --- a/src/Localization/Game.uk.resx +++ b/src/Localization/Game.uk.resx @@ -656,19 +656,19 @@ legacy_id=165 - ВУЛ + СИЛ legacy_id=166 - AGI + СПР legacy_id=167 - ENG + ЕНЕ legacy_id=168 - STA + ВИТ legacy_id=169 @@ -2129,11 +2129,11 @@ legacy_id=575 - Збільшення шкоди на %d%% of + Збільшення шкоди на %d%% legacy_id=577 - Поглинання шкоди %d%% of + Поглинання %d%% шкоди legacy_id=578 @@ -6357,7 +6357,7 @@ legacy_id=1737 - Команда + Командування legacy_id=1738,1900 diff --git a/src/Localization/Game.zh-TW.resx b/src/Localization/Game.zh-TW.resx index 411ee7f9da..33f9f0ad5c 100644 --- a/src/Localization/Game.zh-TW.resx +++ b/src/Localization/Game.zh-TW.resx @@ -656,19 +656,19 @@ legacy_id=165 - STR + 力量 legacy_id=166 - 通用人工智慧 + 敏捷 legacy_id=167 - 英語 + 能量 legacy_id=168 - 史塔 + 體力 legacy_id=169 @@ -2129,11 +2129,11 @@ legacy_id=575 - 增加 %d%% of 傷害 + 增加 %d%% 傷害 legacy_id=577 - 吸收%d%% of傷害 + 吸收%d%%傷害 legacy_id=578 @@ -6225,7 +6225,7 @@ legacy_id=1703 - 活力 + 能量 legacy_id=1704 @@ -6357,7 +6357,7 @@ legacy_id=1737 - 命令 + 統率 legacy_id=1738,1900 diff --git a/src/bin/Data/Items/Group13_Helper.json b/src/bin/Data/Items/Group13_Helper.json index 1935b832cd..df7acd2462 100644 --- a/src/bin/Data/Items/Group13_Helper.json +++ b/src/bin/Data/Items/Group13_Helper.json @@ -16,15 +16,15 @@ "text": { "en": "Absorb 20% of Damage", "de": "Absorbiert 20% des Schadens", - "es": "Absorber daño 20% of", - "id": "Menyerap Kerusakan 20% of", + "es": "Absorbe el 20% del daño", + "id": "Menyerap 20% Kerusakan", "ja": "ダメージ 20%吸収", "pl": "Pochłania 20% obrażeń", - "pt": "Absorver Dano 20% of", - "ru": "Поглощение 20% of урона", - "tl": "Isipsip ang 20% of Pinsala", - "uk": "Поглинання шкоди 20% of", - "zh-TW": "吸收20% of傷害" + "pt": "Absorve 20% do dano", + "ru": "Поглощение 20% урона", + "tl": "Isipsip ang 20% ng Pinsala", + "uk": "Поглинання 20% шкоди", + "zh-TW": "吸收20%傷害" } }, { @@ -81,15 +81,15 @@ "text": { "en": "Increase 30% of attacking & Wizardry Dmg", "de": "Erhöht Angriffs- und Zaubereischaden um 30%", - "es": "Aumenta 30% of ataque y daño de hechicería", - "id": "Meningkatkan 30% of serangan & Dmg Sihir", + "es": "Aumenta un 30% el ataque y el daño de hechicería", + "id": "Meningkatkan serangan & Dmg Sihir 30%", "ja": "攻撃力、力 30%増加", "pl": "Zwiększa obrażenia fizyczne i magiczne o 30%", "pt": "Aumenta em 30% o dano de ataque e magia", - "ru": "Увеличение на 30% of урона от атак и волшебства.", - "tl": "Dagdagan ang 30% of pag-atake at Wizardry Dmg", - "uk": "Збільште на 30% of шкоду від атаки та магії", - "zh-TW": "攻擊力和魔法傷害增加30% of" + "ru": "Увеличение урона от атак и волшебства на 30%.", + "tl": "Dagdagan ang pag-atake at Wizardry Dmg nang 30%", + "uk": "Збільшує шкоду від атаки та магії на 30%", + "zh-TW": "攻擊力和魔法傷害增加30%" } }, { @@ -166,30 +166,30 @@ "text": { "en": "Increase 15% of Damage", "de": "Erhöht den Schaden um 15%", - "es": "Aumenta el daño de 15% of", - "id": "Meningkatkan Kerusakan 15% of", + "es": "Aumenta el daño un 15%", + "id": "Meningkatkan Kerusakan 15%", "ja": "ダメージ 15%増加", "pl": "Zwiększa obrażenia o 15%", - "pt": "Aumentar o dano de 15% of", - "ru": "Увеличение урона 15% of", - "tl": "Dagdagan ang 15% of Pinsala", - "uk": "Збільшення шкоди на 15% of", - "zh-TW": "增加 15% of 傷害" + "pt": "Aumenta o dano em 15%", + "ru": "Увеличение урона на 15%", + "tl": "Dagdagan ang Pinsala nang 15%", + "uk": "Збільшення шкоди на 15%", + "zh-TW": "增加 15% 傷害" } }, { "text": { "en": "Absorb 10% of Damage", "de": "Absorbiert 10% des Schadens", - "es": "Absorber daño 10% of", - "id": "Menyerap Kerusakan 10% of", + "es": "Absorbe el 10% del daño", + "id": "Menyerap 10% Kerusakan", "ja": "ダメージ 10%吸収", "pl": "Pochłania 10% obrażeń", - "pt": "Absorver Dano 10% of", - "ru": "Поглощение 10% of урона", - "tl": "Isipsip ang 10% of Pinsala", - "uk": "Поглинання шкоди 10% of", - "zh-TW": "吸收10% of傷害" + "pt": "Absorve 10% do dano", + "ru": "Поглощение 10% урона", + "tl": "Isipsip ang 10% ng Pinsala", + "uk": "Поглинання 10% шкоди", + "zh-TW": "吸收10%傷害" } }, { @@ -702,28 +702,28 @@ { "en": "ENG", "de": "ENG", - "es": "ESP", - "id": "Bahasa Inggris", + "es": "ENE", + "id": "ENG", "ja": "エナジー", "pl": "ENG", - "pt": "POR", - "ru": "АНГЛ", + "pt": "ENE", + "ru": "ЭНЕ", "tl": "ENG", - "uk": "ENG", - "zh-TW": "英語" + "uk": "ЕНЕ", + "zh-TW": "能量" }, { "en": "STA", "de": "VIT", - "es": "STA", + "es": "VIT", "id": "STA", "ja": "体力", "pl": "STA", - "pt": "STA", - "ru": "СТА", + "pt": "VIT", + "ru": "ВЫН", "tl": "STA", - "uk": "STA", - "zh-TW": "史塔" + "uk": "ВИТ", + "zh-TW": "體力" }, { "en": "AGI", @@ -733,10 +733,10 @@ "ja": "敏捷性", "pl": "AGI", "pt": "AGI", - "ru": "ОИИ", + "ru": "ЛВК", "tl": "AGI", - "uk": "AGI", - "zh-TW": "通用人工智慧" + "uk": "СПР", + "zh-TW": "敏捷" }, { "en": "STR", @@ -746,23 +746,23 @@ "ja": "力", "pl": "STR", "pt": "FOR", - "ru": "СТР", + "ru": "СИЛ", "tl": "STR", - "uk": "ВУЛ", - "zh-TW": "STR" + "uk": "СИЛ", + "zh-TW": "力量" }, { "en": "Command", "de": "Führung", "es": "Dominio", - "id": "Memerintah", + "id": "Kepemimpinan", "ja": "統率", "pl": "Dowodzenie", "pt": "Comando", - "ru": "Команда", - "tl": "Utos", - "uk": "Команда", - "zh-TW": "命令" + "ru": "Командование", + "tl": "Pamumuno", + "uk": "Командування", + "zh-TW": "統率" } ] }, diff --git a/src/bin/Data/Items/Group14_Potion.json b/src/bin/Data/Items/Group14_Potion.json index 001a6e5abd..e9a513255a 100644 --- a/src/bin/Data/Items/Group14_Potion.json +++ b/src/bin/Data/Items/Group14_Potion.json @@ -169,15 +169,15 @@ "text": { "en": "Damage +20% increase effect", "de": "Effekt: Schaden +20%", - "es": "Daño +20% iefecto de aumento", - "id": "Kerusakan +20% imeningkatkan efek", - "ja": "攻撃力+20%上昇效果", + "es": "Daño +20% efecto de aumento", + "id": "Kerusakan +20% meningkatkan efek", + "ja": "攻撃力+20%上昇効果", "pl": "Efekt zwiększenia obrażeń o 20%", - "pt": "Dano +20% infeito de aumento", - "ru": "Урон +20% inувеличение эффекта", - "tl": "Pinsala +20% ipagtaas na epekto", - "uk": "Пошкодження +20% inпосилення ефекту", - "zh-TW": "傷害+20% i效果增加" + "pt": "Dano +20% efeito de aumento", + "ru": "Урон +20% увеличение эффекта", + "tl": "Pinsala +20% pagtaas na epekto", + "uk": "Пошкодження +20% посилення ефекту", + "zh-TW": "傷害+20% 效果增加" }, "color": "darkRed", "levels": [0, 0] diff --git a/src/bin/Data/Items/Tooltips/Tooltip.json b/src/bin/Data/Items/Tooltips/Tooltip.json index b76a50670f..a1add13998 100644 --- a/src/bin/Data/Items/Tooltips/Tooltip.json +++ b/src/bin/Data/Items/Tooltips/Tooltip.json @@ -381,28 +381,28 @@ "damageIncrease": { "en": "Increase {percent}% of Damage", "de": "Erhöht den Schaden um {percent}%", - "es": "Aumenta el daño de {percent}% of", - "id": "Meningkatkan Kerusakan {percent}% of", + "es": "Aumenta el daño un {percent}%", + "id": "Meningkatkan Kerusakan {percent}%", "ja": "ダメージ {percent}%増加", "pl": "Zwiększa obrażenia o {percent}%", - "pt": "Aumentar o dano de {percent}% of", - "ru": "Увеличение урона {percent}% of", - "tl": "Dagdagan ang {percent}% of Pinsala", - "uk": "Збільшення шкоди на {percent}% of", - "zh-TW": "增加 {percent}% of 傷害" + "pt": "Aumenta o dano em {percent}%", + "ru": "Увеличение урона на {percent}%", + "tl": "Dagdagan ang Pinsala nang {percent}%", + "uk": "Збільшення шкоди на {percent}%", + "zh-TW": "增加 {percent}% 傷害" }, "damageAbsorb": { "en": "Absorb {percent}% of Damage", "de": "Absorbiert {percent}% des Schadens", - "es": "Absorber daño {percent}% of", - "id": "Menyerap Kerusakan {percent}% of", + "es": "Absorbe el {percent}% del daño", + "id": "Menyerap {percent}% Kerusakan", "ja": "ダメージ {percent}%吸収", "pl": "Pochłania {percent}% obrażeń", - "pt": "Absorver Dano {percent}% of", - "ru": "Поглощение {percent}% of урона", - "tl": "Isipsip ang {percent}% of Pinsala", - "uk": "Поглинання шкоди {percent}% of", - "zh-TW": "吸收{percent}% of傷害" + "pt": "Absorve {percent}% do dano", + "ru": "Поглощение {percent}% урона", + "tl": "Isipsip ang {percent}% ng Pinsala", + "uk": "Поглинання {percent}% шкоди", + "zh-TW": "吸收{percent}%傷害" }, "increaseSpeed": { "en": "Increase speed", diff --git a/tests/data/test_item_database_files.cpp b/tests/data/test_item_database_files.cpp index a85c27fa38..462fa9372d 100644 --- a/tests/data/test_item_database_files.cpp +++ b/tests/data/test_item_database_files.cpp @@ -963,6 +963,80 @@ TEST_CASE("The tooltip texts by item level are the game's texts in every languag CHECK(compared == (2 + 2 + 4 * 3 + 4) * static_cast(std::size(I18N::GetAvailableLocales()))); } +// The damage texts without the English "of" and the Fruits' stat words, as #828 fixed them: rendered with 12 in each +// language they had wrong, and no translation of the two texts keeps "% of". +TEST_CASE("The damage texts and the Fruits' stat words read right in every language [data][items]") +{ + ClientDataScope client(ShippedClientDirectory); + std::string errorMessage; + REQUIRE(g_ItemDataHandler.Load(errorMessage)); + const Data::Items::ItemTooltipFile& tooltips = g_ItemDatabase.GetTooltipFile(); + const Data::LocalizedString* increase = tooltips.FindText("damageIncrease"); + const Data::LocalizedString* absorb = tooltips.FindText("damageAbsorb"); + REQUIRE(increase != nullptr); + REQUIRE(absorb != nullptr); + const auto twelve = [](std::string_view text) + { return Data::Items::FillPlaceholders(text, [](std::string_view) { return std::optional("12"); }); }; + + struct Damage + { + const char* locale; + const char* increase; + const char* absorb; + }; + const Damage damages[] = { + {"es", "Aumenta el da\u00f1o un 12%", "Absorbe el 12% del da\u00f1o"}, + {"pt", "Aumenta o dano em 12%", "Absorve 12% do dano"}, + {"ru", "\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0443\u0440\u043e\u043d\u0430 \u043d\u0430 12%", "\u041f\u043e\u0433\u043b\u043e\u0449\u0435\u043d\u0438\u0435 12% \u0443\u0440\u043e\u043d\u0430"}, + {"uk", "\u0417\u0431\u0456\u043b\u044c\u0448\u0435\u043d\u043d\u044f \u0448\u043a\u043e\u0434\u0438 \u043d\u0430 12%", "\u041f\u043e\u0433\u043b\u0438\u043d\u0430\u043d\u043d\u044f 12% \u0448\u043a\u043e\u0434\u0438"}, + {"id", "Meningkatkan Kerusakan 12%", "Menyerap 12% Kerusakan"}, + {"tl", "Dagdagan ang Pinsala nang 12%", "Isipsip ang 12% ng Pinsala"}, + {"zh-TW", "\u589e\u52a0 12% \u50b7\u5bb3", "\u5438\u653612%\u50b7\u5bb3"}, + }; + for (const Damage& damage : damages) + { + INFO(damage.locale); + CHECK(twelve(increase->Get(damage.locale)) == damage.increase); + CHECK(twelve(absorb->Get(damage.locale)) == damage.absorb); + } + for (const Data::LocalizedString* text : {increase, absorb}) + { + for (const auto& [locale, translation] : text->GetTranslations()) + { + INFO(locale); + CHECK(translation.find("% of") == std::string::npos); + } + } + + // The Command Fruit's {stat} at +0 to +4: ENG, STA, AGI, STR and Command. + const Data::Items::ItemDefinition* fruit = g_ItemDatabase.Find(13 * MAX_ITEM_INDEX + 15); + REQUIRE(fruit != nullptr); + REQUIRE(fruit->levelValues.size() == 1); + const std::vector& words = fruit->levelValues.front().values; + REQUIRE(words.size() == 5); + struct Stats + { + const char* locale; + std::array words; + }; + const Stats stats[] = { + {"es", {"ENE", "VIT", "AGI", "FUE", "Dominio"}}, + {"pt", {"ENE", "VIT", "AGI", "FOR", "Comando"}}, + {"ru", {"\u042d\u041d\u0415", "\u0412\u042b\u041d", "\u041b\u0412\u041a", "\u0421\u0418\u041b", "\u041a\u043e\u043c\u0430\u043d\u0434\u043e\u0432\u0430\u043d\u0438\u0435"}}, + {"uk", {"\u0415\u041d\u0415", "\u0412\u0418\u0422", "\u0421\u041f\u0420", "\u0421\u0418\u041b", "\u041a\u043e\u043c\u0430\u043d\u0434\u0443\u0432\u0430\u043d\u043d\u044f"}}, + {"zh-TW", {"\u80fd\u91cf", "\u9ad4\u529b", "\u654f\u6377", "\u529b\u91cf", "\u7d71\u7387"}}, + {"id", {"ENG", "STA", "AGI", "STR", "Kepemimpinan"}}, + }; + for (const Stats& stat : stats) + { + for (size_t level = 0; level < words.size(); ++level) + { + INFO(stat.locale << " +" << level); + CHECK(words[level].text.Get(stat.locale) == stat.words[level]); + } + } +} + // The texts the tooltip code wrote for these items are their descriptions now, in every UI language. TEST_CASE("The original items' tooltip texts are in their descriptions [data][items]") {