From 6fc5a803715a911765870af8fde886523cf82a10 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 12 Dec 2024 19:39:43 -0600 Subject: [PATCH] stringtable: rapify (#842) --- Cargo.lock | 1 + bin/src/modules/stringtables/mod.rs | 8 +- libs/stringtable/Cargo.toml | 1 + libs/stringtable/src/key.rs | 16 + libs/stringtable/src/lib.rs | 30 ++ libs/stringtable/src/rapify.rs | 202 ++++++++++ .../tests/snapshots/ace_arsenal__sort-2.snap | 230 +++++++++++ .../tests/snapshots/ace_arsenal__sort.snap | 230 +++++++++++ .../tests/snapshots/comments__sort-2.snap | 4 + .../tests/snapshots/comments__sort.snap | 4 + .../tests/snapshots/gh822__sort.snap | 8 + .../tests/snapshots/testbin__testbin1.snap | 380 ++++++++++++++++++ libs/stringtable/tests/testbin.rs | 28 ++ libs/stringtable/tests/testbin1.xml | 12 + libs/stringtable/tests/testbin2.xml | 11 + 15 files changed, 1163 insertions(+), 2 deletions(-) create mode 100644 libs/stringtable/src/rapify.rs create mode 100644 libs/stringtable/tests/snapshots/testbin__testbin1.snap create mode 100644 libs/stringtable/tests/testbin.rs create mode 100644 libs/stringtable/tests/testbin1.xml create mode 100644 libs/stringtable/tests/testbin2.xml diff --git a/Cargo.lock b/Cargo.lock index 7f848668..360c8945 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1714,6 +1714,7 @@ dependencies = [ "serde", "toml 0.8.19", "tracing", + "vfs", ] [[package]] diff --git a/bin/src/modules/stringtables/mod.rs b/bin/src/modules/stringtables/mod.rs index 6069eaf2..26e24185 100644 --- a/bin/src/modules/stringtables/mod.rs +++ b/bin/src/modules/stringtables/mod.rs @@ -2,6 +2,7 @@ use std::{io::BufReader, sync::Arc}; use hemtt_stringtable::{ analyze::{lint_all, lint_check, lint_one}, + rapify::convert_stringtable, Project, }; use hemtt_workspace::{ @@ -67,9 +68,12 @@ impl Module for Stringtables { report.extend(lint_all(&stringtables, Some(ctx.config()))); for stringtable in stringtables { - report.extend(lint_one(&stringtable, Some(ctx.config()))); + let codes = lint_one(&stringtable, Some(ctx.config())); + if codes.is_empty() { + convert_stringtable(&stringtable.0, &stringtable.1); + } + report.extend(codes); } - Ok(report) } } diff --git a/libs/stringtable/Cargo.toml b/libs/stringtable/Cargo.toml index 627d63b7..833e639c 100644 --- a/libs/stringtable/Cargo.toml +++ b/libs/stringtable/Cargo.toml @@ -20,6 +20,7 @@ quick-xml = { version = "0.37.1", features = ["serialize"] } serde = { workspace = true, features = ["derive"] } toml = { workspace = true } tracing = { workspace = true } +vfs = { workspace = true } [dev-dependencies] insta = { workspace = true } diff --git a/libs/stringtable/src/key.rs b/libs/stringtable/src/key.rs index 70bdb18c..dc182aff 100644 --- a/libs/stringtable/src/key.rs +++ b/libs/stringtable/src/key.rs @@ -89,6 +89,12 @@ pub struct Key { #[serde(skip_serializing_if = "Option::is_none", serialize_with = "min_escape")] #[serde(alias = "dutch", alias = "DUTCH")] dutch: Option, + #[serde(skip_serializing_if = "Option::is_none", serialize_with = "min_escape")] + #[serde(alias = "ukrainian", alias = "UKRAINIAN")] + ukrainian: Option, + #[serde(skip_serializing_if = "Option::is_none", serialize_with = "min_escape")] + #[serde(alias = "danish", alias = "DANISH")] + danish: Option, } impl Key { @@ -216,4 +222,14 @@ impl Key { pub fn dutch(&self) -> Option<&str> { self.dutch.as_deref() } + + #[must_use] + pub fn ukrainian(&self) -> Option<&str> { + self.ukrainian.as_deref() + } + + #[must_use] + pub fn danish(&self) -> Option<&str> { + self.danish.as_deref() + } } diff --git a/libs/stringtable/src/lib.rs b/libs/stringtable/src/lib.rs index 242e0d29..b3e07595 100644 --- a/libs/stringtable/src/lib.rs +++ b/libs/stringtable/src/lib.rs @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize}; pub mod analyze; mod key; mod package; +pub mod rapify; mod totals; pub use key::Key; @@ -13,6 +14,35 @@ pub use package::Package; pub use totals::Totals; use tracing::error; +/// Languages in className format +static ALL_LANGUAGES: [&str; 25] = [ + "English", + "Czech", + "French", + "Spanish", + "Italian", + "Polish", + "Portuguese", + "Russian", + "German", + "Korean", + "Japanese", + "Chinese", + "Chinesesimp", + "Turkish", + "Swedish", + "Slovak", + "SerboCroatian", + "Norwegian", + "Icelandic", + "Hungarian", + "Greek", + "Finnish", + "Dutch", + "Ukrainian", + "Danish", +]; + #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Project { #[serde(rename = "@name")] diff --git a/libs/stringtable/src/rapify.rs b/libs/stringtable/src/rapify.rs new file mode 100644 index 00000000..0797c248 --- /dev/null +++ b/libs/stringtable/src/rapify.rs @@ -0,0 +1,202 @@ +use crate::{Key, Project, ALL_LANGUAGES}; +use hemtt_workspace::WorkspacePath; +use tracing::trace; + +#[derive(Default, Debug)] +pub struct XmlbLayout { + // 4 byte numbers, little end?, nul term strings + header: Vec, // Version + languages: Vec, // Language Count, [Languages] + offsets: Vec, // Offset Count, [Offsets] + keys: Vec, // Key Count, [Keys] + translations: Vec>, // [Translation Count, [Translations], ...] (size may be less than lang count) +} + +#[derive(Clone, Debug)] +struct Translation { + phrases: Vec, + have_unique: bool, +} + +/// # Panics +pub fn convert_stringtable(project: &Project, xml_path: &WorkspacePath) { + let result = rapify(project); + + if result.is_some() { + // Create stringtable.bin + let xmlb_path = xml_path.with_extension("bin").expect("vfs error"); + let mut xmlb_file = xmlb_path.create_file().expect("vfs error"); + + // Remove Original stringtable.xml + xml_path.vfs().remove_file().expect("vfs error"); + + // Write data to virtual file + let data = result.expect("data struct valid"); + xmlb_file.write_all(&data.header).expect("IO Error"); + xmlb_file.write_all(&data.languages).expect("IO Error"); + xmlb_file.write_all(&data.offsets).expect("IO Error"); + xmlb_file.write_all(&data.keys).expect("IO Error"); + for translation_buffer in &data.translations { + xmlb_file.write_all(translation_buffer).expect("IO Error"); + } + trace!( + "binned stringtable{:?} [Unique {}]", + xmlb_path, + data.translations.len() + ); + } else { + trace!("skpping binerization of stringtable{:?}", xml_path); + } +} + +/// Write string with null-termination +fn write_string(buffer: &mut Vec, input: &str) { + buffer.extend(input.as_bytes()); + buffer.push(0); +} +fn write_int(buffer: &mut Vec, input: i32) { + buffer.extend(&input.to_le_bytes()); +} + +#[must_use] +/// # Panics +pub fn rapify(project: &Project) -> Option { + let mut data: XmlbLayout = XmlbLayout::default(); + + // Restructure translations: flat for each language + let mut all_keys: Vec = Vec::with_capacity(20); + let mut all_translations: Vec = vec![ + Translation { + phrases: Vec::with_capacity(20), + have_unique: false + }; + ALL_LANGUAGES.len() + ]; + + for package in project.packages() { + for package_inner in package.containers() { + for key in package_inner.keys() { + all_keys.push(key.id().into()); + if !get_translations(key, &mut all_translations) { + return None; // stop if we can't get some kind of translation + } + } + } + for key in package.keys() { + all_keys.push(key.id().into()); + if !get_translations(key, &mut all_translations) { + return None; // stop if we can't get some kind of translation + } + } + } + + // Header + write_int(&mut data.header, 1_481_460_802); // aka XMLB in LE + + // Languages + write_int( + &mut data.languages, + i32::try_from(ALL_LANGUAGES.len()).expect("overflow"), + ); + for language in ALL_LANGUAGES { + write_string(&mut data.languages, language); + } + + // Keys + write_int( + &mut data.keys, + i32::try_from(all_keys.len()).expect("overflow"), + ); + for key in &all_keys { + write_string(&mut data.keys, key); + } + + // Offset + let offset_size = 4 + 4 * ALL_LANGUAGES.len(); + let mut rolling_offset = + data.header.len() + data.languages.len() + offset_size + data.keys.len(); + write_int( + &mut data.offsets, + i32::try_from(ALL_LANGUAGES.len()).expect("overflow"), + ); + + all_translations[0].have_unique = true; // Always write first set (english) + let first_offset = rolling_offset; + + // Languages and their offsets + for translation in all_translations { + debug_assert_eq!(translation.phrases.len(), all_keys.len()); + + let offset = if translation.have_unique { + // we have some unique tranlation, write and use it's offset + let offset_start = rolling_offset; + let mut translation_buffer: Vec = + Vec::with_capacity(32 * translation.phrases.len()); + write_int( + &mut translation_buffer, + i32::try_from(translation.phrases.len()).expect("overflow"), + ); + for phrase in &translation.phrases { + write_string(&mut translation_buffer, phrase); + } + rolling_offset += translation_buffer.len(); + data.translations.push(translation_buffer); + offset_start + } else { + // no unique translations, just use first offset (english) + first_offset + }; + + write_int(&mut data.offsets, i32::try_from(offset).expect("overflow")); + } + debug_assert_eq!(offset_size, data.offsets.len()); + + Some(data) +} + +fn get_translations(key: &Key, languages: &mut [Translation]) -> bool { + let tranlations = [ + key.english(), + key.czech(), + key.french(), + key.spanish(), + key.italian(), + key.polish(), + key.portuguese(), + key.russian(), + key.german(), + key.korean(), + key.japanese(), + key.chinese(), + key.chinesesimp(), + key.turkish(), + key.swedish(), + key.slovak(), + key.serbocroatian(), + key.norwegian(), + key.icelandic(), + key.hungarian(), + key.greek(), + key.finnish(), + key.dutch(), + key.ukrainian(), + key.danish(), + ]; + debug_assert_eq!(tranlations.len(), ALL_LANGUAGES.len()); // order needs to be synced // Todo: meta programing? + + for (index, result) in tranlations.into_iter().enumerate() { + if let Some(native) = result { + languages[index].have_unique = true; + languages[index].phrases.push(native.into()); + } else if let Some(original) = key.original() { + languages[index].phrases.push(original.into()); + } else if let Some(english) = key.english() { + languages[index].phrases.push(english.into()); + } else { + // If we don't have some kind of default value to use, we should just not do the conversion + return false; + } + } + + true +} diff --git a/libs/stringtable/tests/snapshots/ace_arsenal__sort-2.snap b/libs/stringtable/tests/snapshots/ace_arsenal__sort-2.snap index 6f860c37..2de7a431 100644 --- a/libs/stringtable/tests/snapshots/ace_arsenal__sort-2.snap +++ b/libs/stringtable/tests/snapshots/ace_arsenal__sort-2.snap @@ -60,6 +60,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeAddCompatible_Tooltip", @@ -113,6 +115,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeExport_Tooltip", @@ -166,6 +170,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeImport_Tooltip", @@ -219,6 +225,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Blacklist", @@ -274,6 +282,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_CantOpenDisplay", @@ -329,6 +339,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_DetonatesOnImpact", @@ -378,6 +390,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Items", @@ -433,6 +447,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mission", @@ -488,6 +504,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mission_overview", @@ -541,6 +559,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mission_tooltip", @@ -594,6 +614,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mode", @@ -649,6 +671,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_ReturnToArsenal", @@ -704,6 +728,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_StatExplosionTime", @@ -753,6 +779,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_VisionNight", @@ -808,6 +836,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_VisionNormal", @@ -863,6 +893,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_VisionThermal", @@ -918,6 +950,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Whitelist", @@ -975,6 +1009,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_allowDefaultLoadoutsSetting", @@ -1030,6 +1066,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_allowSharingSetting", @@ -1085,6 +1123,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonClearContainerTooltip", @@ -1138,6 +1178,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonCloseText", @@ -1193,6 +1235,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonCurrentMag2Tooltip", @@ -1248,6 +1292,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonCurrentMagTooltip", @@ -1303,6 +1349,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonDeleteText", @@ -1358,6 +1406,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonDeleteTooltip", @@ -1413,6 +1463,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonExportText", @@ -1468,6 +1520,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonExportTooltip", @@ -1521,6 +1575,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonFavoritesTooltip", @@ -1568,6 +1624,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonHideText", @@ -1623,6 +1681,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonHideTooltip", @@ -1678,6 +1738,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonImportText", @@ -1733,6 +1795,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonImportTooltip", @@ -1786,6 +1850,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadText", @@ -1841,6 +1907,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadTooltip", @@ -1896,6 +1964,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadoutsText", @@ -1951,6 +2021,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadoutsTooltip", @@ -2006,6 +2078,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonRenameTooltip", @@ -2061,6 +2135,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSaveText", @@ -2116,6 +2192,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSaveTooltip", @@ -2171,6 +2249,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSaveTooltip_shiftClick", @@ -2226,6 +2306,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSearchTooltip", @@ -2269,6 +2351,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSharePrivateText", @@ -2324,6 +2408,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSharePublicText", @@ -2379,6 +2465,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonShareTooltip", @@ -2434,6 +2522,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_defaultLoadoutsTooltip", @@ -2489,6 +2579,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_defaultToFavoritesSetting", @@ -2536,6 +2628,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_defaultToFavoritesTooltip", @@ -2583,6 +2677,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_enableIdentityTabsSettings", @@ -2638,6 +2734,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportCurrent", @@ -2693,6 +2791,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportDefault", @@ -2748,6 +2848,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportDefaultError", @@ -2803,6 +2905,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportedClassnameText", @@ -2856,6 +2960,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_favoritesColorSetting", @@ -2903,6 +3009,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_favoritesColorTooltip", @@ -2950,6 +3058,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_fontHeightSetting", @@ -3005,6 +3115,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_fontHeightTooltip", @@ -3060,6 +3172,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_importFormatError", @@ -3115,6 +3229,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_importedCurrent", @@ -3170,6 +3286,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_importedDefault", @@ -3225,6 +3343,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_invertCameraSetting", @@ -3280,6 +3400,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutDeleted", @@ -3335,6 +3457,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutLoaded", @@ -3390,6 +3514,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutRenamed", @@ -3445,6 +3571,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutSaved", @@ -3500,6 +3628,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutSubcategory", @@ -3555,6 +3685,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutUnshared", @@ -3610,6 +3742,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutsSaveFaceSetting", @@ -3657,6 +3791,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutsSaveInsigniaSetting", @@ -3704,6 +3840,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutsSaveVoiceSetting", @@ -3751,6 +3889,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_modIconsSetting", @@ -3806,6 +3946,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_modIconsTooltip", @@ -3861,6 +4003,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_noVirtualItems", @@ -3916,6 +4060,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_page", @@ -3971,6 +4117,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_portLoadoutsLoadoutError", @@ -4026,6 +4174,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_portLoadoutsPlayerError", @@ -4079,6 +4229,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_portLoadoutsText", @@ -4132,6 +4284,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_printToRPTSetting", @@ -4187,6 +4341,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_printToRPTTooltip", @@ -4242,6 +4398,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_renameExistError", @@ -4297,6 +4455,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_saveAuthorError", @@ -4352,6 +4512,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_saveEmptyNameBox", @@ -4407,6 +4569,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_saveSharedError", @@ -4462,6 +4626,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_settingCategory", @@ -4517,6 +4683,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortAscending", @@ -4564,6 +4732,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByAccuracyText", @@ -4615,6 +4785,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByAmountText", @@ -4670,6 +4842,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByLoadText", @@ -4719,6 +4893,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByMagCountText", @@ -4770,6 +4946,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByMagnificationText", @@ -4819,6 +4997,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByProtectionBallistic", @@ -4868,6 +5048,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByProtectionExplosive", @@ -4917,6 +5099,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByRateOfFireText", @@ -4968,6 +5152,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByWeightText", @@ -5023,6 +5209,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortDescending", @@ -5070,6 +5258,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statIlluminators", @@ -5115,6 +5305,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statMagCount", @@ -5162,6 +5354,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statMagnification", @@ -5217,6 +5411,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statPotassium", @@ -5272,6 +5468,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statTTL", @@ -5327,6 +5525,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode", @@ -5382,6 +5582,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionModeGeneric", @@ -5437,6 +5639,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_NoSup", @@ -5492,6 +5696,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_intPrim", @@ -5545,6 +5751,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_intPrimTi", @@ -5588,6 +5796,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_supPrim", @@ -5641,6 +5851,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_supSec", @@ -5694,6 +5906,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_ti", @@ -5737,6 +5951,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabDefaultLoadoutsText", @@ -5792,6 +6008,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabDefaultLoadoutsTooltip", @@ -5847,6 +6065,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabMyLoadoutsText", @@ -5902,6 +6122,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabMyLoadoutsTooltip", @@ -5957,6 +6179,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabSharedLoadoutsText", @@ -6012,6 +6236,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabSharedLoadoutsTooltip", @@ -6067,6 +6293,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_toolsTab", @@ -6122,6 +6350,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, ], containers: [], diff --git a/libs/stringtable/tests/snapshots/ace_arsenal__sort.snap b/libs/stringtable/tests/snapshots/ace_arsenal__sort.snap index aaeaef2c..f57be39d 100644 --- a/libs/stringtable/tests/snapshots/ace_arsenal__sort.snap +++ b/libs/stringtable/tests/snapshots/ace_arsenal__sort.snap @@ -62,6 +62,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonHideTooltip", @@ -117,6 +119,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadoutsText", @@ -172,6 +176,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonExportText", @@ -227,6 +233,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonImportText", @@ -282,6 +290,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonCloseText", @@ -337,6 +347,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_noVirtualItems", @@ -392,6 +404,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSaveText", @@ -447,6 +461,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSaveTooltip", @@ -502,6 +518,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSaveTooltip_shiftClick", @@ -557,6 +575,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonRenameTooltip", @@ -612,6 +632,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadText", @@ -667,6 +689,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadTooltip", @@ -722,6 +746,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonDeleteText", @@ -777,6 +803,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonDeleteTooltip", @@ -832,6 +860,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabMyLoadoutsText", @@ -887,6 +917,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabMyLoadoutsTooltip", @@ -942,6 +974,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabDefaultLoadoutsText", @@ -997,6 +1031,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabDefaultLoadoutsTooltip", @@ -1052,6 +1088,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabSharedLoadoutsText", @@ -1107,6 +1145,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_tabSharedLoadoutsTooltip", @@ -1162,6 +1202,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByWeightText", @@ -1217,6 +1259,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByAmountText", @@ -1272,6 +1316,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByLoadText", @@ -1321,6 +1367,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByAccuracyText", @@ -1372,6 +1420,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByRateOfFireText", @@ -1423,6 +1473,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByMagnificationText", @@ -1472,6 +1524,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByMagCountText", @@ -1523,6 +1577,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByProtectionBallistic", @@ -1572,6 +1628,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortByProtectionExplosive", @@ -1621,6 +1679,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonShareTooltip", @@ -1676,6 +1736,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSharePrivateText", @@ -1731,6 +1793,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSharePublicText", @@ -1786,6 +1850,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportDefaultError", @@ -1841,6 +1907,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportDefault", @@ -1896,6 +1964,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportCurrent", @@ -1951,6 +2021,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_importFormatError", @@ -2006,6 +2078,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_importedDefault", @@ -2061,6 +2135,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_importedCurrent", @@ -2116,6 +2192,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutDeleted", @@ -2171,6 +2249,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutUnshared", @@ -2226,6 +2306,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_saveEmptyNameBox", @@ -2281,6 +2363,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_saveAuthorError", @@ -2336,6 +2420,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_saveSharedError", @@ -2391,6 +2477,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutSaved", @@ -2446,6 +2534,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutLoaded", @@ -2501,6 +2591,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_renameExistError", @@ -2556,6 +2648,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutRenamed", @@ -2611,6 +2705,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_invertCameraSetting", @@ -2666,6 +2762,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_modIconsSetting", @@ -2721,6 +2819,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_fontHeightSetting", @@ -2776,6 +2876,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_allowDefaultLoadoutsSetting", @@ -2831,6 +2933,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_allowSharingSetting", @@ -2886,6 +2990,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_printToRPTSetting", @@ -2941,6 +3047,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonCurrentMagTooltip", @@ -2996,6 +3104,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonCurrentMag2Tooltip", @@ -3051,6 +3161,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_settingCategory", @@ -3106,6 +3218,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutSubcategory", @@ -3161,6 +3275,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_defaultLoadoutsTooltip", @@ -3216,6 +3332,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_modIconsTooltip", @@ -3271,6 +3389,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_fontHeightTooltip", @@ -3326,6 +3446,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_printToRPTTooltip", @@ -3381,6 +3503,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_CantOpenDisplay", @@ -3436,6 +3560,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_portLoadoutsText", @@ -3489,6 +3615,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_portLoadoutsPlayerError", @@ -3542,6 +3670,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_portLoadoutsLoadoutError", @@ -3597,6 +3727,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mission", @@ -3652,6 +3784,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_ReturnToArsenal", @@ -3707,6 +3841,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mission_tooltip", @@ -3760,6 +3896,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mission_overview", @@ -3813,6 +3951,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonLoadoutsTooltip", @@ -3868,6 +4008,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonExportTooltip", @@ -3921,6 +4063,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonImportTooltip", @@ -3974,6 +4118,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statPotassium", @@ -4029,6 +4175,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statMagnification", @@ -4084,6 +4232,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode", @@ -4139,6 +4289,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_supPrim", @@ -4192,6 +4344,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_supSec", @@ -4245,6 +4399,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_intPrim", @@ -4298,6 +4454,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_ti", @@ -4341,6 +4499,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_intPrimTi", @@ -4384,6 +4544,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionMode_NoSup", @@ -4439,6 +4601,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statVisionModeGeneric", @@ -4494,6 +4658,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_VisionNormal", @@ -4549,6 +4715,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_VisionNight", @@ -4604,6 +4772,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_VisionThermal", @@ -4659,6 +4829,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_page", @@ -4714,6 +4886,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_enableIdentityTabsSettings", @@ -4769,6 +4943,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonClearContainerTooltip", @@ -4822,6 +4998,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_exportedClassnameText", @@ -4875,6 +5053,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Mode", @@ -4930,6 +5110,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Whitelist", @@ -4987,6 +5169,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Blacklist", @@ -5042,6 +5226,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_Items", @@ -5097,6 +5283,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeExport_Tooltip", @@ -5150,6 +5338,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeImport_Tooltip", @@ -5203,6 +5393,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeAddCompatible_DisplayName", @@ -5256,6 +5448,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_AttributeAddCompatible_Tooltip", @@ -5309,6 +5503,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statTTL", @@ -5364,6 +5560,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_StatExplosionTime", @@ -5413,6 +5611,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_DetonatesOnImpact", @@ -5462,6 +5662,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutsSaveFaceSetting", @@ -5509,6 +5711,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutsSaveVoiceSetting", @@ -5556,6 +5760,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_loadoutsSaveInsigniaSetting", @@ -5603,6 +5809,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortDescending", @@ -5650,6 +5858,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_sortAscending", @@ -5697,6 +5907,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_toolsTab", @@ -5752,6 +5964,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statMagCount", @@ -5799,6 +6013,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_statIlluminators", @@ -5844,6 +6060,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_defaultToFavoritesSetting", @@ -5891,6 +6109,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_defaultToFavoritesTooltip", @@ -5938,6 +6158,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_favoritesColorSetting", @@ -5985,6 +6207,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_favoritesColorTooltip", @@ -6032,6 +6256,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonFavoritesTooltip", @@ -6079,6 +6305,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "STR_ACE_Arsenal_buttonSearchTooltip", @@ -6122,6 +6350,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, ], containers: [], diff --git a/libs/stringtable/tests/snapshots/comments__sort-2.snap b/libs/stringtable/tests/snapshots/comments__sort-2.snap index 2b375156..221b441a 100644 --- a/libs/stringtable/tests/snapshots/comments__sort-2.snap +++ b/libs/stringtable/tests/snapshots/comments__sort-2.snap @@ -38,6 +38,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "HasNoComment", @@ -71,6 +73,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, ], containers: [], diff --git a/libs/stringtable/tests/snapshots/comments__sort.snap b/libs/stringtable/tests/snapshots/comments__sort.snap index dcd53485..32fcd821 100644 --- a/libs/stringtable/tests/snapshots/comments__sort.snap +++ b/libs/stringtable/tests/snapshots/comments__sort.snap @@ -40,6 +40,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "HasComment", @@ -71,6 +73,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, ], containers: [], diff --git a/libs/stringtable/tests/snapshots/gh822__sort.snap b/libs/stringtable/tests/snapshots/gh822__sort.snap index 64a2afdc..63d6efe6 100644 --- a/libs/stringtable/tests/snapshots/gh822__sort.snap +++ b/libs/stringtable/tests/snapshots/gh822__sort.snap @@ -38,6 +38,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "I will be empty", @@ -73,6 +75,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "I will change the xml structure a little", @@ -108,6 +112,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, Key { id: "My things get unescaped", @@ -145,6 +151,8 @@ Project { greek: None, finnish: None, dutch: None, + ukrainian: None, + danish: None, }, ], containers: [], diff --git a/libs/stringtable/tests/snapshots/testbin__testbin1.snap b/libs/stringtable/tests/snapshots/testbin__testbin1.snap new file mode 100644 index 00000000..fa8b00d4 --- /dev/null +++ b/libs/stringtable/tests/snapshots/testbin__testbin1.snap @@ -0,0 +1,380 @@ +--- +source: libs/stringtable/tests/testbin.rs +expression: bin.unwrap() +--- +XmlbLayout { + header: [ + 66, + 76, + 77, + 88, + ], + languages: [ + 25, + 0, + 0, + 0, + 69, + 110, + 103, + 108, + 105, + 115, + 104, + 0, + 67, + 122, + 101, + 99, + 104, + 0, + 70, + 114, + 101, + 110, + 99, + 104, + 0, + 83, + 112, + 97, + 110, + 105, + 115, + 104, + 0, + 73, + 116, + 97, + 108, + 105, + 97, + 110, + 0, + 80, + 111, + 108, + 105, + 115, + 104, + 0, + 80, + 111, + 114, + 116, + 117, + 103, + 117, + 101, + 115, + 101, + 0, + 82, + 117, + 115, + 115, + 105, + 97, + 110, + 0, + 71, + 101, + 114, + 109, + 97, + 110, + 0, + 75, + 111, + 114, + 101, + 97, + 110, + 0, + 74, + 97, + 112, + 97, + 110, + 101, + 115, + 101, + 0, + 67, + 104, + 105, + 110, + 101, + 115, + 101, + 0, + 67, + 104, + 105, + 110, + 101, + 115, + 101, + 115, + 105, + 109, + 112, + 0, + 84, + 117, + 114, + 107, + 105, + 115, + 104, + 0, + 83, + 119, + 101, + 100, + 105, + 115, + 104, + 0, + 83, + 108, + 111, + 118, + 97, + 107, + 0, + 83, + 101, + 114, + 98, + 111, + 67, + 114, + 111, + 97, + 116, + 105, + 97, + 110, + 0, + 78, + 111, + 114, + 119, + 101, + 103, + 105, + 97, + 110, + 0, + 73, + 99, + 101, + 108, + 97, + 110, + 100, + 105, + 99, + 0, + 72, + 117, + 110, + 103, + 97, + 114, + 105, + 97, + 110, + 0, + 71, + 114, + 101, + 101, + 107, + 0, + 70, + 105, + 110, + 110, + 105, + 115, + 104, + 0, + 68, + 117, + 116, + 99, + 104, + 0, + 85, + 107, + 114, + 97, + 105, + 110, + 105, + 97, + 110, + 0, + 68, + 97, + 110, + 105, + 115, + 104, + 0, + ], + offsets: [ + 25, + 0, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 90, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + 76, + 1, + 0, + 0, + ], + keys: [ + 2, + 0, + 0, + 0, + 65, + 49, + 0, + 65, + 50, + 0, + ], + translations: [ + [ + 2, + 0, + 0, + 0, + 79, + 114, + 105, + 103, + 105, + 110, + 0, + 69, + 78, + 0, + ], + [ + 2, + 0, + 0, + 0, + 79, + 114, + 105, + 103, + 105, + 110, + 0, + 68, + 69, + 0, + ], + ], +} diff --git a/libs/stringtable/tests/testbin.rs b/libs/stringtable/tests/testbin.rs new file mode 100644 index 00000000..d6fe6e33 --- /dev/null +++ b/libs/stringtable/tests/testbin.rs @@ -0,0 +1,28 @@ +#![allow(clippy::unwrap_used)] + +use std::io::BufReader; + +use hemtt_stringtable::{rapify::rapify, Project}; + +#[test] +fn testbin1() { + let stringtable = Project::from_reader(BufReader::new( + std::fs::File::open("tests/testbin1.xml").unwrap(), + )) + .unwrap(); + // Has 2 languages with unique translations + let bin = rapify(&stringtable); + assert!(bin.is_some()); + insta::assert_debug_snapshot!(bin.unwrap()); +} + +#[test] +fn testbin2() { + let stringtable = Project::from_reader(BufReader::new( + std::fs::File::open("tests/testbin2.xml").unwrap(), + )) + .unwrap(); + // Cannot be binnerized + let bin = rapify(&stringtable); + assert!(bin.is_none()); +} diff --git a/libs/stringtable/tests/testbin1.xml b/libs/stringtable/tests/testbin1.xml new file mode 100644 index 00000000..c0e5e2ba --- /dev/null +++ b/libs/stringtable/tests/testbin1.xml @@ -0,0 +1,12 @@ + + + + + Origin + + + DE + EN + + + diff --git a/libs/stringtable/tests/testbin2.xml b/libs/stringtable/tests/testbin2.xml new file mode 100644 index 00000000..439c2f64 --- /dev/null +++ b/libs/stringtable/tests/testbin2.xml @@ -0,0 +1,11 @@ + + + + + Origin + + + 12345 + + +