Repository navigation
fix(i18n): translate the 68 template text nodes that had no translati… - #655
Aman-Mittal merged 6 commits into
Conversation
E2E — mocked backend🎭 E2E Tests✅ All green — 409 passed · 0 failed · 1 skipped, across 38 spec files in 6m 56s. By spec file
All 410 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 36988295194 from |
E2E — real Fineract🎭 E2E Tests✅ All green — 96 passed · 0 failed · 0 skipped, across 31 spec files in 7m 46s. By spec file
All 96 tests — click to expand
Slowest 10 — what the shard counts should be tuned against
📼 Download the HTML report, videos and traces — see the Generated by run 36988295194 from |
…s off the generated client
main dropped the TranslateModule import from accounting-closure-form, so the
two keys added there no longer compiled. Use TranslatePipe from core/adapters.
The nine new specs now run against provideHttpClientTesting instead of
importing generated services (no-generated-api-import, ADR 0006), and the
template-text baseline drops to {} now that apache#651 has landed.
What and why
68 labels and headings across 15 screens were English typed straight into a template, with no translation key. Nothing ever looked them up, so they stayed English in Hindi and Korean whatever the catalogue held, and no existing check could see them. They now resolve through
en.jsonkeys, so a catalogue can translate them.Closes #652
What changed
COMMONornav. The other 58 use 55 new keys, added under each screen's existing namespace. Nothing was removed or reworded, so the English output is identical.| translatewhere it imports ngx-translate'sTranslatePipe(9 files),| appTranslatewhere it imports the adapter's (savings-account-view). Where a file imports neither (accounting-rule-form,financial-activity-mapping-form,accounting-closure-form) or both (audit-logs-list,working-days), I used the adapter'sTranslatePipefromcore/adapters, so no new@ngx-translateimport is added to the lint baseline.aria-labelrepeating the same words (aria-label="Rule Name"), thearia-labelnow follows the label (25 of them). Translating only the visible text would leave a Hindi label over an English accessible name. This is a small step past the issue's text, and I did it on purpose.expectLookedUp()insrc/app/testing/translated-text.tsis used by specs that render a component with no catalogue loaded, so every lookup echoes its key. For each key it asserts that the key is defined inen.json, that it is rendered, and that its English is not typed into the template. 15 specs use it, one per screen (6 existing specs extended, 9 new). The new ones useprovideHttpClientTestingrather than stubbing generated services, becauselocal/no-generated-api-import(ADR 0006) doesn't allow new imports of the generated client.main(Put a boundary around the generated API client, and catch untranslated template text #651 and chore(i18n): upgrade ngx-translate to v18 and replace TranslateModule #654 landed while this was open) and adds what that needed: the adapter pipe inaccounting-closure-form, the specs off the generated client, and the lowered baseline below.The 15 files (68 strings)
accounting/accounting-rule-formACCOUNTING_RULESappTranslate(import added)loans/rescheduling/reschedule-formLOANS.RESCHEDULE_FORM,COMMONtranslateproducts/savings-account-viewSAVINGS,COMMONappTranslatesecurity/audit-logs/audit-logs-listSECURITYappTranslate(file imports both)accounting/journal-entry-formJOURNAL_ENTRIEStranslateloans/point-in-time/loans-point-in-timeLOANS_POINT_IN_TIME,COMMONtranslatesettings/working-daysWORKING_DAYS(new namespace)appTranslate(file imports both)accounting/charges/charge-formCHARGEStranslateaccounting/accounting-closure-formACCOUNTING_CLOSURESappTranslate(import added)accounting/financial-activity-mapping-formACCOUNTINGappTranslate(import added)fintech/asset-owner-viewASSET_OWNERS,navtranslatetransfers/standing-instruction-formCLIENTStranslatecampaigns/email-messagesEMAIL_MESSAGEStranslatecampaigns/sms-campaigns/sms-campaign-formSMS_CAMPAIGNStranslateinterop/interop-transfersINTEROPtranslateNote
Baseline. #651 has merged, so this PR also lowers
scripts/template-text-baseline.jsonto{}: no untranslated template text is left anywhere in the repo. (The checker also countedclients-list,staff-formandview-payload-dialog; #651 fixed those.)Not in this PR
hi.json/ko.json. These are partial catalogues by design and filling them is translator work. This makes the strings translatable; it does not translate them.Office,Description,Comment, ...) and conditional headings such as{{ isEdit ? 'Edit' : 'Create' }} Accounting Rule, which the checker deliberately doesn't flag.Verification
ci.yml, run locally against this branch merged withmainat ba4f563: all pass. That includeslint:prune,check:template-textand the othercheck:*scripts,typecheck:e2e,check-license.sh,api:surface, andnpm run buildin both the default and--configuration productionconfigurations. Not run locally: the API-client drift check (needs Java 17), the dependency licence and security audits, the RAT scan, and the Docker image build.npm run test:unit: 277 files, 1801 tests pass (test:mfetoo). Each of the 15 new or extended specs fails againstmain's templates and passes against this branch.mockedproject across the specs that visit the changed screens (functional-coverage,accessibility,feature-coverage,e2e-journey,date-picker-revisit,client-date-picker-revisit,global-search-navigation,list-pagination), and 25 pass in themobileproject (5 skipped).teller-cash-management("Financial Activity", "GL Account"); I confirmed itsionSelect()locator still resolves against the running app.page.route): each of the 15 screens, with the language switched from English to Hindi in the header. With a Hindi catalogue loaded, 66 of the 66 distinct strings stay English onmain(at d976842) and none do on this branch. (68 occurrences; "Fixed Account" and "Account Tags" each appear twice on one screen.)Screenshots
Hindi, left:
main(d976842), right: this branch, same page and same catalogue.Accounting rule form (9 strings)
Savings account overview (10 strings)
Loan reschedule form (10 strings)
Recording (all 15 screens, switching English to Hindi,
mainon the left)652-before-vs-after.mp4
AI assistance (optional)
Checklist
src/app/api/.src/app/core/adapters/instead of direct browser globals or imperative third-party APIs.