Aman-Mittal opened a new issue, #255:
URL: https://github.com/apache/fineract-backoffice-ui/issues/255
## Business value
The application offers a language switcher with three options. Two of them
barely work.
`en.json` holds 1,884 translatable strings. `hi.json` and `ko.json` hold 340
each — 18%. A user who picks Hindi gets a navigation sidebar in Hindi and then
an application in English: the forms they actually fill in, the validation they
have to read, the confirmation dialogs they have to answer.
That is arguably worse than not offering the language. A user who sees an
English interface knows where they stand. A user who sees a Hindi menu
reasonably expects the rest, and meets English at the point where they are
being asked to confirm an irreversible financial operation.
It also affects who can use the software. Fineract's users are field
officers in institutions where English fluency is not a given, and the back
office is where the irreversible operations live — disbursing, closing, writing
off.
## Reproducing it
```
python3 -c "
import json
def leaves(d): return sum(leaves(v) if isinstance(v, dict) else 1 for v in
d.values())
en = leaves(json.load(open('src/assets/i18n/en.json')))
for l in ('hi','ko'):
n = leaves(json.load(open(f'src/assets/i18n/{l}.json')))
print(l, n, '/', en, f'{100*n/en:.0f}%')
"
# hi 340 / 1884 18%
# ko 340 / 1884 18%
```
Or just switch the language in the running app and open any form.
## Describing the change
Fill in the missing keys. `en.json` is the reference: every key in it should
exist in `hi.json` and `ko.json` with the same nesting.
**This needs someone who actually speaks the language.** Machine translation
is not useful here — these are banking terms with established equivalents, and
a plausible-but-wrong translation of "write off", "moratorium" or "delinquency"
is worse than the English, because it looks authoritative. If you are a native
or fluent speaker, this is a genuinely valuable first contribution and needs no
Angular knowledge.
**One section per pull request.** `en.json` is organised into top-level
sections (`COMMON`, `CLIENTS`, `LOANS`, `SAVINGS`, `ACCOUNTING`, …). Take one,
translate its keys, open a PR. That keeps the diff reviewable by another
speaker and avoids a single enormous PR that nobody can check.
Good sections to start with, in rough order of how much they are seen:
- `COMMON` — buttons and labels reused across every screen, so it has the
widest effect per key
- `nav` / `SIDEBAR` — navigation
- `CLIENTS`, `LOANS`, `SAVINGS` — the three main workflows
- `ACTIONS` — the verbs on confirmation dialogs, which is where a
mistranslation costs the most
To find what is missing in a section:
```
python3 -c "
import json
en = json.load(open('src/assets/i18n/en.json'))['COMMON']
hi = json.load(open('src/assets/i18n/hi.json')).get('COMMON', {})
for k in en:
if k not in hi: print(k, '=', en[k])
"
```
Notes:
- Keep the key names and structure identical to `en.json`. The key is what
the code looks up; only the value is translated.
- A key that is absent falls back to rendering the key itself
(`COMMON.SAVE`), which is the intended failure mode — so a partial section is
visibly partial rather than silently wrong.
- Leave placeholders like `{{count}}` intact.
- Verify by switching the language in the app and walking the screens your
section covers.
## Scope
In scope: translating existing `en.json` keys into `hi.json` and/or
`ko.json`, one section per PR.
Out of scope: adding new locales (worth its own discussion), RTL layout
support, and the hardcoded English strings that bypass translation entirely —
those are #251.
## Getting started
- Catalogues: `src/assets/i18n/{en,hi,ko}.json`.
- No build step is needed to check your work beyond running the app and
switching language.
- `npm run lint` must pass — it will catch malformed JSON.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]