Skip to content

docs: where translations.xml lives, and translations of included projects - #468

Merged
laszlobalint merged 4 commits into
masterfrom
docs/translations-file-rules
Nov 16, 2026
Merged

laszlobalint merged 4 commits into
masterfrom
docs/translations-file-rules

Conversation

@laszlobalint

@laszlobalint laszlobalint commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

The docs never said where the translations file lives, or that a product has only one. In the Editor and the CLI, translations come only from translations.xml at the root of the main project.

Changes

  • docs/syntax/translations.mdx: new "The translations file" section.
    • Translations come only from one translations.xml at the project root.
    • A translations.xml in a sub-folder is an error, and a translations file under any other name is not loaded.
    • A product has one set of translations: an included project cannot have a translations.xml, and all strings go into the root project's file.
  • docs/syntax/project.mdx:
    • "LVGL Pro doesn't enforce a folder structure" now names the exception: the three XML files at the root. project.xml and globals.xml are required, translations.xml is optional, and each must sit at the root under exactly that name.
    • The included-projects section says an included project cannot have a translations.xml.

Where this comes from in the Editor

  • File type: translations.xml is recognized by name, only at the project root (lved-xml-schema workspace-index-builder.ts).
  • Root-only check: the same name in a sub-folder fails validation with "must be located at the project root" (lved-project-layout validation.ts).
  • Code export: reads only <project>/translations.xml.
  • Not yet released: lvgl-private/editor#1708 adds validation errors for a translations.xml in an included project, and for a root file with a <translations> root under another name.

🤖 Generated with Claude Code

…ects

- translations.mdx: translations are read only from translations.xml at the
  project root, one file per project; an included project can have its own,
  whose tags and languages the including project gets.
- project.mdx: the three root XML files are the exception to "LVGL Pro doesn't
  enforce a folder structure"; included projects also share their translations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/syntax/project.mdx Resolved
Comment thread docs/syntax/translations.mdx Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@laszlobalint laszlobalint self-assigned this Nov 16, 2026
@laszlobalint laszlobalint added the documentation Improvements or additions to documentation label Nov 16, 2026
An included project cannot have a translations.xml; the product has one set
of translations, in the root project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread docs/syntax/translations.mdx Resolved
Comment thread docs/syntax/translations.mdx Resolved
lv_xml_load_all_from_path() registers every <translations> file it finds at
runtime, so the page says that too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@laszlobalint
laszlobalint merged commit 0db8cf7 into master Nov 16, 2026
6 checks passed
@laszlobalint
laszlobalint deleted the docs/translations-file-rules branch November 16, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant