Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,21 @@ following resources:
Programmers, please follow these general [guidelines for
contributions](https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md).

### Translators

Music Blocks uses
[PO files](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html)
to maintain translations of the text strings used in the
interface. The PO files are available through an
[interactive website](https://weblate.sugarlabs.org/projects/music-blocks/music-blocks/).

Alternatively, translators can clone the
[git repo](https://github.com/sugarlabs/musicblocks.git), edit the PO files
locally, and make a pull request.

Note that once the PO files are updated, they are compiled into an INI
file, which is the file used by Music Blocks.

### New Contributors

Use the
Expand Down
26 changes: 24 additions & 2 deletions po/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ We are using PO files as the basic mechanism for managing translation
of Music Blocks. We'd prefer that translators work with the Sugar
Labs [Pootle server]( https://weblate.sugarlabs.org) and
we will work with you to set up a PO file for your language if one is
not presently on the server. Also feel free to make Pull Requests
not presently on the server. Also feel free to make pull requests
directly to this repository with updates to existing (or new) PO
files.

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

The text input between the two quotation marks of msgstr will be displayed when a users browser requests the target language
The text input between the two quotation marks of msgstr will be
displayed when a users browser requests the target language.

Under the hood
==============

MusicBlocks.pot is a template that is periodically updated with all of
the strings used for internationalization. Individual language PO
files are updated from this POT file.

As per above, translators work with the PO files, either through the
web interface or by making a pull request.

The localization.ini file is compliled from the PO files. The INI file
is used by JavaScript to do the actual translation of the interface.

There are instructions for adding a new language to the pull-down menu
in the
[README.md](https://github.com/sugarlabs/musicblocks/blob/master/README.md)
file found in the js directory.

The tools for maintaining the POT, PO, and INI files are found in the
[PO Utils](https://github.com/sugarlabs/po-utils) repository.