Skip to content

Latest commit

 

History

History

README.md

Translations welcome!

To provide a translation:

  • Add an entry to l10n/languages.txt of the form language CODE
  • Add a localization file l10n/lang-CODE.json

... where CODE is the language code (e.g. eo is Esperanto)

The localization file must be a valid JSON file with the following structure:

{
  "page": { ... },
  "interpreter": { ... },
  "graphics": { ... }
}

Page

Optional: include for RTL languages (Arabic, Hebrew, etc)

    "dir": "rtl"

Optional: include if you want a custom set of examples, e.g. with translated keywords:

    "examples": "l10n/examples.eo.txt"

Text

Page elements with data-l10n-id attributes can have text replaced.

  • key: data-l10n-id or data-l10n-id . attribute
  • value: replacement text

If a translation is not found, the element text will not be translated.

    "translations": {
      "title": "...",
      ...
    }

Messages

Alerts and other prompts show messages.

  • key: the untranslated (English) string
  • value: translated string

If a translation is not found, the message text will not be translated.

    "messages": {
      "Clear history: Are you sure?": "...",
      ...
    }

Interpreter

Error messages

These can be found in err("...") strings in the code.

  • key: the untranslated (English) string
  • value: translated string

Parts of the string in {...} are substitutions and must be left alone. If a translation is not found or is null, the English text will be used.

    "messages": {
      "Array size must be positive integer": "...",
      ...
    }

Keywords

Keywords are special words in the Logo language which are not procedures. There are only two - ELSE and END.

  • key: the keyword alias
  • value: the untranslated (English) keyword

These function as aliases when parsing programs.

    "keywords": {
      "...": "END",
      "...": "ELSE"
    }

Procedure Names

  • key: the procedure alias
  • value: the untranslated (English) procedure name

The aliases are added to the environment.

    "procedures": {
      "...": "abs",
      ...
    }

Graphics

Color Names

  • key: the color alias
  • value: a CSS color string
    "colors": {
      "...": "black",
      ...
    }