Skip to content

One translation key labels both a Customer heading and an Add button #446

Description

@sridharkalaibala

Found while seeding the language packs (#444). Same shape as #445: lang_Addexpensing does two unrelated jobs.

frontend/modals/customer.html:765

<lang class="lang_Addexpensing">Customer</lang>

frontend/modals/expense.html:4

<span id="expenses_title"><lang class="lang_Addexpensing">Add</lang></span>&nbsp;<lang class="lang_expensing">Cash Book Entry</lang>

So one key has to be both the word "Customer" and the word "Add". No language can satisfy that.

Tamil currently renders புதிய ("new") for it, which is wrong in both places — the customer screen shows "new" where it means "Customer", and the expense modal reads "New Cash Book Entry" where the English says "Add Cash Book Entry". The second one is nearly right by luck, which is how it survived.

The fix

  1. Give the customer heading its own key. lang_customer_title already exists and may be exactly right — check the surrounding markup for what the heading should read.
  2. Leave lang_Addexpensing on the expense modal, or rename it to something that says what it is. The name suggests it started life there.
  3. Update languages/ta.json accordingly, and any other pack with a word for it.
  4. node tests/tools/i18n-coverage.js and node --test tests/i18n.test.js should stay clean.

Good first issue because

Two lines of markup and one language file. No build knowledge needed.

Worth checking while you are in there

These two were found by looking for one English string translated two different ways. There may be more of the same: node tests/tools/i18n-coverage.js --review ta lists them, and about 27 came up. Most are harmless (the tag wraps only part of a phrase), but a few are this bug.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: localizationTranslations, language packs, locale formatting, fontsbugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is neededsize: smallSmall, focused task suitable for a short PR

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions