Localization of LogMan.io¶
This document describes how to create and structure translations for the application, using the Bulgarian language as an example of the target language. Please follow the instructions below to ensure consistency and correctness.
File Structure¶
You will receive a pre-prepared project structure in advance from TeskaLabs.
Your task is to add Bulgarian translations only, without changing the existing structure.
At the initial testing stage, only one application part (a microfrontend, referred to as App1) will be required. At a later stage, the full structure with all microfrontends will be provided.
For each application, translations are stored in the following path:
locales/bg/translation.json
The folder name bg is the standard ISO language code for Bulgarian.
It is used to tell the application that the files inside contain Bulgarian translations.
The translation.json file may already be prepared as a template — you only need to fill it with Bulgarian translations.
Provided Project Structure¶
In bg/translation.json you will find the main blocks and keys.
Your task is to add Bulgarian translations while keeping the structure intact.
Example project structure:
- App1
- locales
- en
- translation.json
- cs
- translation.json
- bg
- translation.json (to be completed by the translator)
- App2
- locales
- en
- translation.json
- cs
- translation.json
- bg
- translation.json (to be completed by the translator)
- App3
- locales
- en
- translation.json
- cs
- translation.json
- bg
- translation.json (to be completed by the translator)
- App4
- locales
- en
- translation.json
- cs
- translation.json
- bg
- translation.json (to be completed by the translator)
i18n Base Configuration¶
The i18n block is the base translation setup:
- The key
"bg"represents the Bulgarian language. - This translation is displayed to the user when Bulgarian is selected.
- The
"Language"field must be translated as"Език".
These settings should be added at the beginning of the translation file in the container applications:
lmio-webuiseacat_admin_webuiseacat_account_webuiseacat_auth_webuiseacat_pki_webui
Example of i18n block:
"i18n": {
"language": {
"en": "English",
"cs": "Česky",
"bg": "Български"
},
"Language": "Език"
}
Note
Please verify the correctness of "Български" and "Език" before submission
Semantic Translation Blocks¶
Translations are grouped into semantic blocks, for example:
- AboutCard
- AccessControlScreen
Basic rules for adding translations
The added translations must comply with the following rules:
- Keys are always written in English.
- Values must be the Bulgarian translations.
- Use double quotes (" ") for both keys and values.
- Add a comma after each line except for the last one in a block.
Test Translation Example¶
Example of a small Bulgarian translation file for container application:
{
"i18n": {
"language": {
"en": "English",
"cs": "Česky",
"bg": "Български"
},
"Language": "Език"
},
"AboutCard": {
"About": "За нас",
"Website": "Вебсайт",
"Vendor": "Производител"
},
"AccessControlScreen": {
"Access control": "Управление на достъпа",
"Username": "Потребителско име",
"Resources": "Ресурси",
"Tenant": "Арендатор"
}
}
Translating Complex Sentences with Variables¶
Some translation keys include variables (placeholders) such as {{ result }} or <author />, <event />, <time />.
There are two types of allowed transformations:¶
- Handlebars-style placeholders:
"Unexpected external login result: {{ result }}": "Неочакван резултат от външно влизане: {{ result }}"
- Inline HTML-style placeholders:
"<author /> added event <event /> at <time />": "<author /> добави събитие <event /> в <time />"
Guidelines:¶
- You can reorder variables to make the translation more natural in Bulgarian.
- Do not change the variable names themselves (
{{ result }},<author />). If there are spaces in the variable in the key, then there should be spaces in the Bulgarian version. - Ensure all placeholders are included; missing or extra placeholders will break the system.
Examples of allowed reordering:
"Unexpected external login result: {{ result }}": "Резултатът от външното влизане е {{ result }}"
"<author /> added event <event /> at <time />": "Събитието <event /> беше добавено от <author /> в <time />"
Examples of NOT allowed:
"Unexpected external login result {{ result }}": "Неочакван резултат от външно Влизане"
{{ result }} is unacceptable because it will lead to a loss of meaning and an error in translation.
"<author /> added event <event /> at <time />": "Събитието беше добавено от автор"
<event /> and <time /> is unacceptable because it will lead to a loss of meaning and an error in translation.
Testing the Translation¶
After completing the translation, testing is mandatory.
JSON Validation¶
- Ensure all quotes, commas, and brackets are correct.
- Use a code editor with JSON validation (e.g. VS Code).
- The file must open without any JSON parsing errors.
Variable Check¶
- All variables from the key must exist in the translation.
- Variables must match exactly:
- spacing (
{{ result }}vs{{result}}— both are valid, but must match the key) - casing
- formatting
- spacing (
Examples:
{{ result }}must not be changed to{{result}}if spaces exist in the key.- For
<play>Play</play>, the correct translation is:<play>Играй</play>
Warning
<играй>Play</играй>— tag translated<play>Play</play>— text not translatedИграй— tag removed
Only the inner text may be translated.
Cross-check with Other Languages¶
If unsure about variables or structure:
-
Check:
locales/en/translation.jsonlocales/cs/translation.json
-
The Bulgarian translation must follow the same structure.
Keys Must Never Be Changed¶
Under no circumstances:
- rename, translate, merge, split, or modify keys
- add or remove keys
- fix grammar inside keys
Only values may be changed.
Self-Review Checklist¶
Before submitting, ensure that:
- JSON file opens without errors
- Keys are unchanged
- All variables and placeholders are present and correct
- No translated or removed placeholder / HTML tags
- No trailing commas
- Structure matches
enandcsversions - Bulgarian text is clear and grammatically correct