Skip to content

Translations

Use the script npm run template to generate up to date template files for all packs

It will generate master file in languages directory : master_translations.json and split used translations subdirectories : cncgrblpack, cncgrblhalpack, printerpack, sandtablepack

Currently:

  • CNC GRBL in languages/cncgrblpack
  • CNC grblHAL languages/cncgrblhalpack
  • 3D Printers (all) languages/printerpack
  • Sand Table (all) languages/sandtablepack

The list of currently supported languages is in src/components/Translations/languages.json, if new language is added, please add it to the list doing a PR or opening an issue.

LanguageNameCodefile name
FrenchFrançaisfrlang-fr.json
GermanDeutschdelang-de.json
HungarianMagyarhulang-hu.json
IndonesianBahasa Indonesiaidlang-id.json
ItalianItalianoitlang-it.json
SpanishEspañoleslang-es.json
PolishPolskipllang-pl.json
RussianРусскийrulang-ru.json
UkrainianУкраїнськаuklang-uk.json
Portuguese-BrPortuguêsptbrlang-ptbr.json
TurkishTürkçetrlang-tr.json
Thaiไทยthlang-th.json
Korean한국어kolang-ko.json
Chinese (simplified)简体中文zhcnlang-zhcn.json
Chinese (traditional)繁體中文zhtwlang-zhtw.json
Japanese日本語jalang-ja.json

To generate a language pack file, you need to:

  • Use existing reference file, or if it is new language, rename a copy of the template file according the language code http://www.lingoes.net/en/translator/langcode.htm removing - if any, and add lang- in from of name. so for example :

    • for french language pack, master_translations.json file should be renamed to lang-fr.json
    • for simplified chinese language pack, master_translations.json file should be renamed to lang-zhcn.json
  • Modify the language pack file according to the language you want to create or update

  • Build the final packs using the following command to compress the final pack targeting the file :

    npm run buildlangpack lang-<target language>.json

    for example :

    npm run buildlangpack lang-fr.json

    This will generate a non compressed and a compressed file in each subdirectory of languageS directory according to the systeme:

    • languages/cncgrblpack/lang-fr.json
    • languages/cncgrblpack/lang-fr.json.gz
    • languages/cncgrblhalpack/lang-fr.json
    • languages/cncgrblhalpack/lang-fr.json.gz
    • languages/printerpack/lang-fr.json
    • languages/printerpack/lang-fr.json.gz
    • languages/sandtablepack/lang-fr.json
    • languages/sandtablepack/lang-fr.json.gz

You can then use the compressed file in the WebUI or the non compressed file to test the language pack with the test server of WebUI

Compare template pack with language pack file

Section titled “Compare template pack with language pack file”

If you have a doubt about missing entries or extra entries, you can use the following script to compare current language pack content against the template language pack to see if the language pack need to be updated.

npm run check reference=<template path file> target=<not compressed language pack>

npm run check target=languages/printerpack/lang-fr.json reference=languages/printerpack/en.json
> ESP3D-WEBUI@3.0.0 check
> node ./config/checkpack.js "target=languages/printerpack/lang-fr.json" "reference=languages/printerpack/en.json"
Comparing files
Checking extra entries...
S724 : Fermer l'application
...done, found 1 extra entries
Checking missing entries...
S14 : Settings
S24 : Close
...done, found 2 missing entries
Comparaison done

Please do a PR to webUI 3.0 github branch or submit ticket with at least the reference file, a complete PR include also generated compressed and clear version of the language pack files for each target using the script npm run buildlangpack lang-<target language>.json