Skip to content

Commit efa6675

Browse files
authored
update the documentation for internationalization (sugarlabs#4337)
1 parent 8818d6c commit efa6675

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,21 @@ following resources:
259259
Programmers, please follow these general [guidelines for
260260
contributions](https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md).
261261
262+
### Translators
263+
264+
Music Blocks uses
265+
[PO files](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
266+
to maintain translations of the text strings used in the
267+
interface. The PO files are available through an
268+
[interactive website](https://weblate.sugarlabs.org/projects/music-blocks/music-blocks/).
269+
270+
Alternatively, translators can clone the
271+
[git repo](https://github.com/sugarlabs/musicblocks.git), edit the PO files
272+
locally, and make a pull request.
273+
274+
Note that once the PO files are updated, they are compiled into an INI
275+
file, which is the file used by Music Blocks.
276+
262277
### New Contributors
263278
264279
Use the

po/README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ We are using PO files as the basic mechanism for managing translation
55
of Music Blocks. We'd prefer that translators work with the Sugar
66
Labs [Pootle server]( https://weblate.sugarlabs.org) and
77
we will work with you to set up a PO file for your language if one is
8-
not presently on the server. Also feel free to make Pull Requests
8+
not presently on the server. Also feel free to make pull requests
99
directly to this repository with updates to existing (or new) PO
1010
files.
1111

@@ -19,4 +19,26 @@ The string of text goes like this:
1919
msgid "word_in_English"
2020
msgstr "put_word_in_translated_language_here"
2121

22-
The text input between the two quotation marks of msgstr will be displayed when a users browser requests the target language
22+
The text input between the two quotation marks of msgstr will be
23+
displayed when a users browser requests the target language.
24+
25+
Under the hood
26+
==============
27+
28+
MusicBlocks.pot is a template that is periodically updated with all of
29+
the strings used for internationalization. Individual language PO
30+
files are updated from this POT file.
31+
32+
As per above, translators work with the PO files, either through the
33+
web interface or by making a pull request.
34+
35+
The localization.ini file is compliled from the PO files. The INI file
36+
is used by JavaScript to do the actual translation of the interface.
37+
38+
There are instructions for adding a new language to the pull-down menu
39+
in the
40+
[README.md](https://github.com/sugarlabs/musicblocks/blob/master/README.md)
41+
file found in the js directory.
42+
43+
The tools for maintaining the POT, PO, and INI files are found in the
44+
[PO Utils](https://github.com/sugarlabs/po-utils) repository.

0 commit comments

Comments
 (0)