Skip to content

chore: ignore translatable strings from frappe and erpnext#259

Merged
barredterra merged 2 commits into
developfrom
ignore_translatable_strings_from
May 12, 2026
Merged

chore: ignore translatable strings from frappe and erpnext#259
barredterra merged 2 commits into
developfrom
ignore_translatable_strings_from

Conversation

@barredterra
Copy link
Copy Markdown
Member

@barredterra barredterra commented May 12, 2026

Updates hooks.py to exclude translatable strings from frappe and erpnext in our translation files. Regenerates translation files and adds missing translations.

@barredterra barredterra changed the title ignore translatable strings from chore: ignore translatable strings from frappe and erpnext May 12, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR configures the eu_einvoice app to exclude generic strings already provided by frappe and erpnext from its own translation catalog, then regenerates the .pot template and de.po German translation to reflect the reduced string set.

  • hooks.py: Adds ignore_translatable_strings_from = [\"frappe\", \"erpnext\"], a Frappe hook that tells the translation extractor to skip any msgid already defined in those upstream apps.
  • de.po / main.pot: Removes ~60 duplicate entries (generic DocType labels, role names, common UI strings) that frappe/erpnext already translate, while updating several app-specific translations (e.g., \"Default VAT exemption reason\", \"E-Invoicing\", \"Purchase Order Row\") and bumping source-file line references throughout.

Confidence Score: 5/5

Safe to merge — changes are limited to the Frappe hooks config and auto-generated translation catalogs with no runtime logic affected.

The only code change is adding a single configuration key in hooks.py; the .po/.pot files are generated artifacts. Removed entries are generic frappe/erpnext strings (role names, standard field labels, common UI actions) that the upstream apps already translate, so end-users will continue to see correct German strings served from those apps' catalogs. A handful of previously-empty de.po entries now carry German translations, which is a net improvement.

No files require special attention.

Important Files Changed

Filename Overview
eu_einvoice/hooks.py Adds ignore_translatable_strings_from = ["frappe", "erpnext"] hook to exclude upstream app strings from this app's translation extraction.
eu_einvoice/locale/de.po Removes ~60 generic string entries duplicated from frappe/erpnext, updates several previously-empty German translations, and updates source-file line references.
eu_einvoice/locale/main.pot Template catalog regenerated in sync with de.po: same string removals and updated line references, creation date bumped to 2026-05-12.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[bench translate eu_einvoice] --> B{ignore_translatable_strings_from?}
    B -- Yes --> C[Load string catalog from frappe]
    C --> D[Load string catalog from erpnext]
    D --> E[Extract strings from eu_einvoice source]
    E --> F[Filter: remove strings already in frappe or erpnext]
    F --> G[Write main.pot template]
    G --> H[Update de.po from template]
    B -- No --> I[Extract ALL strings from eu_einvoice]
    I --> J[Write main.pot with duplicates]
Loading

Reviews (1): Last reviewed commit: "chore: update translations" | Re-trigger Greptile

@barredterra barredterra merged commit 9da623b into develop May 12, 2026
11 checks passed
@barredterra barredterra deleted the ignore_translatable_strings_from branch May 12, 2026 18:32
0xD0M1M0 pushed a commit to 0xD0M1M0/eu_einvoice that referenced this pull request Jun 5, 2026
* chore: ignore translatable strings from frappe and erpnext

* chore: update translations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant