mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
Update i18n README
This commit is contained in:
parent
285b02fd3f
commit
74efe762eb
4 changed files with 63 additions and 30 deletions
|
@ -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
|
|
||||||
```
|
|
||||||
|
|
45
sources/i18n/README.md
Normal file
45
sources/i18n/README.md
Normal file
|
@ -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*.
|
Binary file not shown.
|
@ -5,10 +5,10 @@
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2015-06-11 23:05+0200\n"
|
"POT-Creation-Date: 2015-06-11 23:05+0200\n"
|
||||||
"PO-Revision-Date: 2015-06-14 22:37+0200\n"
|
"PO-Revision-Date: 2015-07-08 18:33+0100\n"
|
||||||
"Last-Translator: root <root@ustelo>\n"
|
"Last-Translator: root <root@ustelo>\n"
|
||||||
"Language-Team: French\n"
|
"Language-Team: French\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
@ -16,6 +16,7 @@ msgstr ""
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
"X-Generator: Poedit 1.6.10\n"
|
||||||
|
|
||||||
#: views/layout.html.php:27
|
#: views/layout.html.php:27
|
||||||
msgid "Wifi Hotspot"
|
msgid "Wifi Hotspot"
|
||||||
|
@ -41,7 +42,9 @@ msgstr "Configuration du point d'accès"
|
||||||
#: views/settings.html.php:39 views/settings.html.php:41
|
#: views/settings.html.php:39 views/settings.html.php:41
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is a fast status. Click on More details to show the complete status."
|
"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
|
#: views/settings.html.php:39
|
||||||
msgid "Running"
|
msgid "Running"
|
||||||
|
@ -69,7 +72,7 @@ msgstr "Point d'accès activé"
|
||||||
|
|
||||||
#: views/settings.html.php:73
|
#: views/settings.html.php:73
|
||||||
msgid "Device"
|
msgid "Device"
|
||||||
msgstr "Appareil"
|
msgstr "Interface"
|
||||||
|
|
||||||
#: views/settings.html.php:85
|
#: views/settings.html.php:85
|
||||||
msgid "Channel"
|
msgid "Channel"
|
||||||
|
@ -84,7 +87,10 @@ msgid ""
|
||||||
"You are currently connected through the wifi hotspot. Please, confirm the "
|
"You are currently connected through the wifi hotspot. Please, confirm the "
|
||||||
"reloading, wait for the wifi disconnect/reconnect and go back here to check "
|
"reloading, wait for the wifi disconnect/reconnect and go back here to check "
|
||||||
"that everything is okay."
|
"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
|
#: views/settings.html.php:124 views/settings.html.php:130
|
||||||
msgid "Reloading may take a few minutes. Be patient."
|
msgid "Reloading may take a few minutes. Be patient."
|
||||||
|
@ -126,7 +132,9 @@ msgstr "Sécurisé"
|
||||||
msgid ""
|
msgid ""
|
||||||
"Disabling the Secure Wifi allows everyone to join the hotspot and spy the "
|
"Disabling the Secure Wifi allows everyone to join the hotspot and spy the "
|
||||||
"traffic (but it's perfect for a PirateBox)"
|
"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
|
#: views/_ssid.html.php:31
|
||||||
msgid "Password (WPA2)"
|
msgid "Password (WPA2)"
|
||||||
|
@ -144,7 +152,10 @@ msgstr "Montrez à vos amis comment accèder à votre point d'accès"
|
||||||
msgid ""
|
msgid ""
|
||||||
"Currently, your wifi clients don't have IPv6 and it's a very bad thing. Ask "
|
"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"
|
"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
|
#: views/_ssid.html.php:45
|
||||||
msgid "change providers"
|
msgid "change providers"
|
Loading…
Reference in a new issue