nativescript-community / nativescript-community/l
[BUG-android] Plugin does not escape special characters
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
It seems that the plugin fails to escape special characters before generating android resources.
This is what we get for a percentage character used as a JSON key:
mobile/platforms/android/app/src/main/res/values/strings.xml: Resource and asset merger: '%' is not a valid resource name character
Execution failed for task ':app:mergeDebugResources'.
mobile/platforms/android/app/src/main/res/values/strings.xml: Error: '%' is not a valid resource name character
Unable to apply changes on device: emulator-5554. Error is: Command ./gradlew failed with exit code 1.
The @nativescript/localize plugin applies escaping without problems.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Android resource-generation failure with a percentage character used as a JSON key, then trace the plugin code that produces mobile/platforms/android/app/src/main/res/values/strings.xml. Done means special characters are escaped before Android resources are generated and the Gradle resource merge completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, typescript
- Domain
- internationalization, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100