wallabag/docs/en/developer/translate.rst

61 lines
1.9 KiB
ReStructuredText
Raw Normal View History

2016-02-17 13:39:30 +00:00
Translate wallabag
==================
2016-02-20 07:39:08 +00:00
wallabag web application
------------------------
2016-02-17 13:48:41 +00:00
Translation files
2016-02-20 07:39:08 +00:00
~~~~~~~~~~~~~~~~~
2016-02-17 13:39:30 +00:00
.. note::
2016-02-20 07:39:08 +00:00
As wallabag is mainly developed by a French team, please consider that french
translation is the most updated one and please copy it to create your own translation.
You can find translation files here: https://github.com/wallabag/wallabag/tree/master/src/Wallabag/CoreBundle/Resources/translations.
2016-02-17 13:39:30 +00:00
You have to create ``messages.CODE.yml`` and ``validators.CODE.yml``, where CODE
2016-02-20 07:39:08 +00:00
is the ISO 639-1 code of your language (`see wikipedia <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__).
2016-02-17 13:39:30 +00:00
2016-02-18 12:59:02 +00:00
Other files to translate:
- https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations.
- https://github.com/wallabag/wallabag/tree/master/src/Wallabag/UserBundle/Resources/translations.
2016-02-17 13:39:30 +00:00
2016-02-20 07:39:08 +00:00
You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files.
2016-02-17 13:39:30 +00:00
Configuration file
2016-02-20 07:39:08 +00:00
~~~~~~~~~~~~~~~~~~
2016-02-17 13:39:30 +00:00
You have to edit `app/config/config.yml
<https://github.com/wallabag/wallabag/blob/master/app/config/config.yml>`__ to display
2016-02-20 07:39:08 +00:00
your language on Configuration page of wallabag (to allow users to switch to this new translation).
2016-02-17 13:39:30 +00:00
2016-02-20 07:39:08 +00:00
Under the ``wallabag_core.languages`` section, you have to add a new line with
your translation. For example:
2016-02-17 13:39:30 +00:00
::
wallabag_core:
...
languages:
en: 'English'
fr: 'Français'
2016-02-20 07:39:08 +00:00
For the first column (``en``, ``fr``, etc.), you have to add the ISO 639-1 code
of your language (see above).
2016-02-17 13:39:30 +00:00
For the second column, it's the name of your language. Just that.
2016-02-20 07:39:08 +00:00
wallabag documentation
----------------------
.. note::
Contrary to the web application, the main language for documentation is english.
Documentation files are stored here: https://github.com/wallabag/wallabag/tree/master/docs
2016-02-20 07:39:08 +00:00
You need to respect the ``en`` folder structure when you create your own translation.