sre-l10n

Localisations for SRE

View on GitHub

Localisation of Speech Rule Engine

These are the localisation facitlities for the speech rule engine. It contains code and files for localising speech rule files. These are now available in a Yaml format and can be more easily localised than in their previous JSON format.

For explanations of the format and what needs to be done to localise them into your language, see here for details.

Usage

Full translation of Speech Rules

Forward translation of all locales:

let trans = require('./js/base/translate');
trans.translateForwardAll();

Backward translation of all locales:

let trans = require('./js/base/translate');
trans.translateBackwardAll();

Translating MathMaps

Translation of mathmaps is done with the functions in maps.ts.

let maps = require('./js/base/maps');

Forward translation is done with the convert methods.

maps.convertSymbols(iso);
maps.convertFunctions(iso);
maps.convertUnits(iso);

Backward translation is done with the retrieve methods.

maps.retrieveSymbols(iso);
maps.retrieveFunctions(iso);
maps.retrieveUnits(iso);

Message Localisations

This is currently still done with the SplitJson module from the sre-resources repository using the spreadsheets split into single csv files.

Adding a new Locale

Symbol Maps

Use the convert methods to do the initial conversion of the (potentially empty) mathmaps. Merge into crowdin branch and push to crowdin.

Possible cleanup needed:

greek-rest, digits_rest

Rules

Things to Pay Attention to