Frappe's gettext extractor misses two categories of translatable strings: bare literals in source code that get wrapped in __() only at render time (e.g. "Save Current Filter" in list_filter.js:88), and labels stored as data in DocType fixtures (e.g. Number Card / Dashboard Chart labels like "Open Opportunity", "Incoming Leads"). These never make it into upstream .pot files, so they cannot be translated via the standard cycle. Adding such msgids directly to the main <lang>.po works but is fragile: the next bench update-po-files run marks them obsolete because the .pot doesn't contain them. This change introduces extras.po sibling files in each translations_<lang>/ <app>/ directory. setup_locale() copies the main <lang>.po to the target app's locale dir as before, then overlays extras.po on top via babel's read_po/write_po. Obsolete (#~) entries are promoted back to active when a matching extras msgid exists. Extras wins on conflict. Seeded extras files cover currently-known gaps in frappe (Save Current Filter) and erpnext (Open Opportunity plus 30 other CRM/dashboard labels). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| az_locale | ||
| .editorconfig | ||
| .eslintrc | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| README.md | ||
| license.txt | ||
| pyproject.toml | ||
README.md
Az Locale
This app adds Azərbaycan language and currency
Installation
You can install this app using the bench CLI:
cd $PATH_TO_YOUR_BENCH
bench get-app $URL_OF_THIS_REPO --branch develop
bench install-app az_locale
Contributing
This app uses pre-commit for code formatting and linting. Please install pre-commit and enable it for this repository:
cd apps/az_locale
pre-commit install
Pre-commit is configured to use the following tools for checking and formatting your code:
- ruff
- eslint
- prettier
- pyupgrade
License
unlicense