Skip to content

Support internationalisation.#1097

Merged
dhalbert merged 1 commit into
adafruit:masterfrom
tannewt:i18n_only
Aug 8, 2018
Merged

Support internationalisation.#1097
dhalbert merged 1 commit into
adafruit:masterfrom
tannewt:i18n_only

Conversation

@tannewt
Copy link
Copy Markdown
Member

@tannewt tannewt commented Aug 8, 2018

To add a string in the code to the list of translations #include "supervisor/shared/translate.h", wrap it in translate(), and run make translate.

To build with a specific translation provide TRANSLATION to make. For example:

make -j3 BOARD=trinket_m0 TRANSLATION=es

To start a new translation copy locale/circuitpython.pot to locale/<language code>.po where <language code> is an IETF language tag with underscores between subtags.

Filenames will now include language tag after board but before version. For example:

adafruit-circuitpython-itsybitsy_m4_express-es-20180803-230171a9d.bin

Copy link
Copy Markdown
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to check in the locale/circuitpython.pot? It looks like it's generated in the Makefile.

How are the .po files generated? How and when should they be updated? What updates the filenames and line numbers?

Maybe give a pointer to doc if it's already explained elsewhere.

@dhalbert
Copy link
Copy Markdown
Collaborator

dhalbert commented Aug 8, 2018

Copy link
Copy Markdown
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having translations will be great!

@dhalbert dhalbert merged commit 9da79c8 into adafruit:master Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants