- Home
- Skills
- Ahmed Lakosha
- Odoo Plugins
- Odoo I18n
odoo-i18n_skill
- Python
18
GitHub Stars
1
Bundled Files
3 weeks ago
Catalog Refreshed
1 month ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstart where the catalogue uses aiagentskills.
npx veilstart add skill ahmed-lakosha/odoo-plugins --skill odoo-i18n- SKILL.md38.9 KB
Overview
This skill is a comprehensive Odoo i18n toolkit for extracting and validating translations, generating reports, and managing multilingual deployments across Odoo 14–19. It focuses on correct extraction of translatable strings in Python, XML/QWeb and JavaScript, .po file hygiene, and special handling for Arabic and RTL layouts. The goal is predictable, maintainable translations and smooth language installs across modules and websites.
How this skill works
The toolkit inspects module i18n folders, parses .pot/.po files, and validates headers, plural forms and message contexts. It analyzes Python, XML/QWeb, and JS sources for correct use of _(), _lt(), _t and translation-safe interpolation patterns, and flags common anti-patterns (f-strings, concatenation, pre-built strings). For Arabic/RTL it validates RTL CSS switches, detects untranslated UI labels and produces deployment-ready translation packs and reports.
When to use it
- When preparing a module for multi-language release (Odoo 14–19).
- Before upgrading Odoo to ensure translations are compatible across versions.
- When validating third-party .po files or merging community translations.
- When implementing Arabic/RTL support for backend or website.
- During CI to catch i18n anti-patterns before merge.
Best practices
- Keep an i18n/ directory in every module with a canonical .pot and language .po files. Ensure .po headers (Language, Plural-Forms, MIME) are present and correct.
- Let Odoo auto-translate field and menu strings via string= attributes; avoid wrapping those in _().
- Use t-translation="off" for technical nodes, codes and numeric identifiers in XML/QWeb.
- For JS use correct import paths by version: @web/core/l10n/translation for 16+, web.core for legacy. Test publicWidget text in website context.
- For RTL support validate CSS direction switches, mirrored layout rules and test website language prefixes (/ar/) and session language behavior.
Example use cases
- Scan a custom module before publishing to extract missing msgid strings and generate a new .pot.
- CI pipeline step that validates .po headers, plural forms and flags f-string usages in Python and JS.
- Generate a translation coverage report showing untranslated strings per module and language. Useful for release planning.
- Prepare an Arabic website deployment: compile translations, enable RTL CSS, and verify translated menu/menuitems and QWeb snippets.
- Migrate translations when upgrading from Odoo 14 to 19 by detecting deprecated translation patterns and suggesting fixes.
FAQ
Ensure the .po header contains the correct Arabic plural rule (nplurals=6 and the appropriate plural expression). The toolkit validates this and flags mismatches.
Can I automatically fix f-strings and concatenations?
The tool flags unsafe patterns and suggests safe replacements (use % or named placeholders). Some simple automatic fixes can be suggested, but manual review is recommended for context-sensitive strings.