Quellcode durchsuchen

docs: update site documentation for new i18n support

Matthias Schiffer vor 9 Jahren
Ursprung
Commit
a2e88140c0
2 geänderte Dateien mit 39 neuen und 8 gelöschten Zeilen
  1. 3 5
      docs/user/getting_started.rst
  2. 36 3
      docs/user/site.rst

+ 3 - 5
docs/user/getting_started.rst

@@ -47,17 +47,15 @@ So let's create the directory *site/*:
     mkdir site
     cd site
 
-Copy *site.conf* and *site.mk* from *docs/site-example*:
+Copy *site.conf*, *site.mk* and *i18n* from *docs/site-example*:
 
 ::
 
     cp ../docs/site-example/site.conf .
     cp ../docs/site-example/site.mk .
+    cp -r ../docs/site-example/i18n .
 
-.. note:: On **v2014.3**, take both files from
-          https://github.com/freifunk-gluon/gluon/tree/2014.3.x/docs/site-example
-
-Edit both files to match your community, then go back to the top-level Gluon
+Edit these files to match your community, then go back to the top-level Gluon
 directory and build Gluon:
 
 ::

+ 36 - 3
docs/user/site.rst

@@ -180,9 +180,6 @@ setup_mode : package
         skip = true,
       },
 
-config_mode : package
-    Configuration Mode text blocks
-
 legacy : package
     Configuration for the legacy upgrade path.
     This is only required in communities upgrading from Lübeck's LFF-0.3.x.
@@ -215,6 +212,30 @@ GLUON_PRIORITY
     The default priority for the generated manifests (see the autoupdater documentation
     for more information).
 
+GLUON_LANGS
+    List of languages (as two-letter-codes) to include for the web interface. Should always contain
+    ``en``.
+
+Config mode texts
+-----------------
+
+The community-defined texts in the config mode are configured in PO files in the ``i18n`` subdirectory
+of the site configuration. The message IDs currently defined are:
+
+gluon-config-mode:welcome
+    Welcome text on the top of the config wizard page.
+
+gluon-config-mode:pubkey
+    Information about the public VPN key on the reboot page.
+
+gluon-config-mode:reboot
+    General information about the reboot page.
+
+There is a POT file in the site example directory which can be used to create templates
+for the language files. The command ``msginit -l en -i ../../docs/site-example/i18n/gluon-site.pot``
+can be used from the ``i18n`` directory to create an initial PO file called ``en.po`` if the ``gettext``
+utilities are installed.
+
 Examples
 --------
 
@@ -230,6 +251,18 @@ site.conf
 .. literalinclude:: ../site-example/site.conf
   :language: lua
 
+i18n/en.po
+^^^^^^^^^^
+
+.. literalinclude:: ../site-example/i18n/en.po
+  :language: po
+
+i18n/de.po
+^^^^^^^^^^
+
+.. literalinclude:: ../site-example/i18n/de.po
+  :language: po
+
 modules
 ^^^^^^^