Skip to content

fix(i18n): let generate-pot-file import hooks without a site - #758

Merged
surajshetty3416 merged 1 commit into
frappe:developfrom
mardausdennis:fix/pot-extraction-unbound-conf
Aug 17, 2026
Merged

fix(i18n): let generate-pot-file import hooks without a site#758
surajshetty3416 merged 1 commit into
frappe:developfrom
mardausdennis:fix/pot-extraction-unbound-conf

Conversation

@mardausdennis

Copy link
Copy Markdown
Contributor

generate-pot-file.yml has never completed successfully. It was added on 2026-08-08 and has run on 08-08, 08-09 and 08-16. All three runs failed the same way:

File "/home/runner/frappe-bench/apps/builder/builder/hooks.py", line 198, in <module>
    builder_path = frappe.conf.builder_path or "builder"
  File "/home/runner/frappe-bench/apps/frappe/frappe/utils/local.py", line 55, in _get_current_object
    raise RuntimeError("object is not bound") from None
RuntimeError: object is not bound

hooks.py reads frappe.conf at import time. That works wherever a site is bound, but bench generate-pot-file --app builder imports hooks without one, so the proxy raises before extraction starts.

The same workflow runs green in frappe/crm and frappe/lms, so a site-less import is the expected contract and the fix belongs in the app rather than in CI.

Scheduled runs fail quietly, so nothing surfaces this. builder/locale/main.pot was last updated by hand in #721 on 2026-08-13, not by the workflow. The roughly 190 strings wrapped in #746 and #750 are in the source but never reach the POT, so no language can translate them yet.

Behaviour is unchanged wherever a site is bound. Only the site-less import falls back to the default path.

Not runtime-tested: I have no bench here. The failing job log and the passing sibling workflows are the evidence I have.

hooks.py reads frappe.conf at import time. bench generate-pot-file --app builder imports hooks without a site bound, so the proxy raises RuntimeError: object is not bound and extraction never starts. Every recorded run of generate-pot-file.yml has failed this way since the workflow was added on 2026-08-08.

The same workflow runs green in frappe/crm and frappe/lms, so a site-less import is the expected contract. Behaviour is unchanged wherever a site is bound; only the site-less import falls back to the default path.
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The fallback is limited to the unbound configuration proxy and retains the existing default route path.

Reviews (1): Last reviewed commit: "fix(i18n): let generate-pot-file import ..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.21%. Comparing base (b47d9bf) to head (eac640e).

Files with missing lines Patch % Lines
builder/hooks.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #758      +/-   ##
===========================================
- Coverage    66.22%   66.21%   -0.01%     
===========================================
  Files           90       90              
  Lines        10015    10018       +3     
===========================================
+ Hits          6632     6633       +1     
- Misses        3383     3385       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@surajshetty3416
surajshetty3416 merged commit cea9322 into frappe:develop Aug 17, 2026
9 of 11 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.33.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants