1 parent
ccd0b5aab8
commit
e49770bd24
3 files changed
+1486
-2
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -711,6 +711,7 @@ fn the_sections_messages_are_in_every_catalog() {
|
|||||||
.chain(["ui.colour_vision", "ui.colour_vision_mode", "ui.colour_vision_sample", "ui.colour_vision_note"])
|
.chain(["ui.colour_vision", "ui.colour_vision_mode", "ui.colour_vision_sample", "ui.colour_vision_note"])
|
||||||
.collect();
|
.collect();
|
||||||
for (lang, text) in [
|
for (lang, text) in [
|
||||||
|
("cs", include_str!("../../../assets/locales/cs.json")),
|
||||||
("de", include_str!("../../../assets/locales/de.json")),
|
("de", include_str!("../../../assets/locales/de.json")),
|
||||||
("ja", include_str!("../../../assets/locales/ja.json")),
|
("ja", include_str!("../../../assets/locales/ja.json")),
|
||||||
("ko", include_str!("../../../assets/locales/ko.json")),
|
("ko", include_str!("../../../assets/locales/ko.json")),
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ impl Catalog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static ENGLISH: Catalog = Catalog::new("en", "English", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/en.json")));
|
static ENGLISH: Catalog = Catalog::new("en", "English", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/en.json")));
|
||||||
|
static CZECH: Catalog = Catalog::new("cs", "Čeština", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/cs.json")));
|
||||||
static GERMAN: Catalog = Catalog::new("de", "Deutsch", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/de.json")));
|
static GERMAN: Catalog = Catalog::new("de", "Deutsch", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/de.json")));
|
||||||
static SPANISH: Catalog = Catalog::new("es", "Español (España)", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/es.json")));
|
static SPANISH: Catalog = Catalog::new("es", "Español (España)", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/es.json")));
|
||||||
static FRENCH: Catalog = Catalog::new("fr", "Français", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/fr.json")));
|
static FRENCH: Catalog = Catalog::new("fr", "Français", include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../../assets/locales/fr.json")));
|
||||||
@@ -49,6 +50,7 @@ static CHINESE: Catalog = Catalog::new("zh", "中文", include_str!(concat!(env!
|
|||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
pub const LOCALES: &[&Catalog] = &[
|
pub const LOCALES: &[&Catalog] = &[
|
||||||
&ENGLISH,
|
&ENGLISH,
|
||||||
|
&CZECH,
|
||||||
&GERMAN,
|
&GERMAN,
|
||||||
&SPANISH,
|
&SPANISH,
|
||||||
&FRENCH,
|
&FRENCH,
|
||||||
@@ -237,12 +239,12 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Catalogs delivered complete. English is the source catalog; Japanese was completed
|
/// Catalogs delivered complete. English is the source catalog; Japanese was completed
|
||||||
/// upstream and Chinese lands complete here. German, Korean, Russian, French and Ukrainian
|
/// upstream, Chinese and Czech land complete here. German, Korean, Russian, French and Ukrainian
|
||||||
/// are partial (German and Korean predate the coverage guards; Russian, French and Ukrainian
|
/// are partial (German and Korean predate the coverage guards; Russian, French and Ukrainian
|
||||||
/// are kept partial so a new label doesn't need more translations), so their gaps fall back
|
/// are kept partial so a new label doesn't need more translations), so their gaps fall back
|
||||||
/// to English and are reported by `cargo xtask i18n` without failing the build, while
|
/// to English and are reported by `cargo xtask i18n` without failing the build, while
|
||||||
/// nothing in the complete catalogs may regress.
|
/// nothing in the complete catalogs may regress.
|
||||||
const COMPLETE: &[&str] = &["ja", "zh"];
|
const COMPLETE: &[&str] = &["cs", "ja", "zh"];
|
||||||
|
|
||||||
/// `text()` falls back to English silently, so a message a complete locale never received is
|
/// `text()` falls back to English silently, so a message a complete locale never received is
|
||||||
/// shown in English inside an otherwise translated UI, with nothing in the build to say so.
|
/// shown in English inside an otherwise translated UI, with nothing in the build to say so.
|
||||||
@@ -315,6 +317,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn newly_catalogued_command_labels_translate() {
|
fn newly_catalogued_command_labels_translate() {
|
||||||
let cases = [
|
let cases = [
|
||||||
|
("cs", "Příruba", "Zebra analýza", "Studie pohybu"),
|
||||||
("zh", "法兰", "斑马纹分析", "运动研究"),
|
("zh", "法兰", "斑马纹分析", "运动研究"),
|
||||||
("ja", "フランジ", "ゼブラ解析", "モーション スタディ"),
|
("ja", "フランジ", "ゼブラ解析", "モーション スタディ"),
|
||||||
("de", "Flansch", "Zebra-Analyse", "Bewegungsuntersuchung"),
|
("de", "Flansch", "Zebra-Analyse", "Bewegungsuntersuchung"),
|
||||||
|
|||||||
Reference in new issue
Block a user