Skip to content

fix(i18n): wrap the remaining user-facing strings - #746

Merged
surajshetty3416 merged 1 commit into
frappe:developfrom
mardausdennis:i18n-remaining-coverage
Aug 14, 2026
Merged

fix(i18n): wrap the remaining user-facing strings#746
surajshetty3416 merged 1 commit into
frappe:developfrom
mardausdennis:i18n-remaining-coverage

Conversation

@mardausdennis

Copy link
Copy Markdown
Contributor

Follow-up to #721. That sweep covered most of the editor, so after it merged I walked the rest of the app to see what still renders in English regardless of the user's language.

What this covers

  • Dashboard and page lifecycle — route tree loading and pagination, template gallery import toasts, template group page counts
  • Editor shell — the small-screen notice, the fragment breadcrumb, the settings loading state, the URL Variables section, the viewer summary
  • Command palette — search placeholders and both empty states
  • Settings — domains, redirects and users were untouched by earlier sweeps and were almost entirely English
  • Controls and modals — block search and replace, split-mode input, state variants, shadow layers, the design token manager
  • Stores, utils and data — component save and sync, font weight labels, image optimisation, domain toasts
  • Desk and backend — the Builder Settings component filter dialog, the Open Builder command, and the FC API error

Translator-facing changes

Every interpolated message became a stable placeholder source. Counted messages now select a singular or plural string instead of rendering token(s), and the CSV import confirmation no longer joins translated fragments into another translated sentence. German and other inflected languages cannot express those forms.

Deliberately not included

  • The permission messages passed to has_page_write / has_page_read. A decorator argument is evaluated at import time, so _() there would resolve the translation before a user session exists. Translating inside the decorator would work, but it changes the decorator's contract, so it seemed better to raise it than to slip it in here.
  • The visibility-condition description, which carries markup.
  • Gradient and page preset names. They read as proper nouns, and the whole preset object is emitted to callers, so translating name would change what consumers receive.
  • The AI surfaces, since feat: Bob - AI Assistant for Builder 🤖 #671 is rewriting them.

Lookup keys and sentinels stay raw: Mixed, UNGROUPED_LABEL, the breakpoint device values, the numeric font weights, and the command palette group keys.

Overlap with open PRs

Some of these files are also touched by open drafts: #733, #671 and #702. Everything here is a one-line wrap, so conflicts should be mechanical, but flagging it since #715 and #721 collided the same way. Happy to rebase whenever it suits.

Checks

Vue templates and TypeScript compile clean locally for all 37 changed frontend files, and domain.py parses. POT extraction and the suites run in CI.

The editor sweep did not walk every surface, so prose stayed in English
regardless of the user's language: the route tree, the template gallery,
the onboarding survey, the command palette, the design token manager,
domains, redirects, users, the small-screen notice, and a number of
stores and utils.

Wraps those strings and converts every interpolated message into a stable
placeholder source, so translators receive whole sentences rather than
fragments. Counted messages now select a singular or plural string instead
of rendering "token(s)", and the CSV import confirmation no longer joins
translated fragments into another translated sentence.

Left alone on purpose:

- the permission messages passed to has_page_write and has_page_read. A
  decorator argument is evaluated at import time, so wrapping it there
  would resolve the translation before a user session exists. Translating
  inside the decorator instead is a contract change worth deciding on its
  own.
- the visibility-condition description, which carries markup.
- gradient and page preset names. They read as proper nouns, and the whole
  preset object is emitted to callers, so translating the name would change
  what consumers receive.
- the AI surfaces, since frappe#671 is rewriting them.

Lookup keys, persisted values and comparison sentinels stay raw: Mixed,
UNGROUPED_LABEL, the breakpoint device values, the numeric font weights and
the command palette group keys.
@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

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

Translation calls preserve existing behavior, interpolation contracts, and stable non-display values.

Reviews (1): Last reviewed commit: "fix(i18n): wrap the remaining user-facin..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.04%. Comparing base (38d68fd) to head (1837a54).

Files with missing lines Patch % Lines
builder/domain.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #746      +/-   ##
===========================================
- Coverage    66.05%   66.04%   -0.02%     
===========================================
  Files           37       37              
  Lines         4982     4983       +1     
===========================================
  Hits          3291     3291              
- Misses        1691     1692       +1     

☔ 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 55baffa into frappe:develop Aug 14, 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