EddyVerbruggen / EddyVerbruggen/nativescript-localize

Identifiers are changed after export happens

Open
#85 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
80
Forks
31
PR merge metrics
No merged PRs in 30d

Description

So we store our localization strings in a javascript file, which looks like this:
```
module.exports = {
"yes": "Yes",
"no": "No",
"type-a-message": "Type a message",
}
```

In the strings.xml and Localizable.strings however the entries look like this:

Android:
```
"No"
"Yes"
"Type a message"
```

iOS:
```
"no" = "Nein";
"yes" = "Ja";
"_type_a_message_Z13yvex" = "Nachricht schreiben";
```
As we use firebase cloud messaging and want to generate localized push notifications with titleLocKey and bodyLocKey (see FCM Documentation for details) it is extremely annoying that "type-a-message" is converted to "_type_a_message_Z13yvex".

Is this a bug? Is this expected behaviour because we use "-" in the identifiers?

It is definitely strange that any identifier would change like this.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no source files or tests; start by locating the export path that converts JavaScript keys into Android strings.xml and iOS Localizable.strings. Trace how hyphenated identifiers are handled on each platform and verify the behavior with the provided examples. Done means the identifier behavior is corrected or clearly documented as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
internationalization, localization, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.