[FOLIO-1436] Reuse of translation key names not supported by Lokalise Created: 23/Aug/18  Updated: 12/Nov/18  Resolved: 23/Aug/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Peter Murray Assignee: Peter Murray
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint:

 Description   

There are several examples of where translation key names are reused across `ui-*` modules. For example, `meta.title`:

Lokalise imposes these conditions on translation key names (emphasis added):

It is important to understand how keys are tied to platforms and filenames in Lokalise:

  • A key can be assigned to one or multiple platforms.
  • Assigning a key to a platform means including the key in the export routine for the file formats associated with the platform (e.g. if a key is assigned to iOS and Android platforms it would get exported to both .strings and .xml files, but would not go to the .json export).
  • A key can be assigned to one unique filename per each platform.
  • A path may be an integral part of the filename (e.g. locale/en.json and main/en.json are considered two different filenames). It is recommended to omit the path in filename and add it dynamically when generating the bundle.

In case you were wondering if Lokalise's notion of a "platform" would help us, it doesn't.
Lokalise defines a "platform" this way:

Lokalise is a multiplatform system – that means you can store iOS, Android, Web or any other strings together, even if they originally exist in different files and formats. Once you upload it all, the system does the automatic merging for the keys with similar names and there are just several steps to merge all other possible keys using translation matching (see docs). As you merge the keys, they only need to be translated once – the strings get exported to appropriate files with appropriate names depending on the platform.

(Both quotes are taken from Localization workflow: best practices - Lokalise Blog.)

When loading the translation files from GitHub to Lokalise, the impact is that Lokalise only remembers the last imported file as the location of a particular translation key. On export, that translation key is only exported to that file. For example, in the recent merge of translation keys from Lokalise into ui-users resulted in the removal of the `meta.title` key in the German translation file.



 Comments   
Comment by Peter Murray [ 23/Aug/18 ]

Hang on – I may have an answer...

Comment by Peter Murray [ 23/Aug/18 ]

Yes, flipping the "Differentiate keys by file" as István Bender suggested fixed this problem.

Generated at Thu Feb 08 23:13:19 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.