.po extension, you can find it in the
./locales folder or in the node_modules/@c8y/locales. Select the
language you want to update i.e. pt_BR.po
./locales folder procceed to
the next step. If the .po file with the slected language is placed in the
node_modules copy it to the ./locales folder. You can also use
this boilerplate to create .po file from scratch:
"Project-Id-Version: c8yui.core\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language: pt_BR\n"
"Language-Team: \n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid ""
msgstr ""
or create it with program like: Poedit.
msgid field as follows:
msgid "Awesome Tab"
msgstr field with your translation:
msgstr "Separador IncrÃvel"
index.ts file, add the following line:
import "./locales/pt_BR.po";
msgstr field in your new or copied
.po file. You can find all translated strings in the
node_modules/@c8y/locales or use c8ycli locale-extract command
described below.
c8ycli locale-extract is the command that automatically copies all translations
from the node_modules/@c8y/locales. This makes it easier to edit and add new
translations.
./locales will contain all available
translations. The rest of the process is the same as above.