Commit 1066553f authored by Samuel Keiffer's avatar Samuel Keiffer
Browse files

Merge branch 'juliancoffee/fluent-i18n' into 'master'

Use Fluent for localisation (l10n) and internationalisation (i18n)

See merge request !3508
parents f35608ac 38d3bdee
Pipeline #606778194 passed with stages
in 71 minutes and 20 seconds
......@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added a setting to influence the gap between music track plays.
### Changed
- Use fluent for translations
### Removed
......
......@@ -1902,6 +1902,47 @@ dependencies = [
"num-traits",
]
[[package]]
name = "fluent"
version = "0.16.0"
source = "git+https://github.com/juliancoffee/fluent-rs.git?branch=patched#929cf9512de121cce9b4cbf1cb860cd3294a1cd9"
dependencies = [
"fluent-bundle",
"unic-langid",
]
[[package]]
name = "fluent-bundle"
version = "0.15.2"
source = "git+https://github.com/juliancoffee/fluent-rs.git?branch=patched#929cf9512de121cce9b4cbf1cb860cd3294a1cd9"
dependencies = [
"fluent-langneg",
"fluent-syntax",
"intl-memoizer",
"intl_pluralrules",
"rustc-hash",
"self_cell",
"smallvec",
"unic-langid",
]
[[package]]
name = "fluent-langneg"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94"
dependencies = [
"unic-langid",
]
[[package]]
name = "fluent-syntax"
version = "0.11.0"
source = "git+https://github.com/juliancoffee/fluent-rs.git?branch=patched#929cf9512de121cce9b4cbf1cb860cd3294a1cd9"
dependencies = [
"thiserror",
]
[[package]]
name = "fnv"
version = "1.0.7"
......@@ -2315,19 +2356,6 @@ version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4"
[[package]]
name = "git2"
version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3826a6e0e2215d7a41c2bfc7c9244123969273f3476b939a226aac0ab56e9e3c"
dependencies = [
"bitflags",
"libc",
"libgit2-sys",
"log",
"url",
]
[[package]]
name = "glam"
version = "0.10.2"
......@@ -2812,6 +2840,25 @@ dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "intl-memoizer"
version = "0.5.1"
source = "git+https://github.com/juliancoffee/fluent-rs.git?branch=patched#929cf9512de121cce9b4cbf1cb860cd3294a1cd9"
dependencies = [
"type-map",
"unic-langid",
]
[[package]]
name = "intl_pluralrules"
version = "7.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b18f988384267d7066cc2be425e6faf352900652c046b6971d2e228d3b1c5ecf"
dependencies = [
"tinystr",
"unic-langid",
]
[[package]]
name = "io-kit-sys"
version = "0.1.0"
......@@ -3006,18 +3053,6 @@ version = "0.2.121"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f"
[[package]]
name = "libgit2-sys"
version = "0.13.2+1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a42de9a51a5c12e00fc0e4ca6bc2ea43582fc6418488e8f615e905d886f258b"
dependencies = [
"cc",
"libc",
"libz-sys",
"pkg-config",
]
[[package]]
name = "libloading"
version = "0.6.7"
......@@ -3080,18 +3115,6 @@ dependencies = [
"pkg-config",
]
[[package]]
name = "libz-sys"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "linked-hash-map"
version = "0.5.4"
......@@ -5262,6 +5285,12 @@ dependencies = [
"libc",
]
[[package]]
name = "self_cell"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ef965a420fe14fdac7dd018862966a4c14094f900e1650bbc71ddd7d580c8af"
[[package]]
name = "semver"
version = "0.9.0"
......@@ -5977,6 +6006,12 @@ dependencies = [
"crunchy",
]
[[package]]
name = "tinystr"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29738eedb4388d9ea620eeab9384884fc3f06f586a2eddb56bedc5885126c7c1"
[[package]]
name = "tinytemplate"
version = "1.2.1"
......@@ -6255,6 +6290,15 @@ dependencies = [
"nom 5.1.2",
]
[[package]]
name = "type-map"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f"
dependencies = [
"rustc-hash",
]
[[package]]
name = "typenum"
version = "1.15.0"
......@@ -6270,6 +6314,24 @@ dependencies = [
"version_check 0.9.4",
]
[[package]]
name = "unic-langid"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73328fcd730a030bdb19ddf23e192187a6b01cd98be6d3140622a89129459ce5"
dependencies = [
"unic-langid-impl",
]
[[package]]
name = "unic-langid-impl"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a4a8eeaf0494862c1404c95ec2f4c33a2acff5076f64314b465e3ddae1b934d"
dependencies = [
"tinystr",
]
[[package]]
name = "unicode-bidi"
version = "0.3.7"
......@@ -6856,15 +6918,17 @@ dependencies = [
[[package]]
name = "veloren-voxygen-i18n"
version = "0.10.0"
version = "0.13.0"
dependencies = [
"clap 3.1.10",
"deunicode",
"git2",
"fluent",
"fluent-bundle",
"hashbrown 0.12.0",
"intl-memoizer",
"ron 0.7.0",
"serde",
"tracing",
"unic-langid",
"veloren-common-assets",
]
......
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
},
vector_map: {
}
)
char_selection-enter_world = أدخل العالم
char_selection-logout = تسجيل خروج
char_selection-create_new_character = إنشاء شخصية جديدة
char_selection-creating_character = جاري إنشاء شخصية...
char_selection-character_creation = إنشاء شخصية
char_selection-create_info_name = شخصيتك تحتاج إلى اسم!
\ No newline at end of file
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
"char_selection.enter_world": "أدخل العالم",
"char_selection.logout": "تسجيل خروج",
"char_selection.create_new_character": "إنشاء شخصية جديدة",
"char_selection.creating_character": "جاري إنشاء شخصية...",
"char_selection.character_creation": "إنشاء شخصية",
"char_selection.create_info_name": "شخصيتك تحتاج إلى اسم!",
},
vector_map: {
}
)
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
},
vector_map: {
}
)
esc_menu-logout = تسجيل خروج
esc_menu-quit_game = قم بإنهاء اللعبة
\ No newline at end of file
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
"esc_menu.logout": "تسجيل خروج",
"esc_menu.quit_game": "قم بإنهاء اللعبة",
},
vector_map: {
}
)
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
},
vector_map: {
}
)
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
},
vector_map: {
}
)
character_window-character_name = اسم الشخصية
character_window-character_stats =
قدرة التحمل
اللياقه البدنيه
قوة الإرادة
الحماية
\ No newline at end of file
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
"character_window.character_name": "اسم الشخصية",
// Character stats
"character_window.character_stats": r#"قدرة التحمل
اللياقه البدنيه
قوة الإرادة
الحماية
"#,
},
vector_map: {
}
)
hud-chat-loot_fail = المخزون الخاص بك كامل!
hud-chat-goodbye = مع السلامة!
\ No newline at end of file
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
"hud.chat.loot_fail": "المخزون الخاص بك كامل!",
"hud.chat.goodbye": "مع السلامة!",
},
vector_map: {
}
)
/// WARNING: Localization files shall be saved in UTF-8 format without BOM
/// Localization for Arabic (Saudi locale)
(
string_map: {
},
vector_map: {
}
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment