Document the OpenSPP Translation Workflow
Document the OpenSPP Translation Workflow
Description
As OpenSPP is used in multiple countries and languages, having clear documentation on the translation workflow is essential. This will help contributors understand how to add or update translations and make OpenSPP more accessible globally. This documentation should be integrated into the existing OpenSPP documentation repository.
Objective
Create a comprehensive guide on OpenSPP's translation workflow that:
- Explains the PO/POT file system
- Describes how to add translations for new languages
- Documents how to update existing translations
- Outlines best practices for maintaining translations
- Integrates seamlessly with the existing OpenSPP documentation structure
Tasks
- Review current documentation in the OpenSPP documentation repository for any existing translation-related content
- Document the structure of translation files in OpenSPP
- Explain how to extract translatable strings
- Provide step-by-step guides for adding a new language
- Document the process for updating existing translations
- Outline how translations are loaded and used in the system
- Include examples and screenshots
- List useful tools for working with PO/POT files
- Format and structure the documentation to match the existing OpenSPP documentation style
- Submit the documentation to the OpenSPP documentation repository following contribution guidelines
Expected Outputs
- Markdown documentation of the translation workflow ready for integration with the OpenSPP documentation repository
- Example-based tutorial for adding a new language
- Explanation of PO/POT file structure with examples
- Best practices section
- Pull request to the OpenSPP documentation repository
Good First Tasks for the Sprint
- Review existing documentation structure in the OpenSPP documentation repository
- Map the current translation file structure
- Document the process for extracting strings
- Create a simple example of adding translations for one module
- List and explain translation-related commands
Resources
- Odoo Translation Documentation
- Python polib Documentation
- OpenSPP Documentation Repository
- OpenSPP Documentation Website
Labels
documentation, good-first-issue, beginner-friendly, enhancement, size:S
Priority
Medium
Size
Small (Completable in a day)
OpenSPP Translation Workflow Guide
This guide explains how to contribute to the translation workflow in OpenSPP, helping make the platform accessible in multiple languages.
Objective
This guide will help you:
-
Understand how OpenSPP handles translations (PO/POT file system)
-
Add new language translations
-
Update existing ones
-
Follow best practices for maintaining clean and accurate localization
Understanding Translation Files
OpenSPP uses .po (Portable Object) and .pot (Portable Object Template) files based on the Odoo framework.
-
.pot: Template file containing translatable strings (English source) -
.po: Language-specific translation file (e.g.,fr.pofor French)
Location example:
addons/your_module/i18n/fr.po
Step-by-Step: Add a New Language Translation
1. Navigate to the Module Directory
cd openspp/openspp-modules/your_module/
2. Generate a .pot Template File
python3 ../../odoo-bin --addons-path=addons,your_module_path -d your_db_name --i18n-export=your_module/i18n/your_module.pot --modules=your_module --language=en_US --stop-after-init
3. Create a .po File from the .pot Template
You can use tools like msginit or copy the .pot manually:
cp i18n/your_module.pot i18n/fr.po
Edit the header and add translations:
msgid "Invoice"
msgstr "Facture"
4. Install the Language in OpenSPP UI
-
Go to Settings → Translations → Languages → Load a Translation
-
Choose your language and install it
5. Load Translations
python3 ../../odoo-bin -d your_db_name -u your_module --load-language=fr_FR
Step-by-Step: Update Existing Translations
1. Export Updated .pot
python3 ../../odoo-bin --addons-path=addons,your_module_path -d your_db_name --i18n-export=i18n/your_module.pot --modules=your_module --language=en_US --stop-after-init
2. Merge .pot with Existing .po
msgmerge --update i18n/fr.po i18n/your_module.pot
3. Edit and Translate New Entries
Open the file using a PO editor or text editor and fill in untranslated msgstr entries.
Translation File Structure Example
msgid "Name"
msgstr "Nom"
msgid "Invoice Amount"
msgstr "Montant de la facture"
🔧 Tools for Managing Translations
| Tool | Description |
|---|---|
| msgmerge | Merges .pot into .po file |
| msginit | Initializes a new .po file |
| Poedit | GUI-based PO file editor |
| polib | Python library to parse .po and .pot files |
| Transifex | Web-based translation platform (optional use) |
Best Practices for Translation Contributors
-
Always pull the latest code and
.potfiles before working -
Use clear, culturally appropriate, and grammatically correct translations
-
Keep formatting tokens (
%s,%(name)s) intact -
Avoid translating technical terms unless localized appropriately
-
Test translations in the UI after applying
Suggested Screenshots
-
Adding language from UI
-
PO file opened in a GUI editor (e.g., Poedit)
-
Translation loaded in OpenSPP interface
Example Use Case
You want to translate the openspp_finance module into Spanish:
-
Navigate to
openspp-modules/openspp_finance -
Export
.potusing--i18n-export -
Copy
.pottoes.po -
Add Spanish translations
-
Load Spanish language via OpenSPP UI
-
Apply using
--load-language=es_ES
Submitting Your Translation
-
Commit your
.pofiles to the module'si18ndirectory -
Follow contribution guidelines from the OpenSPP Documentation Repository
-
Submit a Pull Request
References
This guide aligns with OpenSPP’s documentation format and should be included under a new section such as
translations.md.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.