I have made some improvements to the AWK program to convert VCS format files into XAPIA format files useable with dtcm: TODO can be converted in activities, and some support for numeric (UTC +nn/-nn) timezone has been added. That is the first patch. I also noticed that the "Mail Retrieval" options of dtmail were left untranslated. I am providing translations for the French, Spanish and Italian Locales. That is the second patch.
Also, in case someone is interested in finishing the translation in German of the dtmail messages or making translations in other languages, I am joining a tutorial in html. This could be distributed with the CDE sources or added to the Wiki. I have chosen Latin, a dead language, as an example for various reasons. First, the names of months in English originate from Latin, so the example of translations are easy to follow. Second, there is no locale for Latin distributed with glibc, but an unofficial sample locale can be found on the Web. Studying this sample locale might help in case a similar problem shows up with the locales available with glibc. Finally, in contrast with English or French, Latin is using declensions which add an extra difficulty for the translator.
>From 10dccafb9fec9d91ba5025ec866c1d8b34023b68 Mon Sep 17 00:00:00 2001 From: Edmond ORIGNAC <edmond.orig...@wanadoo.fr> Date: Thu, 3 Nov 2016 19:43:14 +0100 Subject: [PATCH 1/2] Reformatted README. Added support for numeric timezone and for todo items in vcal2xapia. --- cde/contrib/vcal2xapia/README | 35 ++++----- cde/contrib/vcal2xapia/vcal2xapia.awk | 91 +++++++++++++++++++--- .../localized/fr_FR.ISO8859-1/msg/dtcalc.msg | 2 +- 3 files changed, 99 insertions(+), 29 deletions(-) diff --git a/cde/contrib/vcal2xapia/README b/cde/contrib/vcal2xapia/README index 638ffba..6c16334 100644 --- a/cde/contrib/vcal2xapia/README +++ b/cde/contrib/vcal2xapia/README @@ -1,8 +1,8 @@ -Hello, +The AWK script converts .vcs files into XAPIA format files that can then +be dragged and dropped on the Calendar icon of the front panel to +insert an appointment in the CDE calendar. -I have written a simple AWK program to convert .vcs files into -XAPIA format files that can then be dragged and dropped on the Calendar -icon of the front panel to insert an appointment in the CDE calendar. +Initial version: The program has some limitations. For the moment, it ignores ToDo items and only converts appointment items. Also, it has to convert @@ -12,35 +12,32 @@ and to transform "UNTIL=" repetitions into a number of repetition. This is done by using an average duration of 30.44 days for a month and 365.25 days for a year instead of using the correct duration for leap years and for months. So the duration of an appointment can -be sometimes calculated incorrectly. +be sometimes calculated incorrectly. +Appointments in the local time are not handled very well. The script +assumes that the local time is UTC+1. -If you wish to include it with the CDE sources or to post it on the Wiki -documentation, I agree to release it under MIT license. +It is released under MIT license. http://opensource.org/licenses/MIT -Otherwise, there are better programs in Perl by Adam Stein at: +Better programs (in Perl) to interact with dtcm by Adam Stein are available at: http://www.csh.rit.edu/~adam/Progs/programs.html -but they require to install some extra Perl libraries. +They require to install the Calendar-CSA-0.8.tar.gz Perl libraries from CPAN. -I would like to mention that Christian Pélissier (author of a popular -textbook on Unix in French) has posted a dtksh program in a french +Christian Pélissier has posted a dtksh program in a french email list on Solaris x86 that also does the vcal to XAPIA conversion. His message is archived here: http://www.mail-archive.com/solaris_fr@x86.sun.com/msg02388.html -Please add in the comments at the top of my AWK program the links to -his dtksh program and to Adam Stein's Perl programs: -http://www.csh.rit.edu/~adam/Progs/programs.html - Version 2.2.4: - improvements to the script to handle repeating appointments. - + The script supports appointments that repeat every N week/month/days. - easter.awk: script that creates appointments for (Roman Catholic) - Easter, Ascencion Day and Whit Sunday. + Easter, Ascension Day and Whit Sunday. -Best wishes, +Current version: -Edmond Orignac +- added support for ToDo items. +- added support for numeric timezones (TZ:+NN or TZ:-NN). diff --git a/cde/contrib/vcal2xapia/vcal2xapia.awk b/cde/contrib/vcal2xapia/vcal2xapia.awk index 1f848da..158600c 100644 --- a/cde/contrib/vcal2xapia/vcal2xapia.awk +++ b/cde/contrib/vcal2xapia/vcal2xapia.awk @@ -6,12 +6,16 @@ BEGIN {FS=":"} -/^BEGIN/ {if ($2~"VEVENT") {appnt=1; rxtype=0; nxr=0; mxday=0; mxmonth=0; runtil=0; xinterval=0} -} -/^TZ/ {if ($2~"[+-][1-9]*") {timezone=$2} else {timezone=0}} +/^BEGIN/ {if ($2~"VEVENT") {appnt=1; rxtype=0; nxr=0; mxday=0; mxmonth=0; runtil=0; xinterval=0} else if ($2~"VTODO") {appnt=2 ; rxtype=0; nxr=0; mxday=0; mxmonth=0; runtil=0;xinterval=0}} +/^TZ/ {if ($2~"[+-][1-9]*") {timezone=$2} else {timezone=1}} # Knowing the timezone, we can convert local time to UTC time. +# Unfortunately, it is only working if the timezone is indicated by +# a number as in "TZ:+03" not in the case of TZ=Europe/Paris. +# If we fail to get a numeric value, we assume the timezone is UTC+1 /^DTSTART/ {sdate=$2} -/^DTEND/ {fdate=$2} +/^DTEND/ {fdate=$2} +/^DUE/ {ddate=$2; tsksts=2304} +/^COMPLETED/ {ddate=$2;tsksts=6} /^DESCRIPTION/ {summary=summary" "substr($0,13)} /^SUMMARY/ {summary=summary" "substr($0,9)} /^LOCATION/ {summary=summary" in "substr($0,10)} @@ -152,14 +156,14 @@ BEGIN {FS=":"} printf("-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Repeat Interval//EN:uinteger:%d\n",rinterval); print "-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Entry Delimiter//EN:string:end"; printf("\tDate: %s/%s/%s\n",substr(sdate,5,2),substr(sdate,7,2),substr(sdate,1,4)); -# The start/end time are in UTC and have to be converted to local time. We assume the local time is UTC+1 +# The start/end time are in UTC and have to be converted to local time. We assume the local time is UTC+1 unless we know the shift from UTC. shour=substr(sdate,10,2); smin=substr(sdate,12,2); fhour=substr(fdate,10,2); fmin=substr(fdate,12,2); if ((fhour+fmin+shour+smin)==0) {fhour=01;fmin=42;shour=01;smin=41} - shour++; - fhour++; + shour+=timezone; + fhour+=timezone; printf("\tStart: %.2d%.2d\n",shour,smin) printf("\tEnd: %.2d%.2d\n",fhour,fmin) if (rxtype==0) {print "\tRepeat: One Time"}; @@ -183,6 +187,75 @@ BEGIN {FS=":"} fdate=""; appnt=0; summary=""; - } + } else if ($2~"VTODO") { + +# We are reproducing the code for repetition of an event above. This could be refactored as a function to make the program more elegant. -} + if (runtil==1) { + uyear=substr(xuntil,1,4)-substr(sdate,1,4); + umonth=substr(xuntil,5,2)-substr(sdate,5,2); + uday=substr(xuntil,7,2)-substr(sdate,7,2); + if (rxtype==1) nxr=int(365.25*uyear+30.44*umonth+uday)+1; + if (rxtype==2) nxr=int((365.25*uyear+30.44*umonth+uday)/7.0)+1; + if (rxtype==3) nxr=int((365.25*uyear+30.44*umonth+uday)/14.0)+1; + if ((rxtype==4)||(rxtype==5)) nxr=12*uyear+umonth+1; + if (rxtype==6) nxr=uyear+1; + if (rxtype==7) nxr=int((365.25*uyear+30.44*umonth+uday)/xinterval)+1; + if (rxtype==8) nxr=int((365.25*uyear+30.44*umonth+uday)/(7*xinterval))+1; + if (rxtype==9) nxr=int((12*uyear+umonth)/xinterval)+1; + if (rxtype==10) nxr=int(5.0*(365.25*uyear+30.44*umonth+uday)/7.0)+1; + if (rxtype==11) nxr=int(3.0*(365.25*uyear+30.44*umounth+uday)/7.0)+1; + if (rxtype==12) nxr=int(3.0*(365.25*uyear+30.44*umounth+uday)/7.0)+1; + if (nxr<0) nxr=0; + }; + +# Start hour and End hour have to be converted to UTC first if timezone is defined. + + printf("\n\n") + print "\t** Calendar Appointment **" + print "-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Entry Delimiter//EN:string:begin"; + printf("-//XAPIA/CSA/ENTRYATTR//NONSGML Start Date//EN:datetime:%s\n",ddate); + print "-//XAPIA/CSA/ENTRYATTR//NONSGML Type//EN:uinteger:1"; + print "-//XAPIA/CSA/ENTRYATTR//NONSGML Classification//EN:uinteger:0"; + print "-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Show Time//EN:sinteger:1" + print "-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Show Time//EN:sinteger:1"; + printf("-//XAPIA/CSA/ENTRYATTR//NONSGML Summary//EN:string:%s\n",summary); + printf ("-//XAPIA/CSA/ENTRYATTR//NONSGML Status//EN:uinteger:%d\n",tsksts); + printf("-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Repeat Type//EN:sinteger:%d\n",rxtype); + printf("-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Repeat Times//EN:uinteger:%d\n",nxr); + print "-//XAPIA/CSA/ENTRYATTR//NONSGML Audio Reminder//EN:reminder:300:"; + print "-//XAPIA/CSA/ENTRYATTR//NONSGML Popup Reminder//EN:reminder:300:"; + print "-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Repeat Occurrence Number//EN:sinteger:-1"; + printf("-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Repeat Interval//EN:uinteger:%d\n",rinterval); + print "-//CDE_XAPIA_PRIVATE/CSA/ENTRYATTR//NONSGML Entry Delimiter//EN:string:end"; + printf("\tDate: %s/%s/%s\n",substr(ddate,5,2),substr(ddate,7,2),substr(ddate,1,4)); +# The start/end time are in UTC and have to be converted to local time. We assume the local time is UTC+1 unless we have a numeric value for timezone shift. + shour=substr(ddate,10,2); + smin=substr(ddate,12,2); + if ((shour+smin)==0) {shour=01;smin=41} + shour+=timezone; + printf("\tStart: %.2d%.2d\n",shour,smin) + if (rxtype==0) {print "\tRepeat: One Time"}; + if (rxtype==1) {print "\tRepeat: Daily"}; + if (rxtype==2) {print "\tRepeat: Weekly"}; + if (rxtype==3) {print "\tRepeat: Every Two Weeks"}; + if (rxtype==4) {print "\tRepeat: Monthly By Weekday"}; + if (rxtype==5) {print "\tRepeat: Monthly By Date"}; + if (rxtype==6) {print "\tRepeat: Yearly"} + if (rxtype==7) {printf("\t Repeat Every %d days\n",xinterval)} + if (rxtype==8) {printf("\t Repeat Every %d weeks\n",xinterval)} + if (rxtype==9) {printf("\t Repeat Every %d months\n",xinterval)} + if (rxtype==10) {print "\tRepeat: Monday thru Friday"}; + if (rxtype==11) {print "\tRepeat: Mon, Wed, Fri"}; + if (rxtype==12) {print "\tRepeat: Tuesday, Thursday"}; + printf("\tFor: %d\n",nxr); + printf("\tWhat: %s\n",summary); + printf("\t\n"); + sdate=""; + fdate=""; + appnt=0; + summary=""; + }; + + +} \ No newline at end of file diff --git a/cde/programs/localized/fr_FR.ISO8859-1/msg/dtcalc.msg b/cde/programs/localized/fr_FR.ISO8859-1/msg/dtcalc.msg index d4d7f87..1fc4f05 100644 --- a/cde/programs/localized/fr_FR.ISO8859-1/msg/dtcalc.msg +++ b/cde/programs/localized/fr_FR.ISO8859-1/msg/dtcalc.msg @@ -1251,7 +1251,7 @@ $ $ Message 465 - the square root key $ -466 "a" +466 "w" $ $ Message 467 - the Bsp (backspace) key. $ \010 is "Control h" -- 2.8.2
>From 7432251eccab32c4abdeac629a07a717f20f5c49 Mon Sep 17 00:00:00 2001 From: Edmond ORIGNAC <edmond.orig...@wanadoo.fr> Date: Sun, 27 Nov 2016 10:16:14 +0100 Subject: [PATCH 2/2] The "Mail Retrieval" options of dtmail were left untranslated. I have made translations for French,Italian and Spanish. --- .../localized/es_ES.ISO8859-1/msg/DtMail.msg | 26 ++++++++++---------- .../localized/es_ES.ISO8859-1/msg/dtmailopts.msg | 6 ++--- .../localized/fr_FR.ISO8859-1/msg/DtMail.msg | 28 +++++++++++----------- .../localized/fr_FR.ISO8859-1/msg/dtinfo_start.msg | 2 +- .../localized/fr_FR.ISO8859-1/msg/dtmailopts.msg | 10 ++++---- .../localized/fr_FR.ISO8859-1/msg/dttypes.msg | 2 +- .../localized/it_IT.ISO8859-1/msg/DtMail.msg | 26 ++++++++++---------- .../localized/it_IT.ISO8859-1/msg/dtmailopts.msg | 4 ++-- 8 files changed, 52 insertions(+), 52 deletions(-) diff --git a/cde/programs/localized/es_ES.ISO8859-1/msg/DtMail.msg b/cde/programs/localized/es_ES.ISO8859-1/msg/DtMail.msg index 9776070..b277b02 100644 --- a/cde/programs/localized/es_ES.ISO8859-1/msg/DtMail.msg +++ b/cde/programs/localized/es_ES.ISO8859-1/msg/DtMail.msg @@ -1413,19 +1413,19 @@ $set 27 4 "IMAP" 5 "POP2" -6 "Automatic (system) delivery" - -7 "Mail server retrieval" -8 "Server Protocol:" -9 "Server Name:" -10 "User Name:" -11 "Password:" -12 "Remember password" -13 "Delete from server after retrieval" -14 "Retrieve old messages" - -15 "Custom retrieval" -16 "User Getmail command:" +6 "Distribucion Automatica (sistemo)" + +7 "Recoger del servidor de correo" +8 "Protocolo del Servidor:" +9 "Nombre del Servidor:" +10 "Nombre del Usuario:" +11 "Frase de Paso:" +12 "Recordacion de la Frase de Paso" +13 "Borrar del servidor despuès del recogimento" +14 "Recoger viejos mensajes" + +15 "Recogimento Personal" +16 "Mandamiento per recoger correo del usuario:" 17 "Null INBOX path." 18 "INBOX folder path:" diff --git a/cde/programs/localized/es_ES.ISO8859-1/msg/dtmailopts.msg b/cde/programs/localized/es_ES.ISO8859-1/msg/dtmailopts.msg index 9c75e6a..c7d525e 100644 --- a/cde/programs/localized/es_ES.ISO8859-1/msg/dtmailopts.msg +++ b/cde/programs/localized/es_ES.ISO8859-1/msg/dtmailopts.msg @@ -191,13 +191,13 @@ $ Used to construct the label on the "Mail Retrieval" menu button in the $ "Category" option menu in the "Mailer - Options" dialog. $ This menu button is used to select printing options pane. $ This message is in the same menu as messages 4 - 10 above. -$ "NEW-" -93 "Mail Retrieval" +$ "NEW-" (Recobrar is also possible) +93 "Recoger el Correo" $ $ Used to construct the label on the confirm attachment in the $ compose pane. $ "NEW-" -94 "Confirm attachments over:" +94 "Confirmar archivos adjuntos despuès:" $ "NEW-" 95 "kilobytes" diff --git a/cde/programs/localized/fr_FR.ISO8859-1/msg/DtMail.msg b/cde/programs/localized/fr_FR.ISO8859-1/msg/DtMail.msg index 15d074e..d918b6c 100644 --- a/cde/programs/localized/fr_FR.ISO8859-1/msg/DtMail.msg +++ b/cde/programs/localized/fr_FR.ISO8859-1/msg/DtMail.msg @@ -726,7 +726,7 @@ $ "-NEW" 262 "lettre morte message" $ "-NEW" -263 "The attachment '%s' is %d kilobytes.\nAdd as attachment?" +263 "La pièce jointe '%s' prend %d kilooctets.\nAjouter la p.-j. ?" @@ -1414,20 +1414,20 @@ $set 27 4 "IMAP" 5 "POP2" -6 "Automatic (system) delivery" +6 "Distribution (système) automatique" -7 "Mail server retrieval" -8 "Server Protocol:" -9 "Server Name:" -10 "User Name:" -11 "Password:" -12 "Remember password" -13 "Delete from server after retrieval" -14 "Retrieve old messages" +7 "Récupération sur serveur distant" +8 "Protocole du serveur:" +9 "Nom du Serveur:" +10 "Nom Utilisateur:" +11 "Mot de Passe:" +12 "Retenir le mot de passe" +13 "Effacer du serveur après récupération" +14 "Récupérer les anciens messages" -15 "Custom retrieval" -16 "User Getmail command:" +15 "Récupération personnalisée" +16 "commande à éxécuter:" -17 "Null INBOX path." -18 "INBOX folder path:" +17 "Pas de chemin pour INBOX ." +18 "Chemin du dossier INBOX :" diff --git a/cde/programs/localized/fr_FR.ISO8859-1/msg/dtinfo_start.msg b/cde/programs/localized/fr_FR.ISO8859-1/msg/dtinfo_start.msg index 41d3584..c57f0b0 100644 --- a/cde/programs/localized/fr_FR.ISO8859-1/msg/dtinfo_start.msg +++ b/cde/programs/localized/fr_FR.ISO8859-1/msg/dtinfo_start.msg @@ -22,7 +22,7 @@ $ 1 Le processus de la session tt n'est pas lancé et le service ToolTalk\n\ ne peut pas le relancer. 2 L'identificateur courant du processus par défaut est périmé ou incorrect. -3 La session ToolTalk sécifiée est périmée ou incorrecte. +3 La session ToolTalk spécifiée est périmée ou incorrecte. $ $ Message 4: Do not localize the word DtInfo_Start. diff --git a/cde/programs/localized/fr_FR.ISO8859-1/msg/dtmailopts.msg b/cde/programs/localized/fr_FR.ISO8859-1/msg/dtmailopts.msg index 19794ea..6a90679 100644 --- a/cde/programs/localized/fr_FR.ISO8859-1/msg/dtmailopts.msg +++ b/cde/programs/localized/fr_FR.ISO8859-1/msg/dtmailopts.msg @@ -27,9 +27,9 @@ $ ** You can edit this comment and add comments below each message. 4 "Vue message" -5 "Composition fenêtre" +5 "Fenêtre de composition" -6 "Archivage messages" +6 "Archivage des messages" 7 "Congés" @@ -192,12 +192,12 @@ $ "Category" option menu in the "Mailer - Options" dialog. $ This menu button is used to select printing options pane. $ This message is in the same menu as messages 4 - 10 above. $ "NEW-" -93 "Mail Retrieval" +93 "Récupération Courrier" $ $ Used to construct the label on the confirm attachment in the $ compose pane. $ "NEW-" -94 "Confirm attachments over:" +94 "Confirmer pièces-jointes après:" $ "NEW-" -95 "kilobytes" +95 "kilooctets" diff --git a/cde/programs/localized/fr_FR.ISO8859-1/msg/dttypes.msg b/cde/programs/localized/fr_FR.ISO8859-1/msg/dttypes.msg index c909c11..5662bb3 100644 --- a/cde/programs/localized/fr_FR.ISO8859-1/msg/dttypes.msg +++ b/cde/programs/localized/fr_FR.ISO8859-1/msg/dttypes.msg @@ -97,7 +97,7 @@ $ Do not Translate 32 "zone rec_info incorrecte dans l'option -w\n" $ do not translate "rec_info" or "-w" -33 "Option introuvabel dans -w ou -l\n" +33 "Option introuvable dans -w ou -l\n" $ do not translate "-w" or "-l" 34 "Option inconnue\n" diff --git a/cde/programs/localized/it_IT.ISO8859-1/msg/DtMail.msg b/cde/programs/localized/it_IT.ISO8859-1/msg/DtMail.msg index 1ec43f8..3660eb6 100644 --- a/cde/programs/localized/it_IT.ISO8859-1/msg/DtMail.msg +++ b/cde/programs/localized/it_IT.ISO8859-1/msg/DtMail.msg @@ -1104,19 +1104,19 @@ $set 27 4 "IMAP" 5 "POP2" -6 "Automatic (system) delivery" - -7 "Mail server retrieval" -8 "Server Protocol:" -9 "Server Name:" -10 "User Name:" -11 "Password:" -12 "Remember password" -13 "Delete from server after retrieval" -14 "Retrieve old messages" - -15 "Custom retrieval" -16 "User Getmail command:" +6 "Distribuzione (sistemo) automatica" + +7 "ricupero dal Mailserver" +8 "Protocollo del Server:" +9 "Nome Server:" +10 "Nome Utento:" +11 "Passaparola:" +12 "Ricorda passaparola" +13 "Cancellare dal server dopo ricupero" +14 "Ricupera vecchi messagi" + +15 "Ricupero personalizzato" +16 "Utento Getmail commanda:" 17 "Null INBOX path." 18 "INBOX folder path:" diff --git a/cde/programs/localized/it_IT.ISO8859-1/msg/dtmailopts.msg b/cde/programs/localized/it_IT.ISO8859-1/msg/dtmailopts.msg index fed04b4..b5ad2f6 100644 --- a/cde/programs/localized/it_IT.ISO8859-1/msg/dtmailopts.msg +++ b/cde/programs/localized/it_IT.ISO8859-1/msg/dtmailopts.msg @@ -111,12 +111,12 @@ $ "Category" option menu in the "Mailer - Options" dialog. $ This menu button is used to select printing options pane. $ This message is in the same menu as messages 4 - 10 above. $ "NEW-" -93 "Mail Retrieval" +93 "Ricupero Posta" $ $ Used to construct the label on the confirm attachment in the $ compose pane. $ "NEW-" -94 "Confirm attachments over:" +94 "Conferma allegati dopo:" $ "NEW-" 95 "kilobytes" -- 2.8.2Title: Internationalization of Common Desktop Environment
Internationalization of Common Desktop Environment
The LANG environment variable
The environement variable LANG indicates both the language and the national specificities that (the "locale" in Unix jargon: man 7 locale for details) should be used by the Common Desktop Environnement. Its value takes the form LANG=language_country.encoding, where language is the two letter code specifying in which language menus (say english en) and messages should be written, country is another two-letter code indicating for which specific country adjustement (say the United States of America US or the United Kingdom UK) to the messages in a given language should be made, and encoding indicates whether the language is written with a latin, cyrillic, greek, hebrew, arabic, asian (etc...) alphabet.
For now, besides the english C locale, some possible values of LANG in the Common Desktop Environment are fr_FR.ISO8859-1, de_DE.ISO8859-1, es_ES.ISO8859-1and it_IT.ISO8859-1 that is messages written in French (fr) for France (FR), or in German (de) language and for Germany (DE), or in Spanish(es) and for Spain (ES) or in Italian (it) for Italy. In the case of Switzerland, in order to have the appropriate monetary symbol for the Swiss Franc, and to take into account possible differences between German and Swiss German in the messages, one would need to create a LANG=de_CH.ISO8859-1 locale. Similarly, an adaptation for French Swiss cantons (Genève, Valais, Vaud...) requires aLANG=fr_CH.ISO8859-1 locale, and and adaptation for Ticino a LANG=it_CH.ISO8859-1. In North America, an adaptation for Québec (with Canadian dollar as monetary symbol etc...) would require a LANG=fr_CA.ISO8859-1 "locale". In Mexico, a LANG=es_MX.ISO8859-1 "locale" would be used.
Obviously, some West European languages that can be encoded with ISO8859-1 such as Dutch (nl_NL.ISO8859-1) or Portuguese (pt_PT.ISO8859-1) are missing. A pending question is whether East European languages can be supported. In principle, OSF/Motif supports all the ISO8859 family of encodings, so translations of the messages to Polish, Czech, Romanian should be feasible.
Two letter code | Language |
---|---|
de | German |
es | Spanish |
eu | Basque |
fr | French |
it | Italian |
nl | Dutch |
oc | Occitan |
pt | Portuguese |
la | Latin |
Two letter code | Country |
---|---|
BE | Belgium |
CA | Canada |
CH | Swiss Confederation |
DE | Germany |
ES | Spain |
FR | France |
IT | Italy |
PT | Portugal |
Encoding | Languages |
---|---|
ISO8859-1/15 | Afar, Afrikaans, English, Basque, Breton,
Catalan, Cornish, Danish, Dutch, Finnish, French, Gaelic, Galician,
German, Icelandic, Indonesian, Irish, Italian, Malagasy, Malay, Oromo, Norwegian, Portuguese, Scottish, Somali, Sotho, Spanish, Swahili, Swedish, Tagalog, Uzbek, Xhosa, Zulu |
ISO8859-2 | Albanian, Bosnian, Croatian, Czech, English, Finnish, German, Hungarian, Irish, Polish, Slovak, Slovenian and Sorbian |
ISO 8859-3 | Maltese, Esperanto |
ISO 8859-4 | Baltic and Scandinavian Languages:Icelandic, Lappish, Eskimo |
ISO 8859-5 | Cyrillic: Russsian, Serbo-Croat, Bulgarian |
ISO 8859-6 | Arabic |
ISO 8859-7 | Greek |
ISO 8859-8 | Hebrew |
ISO-8859-9 | Turkish |
ISO-8859-10 | Icelandic, Lappish, Eskimo, Luganda |
ISO-8859-11 | Thai |
ISO-8859-13 | Baltic languages: Latvian, Lithuanian and Maori |
ISO-8859-14 | Celtic Languages: Welsh, Gaelic, Breton, Cornish |
Note that ISO-8859-15 is an improved version of ISO-8859-1 with the € symbol. Some African languages such as Zulu and Swahili are written with only ASCII characters, and thus with any of the ISO-8859 encodings.
Message catalogs, online help and miscellaneous
Message catalogs
When the variable LANG has a definite value, messages are taken in the usr/dt/lib/nls/msg/$LANG folder. For exemple, the folder /usr/dt/lib/nls/msg/fr_FR.ISO8859-1/ contains:
Each .cat file is a binary file in which messages, menu texts, button names of the application are stored. The binary file dtcalc.cat contains the names of the keys of the applications dtcalc as well as the text of the error messages.
The .cat binary files are generated during the CDE build process by the program gencat(1) from source files .msg that are included with sources of the Common Desktop Environment in the folder programs/localized/$LANG.
Online help
Similarly, when LANG is defined, help messages are taken from the folder /usr/dt/appconfig/help/$LANG. The folder /usr/dt/appconfig/help/fr_FR.ISO8859-1/ contains the following files and directories:
To add a new "locale" to the Common Desktop Environment one must translate the messages from the .msg files and the help messages from the .sgm files, and generate the .cat and .sdl files. The .cat will have to be placed under the new directory /usr/dt/lib/nls/msg/LANG, where LANG is formed of the two lowercase letter code of the language, followed by the two uppercase letter code of the country and terminated by the code indicating which ISO8859 encoding is used for the characters. The .sdl files have to be placed under /usr/dt/appconfig/help/LANG
.Miscellaneous
The directory app-defaults/ contains:Message catalogs: an example
Let's assume that we want to add Latin to the available languages. We will need to create a "locale" for that language. The two letter code for latin is la, and Latin can be encoded with any ISO8859 encoding. The country can be picked at will, and in our example France will be chosen. We will have to create the folder programs/localized/la_FR.ISO8859-1 and copy there all files and folders under programs/localized/C.
We also need to do
The Imakefile under the directories
Various dictionaries and grammars are available online:
- A Copious and Critical English-Latin Dictionary by William Smith,Theophilus Dwight Hall
- A Complete English-Latin and Latin-English Dictionary by Joseph Esmond Riddle
- A Copious and Critical English-Latin Lexicon Joseph Esmond Riddle,Karl Ernst Georges,Thomas Kerchever Arnold
- A Phraseological English-Latin Dictionary Charles Duke Yonge
- Entick's English-Latin dictionary John Entick
- Elements of Latin Grammar Albert Harkness
- A Latin Grammar for Schools and Colleges Joseph Henry Allen,James Bradstreet Greenough
- Handbook of Latin writing Henry Preble, Charles Pomeroy Parker
Format of the message files
In any .msg file, the lines beginning with a $ followed by space are comments in English to help the translator (see for instance CDE Internationalization Programmer's Guide in Message Guidelines section). It is not necessary to translate them in Latin. Lines beginning with $set are $quote must not be changed. The lines containing a message begin with a number followed by a space and the message to be translated such as 66 Index. The number must remain untouched, and only the text of the message may need to be translated.
The following warning appears in the comments at the beginning of the file localized/C/msg/dtterm.msg :
Moreover, the file localized/C/msg/dtpad.msg also contains comments of the form:
Rules
- Never translate lines beginning with a $.
- Never translate the messages that should not be localized (DO NOT TRANSLATE/CHANGE/LOCALIZE) as this could cause undefined behavior of the program.
- Prioritize the translation of the messages displayed to the users over messages that go to the error log file (WILL ONLY APPEAR IN THE DT ERRORLOG FILE) or messages marked UNUSED.
Simple messages
The file localized/C/msg/dtcm.msg contains the messages of the dtcm calendar program. For instance, the names of the months are given as messages 114 to 125):
The numbers of the first columns are the message numbers. They are used by dtcm to locate the name of the month that should be printed. They must therefore be left intact. The names of the months between quotes in the second columd must be changed to the Latin names in the file localized/la_FR.ISO8859-1/msg/dtcm.msg:
Three-letter abbreviations are found as messages 126 to 137. Only the message 130 "May" needs to be changed to 130 "Mai" .
The names of the days are found in localized/C/msg/dtcm.msg as messages 146 to 152
The names in the second column have to be translated in Latin in the file localized/la_FR.ISO8859-1/msg/dtcm.msg:
Messages containing C language format strings
Some messages contain symbols %s (or %d), for instance in localized/C/msg/dtcm.msg:
Examples of messages containing the symbol %d (indicating an integer number format in C) are:
The %A is replaced by the name of the day, %B by the month, %e by the day of the month, %Y by the year. One only has to exchange the order into 992 "%A %e %B, %Y". Note that if such a format string is used in strftime(3), the result will depend on the existence of a locale for Latin on the system as as this one. In the absence of such a locale, the output of strftime(3)will be in English.
A more complex example of C format strings in localized/C/msg/dtcm.msg is,The *.tmsg files under app-defaults/ backdrops/ config/ palettes/ types/ must be translated following the same rules.
In order to have some uniformity between the applications, it is useful to make a glossary of English terms frequently used by CDE. These words can be replaced using the global substitution (with confirmation since some messages must not bet translated) function of an interactive text editor. In that way, the same Latin terms will describe the same objects/operations across all CDE applications, ensuring consistency of the messages. An example of such glossary is given in the table.
English | Latin |
---|---|
Action | Action, onis |
Apply | Applicare |
Go To | Vadere |
Cancel | Relinquere |
Help | Adjumentum |
Change | Mutare |
Close | Claudere |
Load | Onerare |
Copy | Copiare |
Paste | Agglutinare |
Create | Creare |
Edit | Rediger |
Error | Error, oris |
Execute | Pellere |
Folder | Index, icis |
File | scapus, i |
Host | Hospes, itis |
Ignore | Contemnere |
Exscribere | |
Group | Circulus, i |
Modify | Modificare |
Move | Movere |
Network | Rete, is |
New | Novus, a, um |
Options | Optio, onis |
Browse | Perlustrare |
Default | Absentem Aliquis |
Font | Typus, i |
Program | Programma |
Read | Legere |
Search | Quaerere |
Save (as) | Perscribere (in) |
Select | Seligere |
Delete | Delere |
Syntax | Constructio, onis |
Rename | Vocare |
Type | Genus, neris |
Text | Textus |
Key | Clavis, is |
User | Usor (or Usuarius) |
Validate | Validare |
Value | Valor, oris |
Visualise | Aspicere |
|
Once the necessary translations are finished, the message catalogs *.cat must be created with gencat .
The proper command is
To test the translated files, we need to do (as root)
Help Messages
To generate the help messages the files other than book.sgm under doc/C/help/Calendar have to be translated. The translation work is simpler since no C formats strings appear. Text between <-- --> is a comment and does not need to be translated. Text of the form &something; is a SGML symbol and must not be translated. Only the text between <...> and </...> needs to be translated. The help volumes can be stored in the local directory under .dt/help.------------------------------------------------------------------------------
_______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel