Skip to content

Commit

Permalink
Merge pull request #322 from nokyan/translation-context
Browse files Browse the repository at this point in the history
Add context to NICE_TO_LABEL
  • Loading branch information
nokyan authored Aug 10, 2024
2 parents ff4f2b9 + fbfa9f8 commit a246051
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 48 deletions.
37 changes: 16 additions & 21 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: resources\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-09 23:34+0200\n"
"POT-Creation-Date: 2024-08-10 12:24+0200\n"
"PO-Revision-Date: 2024-08-09 23:35+0200\n"
"Last-Translator: nokyan <nokyan@tuta.io>\n"
"Language-Team: German <nokyan@tuta.io>\n"
Expand Down Expand Up @@ -490,26 +490,6 @@ msgstr "Prozess abwürgen"
msgid "Continue Process"
msgstr "Prozess fortsetzen"

#: src/ui/pages/mod.rs:29
msgid "Very High"
msgstr "Sehr hoch"

#: src/ui/pages/mod.rs:33
msgid "High"
msgstr "Hoch"

#: src/ui/pages/mod.rs:37
msgid "Normal"
msgstr "Normal"

#: src/ui/pages/mod.rs:41
msgid "Low"
msgstr "Niedrig"

#: src/ui/pages/mod.rs:45
msgid "Very Low"
msgstr "Sehr niedrig"

#: src/ui/window.rs:300
msgid "GPU {}"
msgstr "GPU {}"
Expand Down Expand Up @@ -1701,6 +1681,21 @@ msgstr "Prozesse suchen"
msgid "Show Process Options"
msgstr "Prozessoptionen anzeigen"

#~ msgid "Very High"
#~ msgstr "Sehr hoch"

#~ msgid "High"
#~ msgstr "Hoch"

#~ msgid "Normal"
#~ msgstr "Normal"

#~ msgid "Low"
#~ msgstr "Niedrig"

#~ msgid "Very Low"
#~ msgstr "Sehr niedrig"

#~ msgid "Very Slow"
#~ msgstr "Sehr langsam"

Expand Down
22 changes: 1 addition & 21 deletions po/resources.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-09 23:34+0200\n"
"POT-Creation-Date: 2024-08-10 12:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -477,26 +477,6 @@ msgstr ""
msgid "Continue Process"
msgstr ""

#: src/ui/pages/mod.rs:29
msgid "Very High"
msgstr ""

#: src/ui/pages/mod.rs:33
msgid "High"
msgstr ""

#: src/ui/pages/mod.rs:37
msgid "Normal"
msgstr ""

#: src/ui/pages/mod.rs:41
msgid "Low"
msgstr ""

#: src/ui/pages/mod.rs:45
msgid "Very Low"
msgstr ""

#: src/ui/window.rs:300
msgid "GPU {}"
msgstr ""
Expand Down
27 changes: 21 additions & 6 deletions src/ui/pages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{collections::HashMap, sync::LazyLock};

use process_data::Niceness;

use crate::i18n::i18n;
use crate::i18n::pi18n;

pub mod applications;
pub mod battery;
Expand All @@ -26,23 +26,38 @@ pub static NICE_TO_LABEL: LazyLock<HashMap<Niceness, (String, u32)>> = LazyLock:
let mut hash_map = HashMap::new();

for i in -20..=-8 {
hash_map.insert(Niceness::try_new(i).unwrap(), (i18n("Very High"), 0));
hash_map.insert(
Niceness::try_new(i).unwrap(),
(pi18n("process priority", "Very High"), 0),
);
}

for i in -7..=-3 {
hash_map.insert(Niceness::try_new(i).unwrap(), (i18n("High"), 1));
hash_map.insert(
Niceness::try_new(i).unwrap(),
(pi18n("process priority", "High"), 1),
);
}

for i in -2..=2 {
hash_map.insert(Niceness::try_new(i).unwrap(), (i18n("Normal"), 2));
hash_map.insert(
Niceness::try_new(i).unwrap(),
(pi18n("process priority", "Normal"), 2),
);
}

for i in 3..=6 {
hash_map.insert(Niceness::try_new(i).unwrap(), (i18n("Low"), 3));
hash_map.insert(
Niceness::try_new(i).unwrap(),
(pi18n("process priority", "Low"), 3),
);
}

for i in 7..=19 {
hash_map.insert(Niceness::try_new(i).unwrap(), (i18n("Very Low"), 4));
hash_map.insert(
Niceness::try_new(i).unwrap(),
(pi18n("process priority", "Very Low"), 4),
);
}

hash_map
Expand Down

0 comments on commit a246051

Please sign in to comment.