From 433dfe1ce8231829db4f24d9b6ac0ede66ab16e9 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Tue, 20 Feb 2024 18:42:53 +0300 Subject: [PATCH] Migrate translations to i18n --- Cargo.lock | 287 +++++++++++++++++++++- Cargo.toml | 1 + Makefile | 2 +- po/bg.po | 196 --------------- po/de.po | 200 --------------- po/en_US.po | 178 -------------- po/fr.po | 223 ----------------- po/it.po | 199 --------------- po/sv.po | 198 --------------- src/config.rs | 4 +- src/first_setup/codec_carousel/mod.rs | 26 +- src/first_setup/driver_carousel/mod.rs | 16 +- src/first_setup/final_carousel/mod.rs | 8 +- src/first_setup/gameutils_carousel/mod.rs | 22 +- src/first_setup/initial_carousel/mod.rs | 8 +- src/first_setup/internet_carousel/mod.rs | 26 +- src/first_setup/mod.rs | 4 +- src/first_setup/update_carousel/mod.rs | 24 +- src/first_setup/user_carousel/mod.rs | 24 +- src/main.rs | 27 +- 20 files changed, 376 insertions(+), 1297 deletions(-) delete mode 100644 po/bg.po delete mode 100644 po/de.po delete mode 100644 po/en_US.po delete mode 100644 po/fr.po delete mode 100644 po/it.po delete mode 100644 po/sv.po diff --git a/Cargo.lock b/Cargo.lock index 26ead2f..51b4af7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,6 +27,12 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +[[package]] +name = "arc-swap" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" + [[package]] name = "async-channel" version = "2.1.1" @@ -46,6 +52,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.4.2" @@ -58,13 +70,23 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "bstr" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "cairo-rs" version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags", + "bitflags 2.4.2", "cairo-sys-rs", "glib", "libc", @@ -111,6 +133,25 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-utils" version = "0.8.19" @@ -345,7 +386,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags", + "bitflags 2.4.2", "futures-channel", "futures-core", "futures-executor", @@ -386,6 +427,36 @@ dependencies = [ "system-deps", ] +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "globwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +dependencies = [ + "bitflags 1.3.2", + "ignore", + "walkdir", +] + [[package]] name = "gobject-sys" version = "0.18.0" @@ -505,6 +576,12 @@ dependencies = [ "system-deps", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.3" @@ -517,6 +594,32 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.2.2" @@ -524,9 +627,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.3", ] +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + [[package]] name = "lazy_static" version = "1.4.0" @@ -571,6 +680,12 @@ version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "locale_config" version = "0.3.0" @@ -614,6 +729,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "normpath" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5831952a9476f2fed74b77d74182fa5ddc4d21c72ec45a333b250e3ed0272804" +dependencies = [ + "windows-sys", +] + [[package]] name = "objc" version = "0.2.7" @@ -692,7 +816,7 @@ checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "pika-first-setup-gtk4" -version = "0.1.0" +version = "1.0.1" dependencies = [ "async-channel", "duct", @@ -701,6 +825,7 @@ dependencies = [ "libadwaita", "os_pipe", "regex", + "rust-i18n", "user", "users", ] @@ -814,6 +939,57 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "rust-i18n" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dcd94370631e5658a0a23635f7f47e43d06a00ad948e0bb5de79b00d85b880c" +dependencies = [ + "globwalk", + "once_cell", + "regex", + "rust-i18n-macro", + "rust-i18n-support", + "smallvec", +] + +[[package]] +name = "rust-i18n-macro" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "355763801dcf287e777e42def7c578410783477b804b1107852119e0b2518396" +dependencies = [ + "glob", + "once_cell", + "proc-macro2", + "quote", + "rust-i18n-support", + "serde", + "serde_json", + "serde_yaml", + "syn 2.0.48", +] + +[[package]] +name = "rust-i18n-support" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399801f4d955abf1c3ce3ce2215dc76bd40beb4ae39e3a84936b21a79ce2caa5" +dependencies = [ + "arc-swap", + "globwalk", + "lazy_static", + "normpath", + "once_cell", + "proc-macro2", + "regex", + "serde", + "serde_json", + "serde_yaml", + "toml 0.7.8", + "triomphe", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -823,6 +999,21 @@ dependencies = [ "semver", ] +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "semver" version = "1.0.21" @@ -849,6 +1040,17 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "serde_json" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +dependencies = [ + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_spanned" version = "0.6.5" @@ -858,6 +1060,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_yaml" +version = "0.8.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +dependencies = [ + "indexmap 1.9.3", + "ryu", + "serde", + "yaml-rust", +] + [[package]] name = "shared_child" version = "1.0.0" @@ -883,6 +1097,12 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "syn" version = "1.0.109" @@ -914,7 +1134,7 @@ dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.8.2", "version-compare", ] @@ -950,6 +1170,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml" version = "0.8.2" @@ -977,7 +1209,9 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.2.2", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -988,13 +1222,24 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap", + "indexmap 2.2.2", "serde", "serde_spanned", "toml_datetime", "winnow", ] +[[package]] +name = "triomphe" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859eb650cfee7434994602c3a68b25d77ad9e68c8a6cd491616ef86661382eb3" +dependencies = [ + "arc-swap", + "serde", + "stable_deref_trait", +] + [[package]] name = "unicode-ident" version = "1.0.12" @@ -1033,6 +1278,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "winapi" version = "0.1.23" @@ -1070,6 +1325,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi 0.3.9", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -1150,3 +1414,12 @@ checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" dependencies = [ "memchr", ] + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] diff --git a/Cargo.toml b/Cargo.toml index f5c6bc1..1fe57d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,3 +15,4 @@ duct = "0.13.7" os_pipe = "1.1.5" user = "0.1.1" users = "0.11.0" +rust-i18n = "3.0.1" diff --git a/Makefile b/Makefile index ccfbfde..f50b022 100644 --- a/Makefile +++ b/Makefile @@ -18,4 +18,4 @@ install: cp -vf data/com.github.pikaos-linux.pikafirstsetup.desktop $(DESTDIR)/usr/share/applications/ mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps cp -vf data/com.github.pikaos-linux.pikafirstsetup.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/ - makepot $(DESTDIR)/usr/share/locale + #makepot $(DESTDIR)/usr/share/locale diff --git a/po/bg.po b/po/bg.po deleted file mode 100644 index 6d4e62a..0000000 --- a/po/bg.po +++ /dev/null @@ -1,196 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2024-02-09 17:48+0300\n" -"PO-Revision-Date: 2024-02-19 23:08+0000\n" -"Last-Translator: Peter Tsvetkov \n" -"Language-Team: Bulgarian \n" -"Language: bg\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.5-dev\n" -"X-Poedit-Basepath: .\n" - -msgid "first_setup_initial_box_text_title" -msgstr "Добре дошли" - -msgid "first_setup_initial_box_text_description" -msgstr "Този асистент ще ви помогне да извършите инсталацията на PikaOS." - -msgid "first_setup_start_button_label" -msgstr "Нека започнем" - -msgid "first_setup_window_headerbar_back_button_label" -msgstr "Назад" - -msgid "first_setup_internet_box_text_title" -msgstr "Интернет" - -msgid "first_setup_internet_box_text_description" -msgstr "Проверяваме връзката с интернет..." - -msgid "internet_skip_button_label" -msgstr "Пропусни" - -msgid "internet_next_button_label" -msgstr "Следващ" - -msgid "first_setup_internet_button_content_text_label" -msgstr "Настройте мрежовата връзка и proxy/VPN." - -msgid "first_setup_internet_button_content_label" -msgstr "Отвори Мрежови Настройки." - -msgid "first_setup_internet_skip_dialog_heading" -msgstr "Пропусни Мрежова Настройка?" - -msgid "first_setup_internet_skip_dialog_body" -msgstr "" -"Пропускайки Мрежовата Настройка, много от следващите стъпки ще са недостъпни!" -"\n" -"Това НЕ Е препоръчително." - -msgid "first_setup_internet_skip_dialog_skip_cancel_label" -msgstr "Обратно към Мрежови Настройки" - -msgid "first_setup_internet_skip_dialog_skip_confirm_label" -msgstr "Просто Пропусни!" - -msgid "first_setup_internet_box_text_description_true" -msgstr "Устройството се свърза с Интернет успешно!" - -msgid "first_setup_internet_box_text_description_false" -msgstr "Няма връзка с Интернет!" - -msgid "first_setup_update_box_text_title" -msgstr "Системни Актуализации" - -msgid "first_setup_update_button_label" -msgstr "Обнови" - -msgid "first_setup_update_skip_button_label" -msgstr "Пропусни актуализациите" - -msgid "system_update_dialog_heading" -msgstr "Списък Системни Актуализации" - -msgid "system_update_dialog_ok_label" -msgstr "Ok" - -msgid "internet_network_disabled" -msgstr "Деактивирано..Мрежовата настройка беше пропусната" - -msgid "system_update_dialog_success_true" -msgstr "Актуализацията завършена Успешно!" - -msgid "system_update_dialog_success_false" -msgstr "" -"Актуализацията неуспешна!\n" -"Моля, опитайте отново." - -msgid "first_setup_user_box_text_title" -msgstr "Потребителски настройки" - -msgid "first_setup_user_box_text_description" -msgstr "Създайте потребителско профил." - -msgid "user_info_username_title" -msgstr "Потребителско име:" - -msgid "user_info_full_name_title" -msgstr "Две имена:" - -msgid "user_info_password_title" -msgstr "Потребителска парола:" - -msgid "user_info_password_verify_title" -msgstr "Напишете Потребителска парола отново:" - -msgid "error_label_is_root_label" -msgstr "Потребителското име не може да е root." - -msgid "error_label_is_pikaos_label" -msgstr "Потребителското име не може да е pikaos." - -msgid "error_label_is_special_label" -msgstr "Потребителското име не може да съдържа специални символи." - -msgid "error_label_password_mismatch_label" -msgstr "Паролите не съвпадат!" - -msgid "first_setup_gameutils_box_text_title" -msgstr "PikaOS Геймърски МЕТА Пакет" - -msgid "first_setup_gameutils_box_text_description" -msgstr "" -"Бихте ли желали PikaOS Геймърския МЕТА Пакет?\n" -"(от съществено значение, затова е и силно препоръчителен)" - -msgid "first_setup_gameutils_button_label" -msgstr "Инсталирай МЕТА Пакета" - -msgid "first_setup_gameutils_skip_button_label" -msgstr "Пропусни инсталацията на МЕТА Пакета" - -msgid "gameutils_install_dialog_heading" -msgstr "МЕТА Пакет инсталационен списък" - -msgid "gameutils_install_dialog_success_true" -msgstr "Инсталиране на МЕТА Пакетът Завършено Успешно!" - -msgid "gameutils_install_dialog_success_false" -msgstr "" -"Инсталиране на МЕТА Пакета неуспешно!\n" -"Моля, опитайте отново." - -msgid "first_setup_codec_box_text_title" -msgstr "Мултимедийни Кодеци" - -msgid "first_setup_codec_box_text_description" -msgstr "" -"Желаете ли да инсталирате допълнителни видео възпроизвеждащи и кодиращи/" -"декодиращи пакети?\n" -"(силно препоръчително)" - -msgid "first_setup_codec_button_label" -msgstr "Инсталирай Кодеци" - -msgid "first_setup_codec_skip_button_label" -msgstr "Пропусни Инсталиране на Кодеци" - -msgid "codec_install_dialog_heading" -msgstr "Списък инсталирани Кодеци" - -msgid "codec_install_dialog_success_true" -msgstr "Инсталирането Завършено Успешно!" - -msgid "codec_install_dialog_success_false" -msgstr "" -"Неуспешно инсталиране на Кодеци!\n" -"Моля, опитайте отново." - -msgid "first_setup_driver_box_text_title" -msgstr "Хардуерни Драйвъри" - -msgid "first_setup_driver_box_text_description" -msgstr "Може да инсталирате драйвъри като NVIDIA собствени и CPU микрокод." - -msgid "first_setup_driver_button_label" -msgstr "Отвори Менажера на Драйвъри" - -msgid "first_setup_driver_skip_button_label" -msgstr "Пропусни инсталиране на Драйвъри" - -msgid "first_setup_final_box_text_title" -msgstr "Първоначалната Настройка е Завършена!" - -msgid "first_setup_final_box_text_description" -msgstr "" -"Първоначалната след-инсталационна настройка на PikaOS беше завършена.\n" -"Рестартирайте още веднъж, за да влезнете в новата си потребителска сесия." - -msgid "first_setup_reboot_button_label" -msgstr "Рестартирай" diff --git a/po/de.po b/po/de.po deleted file mode 100644 index a72692f..0000000 --- a/po/de.po +++ /dev/null @@ -1,200 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2024-02-09 17:48+0300\n" -"PO-Revision-Date: 2024-02-19 23:08+0000\n" -"Last-Translator: selektionsrest \n" -"Language-Team: German \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.5-dev\n" -"X-Poedit-Basepath: .\n" - -msgid "first_setup_initial_box_text_title" -msgstr "Willkommen" - -msgid "first_setup_initial_box_text_description" -msgstr "" -"Dieser Assistent wird dir dabei helfen deine PikaOS installation " -"abzuschließen." - -msgid "first_setup_start_button_label" -msgstr "Lasst uns beginnen" - -msgid "first_setup_window_headerbar_back_button_label" -msgstr "Zurück" - -msgid "first_setup_internet_box_text_title" -msgstr "Internet" - -msgid "first_setup_internet_box_text_description" -msgstr "Überprüfe die Internetverbindung..." - -msgid "internet_skip_button_label" -msgstr "Überspringen" - -msgid "internet_next_button_label" -msgstr "Weiter" - -msgid "first_setup_internet_button_content_text_label" -msgstr "Richte eine Netzwerkverbindung und einen proxy/VPN ein." - -msgid "first_setup_internet_button_content_label" -msgstr "Öffne Netzwerkeinstellungen." - -msgid "first_setup_internet_skip_dialog_heading" -msgstr "Netzwerkeinrichtung überspringen?" - -msgid "first_setup_internet_skip_dialog_body" -msgstr "" -"Wenn du die Netzwerkeinrichtung überspringst, sind viele der nächsten " -"Schritte nicht verfügbar!\n" -"Dies wird NICHT empfohlen." - -msgid "first_setup_internet_skip_dialog_skip_cancel_label" -msgstr "Zurück zur Netzwerkeinrichtung" - -msgid "first_setup_internet_skip_dialog_skip_confirm_label" -msgstr "Ja überspringen!" - -msgid "first_setup_internet_box_text_description_true" -msgstr "Gerät hat sich erfolgfreich mit dem Internet verbunden!" - -msgid "first_setup_internet_box_text_description_false" -msgstr "Keine Internetverbindung!" - -msgid "first_setup_update_box_text_title" -msgstr "System Aktualisierungen" - -msgid "first_setup_update_button_label" -msgstr "Aktualisierung" - -msgid "first_setup_update_skip_button_label" -msgstr "Aktualisierungen überspringen" - -msgid "system_update_dialog_heading" -msgstr "Systemaktualisierungsprotokoll" - -msgid "system_update_dialog_ok_label" -msgstr "Ok" - -msgid "internet_network_disabled" -msgstr "Deaktiviert.. Die Netzwerkeinrichtung wurde übersprungen" - -msgid "system_update_dialog_success_true" -msgstr "Update erfolgreich abgeschlossen!" - -msgid "system_update_dialog_success_false" -msgstr "" -"Update fehlgeschlagen!\n" -"Bitte versuche es erneut." - -msgid "first_setup_user_box_text_title" -msgstr "Benutzereinrichtung" - -msgid "first_setup_user_box_text_description" -msgstr "Ein Benutzerkonto erstellen" - -msgid "user_info_username_title" -msgstr "Benutzername:" - -msgid "user_info_full_name_title" -msgstr "Vollständiger Name:" - -msgid "user_info_password_title" -msgstr "Benutzer Passwort:" - -msgid "user_info_password_verify_title" -msgstr "Gib das Benutzerpasswort erneut ein:" - -msgid "error_label_is_root_label" -msgstr "Der Benutzername darf nicht root sein." - -msgid "error_label_is_pikaos_label" -msgstr "Der Benutzername darf nicht pikaos sein." - -msgid "error_label_is_special_label" -msgstr "Der Benutzername darf keine Sonderzeichen enthalten." - -msgid "error_label_password_mismatch_label" -msgstr "Passwörter stimmen nicht überein!" - -msgid "first_setup_gameutils_box_text_title" -msgstr "PikaOS Gaming Meta-Paket" - -msgid "first_setup_gameutils_box_text_description" -msgstr "" -"Möchtest du das PikaOS Gaming Meta-Paket?\n" -"(unverzichtbar für Spiele, daher dringend empfohlen)" - -msgid "first_setup_gameutils_button_label" -msgstr "Meta-Paket installieren" - -msgid "first_setup_gameutils_skip_button_label" -msgstr "Überspringe die Meta-Paket Installation" - -msgid "gameutils_install_dialog_heading" -msgstr "Meta-Paket Installationsprotokoll" - -msgid "gameutils_install_dialog_success_true" -msgstr "Meta-Paket Installation erfolgreich abgeschlossen!" - -msgid "gameutils_install_dialog_success_false" -msgstr "" -"Installation des Meta Pakets fehlgeschlagen!\n" -"Bitte versuche es erneut." - -msgid "first_setup_codec_box_text_title" -msgstr "Multi-media Codecs" - -msgid "first_setup_codec_box_text_description" -msgstr "" -"Möchtest du zusätzliche Videowiedergabe- und Kodierungs-/Dekodierungspakete " -"installieren?\n" -"(dringend empfohlen)" - -msgid "first_setup_codec_button_label" -msgstr "Codecs installieren" - -msgid "first_setup_codec_skip_button_label" -msgstr "Codec Installation überspringen" - -msgid "codec_install_dialog_heading" -msgstr "Codec-Installationsprotokoll" - -msgid "codec_install_dialog_success_true" -msgstr "Codec-Installation erfolgreich abgeschlossen!" - -msgid "codec_install_dialog_success_false" -msgstr "" -"Codec-Installation fehlgeschlagen!\n" -"Bitte versuche es erneut." - -msgid "first_setup_driver_box_text_title" -msgstr "Hardwaretreiber" - -msgid "first_setup_driver_box_text_description" -msgstr "" -"Sie können Treiber wie die proprietären NVIDIA-Treiber und CPU-Mikrocode " -"installieren." - -msgid "first_setup_driver_button_label" -msgstr "Öffne den Treibermanager" - -msgid "first_setup_driver_skip_button_label" -msgstr "Treiberinstallation überspringen" - -msgid "first_setup_final_box_text_title" -msgstr "Ersteinrichtung abgeschlossen!" - -msgid "first_setup_final_box_text_description" -msgstr "" -"Die Ersteinrichtung nach der Installation von PikaOS ist abgeschlossen.\n" -"Starte ein letztes Mal neu, um deine neue Benutzersitzung aufzurufen." - -msgid "first_setup_reboot_button_label" -msgstr "Neu starten" diff --git a/po/en_US.po b/po/en_US.po deleted file mode 100644 index 3a80254..0000000 --- a/po/en_US.po +++ /dev/null @@ -1,178 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2024-02-09 17:48+0300\n" -"PO-Revision-Date: 2024-02-09 17:55+0300\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: en_US\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 3.4\n" -"X-Poedit-Basepath: .\n" - -msgid "first_setup_initial_box_text_title" -msgstr "Welcome" - -msgid "first_setup_initial_box_text_description" -msgstr "This wizard will help you finish your PikaOS installation." - -msgid "first_setup_start_button_label" -msgstr "Let's Start" - -msgid "first_setup_window_headerbar_back_button_label" -msgstr "Back" - -msgid "first_setup_internet_box_text_title" -msgstr "Internet" - -msgid "first_setup_internet_box_text_description" -msgstr "Checking Internet Connection..." - -msgid "internet_skip_button_label" -msgstr "Skip" - -msgid "internet_next_button_label" -msgstr "Next" - -msgid "first_setup_internet_button_content_text_label" -msgstr "Set up a network connection and a proxy/VPN." - -msgid "first_setup_internet_button_content_label" -msgstr "Open Network Settings." - -msgid "first_setup_internet_skip_dialog_heading" -msgstr "Skip Network Setup?" - -msgid "first_setup_internet_skip_dialog_body" -msgstr "Skipping Network Setup will make many of the next steps unavailable!\nThis is NOT recommended." - -msgid "first_setup_internet_skip_dialog_skip_cancel_label" -msgstr "Return to Network Setup" - -msgid "first_setup_internet_skip_dialog_skip_confirm_label" -msgstr "Just Skip!" - -msgid "first_setup_internet_box_text_description_true" -msgstr "Device connected to Internet Successfully!" - -msgid "first_setup_internet_box_text_description_false" -msgstr "No internet Connection!" - -msgid "first_setup_update_box_text_title" -msgstr "System Updates" - -msgid "first_setup_update_button_label" -msgstr "Update" - -msgid "first_setup_update_skip_button_label" -msgstr "Skip Updates" - -msgid "system_update_dialog_heading" -msgstr "System Update Log" - -msgid "system_update_dialog_ok_label" -msgstr "Ok" - -msgid "internet_network_disabled" -msgstr "Disabled.. Network setup was skipped" - -msgid "system_update_dialog_success_true" -msgstr "Update Completed Successfully!" - -msgid "system_update_dialog_success_false" -msgstr "Update Failed!\nPlease try again." - -msgid "first_setup_user_box_text_title" -msgstr "User setup" - -msgid "first_setup_user_box_text_description" -msgstr "Create a user account." - -msgid "user_info_username_title" -msgstr "Username:" - -msgid "user_info_full_name_title" -msgstr "Full name:" - -msgid "user_info_password_title" -msgstr "User password:" - -msgid "user_info_password_verify_title" -msgstr "Enter User password again:" - -msgid "error_label_is_root_label" -msgstr "Username can not be root." - -msgid "error_label_is_pikaos_label" -msgstr "Username can not be pikaos." - -msgid "error_label_is_special_label" -msgstr "Username can not contain special characters." - -msgid "error_label_password_mismatch_label" -msgstr "Passwords do not match!" - -msgid "first_setup_gameutils_box_text_title" -msgstr "PikaOS Gaming Meta Package" - -msgid "first_setup_gameutils_box_text_description" -msgstr "Would you like the PikaOS Gaming Meta Package?\n(essential for gaming thus strongly recommended)" - -msgid "first_setup_gameutils_button_label" -msgstr "Install Meta Package" - -msgid "first_setup_gameutils_skip_button_label" -msgstr "Skip Meta Package Installation" - -msgid "gameutils_install_dialog_heading" -msgstr "Meta Package installation Log" - -msgid "gameutils_install_dialog_success_true" -msgstr "Meta Package installation Completed Successfully!" - -msgid "gameutils_install_dialog_success_false" -msgstr "Meta Package installation Failed!\nPlease try again." - -msgid "first_setup_codec_box_text_title" -msgstr "Multi-media Codecs" - -msgid "first_setup_codec_box_text_description" -msgstr "Would you like to install additional video playback and encoding/decoding packages?\n(strongly recommended)" - -msgid "first_setup_codec_button_label" -msgstr "Install Codecs" - -msgid "first_setup_codec_skip_button_label" -msgstr "Skip Codec Installation" - -msgid "codec_install_dialog_heading" -msgstr "Codec installation Log" - -msgid "codec_install_dialog_success_true" -msgstr "Codec installation Completed Successfully!" - -msgid "codec_install_dialog_success_false" -msgstr "Codec installation Failed!\nPlease try again." - -msgid "first_setup_driver_box_text_title" -msgstr "Hardware Drivers" - -msgid "first_setup_driver_box_text_description" -msgstr "You can install drivers such as the NVIDIA proprietary drivers and CPU microcode." - -msgid "first_setup_driver_button_label" -msgstr "Open Driver manager" - -msgid "first_setup_driver_skip_button_label" -msgstr "Skip Driver installation" - -msgid "first_setup_final_box_text_title" -msgstr "Initial Setup Complete!" - -msgid "first_setup_final_box_text_description" -msgstr "PikaOS initial post install setup has been completed.\nReboot one last time to enter your new user session." - -msgid "first_setup_reboot_button_label" -msgstr "Reboot" \ No newline at end of file diff --git a/po/fr.po b/po/fr.po deleted file mode 100644 index f716160..0000000 --- a/po/fr.po +++ /dev/null @@ -1,223 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2024-02-09 17:48+0300\n" -"PO-Revision-Date: 2024-02-19 23:08+0000\n" -"Last-Translator: piaf \n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 5.5-dev\n" -"X-Poedit-Basepath: .\n" - -#, fuzzy -msgid "first_setup_initial_box_text_title" -msgstr "Bienvenue" - -#, fuzzy -msgid "first_setup_initial_box_text_description" -msgstr "Cet assistant vous aidera à terminer l'installation de PikaOS" - -msgid "first_setup_start_button_label" -msgstr "" - -#, fuzzy -msgid "first_setup_window_headerbar_back_button_label" -msgstr "Retour" - -#, fuzzy -msgid "first_setup_internet_box_text_title" -msgstr "Internet" - -#, fuzzy -msgid "first_setup_internet_box_text_description" -msgstr "Vérification de la connexion Internet..." - -#, fuzzy -msgid "internet_skip_button_label" -msgstr "Ignorer" - -#, fuzzy -msgid "internet_next_button_label" -msgstr "Suivant" - -#, fuzzy -msgid "first_setup_internet_button_content_text_label" -msgstr "Établir une connexion réseau et un proxy/VPN" - -#, fuzzy -msgid "first_setup_internet_button_content_label" -msgstr "Ouvrir les paramètres réseau" - -#, fuzzy -msgid "first_setup_internet_skip_dialog_heading" -msgstr "Passer la configuration du réseau ?" - -#, fuzzy -msgid "first_setup_internet_skip_dialog_body" -msgstr "" -"Si vous sautez l'étape de l'installation du réseau, la plupart des étapes " -"suivantes ne seront pas disponibles !\n" -"Ceci n'est PAS recommandé" - -#, fuzzy -msgid "first_setup_internet_skip_dialog_skip_cancel_label" -msgstr "Retour à la configuration du réseau" - -msgid "first_setup_internet_skip_dialog_skip_confirm_label" -msgstr "" - -#, fuzzy -msgid "first_setup_internet_box_text_description_true" -msgstr "L'appareil s'est connecté à Internet avec succès !" - -#, fuzzy -msgid "first_setup_internet_box_text_description_false" -msgstr "Pas de connexion internet !" - -#, fuzzy -msgid "first_setup_update_box_text_title" -msgstr "Mises à jour du système" - -#, fuzzy -msgid "first_setup_update_button_label" -msgstr "Mettre à jour" - -#, fuzzy -msgid "first_setup_update_skip_button_label" -msgstr "Ignorer les mises à jour" - -#, fuzzy -msgid "system_update_dialog_heading" -msgstr "Journal des mises à jour du système" - -msgid "system_update_dialog_ok_label" -msgstr "Ok" - -#, fuzzy -msgid "internet_network_disabled" -msgstr "Désactivé... La configuration du réseau a été ignorée" - -#, fuzzy -msgid "system_update_dialog_success_true" -msgstr "Mise à jour effectuée avec succès !" - -#, fuzzy -msgid "system_update_dialog_success_false" -msgstr "" -"La mise à jour a échoué !\n" -"Veuillez réessayer" - -msgid "first_setup_user_box_text_title" -msgstr "" - -#, fuzzy -msgid "first_setup_user_box_text_description" -msgstr "Créer un compte utilisateur" - -#, fuzzy -msgid "user_info_username_title" -msgstr "Nom d'utilisateur:" - -msgid "user_info_full_name_title" -msgstr "" - -msgid "user_info_password_title" -msgstr "" - -msgid "user_info_password_verify_title" -msgstr "" - -#, fuzzy -msgid "error_label_is_root_label" -msgstr "Le nom d'utilisateur ne peut pas être \"root\"." - -#, fuzzy -msgid "error_label_is_pikaos_label" -msgstr "Le nom d'utilisateur ne peut pas être \"pikaos\"." - -#, fuzzy -msgid "error_label_is_special_label" -msgstr "Le nom d'utilisateur ne peut pas contenir de caractères spéciaux." - -#, fuzzy -msgid "error_label_password_mismatch_label" -msgstr "Les mots de passe ne correspondent pas !" - -msgid "first_setup_gameutils_box_text_title" -msgstr "" - -msgid "first_setup_gameutils_box_text_description" -msgstr "" - -msgid "first_setup_gameutils_button_label" -msgstr "" - -msgid "first_setup_gameutils_skip_button_label" -msgstr "" - -msgid "gameutils_install_dialog_heading" -msgstr "" - -msgid "gameutils_install_dialog_success_true" -msgstr "" - -msgid "gameutils_install_dialog_success_false" -msgstr "" - -#, fuzzy -msgid "first_setup_codec_box_text_title" -msgstr "Codecs multimédias" - -#, fuzzy -msgid "first_setup_codec_box_text_description" -msgstr "" -"Souhaitez-vous installer d'autres logiciels de lecture vidéo et d'encodage/" -"décodage ?\n" -"(fortement recommandé)" - -#, fuzzy -msgid "first_setup_codec_button_label" -msgstr "Installer les codecs" - -msgid "first_setup_codec_skip_button_label" -msgstr "" - -msgid "codec_install_dialog_heading" -msgstr "" - -msgid "codec_install_dialog_success_true" -msgstr "" - -msgid "codec_install_dialog_success_false" -msgstr "" - -msgid "first_setup_driver_box_text_title" -msgstr "" - -#, fuzzy -msgid "first_setup_driver_box_text_description" -msgstr "" -"Vous pouvez installer des pilotes tels que les pilotes propriétaires de " -"NVIDIA et le microcode du processeur." - -msgid "first_setup_driver_button_label" -msgstr "" - -msgid "first_setup_driver_skip_button_label" -msgstr "" - -#, fuzzy -msgid "first_setup_final_box_text_title" -msgstr "Installation initiale terminée !" - -msgid "first_setup_final_box_text_description" -msgstr "" - -#, fuzzy -msgid "first_setup_reboot_button_label" -msgstr "Redémarrer" diff --git a/po/it.po b/po/it.po deleted file mode 100644 index a5af72f..0000000 --- a/po/it.po +++ /dev/null @@ -1,199 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2024-02-09 17:48+0300\n" -"PO-Revision-Date: 2024-02-19 23:08+0000\n" -"Last-Translator: Urlo30 \n" -"Language-Team: Italian \n" -"Language: it\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.5-dev\n" -"X-Poedit-Basepath: .\n" - -msgid "first_setup_initial_box_text_title" -msgstr "Benvenuto" - -msgid "first_setup_initial_box_text_description" -msgstr "Questo programma ti aiuterà a finire la tua installazione di PikaOS." - -msgid "first_setup_start_button_label" -msgstr "Cominciamo" - -msgid "first_setup_window_headerbar_back_button_label" -msgstr "Indietro" - -msgid "first_setup_internet_box_text_title" -msgstr "Internet" - -msgid "first_setup_internet_box_text_description" -msgstr "Controllo della connessione in corso..." - -msgid "internet_skip_button_label" -msgstr "Salta" - -msgid "internet_next_button_label" -msgstr "Avanti" - -msgid "first_setup_internet_button_content_text_label" -msgstr "Imposta una connessione a internet e opzionalmente un proxy e una VPN" - -msgid "first_setup_internet_button_content_label" -msgstr "Apri le impostazioni di rete." - -msgid "first_setup_internet_skip_dialog_heading" -msgstr "Vuoi saltare la configurazione di Internet?" - -msgid "first_setup_internet_skip_dialog_body" -msgstr "" -"Saltare la configurazione della rete renderà molti dei prossimi passaggi " -"impossibili!\\n" -"Questo non è raccomandato." - -msgid "first_setup_internet_skip_dialog_skip_cancel_label" -msgstr "Ritorna alla configurazione della rete" - -msgid "first_setup_internet_skip_dialog_skip_confirm_label" -msgstr "Si voglio saltarla!" - -msgid "first_setup_internet_box_text_description_true" -msgstr "Il dispositivo è stato connesso a Internet con successo!" - -msgid "first_setup_internet_box_text_description_false" -msgstr "Non c'è alcuna connessione a Internet!" - -msgid "first_setup_update_box_text_title" -msgstr "Aggiornamenti di sistema" - -msgid "first_setup_update_button_label" -msgstr "Aggiorna" - -msgid "first_setup_update_skip_button_label" -msgstr "Salta gli aggiornamenti" - -msgid "system_update_dialog_heading" -msgstr "Log degli aggiornamenti" - -msgid "system_update_dialog_ok_label" -msgstr "Ok" - -msgid "internet_network_disabled" -msgstr "Disabilitata.. La configurazione di rete è stata saltata" - -msgid "system_update_dialog_success_true" -msgstr "Aggiornamento completato con successo" - -msgid "system_update_dialog_success_false" -msgstr "" -"Aggiornamento fallito!\\n" -" Per favore prova un altra volta." - -msgid "first_setup_user_box_text_title" -msgstr "Configurazione dell'utente" - -msgid "first_setup_user_box_text_description" -msgstr "Crea un nuovo account utente." - -msgid "user_info_username_title" -msgstr "Username:" - -msgid "user_info_full_name_title" -msgstr "Nome completo:" - -msgid "user_info_password_title" -msgstr "Password dell'utente:" - -msgid "user_info_password_verify_title" -msgstr "Inserisci la password dell'utente un altra volta:" - -msgid "error_label_is_root_label" -msgstr "L'username non può essere root." - -msgid "error_label_is_pikaos_label" -msgstr "L'username non può essere pikaos." - -msgid "error_label_is_special_label" -msgstr "L'username non può contenere caratteri speciali." - -msgid "error_label_password_mismatch_label" -msgstr "Le password non corrispondono!" - -msgid "first_setup_gameutils_box_text_title" -msgstr "PikaOS Pacchetto per il Gaming" - -msgid "first_setup_gameutils_box_text_description" -msgstr "" -"Vorresti installare il pacchetto per il gaming di Pika OS?\\n" -"(poichè è essenziale per il gaming esso è estremamente raccomandato)" - -msgid "first_setup_gameutils_button_label" -msgstr "Installa il pacchetto" - -msgid "first_setup_gameutils_skip_button_label" -msgstr "Salta l'installazione del pacchetto" - -msgid "gameutils_install_dialog_heading" -msgstr "Mostra i registri dell'installazione del pacchetto" - -msgid "gameutils_install_dialog_success_true" -msgstr "Il pacchetto è stato installato con successo!" - -msgid "gameutils_install_dialog_success_false" -msgstr "" -"L'installazione del pacchetto è fallita!\\n" -"Perfavore prova ancora." - -msgid "first_setup_codec_box_text_title" -msgstr "Codecs Multimediali" - -msgid "first_setup_codec_box_text_description" -msgstr "" -"Vorresti installare dei pacchetti addizionali per la riproduzione dei video " -"e per la codifica/decodifica?\\n" -"(estremamente raccomandato)" - -msgid "first_setup_codec_button_label" -msgstr "Installa i Codec" - -msgid "first_setup_codec_skip_button_label" -msgstr "Salta l'installazione dei Codec" - -msgid "codec_install_dialog_heading" -msgstr "Mostra i registri dell'installazione dei Codec" - -msgid "codec_install_dialog_success_true" -msgstr "L'installazione dei Codec è stata completata con successo!" - -msgid "codec_install_dialog_success_false" -msgstr "" -"L'installazione dei Codec è fallita!\\n" -"Perfavore prova ancora." - -msgid "first_setup_driver_box_text_title" -msgstr "Driver dell'hardware" - -msgid "first_setup_driver_box_text_description" -msgstr "" -"Puoi installare dei driver come quello proprietario di NVIDIA e i micro-" -"codici della CPU" - -msgid "first_setup_driver_button_label" -msgstr "Apri la configurazione dei driver" - -msgid "first_setup_driver_skip_button_label" -msgstr "Salta l'installazione dei Driver" - -msgid "first_setup_final_box_text_title" -msgstr "La configurazione iniziale è stata completata!" - -msgid "first_setup_final_box_text_description" -msgstr "" -"Il post installazione di Pika OS è stato completato.\\n" -"Perfavore riavvia l'ultima volta per poter accedere alla tua nuova sessione " -"utente" - -msgid "first_setup_reboot_button_label" -msgstr "Riavvia" diff --git a/po/sv.po b/po/sv.po deleted file mode 100644 index d50382b..0000000 --- a/po/sv.po +++ /dev/null @@ -1,198 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: \n" -"POT-Creation-Date: 2024-02-09 17:48+0300\n" -"PO-Revision-Date: 2024-02-19 23:08+0000\n" -"Last-Translator: Folktro \n" -"Language-Team: Swedish \n" -"Language: sv\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.5-dev\n" -"X-Poedit-Basepath: .\n" - -msgid "first_setup_initial_box_text_title" -msgstr "Välkommen" - -msgid "first_setup_initial_box_text_description" -msgstr "" -"Den här installationsguiden hjälper dig att slutföra din PikaOS installation." - -msgid "first_setup_start_button_label" -msgstr "Påbörja" - -msgid "first_setup_window_headerbar_back_button_label" -msgstr "Tillbaka" - -msgid "first_setup_internet_box_text_title" -msgstr "Internet" - -msgid "first_setup_internet_box_text_description" -msgstr "Kontrollerar Internetanslutning..." - -msgid "internet_skip_button_label" -msgstr "Hoppa över" - -msgid "internet_next_button_label" -msgstr "Nästa" - -msgid "first_setup_internet_button_content_text_label" -msgstr "Konfigurera en Nätverksanslutning och en proxy/VPN." - -msgid "first_setup_internet_button_content_label" -msgstr "Öppna Nätverksinställningar." - -msgid "first_setup_internet_skip_dialog_heading" -msgstr "Hoppa över Nätverkskonfiguration?" - -msgid "first_setup_internet_skip_dialog_body" -msgstr "" -"Om du hoppar över Nätverkskonfiguration blir många av de följande stegen " -"otillgängliga!\n" -"Detta rekommenderas INTE." - -msgid "first_setup_internet_skip_dialog_skip_cancel_label" -msgstr "Återgå till Nätverkskonfiguration" - -msgid "first_setup_internet_skip_dialog_skip_confirm_label" -msgstr "Hoppa över!" - -msgid "first_setup_internet_box_text_description_true" -msgstr "Enheten har anslutits till Internet!" - -msgid "first_setup_internet_box_text_description_false" -msgstr "Ingen internetanslutning!" - -msgid "first_setup_update_box_text_title" -msgstr "Systemuppdateringar" - -msgid "first_setup_update_button_label" -msgstr "Uppdatera" - -msgid "first_setup_update_skip_button_label" -msgstr "Hoppa över Uppdateringar" - -msgid "system_update_dialog_heading" -msgstr "Systemets Uppdateringslogg" - -msgid "system_update_dialog_ok_label" -msgstr "Ok" - -msgid "internet_network_disabled" -msgstr "Inaktiverad... Nätverkskonfigurationen hoppades över" - -msgid "system_update_dialog_success_true" -msgstr "Uppdateringen Slutfördes Framgångsrikt!" - -msgid "system_update_dialog_success_false" -msgstr "" -"Uppdateringen Misslyckades!\n" -"Var god försök igen." - -msgid "first_setup_user_box_text_title" -msgstr "Användarkonfiguration" - -msgid "first_setup_user_box_text_description" -msgstr "Skapa ett användarkonto." - -msgid "user_info_username_title" -msgstr "Användarnamn:" - -msgid "user_info_full_name_title" -msgstr "Fullständigt namn:" - -msgid "user_info_password_title" -msgstr "Användarlösenord:" - -msgid "user_info_password_verify_title" -msgstr "Ange Användarlösenord igen:" - -msgid "error_label_is_root_label" -msgstr "Användarnamn kan inte vara root." - -msgid "error_label_is_pikaos_label" -msgstr "Användarnamn kan inte vara pikaos." - -msgid "error_label_is_special_label" -msgstr "Användarnamn kan inte innehålla specialtecken." - -msgid "error_label_password_mismatch_label" -msgstr "Lösenorden matchar inte varandra!" - -msgid "first_setup_gameutils_box_text_title" -msgstr "PikaOS Gaming Meta Package" - -msgid "first_setup_gameutils_box_text_description" -msgstr "" -"Vill du ha PikaOS Gaming Meta Package?\n" -"(essentiell för spel och därmed en stark rekommendation)" - -msgid "first_setup_gameutils_button_label" -msgstr "Installera Meta Package" - -msgid "first_setup_gameutils_skip_button_label" -msgstr "Hoppa över Meta Package Installation" - -msgid "gameutils_install_dialog_heading" -msgstr "Meta Package Installationslogg" - -msgid "gameutils_install_dialog_success_true" -msgstr "Meta Package installationen Slutfördes Framgångsrikt!" - -msgid "gameutils_install_dialog_success_false" -msgstr "" -"Meta Package installationen Misslyckades!\n" -"Vänligen försök igen." - -msgid "first_setup_codec_box_text_title" -msgstr "Multi-media Codecs" - -msgid "first_setup_codec_box_text_description" -msgstr "" -"Vill du installera ytterligare paket för videouppspelning och kodning/" -"avkodning?\n" -"(rekommenderas starkt)" - -msgid "first_setup_codec_button_label" -msgstr "Installera Codecs" - -msgid "first_setup_codec_skip_button_label" -msgstr "Hoppa över Codec Installation" - -msgid "codec_install_dialog_heading" -msgstr "Codec Installationslogg" - -msgid "codec_install_dialog_success_true" -msgstr "Codec installation Slutförd Framgångsrikt!" - -msgid "codec_install_dialog_success_false" -msgstr "" -"Codec installation Misslyckades!\n" -"Vänligen försök igen." - -msgid "first_setup_driver_box_text_title" -msgstr "Drivrutiner för hårdvara" - -msgid "first_setup_driver_box_text_description" -msgstr "" -"Du kan installera drivrutiner som NVIDIAs egna drivrutiner och CPU mikrokod." - -msgid "first_setup_driver_button_label" -msgstr "Öppna Drivrutinshanteraren" - -msgid "first_setup_driver_skip_button_label" -msgstr "Hoppa över installation av drivrutiner" - -msgid "first_setup_final_box_text_title" -msgstr "Initiala Konfigurationen Slutförd!" - -msgid "first_setup_final_box_text_description" -msgstr "" -"PikaOS initiala konfiguration efter installation har slutförts.\n" -"Starta om en sista gång för att komma till din nya användarsession." - -msgid "first_setup_reboot_button_label" -msgstr "Starta om" diff --git a/src/config.rs b/src/config.rs index ef6a27c..c424d79 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,6 @@ pub const APP_ID: &str = "com.github.pikaos-linux.pikafirstsetup"; -pub const GETTEXT_PACKAGE: &str = env!("CARGO_PKG_NAME"); -pub const LOCALEDIR: &str = "/usr/share/locale"; +//pub const GETTEXT_PACKAGE: &str = env!("CARGO_PKG_NAME"); +//pub const LOCALEDIR: &str = "/usr/share/locale"; //pub const PKGDATADIR: &str = " /usr/share"; //pub const RESOURCES_FILE: &str = concat!(@PKGDATADIR@, "/resources.gresource"); //pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/src/first_setup/codec_carousel/mod.rs b/src/first_setup/codec_carousel/mod.rs index b69ca71..f6e7e7a 100644 --- a/src/first_setup/codec_carousel/mod.rs +++ b/src/first_setup/codec_carousel/mod.rs @@ -8,7 +8,7 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + use std::{thread, time}; @@ -77,13 +77,13 @@ pub fn codec_carousel( let first_setup_codec_box_text = adw::StatusPage::builder() .icon_name("media-tape") - .title(gettext("first_setup_codec_box_text_title")) - .description(gettext("first_setup_codec_box_text_description")) + .title(t!("first_setup_codec_box_text_title")) + .description(t!("first_setup_codec_box_text_description")) .build(); first_setup_codec_box_text.add_css_class("compact"); let first_setup_codec_button = gtk::Button::builder() - .label(gettext("first_setup_codec_button_label")) + .label(t!("first_setup_codec_button_label")) .sensitive(false) .build(); @@ -91,7 +91,7 @@ pub fn codec_carousel( first_setup_codec_button.add_css_class("pill"); let first_setup_codec_skip_button = gtk::Button::builder() - .label(gettext("first_setup_codec_skip_button_label")) + .label(t!("first_setup_codec_skip_button_label")) .sensitive(true) .width_request(25) .build(); @@ -134,9 +134,9 @@ pub fn codec_carousel( .extra_child(&codec_install_log_terminal_scroll) .width_request(400) .height_request(200) - .heading(gettext("codec_install_dialog_heading")) + .heading(t!("codec_install_dialog_heading")) .build(); - codec_install_dialog.add_response("codec_install_dialog_ok", &gettext("system_update_dialog_ok_label")); + codec_install_dialog.add_response("codec_install_dialog_ok", &t!("system_update_dialog_ok_label")); first_setup_codec_buttons_box.append(&first_setup_codec_button); first_setup_codec_buttons_box.append(&first_setup_codec_skip_button); @@ -153,10 +153,10 @@ pub fn codec_carousel( while let Ok(_state) = internet_loop_receiver.recv().await { if *internet_connected_status.borrow_mut() == true { first_setup_codec_button.set_sensitive(true); - first_setup_codec_button.set_label(&gettext("first_setup_codec_button_label")); + first_setup_codec_button.set_label(&t!("first_setup_codec_button_label")); } else { first_setup_codec_button.set_sensitive(false); - first_setup_codec_button.set_label(&gettext("internet_network_disabled")); + first_setup_codec_button.set_label(&t!("internet_network_disabled")); } } }), @@ -176,16 +176,16 @@ pub fn codec_carousel( while let Ok(state) = log_status_loop_receiver.recv().await { if state == true { codec_install_dialog.set_response_enabled("codec_install_dialog_ok", true); - codec_install_dialog.set_body(&gettext("codec_install_dialog_success_true")); + codec_install_dialog.set_body(&t!("codec_install_dialog_success_true")); first_setup_codec_button.remove_css_class("suggested-action"); - first_setup_codec_skip_button.set_label(&gettext("internet_next_button_label")); + first_setup_codec_skip_button.set_label(&t!("internet_next_button_label")); first_setup_codec_skip_button.add_css_class("suggested-action"); } else { first_setup_codec_skip_button.remove_css_class("suggested-action"); - first_setup_codec_skip_button.set_label(&gettext("first_setup_codec_skip_button_label")); + first_setup_codec_skip_button.set_label(&t!("first_setup_codec_skip_button_label")); first_setup_codec_button.add_css_class("suggested-action"); codec_install_dialog.set_response_enabled("codec_install_dialog_ok", true); - codec_install_dialog.set_body(&gettext("codec_install_dialog_success_false")); + codec_install_dialog.set_body(&t!("codec_install_dialog_success_false")); } } })); diff --git a/src/first_setup/driver_carousel/mod.rs b/src/first_setup/driver_carousel/mod.rs index a094068..c515ca5 100644 --- a/src/first_setup/driver_carousel/mod.rs +++ b/src/first_setup/driver_carousel/mod.rs @@ -8,7 +8,7 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + use std::{thread, time}; @@ -42,13 +42,13 @@ pub fn driver_carousel( let first_setup_driver_box_text = adw::StatusPage::builder() .icon_name("audio-card") - .title(gettext("first_setup_driver_box_text_title")) - .description(gettext("first_setup_driver_box_text_description")) + .title(t!("first_setup_driver_box_text_title")) + .description(t!("first_setup_driver_box_text_description")) .build(); first_setup_driver_box_text.add_css_class("compact"); let first_setup_driver_button = gtk::Button::builder() - .label(gettext("first_setup_driver_button_label")) + .label(t!("first_setup_driver_button_label")) .sensitive(false) .build(); @@ -56,7 +56,7 @@ pub fn driver_carousel( first_setup_driver_button.add_css_class("pill"); let first_setup_driver_skip_button = gtk::Button::builder() - .label(gettext("first_setup_driver_skip_button_label")) + .label(t!("first_setup_driver_skip_button_label")) .sensitive(true) .width_request(25) .build(); @@ -91,10 +91,10 @@ pub fn driver_carousel( while let Ok(_state) = internet_loop_receiver.recv().await { if *internet_connected_status.borrow_mut() == true { first_setup_driver_button.set_sensitive(true); - first_setup_driver_button.set_label(&gettext("first_setup_driver_button_label")); + first_setup_driver_button.set_label(&t!("first_setup_driver_button_label")); } else { first_setup_driver_button.set_sensitive(false); - first_setup_driver_button.set_label(&gettext("internet_network_disabled")); + first_setup_driver_button.set_label(&t!("internet_network_disabled")); } } }), @@ -105,7 +105,7 @@ pub fn driver_carousel( .spawn() .expect("pika-drivers failed to start"); first_setup_driver_button.remove_css_class("suggested-action"); - first_setup_driver_skip_button.set_label(&gettext("internet_next_button_label")); + first_setup_driver_skip_button.set_label(&t!("internet_next_button_label")); first_setup_driver_skip_button.add_css_class("suggested-action"); })); diff --git a/src/first_setup/final_carousel/mod.rs b/src/first_setup/final_carousel/mod.rs index 6aca39f..40b9064 100644 --- a/src/first_setup/final_carousel/mod.rs +++ b/src/first_setup/final_carousel/mod.rs @@ -5,7 +5,7 @@ use adw::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + use duct::cmd; @@ -27,13 +27,13 @@ pub fn final_carousel(first_setup_carousel: &adw::Carousel) { let first_setup_final_box_text = adw::StatusPage::builder() .icon_name("emblem-favorite") - .title(gettext("first_setup_final_box_text_title")) - .description(gettext("first_setup_final_box_text_description")) + .title(t!("first_setup_final_box_text_title")) + .description(t!("first_setup_final_box_text_description")) .build(); first_setup_final_box_text.add_css_class("compact"); let first_setup_start_button = gtk::Button::builder() - .label(gettext("first_setup_reboot_button_label")) + .label(t!("first_setup_reboot_button_label")) .halign(Align::Center) .build(); diff --git a/src/first_setup/gameutils_carousel/mod.rs b/src/first_setup/gameutils_carousel/mod.rs index 817025a..ccf43e5 100644 --- a/src/first_setup/gameutils_carousel/mod.rs +++ b/src/first_setup/gameutils_carousel/mod.rs @@ -8,7 +8,7 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + use std::{thread, time}; @@ -77,13 +77,13 @@ pub fn gameutils_carousel( let first_setup_gameutils_box_text = adw::StatusPage::builder() .icon_name("input-gaming") - .title(gettext("first_setup_gameutils_box_text_title")) - .description(gettext("first_setup_gameutils_box_text_description")) + .title(t!("first_setup_gameutils_box_text_title")) + .description(t!("first_setup_gameutils_box_text_description")) .build(); first_setup_gameutils_box_text.add_css_class("compact"); let first_setup_gameutils_button = gtk::Button::builder() - .label(gettext("first_setup_gameutils_button_label")) + .label(t!("first_setup_gameutils_button_label")) .sensitive(false) .build(); @@ -91,7 +91,7 @@ pub fn gameutils_carousel( first_setup_gameutils_button.add_css_class("pill"); let first_setup_gameutils_skip_button = gtk::Button::builder() - .label(gettext("first_setup_gameutils_skip_button_label")) + .label(t!("first_setup_gameutils_skip_button_label")) .sensitive(true) .width_request(25) .build(); @@ -134,9 +134,9 @@ pub fn gameutils_carousel( .extra_child(&gameutils_install_log_terminal_scroll) .width_request(400) .height_request(200) - .heading(gettext("gameutils_install_dialog_heading")) + .heading(t!("gameutils_install_dialog_heading")) .build(); - gameutils_install_dialog.add_response("gameutils_install_dialog_ok", &gettext("system_update_dialog_ok_label")); + gameutils_install_dialog.add_response("gameutils_install_dialog_ok", &t!("system_update_dialog_ok_label")); first_setup_gameutils_buttons_box.append(&first_setup_gameutils_button); first_setup_gameutils_buttons_box.append(&first_setup_gameutils_skip_button); @@ -153,10 +153,10 @@ pub fn gameutils_carousel( while let Ok(_state) = internet_loop_receiver.recv().await { if *internet_connected_status.borrow_mut() == true { first_setup_gameutils_button.set_sensitive(true); - first_setup_gameutils_button.set_label(&gettext("first_setup_gameutils_button_label")); + first_setup_gameutils_button.set_label(&t!("first_setup_gameutils_button_label")); } else { first_setup_gameutils_button.set_sensitive(false); - first_setup_gameutils_button.set_label(&gettext("internet_network_disabled")); + first_setup_gameutils_button.set_label(&t!("internet_network_disabled")); } } }), @@ -176,7 +176,7 @@ pub fn gameutils_carousel( while let Ok(state) = log_status_loop_receiver.recv().await { if state == true { gameutils_install_dialog.set_response_enabled("gameutils_install_dialog_ok", true); - gameutils_install_dialog.set_body(&gettext("gameutils_install_dialog_success_true")); + gameutils_install_dialog.set_body(&t!("gameutils_install_dialog_success_true")); first_setup_gameutils_button.remove_css_class("suggested-action"); first_setup_gameutils_skip_button.set_label("Next"); first_setup_gameutils_skip_button.add_css_class("suggested-action"); @@ -185,7 +185,7 @@ pub fn gameutils_carousel( first_setup_gameutils_skip_button.set_label("Skip Meta Package Installation"); first_setup_gameutils_button.add_css_class("suggested-action"); gameutils_install_dialog.set_response_enabled("gameutils_install_dialog_ok", true); - gameutils_install_dialog.set_body(&gettext("gameutils_install_dialog_success_false")); + gameutils_install_dialog.set_body(&t!("gameutils_install_dialog_success_false")); } } })); diff --git a/src/first_setup/initial_carousel/mod.rs b/src/first_setup/initial_carousel/mod.rs index d0b0256..44f7cdd 100644 --- a/src/first_setup/initial_carousel/mod.rs +++ b/src/first_setup/initial_carousel/mod.rs @@ -6,7 +6,7 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + use crate::config::{DISTRO_ICON}; pub fn initial_carousel(first_setup_carousel: &adw::Carousel) { @@ -21,13 +21,13 @@ pub fn initial_carousel(first_setup_carousel: &adw::Carousel) { let first_setup_initial_box_text = adw::StatusPage::builder() .icon_name(DISTRO_ICON) - .title(gettext("first_setup_initial_box_text_title")) - .description(gettext("first_setup_initial_box_text_description")) + .title(t!("first_setup_initial_box_text_title")) + .description(t!("first_setup_initial_box_text_description")) .build(); first_setup_initial_box_text.add_css_class("compact"); let first_setup_start_button = gtk::Button::builder() - .label(gettext("first_setup_start_button_label")) + .label(t!("first_setup_start_button_label")) .halign(Align::Center) .build(); diff --git a/src/first_setup/internet_carousel/mod.rs b/src/first_setup/internet_carousel/mod.rs index 880d835..6c0e1be 100644 --- a/src/first_setup/internet_carousel/mod.rs +++ b/src/first_setup/internet_carousel/mod.rs @@ -6,7 +6,7 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + //use crate::check_internet_connection; use std::cell::RefCell; @@ -62,8 +62,8 @@ pub fn internet_carousel( let first_setup_internet_box_text = adw::StatusPage::builder() .icon_name("network-cellular-acquiring") - .title(gettext("first_setup_internet_box_text_title")) - .description(gettext("first_setup_internet_box_text_description")) + .title(t!("first_setup_internet_box_text_title")) + .description(t!("first_setup_internet_box_text_description")) .hexpand(true) .vexpand(true) .valign(Align::Start) @@ -71,7 +71,7 @@ pub fn internet_carousel( first_setup_internet_box_text.add_css_class("compact"); let internet_skip_button = gtk::Button::builder() - .label(gettext("internet_skip_button_label")) + .label(t!("internet_skip_button_label")) .halign(Align::Center) .sensitive(false) .build(); @@ -80,7 +80,7 @@ pub fn internet_carousel( internet_skip_button.add_css_class("pill"); let internet_next_button = gtk::Button::builder() - .label(gettext("internet_next_button_label")) + .label(t!("internet_next_button_label")) .halign(Align::Center) .sensitive(false) .build(); @@ -106,11 +106,11 @@ pub fn internet_carousel( .build(); let first_setup_internet_button_content_text = gtk::Label::builder() - .label(gettext("first_setup_internet_button_content_text_label")) + .label(t!("first_setup_internet_button_content_text_label")) .build(); let first_setup_internet_button_content = adw::ButtonContent::builder() - .label(gettext("first_setup_internet_button_content_label")) + .label(t!("first_setup_internet_button_content_label")) .icon_name("network-wired") .build(); @@ -133,14 +133,14 @@ pub fn internet_carousel( first_setup_internet_box.append(&internet_buttons_box); let first_setup_internet_skip_dialog = adw::MessageDialog::builder() - .heading(gettext("first_setup_internet_skip_dialog_heading")) - .body(gettext("first_setup_internet_skip_dialog_body")) + .heading(t!("first_setup_internet_skip_dialog_heading")) + .body(t!("first_setup_internet_skip_dialog_body")) .transient_for(window) .hide_on_close(true) .build(); - first_setup_internet_skip_dialog.add_response("skip_cancel", &gettext("first_setup_internet_skip_dialog_skip_cancel_label")); - first_setup_internet_skip_dialog.add_response("skip_confirm", &gettext("first_setup_internet_skip_dialog_skip_confirm_label")); + first_setup_internet_skip_dialog.add_response("skip_cancel", &t!("first_setup_internet_skip_dialog_skip_cancel_label")); + first_setup_internet_skip_dialog.add_response("skip_confirm", &t!("first_setup_internet_skip_dialog_skip_confirm_label")); first_setup_internet_skip_dialog .set_response_appearance("skip_confirm", adw::ResponseAppearance::Destructive); @@ -153,13 +153,13 @@ pub fn internet_carousel( if state == true { internet_skip_button.set_sensitive(false); internet_next_button.set_sensitive(true); - first_setup_internet_box_text.set_description(Some(&gettext("first_setup_internet_box_text_description_true"))); + first_setup_internet_box_text.set_description(Some(&t!("first_setup_internet_box_text_description_true"))); first_setup_internet_box_text.set_icon_name(Some("network-cellular-signal-excellent")); *internet_connected_status.borrow_mut()=true; } else { internet_next_button.set_sensitive(false); internet_skip_button.set_sensitive(true); - first_setup_internet_box_text.set_description(Some(&gettext("first_setup_internet_box_text_description_false"))); + first_setup_internet_box_text.set_description(Some(&t!("first_setup_internet_box_text_description_false"))); first_setup_internet_box_text.set_icon_name(Some("network-cellular-offline")); *internet_connected_status.borrow_mut()=false; } diff --git a/src/first_setup/mod.rs b/src/first_setup/mod.rs index 35d7591..1925732 100644 --- a/src/first_setup/mod.rs +++ b/src/first_setup/mod.rs @@ -5,7 +5,7 @@ use glib::*; /// Use all gtk4 libraries (gtk4 -> gtk because cargo) /// Use all libadwaita libraries (libadwaita -> adw because cargo) -use gettextrs::gettext; + // use std::cell::RefCell; @@ -44,7 +44,7 @@ pub fn first_setup(window: &adw::ApplicationWindow) { .carousel(&first_setup_carousel) .build(); - let first_setup_window_headerbar_back_button = gtk::Button::builder().label(gettext("first_setup_window_headerbar_back_button_label")).build(); + let first_setup_window_headerbar_back_button = gtk::Button::builder().label(t!("first_setup_window_headerbar_back_button_label")).build(); let first_setup_window_headerbar = adw::HeaderBar::builder() .show_start_title_buttons(true) diff --git a/src/first_setup/update_carousel/mod.rs b/src/first_setup/update_carousel/mod.rs index fc6cdff..415413f 100644 --- a/src/first_setup/update_carousel/mod.rs +++ b/src/first_setup/update_carousel/mod.rs @@ -8,7 +8,7 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; + use std::{thread, time}; @@ -77,13 +77,13 @@ pub fn update_carousel( let first_setup_update_box_text = adw::StatusPage::builder() .icon_name("software-update-available") - .title(gettext("first_setup_update_box_text_title")) + .title(t!("first_setup_update_box_text_title")) .description("We recommend updating your PikaOS install before proceeding\nWould you like to Update your system?") .build(); first_setup_update_box_text.add_css_class("compact"); let first_setup_update_button = gtk::Button::builder() - .label(gettext("first_setup_update_button_label")) + .label(t!("first_setup_update_button_label")) .sensitive(false) .build(); @@ -91,7 +91,7 @@ pub fn update_carousel( first_setup_update_button.add_css_class("pill"); let first_setup_update_skip_button = gtk::Button::builder() - .label(gettext("first_setup_update_skip_button_label")) + .label(t!("first_setup_update_skip_button_label")) .sensitive(true) .width_request(25) .build(); @@ -134,9 +134,9 @@ pub fn update_carousel( .extra_child(&system_update_log_terminal_scroll) .width_request(400) .height_request(200) - .heading(gettext("system_update_dialog_heading")) + .heading(t!("system_update_dialog_heading")) .build(); - system_update_dialog.add_response("system_update_dialog_ok", &gettext("system_update_dialog_ok_label")); + system_update_dialog.add_response("system_update_dialog_ok", &t!("system_update_dialog_ok_label")); first_setup_update_buttons_box.append(&first_setup_update_button); first_setup_update_buttons_box.append(&first_setup_update_skip_button); @@ -153,10 +153,10 @@ pub fn update_carousel( while let Ok(_state) = internet_loop_receiver.recv().await { if *internet_connected_status.borrow_mut() == true { first_setup_update_button.set_sensitive(true); - first_setup_update_button.set_label(&gettext("first_setup_update_button_label")); + first_setup_update_button.set_label(&t!("first_setup_update_button_label")); } else { first_setup_update_button.set_sensitive(false); - first_setup_update_button.set_label(&gettext("internet_network_disabled")); + first_setup_update_button.set_label(&t!("internet_network_disabled")); } } }), @@ -176,16 +176,16 @@ pub fn update_carousel( while let Ok(state) = log_status_loop_receiver.recv().await { if state == true { system_update_dialog.set_response_enabled("system_update_dialog_ok", true); - system_update_dialog.set_body(&gettext("system_update_dialog_success_true")); + system_update_dialog.set_body(&t!("system_update_dialog_success_true")); first_setup_update_button.remove_css_class("suggested-action"); - first_setup_update_skip_button.set_label(&gettext("internet_next_button_label")); + first_setup_update_skip_button.set_label(&t!("internet_next_button_label")); first_setup_update_skip_button.add_css_class("suggested-action"); } else { first_setup_update_skip_button.remove_css_class("suggested-action"); - first_setup_update_skip_button.set_label(&gettext("internet_skip_button_label")); + first_setup_update_skip_button.set_label(&t!("internet_skip_button_label")); first_setup_update_button.add_css_class("suggested-action"); system_update_dialog.set_response_enabled("system_update_dialog_ok", true); - system_update_dialog.set_body(&gettext("system_update_dialog_success_false")); + system_update_dialog.set_body(&t!("system_update_dialog_success_false")); } } })); diff --git a/src/first_setup/user_carousel/mod.rs b/src/first_setup/user_carousel/mod.rs index 837c09d..1ac334b 100644 --- a/src/first_setup/user_carousel/mod.rs +++ b/src/first_setup/user_carousel/mod.rs @@ -6,8 +6,6 @@ use glib::*; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::gettext; - // use regex::Regex; use std::cell::RefCell; @@ -69,8 +67,8 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { .build(); let first_setup_user_box_text = adw::StatusPage::builder() - .title(gettext("first_setup_user_box_text_title")) - .description(gettext("first_setup_user_box_text_description")) + .title(t!("first_setup_user_box_text_title")) + .description(t!("first_setup_user_box_text_description")) .hexpand(true) .valign(Align::Start) .build(); @@ -90,25 +88,25 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { let user_info_username = adw::EntryRow::builder() .hexpand(true) - .title(gettext("user_info_username_title")) + .title(t!("user_info_username_title")) .input_purpose(InputPurpose::Alpha) .input_hints(InputHints::LOWERCASE) .build(); let user_info_full_name = adw::EntryRow::builder() .hexpand(true) - .title(gettext("user_info_full_name_title")) + .title(t!("user_info_full_name_title")) .input_purpose(InputPurpose::Name) .build(); let user_info_password = adw::PasswordEntryRow::builder() .hexpand(true) - .title(gettext("user_info_password_title")) + .title(t!("user_info_password_title")) .build(); let user_info_password_verify = adw::PasswordEntryRow::builder() .hexpand(true) - .title(gettext("user_info_password_verify_title")) + .title(t!("user_info_password_verify_title")) .build(); let user_info_password_verify_revealer = gtk::Revealer::builder() @@ -150,7 +148,7 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { error_label.add_css_class("red-text"); let user_next_button = gtk::Button::builder() - .label(gettext("internet_next_button_label")) + .label(t!("internet_next_button_label")) .sensitive(false) .halign(Align::Center) .valign(Align::End) @@ -210,21 +208,21 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { if user_info_username_string != "root" { _username_is_root=false; } else { - error_label.set_label(&gettext("error_label_is_root_label")); + error_label.set_label(&t!("error_label_is_root_label")); _username_is_root=true; } if user_info_username_string != "pikaos" { _username_is_pikaos=false; } else { - error_label.set_label(&gettext("error_label_is_pikaos_label")); + error_label.set_label(&t!("error_label_is_pikaos_label")); _username_is_pikaos=true; } if only_alphanumeric(&user_info_username_string) { _username_is_special=false; } else { - error_label.set_label(&gettext("error_label_is_special_label")); + error_label.set_label(&t!("error_label_is_special_label")); _username_is_special=true; } @@ -275,7 +273,7 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) { *user_info_passwords_valid.borrow_mut()=true; } else { error_label.set_visible(true); - error_label.set_label(&gettext("error_label_password_mismatch_label")); + error_label.set_label(&t!("error_label_password_mismatch_label")); *user_info_passwords_valid.borrow_mut()=false; } })); diff --git a/src/main.rs b/src/main.rs index fea0ffe..f1bd70f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ // GTK crates mod config; +use std::env; use adw::prelude::*; use adw::*; use gdk::Display; @@ -8,9 +9,9 @@ use gdk::Display; /// Use all libadwaita libraries (libadwaita -> adw because cargo) use gtk::*; -use gettextrs::{gettext, LocaleCategory}; +use std::boxed::Box; use users::*; -use config::{GETTEXT_PACKAGE, LOCALEDIR, APP_ID}; +use config::{APP_ID}; // application crates mod build_ui; @@ -18,8 +19,18 @@ use crate::build_ui::build_ui; /// first setup crates mod first_setup; +// Init translations for current crate. +#[macro_use] +extern crate rust_i18n; +i18n!("locales", fallback = "en_US"); + /// main function fn main() { + let current_locale = match env::var_os("LANG") { + Some(v) => v.into_string().unwrap(), + None => panic!("$LANG is not set"), + }; + rust_i18n::set_locale(current_locale.strip_suffix(".UTF-8").unwrap()); let application = adw::Application::new( Some(APP_ID), Default::default(), @@ -35,20 +46,10 @@ fn main() { &provider, STYLE_PROVIDER_PRIORITY_APPLICATION, ); - // Prepare i18n - gettextrs::setlocale(LocaleCategory::LcAll, ""); - gettextrs::bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect("Unable to bind the text domain"); - gettextrs::textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain"); - // Fallback if no translation present - if gettext("first_setup_initial_box_text_title") == "first_setup_initial_box_text_title" { - println!("Warning: Current LANG is not supported, using fallback Locale."); - gettextrs::setlocale(LocaleCategory::LcAll, "en_US.UTF8"); - } - app.connect_activate(build_ui); }); - if get_current_username().unwrap() == "pikaos" { + if get_current_username().unwrap() != "pikaos" { application.run(); } else { println!("Error: This program can only be run via pikaos user");