Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Re: Introducing pofiletranslate – A Tool for Translating PO Files
Re: Introducing pofiletranslate – A Tool for Translating PO Files
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byHi Antonio,
By codebase, I mean the root directory of your workspace where your source code and existing translation files are located. The package searches for translations by analyzing the .po
files in your project and reusing existing translations instead of relying on AI or Google Translate.
By default, the tool starts from the directory of the provided .po
file and backtracks up to 4 levels (configurable with --depth
) to identify common translations within your project.
Here’s an example to illustrate how it works:
workspace17/
├── hr/ # HR-related modules
├── account/ # Accounting-related modules
│ ├── my_module/ # Your custom module
│ │ ├── i18n/ # Translation folder
│ │ │ ├── fr.po # French translation file (target file for translation)
If you run:
pofiletranslate account/my_module/i18n/fr.po
The tool will search for translations in fr.po
files up to 4 levels above in your workspace (workspace17/
), ensuring better translation consistency across your project.
Let me know if you need any further clarification!
Best regards,
Rachid
Hi Rachid,
it is very interesting but what do you mean for Codebase?
I cannot understand where package search for tranlsation.
Thanks
Il 11/03/2025 21:23, Rachid Alassir ha scritto:
I apologize for the incorrectly formatted URLs in my previous email. Here are the correct links:
On Tue, Mar 11, 2025, 8:39 PM Rachid Alassir <rachidalassir@gmail.com> wrote:
Dear Odoo Community,
I’ve developed a straightforward tool to translate PO files directly from a local codebase. I noticed that translations often follow a pattern within each project, and leveraging existing translations tends to produce better results than relying on Google Translate or AI-based tools.
**PyPI:** [https://pypi.org/project/pofiletranslate/](https://pypi.org/project/pofiletranslate/)
**GitHub:** [https://github.com/RachidAlassir/po-translate](https://github.com/RachidAlassir/po-translate)
I’d love to hear your feedback and suggestions!
Best regards,
Rachid Alassir_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
Reference
-
Introducing pofiletranslate – A Tool for Translating PO Files
byRachid Alassir-
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byRachid Alassir -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byGoran Sunjka -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
bySHS-AV srl, Antonio M. Vigliotti -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byTecnativa. S. L., Pedro M. Baeza -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byTherp, Tom Blauwendraat -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byRachid Alassir -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
bySHS-AV srl, Antonio M. Vigliotti -
Re: Introducing pofiletranslate – A Tool for Translating PO Files
byRachid Alassir
-