From 74efe762eb501f88f3ebe8ef11ccd6c73cfa39f7 Mon Sep 17 00:00:00 2001 From: Julien VAUBOURG Date: Wed, 8 Jul 2015 18:36:14 +0200 Subject: [PATCH] Update i18n README --- sources/i18n/README | 23 --------- sources/i18n/README.md | 45 ++++++++++++++++++ .../i18n/fr_FR/LC_MESSAGES/localization.mo | Bin 3465 -> 3478 bytes .../fr_FR/{ => LC_MESSAGES}/localization.po | 25 +++++++--- 4 files changed, 63 insertions(+), 30 deletions(-) delete mode 100644 sources/i18n/README create mode 100644 sources/i18n/README.md rename sources/i18n/fr_FR/{ => LC_MESSAGES}/localization.po (83%) diff --git a/sources/i18n/README b/sources/i18n/README deleted file mode 100644 index 8bd2e4b..0000000 --- a/sources/i18n/README +++ /dev/null @@ -1,23 +0,0 @@ -Add a "localization.pot" to this directory, and one folder per translated language, containing the po a LC_MESSAGE directory (with the .mo) - -See: https://github.com/YunoHost/admin_v1/tree/master/i18n - -## Example - -The next command generates the pot file from templates files -``` -xgettext views/* -o i18n/localization.pot -``` - -The template must use directly the function ```gettext``` or its alias ```_```. - -The following command generate the .po file for the language fr_FR with UTF-8 as enconding: -``` -msginit --locale=fr_FR.UTF-8 -i i18n/localization.pot -o i18n/fr_FR/localization.po -``` - -Once the po file fullfilled, you can generate the .mo file used by the system. -``` -msgfmt i18n/fr_FR/localization.po -o i18n/fr_FR/LC_MESSAGES/localization.mo -``` - diff --git a/sources/i18n/README.md b/sources/i18n/README.md new file mode 100644 index 0000000..960df01 --- /dev/null +++ b/sources/i18n/README.md @@ -0,0 +1,45 @@ +## Force language + +The default language of the web admin depends on your browser language. + +You can force a language by using (e.g. for French): +``` +/wifiadmin/?/lang/fr +``` + +English is the default language if the browser language is not available. + +## Update the default string list + +Updating the pot file from template files: +``` +xgettext sources/views/* -o sources/i18n/localization.pot +``` + +## Add a new language + +Create a new directory path (e.g. for French): +``` +mkdir -p sources/i18n/fr_FR/LC_MESSAGES/ +``` + +Generate the po file: +``` +msginit --locale=fr_FR.UTF-8 -i sources/i18n/localization.pot -o sources/i18n/fr_FR/LC_MESSAGES/localization.po +``` + +You can use poedit for translating the po: +``` +poedit sources/i18n/fr_FR/LC_MESSAGES/localization.po +``` + +With poedit, just save your modifications with the button and the *localization.mo* (compiled version of the po) file will automatically be created or updated. + +If you edited the po by hand, you have to compile the mo file: +``` +msgfmt sources/i18n/fr_FR/localization.po -o sources/i18n/fr_FR/LC_MESSAGES/localization.mo +``` + +Change the default language of your browser, and test this new translation. + +You should add the locale to the list at the end of *sources/controller.php*. diff --git a/sources/i18n/fr_FR/LC_MESSAGES/localization.mo b/sources/i18n/fr_FR/LC_MESSAGES/localization.mo index 75fc8a2a6e3fa9e340b08a4dba0de663ecd09cc4..59e832dbe28928d5c21e12de58b415239314849e 100644 GIT binary patch delta 377 zcmXZYKTE?<6o&B=ttP2e1ktK3n5}~}Bowt29Rx+XIqF!_6zb4I$R5O@x(NkcS~qcV zs02EQAc&KQi$h1hfH(*3N-=rn@FK%h<(zwG}{K4n|ZAyev z@)!*)B$^nlui+L}aUMIki2WoFG1~u%yirEDi67X&e5MfJy-~EvhFz|dN~@OLeNo?*4~lzk%k^r0+p8G+ZMWX^4clBdZ7aOgvWi}9 P`L5TfIc_-A-^c#|sR=h0 delta 365 zcmbOx-6_4ng|R-Ik%7UHoq<7;fq`Kr2LppRklqZW#eno_Ak7M-9|37jApHVJ&jr$- zfV41>o&XdCi7x>XKp}>8KzbgK-VUVMfOHra#GF_l%?IR{K>5u;ngz(8#l=t$X3Pf) zxB>;10BHdr{R&8fEcgwifrx>h8)BdolvV`NAbAZSZ40DrfV3!(t^(2$Kzag{zY<7; z^zR4KKtD2^0@5}>`Vx>%1Je9F>JXQd@jwi$2Ga6CiGCn`2uQC7(x8wi+MLPshJ`=C z(b?P4-BlsXH7MBA-*0j#dnB)!uAzy7k&%_Lxwe7P\n" "Language-Team: French\n" "Language: fr\n" @@ -16,6 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 1.6.10\n" #: views/layout.html.php:27 msgid "Wifi Hotspot" @@ -41,7 +42,9 @@ msgstr "Configuration du point d'accès" #: views/settings.html.php:39 views/settings.html.php:41 msgid "" "This is a fast status. Click on More details to show the complete status." -msgstr "Ceci est un résumé du statut. Cliquez sur Plus de détails pour consulter l'intégralité du statut." +msgstr "" +"Ceci est un résumé du statut. Cliquez sur Plus de détails pour consulter " +"l'intégralité du statut." #: views/settings.html.php:39 msgid "Running" @@ -69,7 +72,7 @@ msgstr "Point d'accès activé" #: views/settings.html.php:73 msgid "Device" -msgstr "Appareil" +msgstr "Interface" #: views/settings.html.php:85 msgid "Channel" @@ -84,7 +87,10 @@ msgid "" "You are currently connected through the wifi hotspot. Please, confirm the " "reloading, wait for the wifi disconnect/reconnect and go back here to check " "that everything is okay." -msgstr "Vous êtes actuellement connecté(e) au point d'accès WiFi. Veillez confirmer le rechargement, attendre que le WiFi se déconnecte/reconnecte et revenir ici pour vérifier que tout est correct." +msgstr "" +"Vous êtes actuellement connecté(e) au point d'accès WiFi. Veillez confirmer " +"le rechargement, attendre que le WiFi se déconnecte/reconnecte et revenir " +"ici pour vérifier que tout est correct." #: views/settings.html.php:124 views/settings.html.php:130 msgid "Reloading may take a few minutes. Be patient." @@ -126,7 +132,9 @@ msgstr "Sécurisé" msgid "" "Disabling the Secure Wifi allows everyone to join the hotspot and spy the " "traffic (but it's perfect for a PirateBox)" -msgstr "Désactiver le WiFi sécurisé permet à tout individu de se connecter au point d'accès et d'espionner le trafic (Cependant c'est parfait pour une PirateBox)" +msgstr "" +"Désactiver le WiFi sécurisé permet à tout individu de se connecter au point " +"d'accès et d'espionner le trafic (Cependant c'est parfait pour une PirateBox)" #: views/_ssid.html.php:31 msgid "Password (WPA2)" @@ -144,7 +152,10 @@ msgstr "Montrez à vos amis comment accèder à votre point d'accès" msgid "" "Currently, your wifi clients don't have IPv6 and it's a very bad thing. Ask " "your Internet Service Provider an IPv6 delegated prefix, or" -msgstr "Actuellement vos clients WiFi n'utilisent pas IPv6, ce qui n'est pas une très bonne chose. Demandez à votre Fournisseur d'accès Internet un préfixe IPv6." +msgstr "" +"Actuellement vos clients WiFi n'utilisent pas IPv6, ce qui n'est pas une " +"très bonne chose. Demandez à votre Fournisseur d'accès Internet un préfixe " +"IPv6." #: views/_ssid.html.php:45 msgid "change providers"