Bewertung: 5 / 5

Stern aktivStern aktivStern aktivStern aktivStern aktiv
 

raspiBackupInstallUI and raspiBackup right now writes messages in German and English only. But both are able to write messages in any language from a coding point of view (I18N). Unfortunately I'm a German native speaker and can speak English and a little bit French and thus I'm unable to add any other language (L10N) and need help on this. Anybody who is willing to help to add support for a new language other than German and English is welcome. Just add your interest in a comment on this page and I will guide and help you to add new messages in your native language to raspiBackupInstallUI and raspiBackup.

Right now following languages are supported:

EN - English
DE - German
FI - Finnish
ZH - Chinese
FR - French

There exist two files which write messages: raspiBackup and raspiBackupInstallUI. Latter should get all messages translated into another language wheras raspiBackup may get new messages. It's up to you. If a language is not supported in raspiBackup English is used.

Following steps have to be done to add a new language to raspiBackupInstallUI and optionally to raspiBackup:

1) For every message a new line in the code for the new language has to be added. Example:

MSG_RUNASROOT=2
MSG_EN[$MSG_RUNASROOT]="RBK0002E: $MYSELF has to be started as root. Try 'sudo %s%s'."
MSG_DE[$MSG_RUNASROOT]="RBK0002E: $MYSELF muss als root gestartet werden. Benutze 'sudo %s%s'."
MSG_FI[$MSG_RUNASROOT]="RBK0002E: $MYSELF tulee käynnistää root-oikeuksin. Suorita 'sudo %s%s'."

The line starting with MSG_FI was added in order to support Finnish. Just use MSG_<LL> where LL are the first two characters of your $LANG. Example for German:

echo $LANG
de_DE.UTF-8

and thus LL is DE.

2) The help text in raspiBackup may optionally also be translated. For every language a bash function usageLL() may be created which has to follow bash syntax. Just use the existing function usageEN as a template.

3) Finally to enable the new language the following line in the code has to be updated:

SUPPORTED_LANGUAGES=("EN" "DE")

change to

SUPPORTED_LANGUAGES=("EN" "DE" "LL")

where LL is the id of the new language. To enable Finnish the line was changed to

SUPPORTED_LANGUAGES=("EN" "DE" "FI")

 

 

Kommentar schreiben

*** Hinweis ***

Kommentare sind erwünscht. Aber um lästige Spamposts abweisen zu können gibt es ein paar Dinge die zu beachten sind:
  1. Kommentare mit dem Text http werden sofort zurückgewiesen mit der Meldung Sie sind nicht berechtigt den Tag zu verwenden. zz
  2. Kommentare werden manuell überprüft und es dauert deshalb in der Regel einen Tag bis sie veröffentlicht werden.