]> git.plutz.net Git - confetti/blobdiff - cards/l10n.sh
stubs for experimental date localisation
[confetti] / cards / l10n.sh
index 044a6a1eec654dc8f66bc454813b902ac28449c7..9c17957bcdce976a6448d363eb100287705a7183 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2014, 2016, 2019 Paul Hänsch
+# Copyright 2014, 2016, 2019, 2021 Paul Hänsch
 #
 # This file is part of Confetti.
 # 
@@ -17,7 +17,7 @@
 
 l10n(){
   local word
-  [ $# -eq 0 ] && read -r word || word="$1"
+  [ $# -eq 0 ] && read -r word || word="$*"
   case $word in
     PHOTO) printf %s "Foto";;
     LOGO) printf %s "Logo";;
@@ -25,25 +25,25 @@ l10n(){
     N) printf %s "Name";;
     n_pre) printf %s "Titel";;
     n_first) printf %s "Vorname";;
-    n_middle) printf %s "Mittelnamen";;
+    n_middle) printf %s "Mittel­namen";;
     n_last) printf %s "Nachname";;
     n_post) printf %s "Zusätze";;
-    NICKNAME) printf %s "Spitzname";;
-    SOUND) printf %s "Aussprache";;
-    GENDER) printf %s "Geschlecht";;
+    NICKNAME) printf %s "Spitz­name";;
+    SOUND) printf %s "Aus­sprache";;
+    GENDER) printf %s "Ge­schlecht";;
     KIND) printf %s "Typ";;
     TITLE) printf %s "Beruf";;
     ROLE) printf %s "Position";;
-    ORG) printf %s "Organisation";;
+    ORG) printf %s "Orga­ni­sation";;
     MEMBER) printf %s "Mitglied";;
     CATEGORIES) printf %s "Kategorien";;
     ANNIVERSARY) printf %s "Jubiläum";;
     BDAY) printf %s "Geburtstag";;
     EMAIL) printf %s "E-Mail";;
     TEL) printf %s "Telefon";;
-    teltype) printf %s "Anschlusstyp:";;
+    teltype) printf %s "Anschluss­typ:";;
     TYPE=HOME) printf %s "Privat";;
-    TYPE=WORK) printf %s "Geschäftlich";;
+    TYPE=WORK) printf %s "Geschäft­lich";;
     TYPE=CELL) printf %s "Mobil";;
     TYPE=FAX) printf %s "Fax";;
     IMPP) printf %s "Chat";;
@@ -82,12 +82,12 @@ l10n(){
     hi_status) printf %s "Ver­sich­er­ten­sta­tus";;
     X-HEALTH-INSURANCE-NOCONTRIB) printf %s "Zu­zahl­ungs­be­frei­ung";;
     X-CLIENT-REFERRAL) printf %s "Empfehl­ung durch";;
-    prescriptions) printf %s "Verordnungen";;
-    new_prescription) printf %s "Neue Verordnung";;
+    prescriptions) printf %s "Verord­nungen";;
+    new_prescription) printf %s "Neue Verord­nung";;
     no_icd) printf %s "Kein ICD Code";;
   
-    X-ZACK-JOINDATE)  printf %s "An­mel­de­da­tum";;
-    X-ZACK-LEAVEDATE) printf %s "Ab­mel­de­da­tum";;
+    X-ZACK-JOINDATE)  printf %s "Anmelde­datum";;
+    X-ZACK-LEAVEDATE) printf %s "Abmelde­datum";;
     X-ZACK-JOINDATE_short)  printf %s "Anm.";;
     X-ZACK-LEAVEDATE_short) printf %s "Abm.";;
   
@@ -95,6 +95,7 @@ l10n(){
     edit_categories) printf %s "Kategorien Bearbeiten";;
     vcf_export) printf %s "Vcard Exportieren";;
     control) printf %s "Aktionen";;
+    delete) printf %s "entfernen";;
     edit_update) printf %s "Daten übernehmen";;
     edit_cancel) printf %s "Abbrechen";;
     edit_delete) printf %s "Eintrag löschen";;
@@ -102,6 +103,7 @@ l10n(){
     edit_addfield) printf %s "+";;
     edit_deletefield) printf %s "X";;
     filter_label) printf %s "Filter";;
+    filter_item) printf %s "Eingrenzung nach";;
     filter_placeholder) printf %s "Begriffe zur Eingrenzung eingeben";;
     filter_type) printf %s "Filtertyp";;
     filter_order) printf %s "Sortierung";;
@@ -112,14 +114,15 @@ l10n(){
     filter_street) printf %s "Straße";;
     filter_zip) printf %s "PLZ.";;
     filter_TEL) printf %s "Telefon";;
-    filter_BDAY) printf %s "Geburtsjahr";;
-    filter_bdate) printf %s "Geburtsdatum";;
+    filter_BDAY) printf %s "Geburts­jahr";;
+    filter_bdate) printf %s "Geburts­datum";;
     filter_course) printf %s "Kurs";;
     filter_CATEGORIES) printf %s "Kategorien";;
+    filter_more) printf %s "+ mehr Filter";;
     filter_apply) printf %s "Filtern";;
     filter_cancel) printf %s "Filter löschen";;
     newcard) printf %s "Neuen Eintrag anlegen";;
-    course_attendance) printf %s "Kursteilnahme";;
+    course_attendance) printf %s "Kurs­teil­nahme";;
   
     gender_none) printf %s "keine Angabe";;
     gender_female) printf %s "Weiblich";;
@@ -131,8 +134,33 @@ l10n(){
     other) printf %s "⚥";;
     none) printf %s "⚪";;
 
-
-    *) printf %s "$1";;
+    *) printf %s "$word";;
   esac
 }
 
+l10n_time() {
+  [ $# -eq 0 ] && read -r time || time="$*"
+  printf '%s\n' "$time" |sed -E '
+    s;Monday;Mon\&shy\;tag;g;          s;Mon\.;Mo.;g;
+    s;Tuesday;Diens\&shy\;tag;g;       s;Tue\.;Di.;g;
+    s;Wednesday;Mitt\&shy\;woch;g;     s;Wed\.;Mi.;g;
+    s;Thursday;Don\&shy\;ners\&shy\;tag;g; s;Thu\.;Do.;g;
+    s;Friday;Frei\&shy\;tag;g;         s;Fri\.;Fr.;g;
+    s;Saturday;Sams\&shy\;tag;g;       s;Sat\.;Sa.;g;
+    s;Sunday;Sonn\&shy\;tag;g;         s;Sun\.;So.;g;
+
+    s;January;Ja\&shy\;nu\&shy\;ar;g;          s;Jan\.;Jan.;g;
+    s;February;Fe\&shy\;bru\&shy\;ar;g;                s;Feb\.;Feb.;g;
+    s;March;März;g;                           s;Mar\.;Mär.;g;
+    s;April;April;g;                           s;Apr\.;Apr.;g;
+    s;May;Mai;g;                               s;May\.;Mai.;g;
+    s;June;Juni;g;                             s;Jun\.;Jun.;g;
+    s;July;Juli;g;                             s;Jul\.;Jul.;g;
+    s;August;Au\&shy\;gust;g;                  s;Aug\.;Aug.;g;
+    s;September;Sep\&shy\;tem\&shy\;ber;g;     s;Sep\.;Sep.;g;
+    s;October;Ok\&shy\;to\&shy\;ber;g;         s;Oct\.;Okt.;g;
+    s;November;No\&shy\;vem\&shy\;ber;g;       s;Nov\.;Nov.;g;
+    s;December;De\&shy\;zem\&shy\;ber;g;       s;Dec\.;Dez.;g;
+  '
+}
+