Skip to content

Commit e6c7c56

Browse files
committed
use cargo-i18n
1 parent 3401cec commit e6c7c56

14 files changed

+2669
-1639
lines changed

.cargo/config.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build]
2-
#why do I need this again?
2+
# stuff for mold linker
33
rustflags = ["--cfg", "ruma_identifiers_storage=\"Arc\""]
44

55
[env]

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ flatpak_app/
1717

1818
book
1919
docs/book
20+
21+
i18n/pot
22+
i18n/mo
23+
i18n/src
24+
i18n/data
25+
*.mo

Cargo.lock

-42
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-4
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,10 @@ zbus = "4.1.2"
5959
num-traits = "0.2.18"
6060
approx = "0.5.1"
6161
nix = { version = "0.28", features = ["term", "aio", "fs", "process"] }
62-
convert_case = "0.6.0"
6362

6463
[build-dependencies]
6564
glib-build-tools = "0.19.0"
6665
git-version = "0.3.9"
6766

6867
[patch.crates-io]
6968
gsettings-macro = { git = "https://github.com/vhdirk/gsettings-macro.git", branch = "multiple-schemas" }
70-
71-
[dev-dependencies]
72-
xtr = "0.1.9"

i18n.toml

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
fallback_language = "en"
2+
msg_bugs_address = "[email protected]"
3+
copyright_holder = "Dirk Van Haerenborgh"
4+
5+
extract_to_parent = true
6+
collate_extracted_subcrates = true
27

38
[fluent]
4-
assets_dir = "i18n"
9+
assets_dir = "i18n"
10+
11+
[gettext]
12+
target_languages = ["nl"]
13+
xtr = true
14+
output_dir = "i18n"
15+
pot_dir = "i18n"
16+
po_dir = "i18n"
17+
mo_dir = "i18n"
18+
use_fuzzy = true
19+
20+
xgettext = [
21+
"src/**/*.ui",
22+
"data/*.xml.in",
23+
"data/*.xml.in.in",
24+
"data/*.desktop.in.in",
25+
]

po/README.md i18n/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To start translating, duplicate any of the `.po` files and start translating it,
44
rename it to match your country code and add your contry code.
55

6-
Be sure to add your country code to the [LINGUAS](https://github.com/vhdirk/terms/blob/main/po/LINGUAS) file too.
6+
Be sure to add your country code to the [LINGUAS](https://github.com/vhdirk/terms/blob/main/i18n.toml) file too.
77

88
|Code |Language |
99
|----------|------------------------------------------|

po/meson.build i18n/meson.build

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# preset: 'glib'
77
#)
88

9+
add_project_arguments('-DGETTEXT_PACKAGE="terms"', language:'rust')
910
i18n.gettext(gettext_package,
1011
args: ['--keyword=gettext', '--keyword=ngettext:1,2',],
1112
preset: 'glib')

0 commit comments

Comments
 (0)