Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ergenius/gettext-po-samples

Gettext PO samples database
https://github.com/ergenius/gettext-po-samples

gettext gettext-language-formulas gettext-plural-forms gettext-po gettext-po-examples gettext-po-samples gettext-po-templates gettext-pot-sample po-plural-forms

Last synced: 14 days ago
JSON representation

Gettext PO samples database

Awesome Lists containing this project

README

        

# **gettext-po-samples**
## Gettext PO samples database

This project is an effort to create a free, open source repository of GNU gettext PO files samples database.

It is intended to be used as a learning resource, demonstrating most GNU Gettext features.
It can also be used by programmers to build or test their gettext implementations.

**235 languages and dialects PO samples are provided** including the proper Plural-Forms header.

**The project also contains a separate database of Plural-Forms.**
Please check the `/data/plural-forms.json` for details. The file is self-explanatory.
An Erlang file is offered as an alternative to the JSON database.

## Project structure
- `/po` - contains "translations" for the `/po/template.pot` file in 235 languages
- `/data` - contains useful data for projects related to gettext
- `/data/plural-forms.json` - contains a database of plural formulas in JSON format
- `/data/plural-forms.eterm` - contains a database of plural formulas in Erlang term format to use with file:consult/1
- `/generator` - contains Erlang escript used to generate this database

## Motivation
The need for creating the gettext PO samples database arose while writing a PO parser in Erlang.

## Is this data correct?

Short answer: Yes, if you trust CLDR Project.

We use the following sources and tools for compiling the database:
- Unicode CLDR Project https://cldr.unicode.org/
- PHP gettext language list https://github.com/php-gettext/Languages
- TranslateHouse http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html

Formulas are automated generated by php-gettext from CLDR. Each new release is manually checked and compared with the sources mentioned above.
Data is compiled into `/generator/data/languages.config` file, used by `/generator` Erlang escript to create the PO database and data files.

## Project roadmap
1. Continuously check plural formulas and monitor CLDR for changes.
2. Study various gettext projects and test compatibility with this repository.
3. Add more useful data related to PO and GNU gettext.

## Projects using gettext-po-samples
(Please make a pull request if you want your project added to this list)

A backlink is highly appreciated but not required!

## Authors
- Madalin Grigore-Enescu (ergenius)

## License
gettext-po-samples is available under the MIT license (see `LICENSE`).