README.rst 2.44 KB
Newer Older
The GAFAM tech collective's avatar
The GAFAM tech collective committed
1 2 3 4 5
.. image:: https://img.shields.io/github/tag/gafam/gafam-poster-translations.svg
    :target: https://github.com/gafam/gafam-poster-translations

|

The GAFAM tech collective's avatar
The GAFAM tech collective committed
6 7 8
######################################
The GAFAM poster campaign translations
######################################
The GAFAM tech collective's avatar
The GAFAM tech collective committed
9 10 11 12


About
=====
The GAFAM tech collective's avatar
The GAFAM tech collective committed
13 14
This repository contains translations of the `GAFAM poster campaign`_
by `La Quadrature du Net`_ in `GNU gettext`_ format.
The GAFAM tech collective's avatar
The GAFAM tech collective committed
15

16
The repository and its accompanying web page `gafam.info`_
The GAFAM tech collective's avatar
The GAFAM tech collective committed
17 18
are intended to support the lovely people of LQDN in spreading
the word about their campaign.
The GAFAM tech collective's avatar
The GAFAM tech collective committed
19 20 21

Contributions are always welcome!

22 23 24 25 26
.. _GAFAM poster campaign: https://twitter.com/laquadrature/status/942764007286591490
.. _La Quadrature du Net: https://www.laquadrature.net/
.. _GNU gettext: https://en.wikipedia.org/wiki/Gettext
.. _gafam.info: https://gafam.info/

The GAFAM tech collective's avatar
The GAFAM tech collective committed
27 28 29

How to work with it
===================
30 31 32

Add another translation
-----------------------
The GAFAM tech collective's avatar
The GAFAM tech collective committed
33
You can find a nice description about how to get started
The GAFAM tech collective's avatar
The GAFAM tech collective committed
34
with translations at https://gafam.info/#contribute.
The GAFAM tech collective's avatar
The GAFAM tech collective committed
35 36 37

Thanks for your efforts!

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67


Technical guideline for operators
=================================
If you are used to work on the command line,
these informations might help you along.


Add a new translation file
--------------------------
::

    cd po
    msginit --locale pt

This should add a new translation file ``pt.po``.

Please edit the header fields ``Last-Translator``
and ``Language-Team`` appropriately. Then, add
the translation texts.

You might want to have a look at the existing
translations as a reference, especially about
how to handle multiline items:
`<po/fr.po>`_, `<po/en.po>`_, `<po/de.po>`_ and
`<po/jp.po>`_.


Convert translation file formats
--------------------------------
68
Convert GNU gettext PO files to i18next_ JSON format::
The GAFAM tech collective's avatar
The GAFAM tech collective committed
69

70
    yarn install
71
    make gettext-to-json
The GAFAM tech collective's avatar
The GAFAM tech collective committed
72

73 74 75
This should convert all ``po/*.po`` files to their
corresponding ``json/*.json`` pendants.

76 77 78
When adding a new translation to the ``po/`` directory,
please also update the ``LANGUAGES`` list in the ``Makefile``.

79 80 81 82 83 84 85 86 87 88 89
It uses the `i18next-gettext-converter`_ module under the hood.

.. note::

    As the JSON files will be automatically generated from
    the PO files, there's no need to edit/update them when
    adding/correcting a translation for a specific language.

    Just run the command above to build the JSON files
    from the PO files.

90
.. _i18next: https://www.i18next.com/
91 92
.. _i18next-gettext-converter: https://github.com/i18next/i18next-gettext-converter