Add LANGID translations to all language packs.

This commit is contained in:
Dianne Skoll
2024-12-10 15:27:41 -05:00
parent 6c0e7b4ff5
commit a622d4fad4
18 changed files with 90 additions and 57 deletions

View File

@@ -51,3 +51,5 @@ FSET subst_hours(h) iif(h==1, "1 hora", h + " hores")
SET $Is "és"
SET $Was "va ser"
SET $And "i"
TRANSLATE "LANGID" "ca"

View File

@@ -67,3 +67,5 @@ FSET subst_hx(alt, d, t) "den " + zeropad(day(d), 2) + $DateSep + zeropad(monnum
FSET subst_ix(alt, d, t) "den " + zeropad(monnum(d), 2) + $DateSep + zeropad(day(d), 2)
FSET subst_ux(alt, d, t) subst_ax(alt, d, t)
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
TRANSLATE "LANGID" "da"

View File

@@ -64,28 +64,13 @@ FSET subst_p(alt, d, t) iif(d == today()+1, "", "en")
# Localization of various astronomical events
# Perihelion
SET earthseasons_Perihelion_str "Perihel"
TRANSLATE "Perihelion" "Perihel"
TRANSLATE "Vernal Equinox" "Frühlingsanfang"
TRANSLATE "Summer Solstice" "Sommeranfang"
TRANSLATE "Aphelion" "Aphel"
TRANSLATE "Autumnal Equinox" "Herbstanfang"
TRANSLATE "Winter Solstice" "Winteranfang"
TRANSLATE "Daylight Saving Time Starts" "Beginn Sommerzeit"
TRANSLATE "Daylight Saving Time Ends" "Ende Sommerzeit"
# Vernal equinox
SET earthseasons_EquinoxMar_str "Frühlingsanfang"
# Summer solstice
SET earthseasons_SolsticeJun_str "Sommeranfang"
# Aphelion
SET earthseasons_Aphelion_str "Aphel"
# Autumnal Equinox
SET earthseasons_EquinoxSep_str "Herbstanfang"
# Winter Solstice
SET earthseasons_SolsticeDec_str "Winteranfang"
# Daylight saving time starts
SET daylightST_starts_str "Beginn Sommerzeit"
# Daylight saving time ends
SET daylightST_ends_str "Ende Sommerzeit"
PRESERVE earthseasons_Perihelion_str earthseasons_EquinoxMar_str earthseasons_SolsticeJun_str earthseasons_Aphelion_str earthseasons_EquinoxSep_str earthseasons_SolsticeDec_str daylightST_starts_str daylightST_ends_str
TRANSLATE "LANGID" "de"

View File

@@ -46,3 +46,5 @@ SET $Hplu "s"
SET $Mplu "s"
FSET subst_bx(a, d, t) "dentro de " + (d-today()) + " días"
TRANSLATE "LANGID" "es"

View File

@@ -93,6 +93,8 @@ FSET subst_min_past(m) iif(m==0, "", m + " " + $Minute + iif(m==1, " ", $Mplu +
FSET subst_hour_future(h) iif(h==0, "", h + " tunnin ")
FSET subst_min_future(m) iif(m==0, "", m + " minuutin ")
TRANSLATE "LANGID" "fi"
TRANSLATE "Missing ']'" "Puuttuva ']'"
TRANSLATE "Missing quote" "Puuttuva lainausmerkki"
TRANSLATE "Expression too complex" "Liian monimutkainen lauseke"

View File

@@ -61,6 +61,7 @@ FSET subst_jx(alt, date, time) iif(alt, subst_j_alt(date), $On + " " + subst_j_a
FSET subst_k_alt(date) wkday(date) + ", " + day(date) + subst_ordinal(day(date)) + " " + mon(date)
FSET subst_kx(alt, date, time) iif(alt, subst_k_alt(date), $On + " " + subst_k_alt(date))
TRANSLATE "LANGID" "fr"
TRANSLATE "Missing ']'" "']' manquant"
TRANSLATE "Missing quote" "Apostrophe manquant"

View File

@@ -56,30 +56,13 @@ FSET subst_gx(alt, d, t) iif(alt, subst_g_alt(d), $On + " " + subst_g_alt(d))
FSET subst_ux(alt, d, t) subst_ax(alt, d, t)
FSET subst_vx(alt, d, t) subst_gx(alt, d, t)
# Localization of various astronomical events
TRANSLATE "LANGID" "gr"
# Perihelion
SET earthseasons_Perihelion_str "Περιήλιον"
# Vernal equinox
SET earthseasons_EquinoxMar_str "Εαρινή ισημερία"
# Summer solstice
SET earthseasons_SolsticeJun_str "Θερινό ηλιοστάσιο"
# Aphelion
SET earthseasons_Aphelion_str "Αφήλιον"
# Autumnal Equinox
SET earthseasons_EquinoxSep_str "Φθινοπωρινή ισημερία"
# Winter Solstice
SET earthseasons_SolsticeDec_str "Χειμερινό ηλιοστάσιο"
# Daylight saving time starts
SET daylightST_starts_str "Έναρξη θέρους"
# Daylight saving time ends
SET daylightST_ends_str "Τέλος θέρους"
PRESERVE earthseasons_Perihelion_str earthseasons_EquinoxMar_str earthseasons_SolsticeJun_str earthseasons_Aphelion_str earthseasons_EquinoxSep_str earthseasons_SolsticeDec_str daylightST_starts_str daylightST_ends_str
TRANSLATE "Perihelion" "Περιήλιον"
TRANSLATE "Vernal Equinox" "Εαρινή ισημερία"
TRANSLATE "Summer Solstice" "Θερινό ηλιοστάσιο"
TRANSLATE "Aphelion" "Αφήλιον"
TRANSLATE "Autumnal Equinox" "Φθινοπωρινή ισημερία"
TRANSLATE "Winter Solstice" "Χειμερινό ηλιοστάσιο"
TRANSLATE "Daylight Saving Time Starts" "Έναρξη θέρους"
TRANSLATE "Daylight Saving Time Ends" "Τέλος θέρους"

View File

@@ -49,3 +49,5 @@ SET $Mplu "r"
FSET subst_bx(a, d, t) "eftir " + (d - today()) + " daga"
fset subst_p(a, d, t) iif(d == today()+1, "", "a")
TRANSLATE "LANGID" "is"

View File

@@ -65,3 +65,5 @@ FSET subst_hours(h) iif(h==1, "1 ora", h + " ore")
FSET subst_0(a, d, t) iif(abs(now()-t)/60==1, "a", "e")
FSET subst_9(a, d, t) iif(abs(now()-t)%60==1, "o", "i")
TRANSLATE "LANGID" "it"

View File

@@ -55,6 +55,8 @@ FSET subst_hours(h) iif(h==1, "1 uur", h + " uren")
FSET subst_bx(a, d, t) "over " + (d-today()) + " dagen"
TRANSLATE "LANGID" "nl"
TRANSLATE "New Moon" "Nieuwe maan"
TRANSLATE "First Quarter" "Eerste kwartier"
TRANSLATE "Full Moon" "Volle maan"

View File

@@ -56,3 +56,6 @@ FSET subst_g_alt(d) wkday(d) + ", den " + day(d) + ". " + mon(d)
FSET subst_ux(a, d, t) subst_ax(a, d, t)
FSET subst_vx(a, d, t) subst_gx(a, d, t)
FSET subst_p(a, d, t) iif(d==today()+1, "", "er")
TRANSLATE "LANGID" "no"

View File

@@ -68,6 +68,8 @@ FSET subst_1past(diff) iif(diff/60==0, subst_1min(diff%60), diff%60==0, subst_1h
FSET subst_1min(m) m + " " + $Minute + subst_pl_plu(m)
FSET subst_1h(h) h + " " + $Hour + subst_pl_plu(h)
TRANSLATE "LANGID" "pl"
TRANSLATE "Ok" "OK"
TRANSLATE "Missing ']'" "Brakujący ']'"
TRANSLATE "Missing quote" "Brakujący nawias"

View File

@@ -68,6 +68,8 @@ FSET subst_1help(diff) iif(diff/60==0, subst_mplu(diff%60), diff%60==0, subst_hp
FSET subst_mplu(m) iif(m==1, "1 " + $Minute, m + " " + $Minute + $Mplu)
FSET subst_hplu(h) iif(h==1, "1 " + $Hour, h + " " + $Hour + $Hplu)
TRANSLATE "LANGID" "pt"
TRANSLATE "Missing ']'" "Falta um ']'"
TRANSLATE "Missing quote" "Falta uma aspa"
TRANSLATE "Expression too complex" "Expressao muito complexa"

View File

@@ -66,3 +66,5 @@ FSET subst_1helper(diff, when) when + iif(diff%60==0, subst_1h(diff/60), diff/60
FSET subst_1h(h) iif(h==1, "1 oră", h + " ore")
FSET subst_1m(m) iif(m==1, "1 minut", m + " minute")
FSET subst_0(a, d, t) iif(abs(t-now())/60==1, "ă", "e")
TRANSLATE "LANGID" "ro"

View File

@@ -5714,6 +5714,18 @@ system variables \fIexcept for\fR \fB$Hplu\fR and \fB$Mplu\fR.
.PP
The converse does not apply; creating a translation table entry for
"December" does not automatically set \fB$December\fR.
.PP
The translation table always contains a special entry \fBLANGID\fR whose
default value is \fBen\fR. Translators are encouraged to add a \fBLANGID\fR
entry in their language files. For example, if you write a translation
file for the Dutch language, add this line:
.PP
.nf
TRANSLATE "LANGID" "nl"
.fi
.PP
Scripts can use \fB_("LANGID")\fR to query the translation language that is
in effect.
.SH LANGUAGE PACKS
.PP
\fBRemind\fR ships with a number of language packs, which are simply reminder

View File

@@ -195,6 +195,7 @@ InitTranslationTable(void)
fprintf(stderr, "Unable to initialize translation hash table: Out of memory. Exiting.\n");
exit(1);
}
InsertTranslation("LANGID", "en");
}
static XlateItem *
@@ -286,6 +287,9 @@ DoTranslate(ParsePtr p)
if (item) {
RemoveTranslation(item);
}
if (!strcmp(DBufValue(&orig), "LANGID")) {
InsertTranslation("LANGID", "en");
}
r = OK;
}
DBufFree(&orig);

View File

@@ -5980,10 +5980,12 @@ _("Hello") => "Hallo!!!!!"
TRANSLATE DUMP
# Translation table
TRANSLATE "LANGID" "en"
TRANSLATE "Hello" "Hallo!!!!!"
TRANSLATE CLEAR
TRANSLATE DUMP
# Translation table
TRANSLATE "LANGID" "en"
set a _("Hello")
_("Hello") => "Hello"
@@ -5994,6 +5996,18 @@ TRANSLATE "Quux" "OOOGHY"
# Delete Bar translation
TRANSLATE "Bar"
# LANGID is a special case
set a _("LANGID")
_("LANGID") => "en"
TRANSLATE "LANGID" "nl"
set a _("LANGID")
_("LANGID") => "nl"
TRANSLATE "LANGID"
set a _("LANGID")
_("LANGID") => "en"
set a _("Wookie")
_("Wookie") => "Bar"
set a _("Bar")
@@ -6038,6 +6052,7 @@ TRANSLATE DUMP
# Translation table
TRANSLATE "Wookie" "Bar"
TRANSLATE "Friday" "TxFriday"
TRANSLATE "LANGID" "en"
TRANSLATE "Monday" "TxMonday"
TRANSLATE "Tuesday" "TxTuesday"
TRANSLATE "at" "Txat"
@@ -6073,14 +6088,15 @@ TRANSLATE "May" "TxMay"
TRANSLATE "Saturday" "TxSaturday"
TRANSLATE "missing quote" "missing a quote
../tests/test.rem(1247): Missing quote
../tests/test.rem(1256): Missing quote
TRANSLATE "missing quote
../tests/test.rem(1248): Missing quote
../tests/test.rem(1257): Missing quote
DO torture-test.rem
# Turn off some debugging to make output a bit easier on the eyes...
DEBUG -xte
# Translation table
TRANSLATE "LANGID" "en"
TRANSLATE "We" "Survived"
Dedup-0
Dedup-1
@@ -16082,12 +16098,12 @@ Dedup-9996
Dedup-9997
Dedup-9998
Dedup-9999
../tests/test.rem(1253): `/': Ya tried to divide by zero, ya FOOOL!!!!!
../tests/test.rem(1255): `/': Division by zero
../tests/test.rem(1262): `/': Ya tried to divide by zero, ya FOOOL!!!!!
../tests/test.rem(1264): `/': Division by zero
Var hash: total = 100141; maxlen = 5; avglen = 1.142
Func hash: total = 100016; maxlen = 5; avglen = 1.140
Dedup hash: total = 10000; maxlen = 7; avglen = 1.828
Trans hash: total = 1; maxlen = 1; avglen = 0.059
Trans hash: total = 2; maxlen = 1; avglen = 0.118
Expression nodes allocated: 300096
Expression nodes high-water: 300073
Expression nodes leaked: 0
@@ -23542,7 +23558,7 @@ No reminders.
Var hash: total = 1; maxlen = 1; avglen = 0.059
Func hash: total = 0; maxlen = 0; avglen = 0.000
Dedup hash: total = 0; maxlen = 0; avglen = 0.000
Trans hash: total = 0; maxlen = 0; avglen = 0.000
Trans hash: total = 1; maxlen = 1; avglen = 0.059
Expression nodes allocated: 512
Expression nodes high-water: 499
Expression nodes leaked: 0
@@ -24068,7 +24084,7 @@ No reminders.
Var hash: total = 1; maxlen = 1; avglen = 0.059
Func hash: total = 1; maxlen = 1; avglen = 0.059
Dedup hash: total = 0; maxlen = 0; avglen = 0.000
Trans hash: total = 1; maxlen = 1; avglen = 0.059
Trans hash: total = 2; maxlen = 1; avglen = 0.118
Expression nodes allocated: 300032
Expression nodes high-water: 300000
Expression nodes leaked: 0

View File

@@ -1205,6 +1205,15 @@ TRANSLATE "Quux" "OOOGHY"
# Delete Bar translation
TRANSLATE "Bar"
# LANGID is a special case
set a _("LANGID")
TRANSLATE "LANGID" "nl"
set a _("LANGID")
TRANSLATE "LANGID"
set a _("LANGID")
set a _("Wookie")
set a _("Bar")
set a _("Quux")