NativeScript / NativeScript/plugins

nativescript/localize info about string-arrays & integer-arrays

Open
#166 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

Hi,

Hope you're well!

I've some issue or misunderstandings regards to @nativescript/localize package, in terms of arrays. Does arrays are transformed into with each item in array as ?

The arrays are mentioned in https://github.com/NativeScript/plugins/tree/main/packages/localize#file-format

If yes,
I've tried doing so, but it doesn't work, below I tried the following

Json file

{
  "array": [
    "split the translation into ",
    "multiples lines"
  ]
}

XML output

<string name="array">"split the translation into multiples lines"</string>

If no

Are there any ways of doing so, or will there be plans for it? Below have an example of what I'm trying to achieve.

string-arrays

<string-array name="some_name">
    <item>One</item>
    <item>Two...</item>
</string-array>

integer-array

<integer-array name="some_name">
    <item>2</item>
</integer-array>

Hoping that there is such feature as it would be very helpful, looking forward to hearing from you.

Best regards,
Cheers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the @nativescript/localize file-format documentation linked in the issue and comparing its documented array behavior with the shown JSON and XML. Confirm whether string-array and integer-array resources are supported; done means documenting the behavior or defining a scoped implementation plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
localization, mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.