feat(i18n): Migrate to PO/MO translation system with French support#91
feat(i18n): Migrate to PO/MO translation system with French support#91bvisible wants to merge 6 commits intoBrainWise-DEV:developfrom
Conversation
- Migrate from CSV to PO/MO (gettext) format for better tooling support - Add complete French translation (1438 strings) - Add French locale to SUPPORTED_LOCALES in useLocale.js - Add migration script for CSV to PO conversion - Add GitHub workflow for automatic POT file updates - Update localization documentation
Auto-generated from source code changes
- Changed default behavior: empty allowed_locales now shows all supported languages - Added get_supported_locales() to dynamically detect available languages from .po files - Updated doctype description to reflect new behavior
Auto-generated from source code changes
Inter font must come before SaudiRiyalSymbol to properly render accented characters like ê in Português
CI Failures AnalysisThe 3 failing checks are pre-existing issues in the repository's CI configuration, not caused by this PR: 1. Server Build (❌)The error occurs during translation compilation of another app (not pos_next). Our French MO file was created successfully. 2. Frappe Linter (❌)Pre-existing lint issues in the codebase:
These issues exist in files that were not modified by this PR. 3. Vulnerable Dependency Check (❌)The CI tries to install Conclusion: All 3 failures are unrelated to the i18n changes in this PR. The CI configuration needs to be fixed independently. |
|
Thank you, @bvisible, for your valuable contribution to the POSNext translations. |
Summary
This PR modernizes the internationalization (i18n) system by migrating from CSV to the industry-standard PO/MO format and adds complete French language support.
Key Changes
.pofilesFeatures
1. PO/MO Translation Migration
ar.po,fr.po,pt_br.pomain.potfor translators2. Dynamic Language Configuration
get_supported_locales()automatically scans.pofiles in locale directoryallowed_localesis empty in POS Settings, all available languages are shown3. French Language Support
4. Font Stack Fix
InterbeforeSaudiRiyalSymbolFiles Changed
pos_next/api/localization.pyPOS/src/composables/useLocale.js,POS/src/index.csspos_next/locale/*.po,pos_next/locale/main.potdocs/Translation-Migration-Guide.md,docs/LOCALIZATION.md.github/workflows/update-translations.ymlscripts/migrate_translations.pyHow to Add New Languages
.pofile:pos_next/locale/{lang_code}.poPOS/src/composables/useLocale.js:.pofilebench build --app pos_nextTesting