added german translation and store stuff for app

This commit is contained in:
Jan Pleterski
2026-11-13 10:56:11 +01:00
parent d4bc01f202
commit 30708c73b1
47 changed files with 530 additions and 160 deletions
+2
View File
@@ -148,6 +148,7 @@ class _SessionScreenState extends State<SessionScreen> {
/// "1 target" / "5 targets", with Slovenian dual and plural forms.
String targetCount(int n) {
final s = AppSettings.instance;
if (s.language == 'German') return n == 1 ? '1 Scheibe' : '$n Scheiben';
if (s.language != 'Slovenian') return n == 1 ? '1 target' : '$n targets';
final mod = n % 100;
final word = mod == 1 ? 'tarča' : mod == 2 ? 'tarči' : (mod == 3 || mod == 4) ? 'tarče' : 'tarč';
@@ -157,6 +158,7 @@ String targetCount(int n) {
/// "1 shot" / "5 shots", with Slovenian dual and plural forms.
String shotCount(int n) {
final s = AppSettings.instance;
if (s.language == 'German') return n == 1 ? '1 Schuss' : '$n Schüsse';
if (s.language != 'Slovenian') return n == 1 ? '1 shot' : '$n shots';
final mod = n % 100;
final word = mod == 1 ? 'strel' : mod == 2 ? 'strela' : (mod == 3 || mod == 4) ? 'streli' : 'strelov';