NativeScript / NativeScript/plugins

@nativescript/localize, Android bug, Cannot add language file with region specifier

未关闭
#246 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

Hello together, I am currently trying to add simple Chinese (zh.json) and traditional Chinese (zh-hant.json) language files to my app using the localize plugin.
Both files work as expected when building the ios app. However, with the zh-hant.json file included in the sources I cannot build the android version of my app. I get the following error message:

ERROR:/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd/platforms/android/app/src/main/res/values-zh-rhant: Resource and asset merger: Invalid resource directory name

Execution failed for task ':app:mergeDebugResources'.
/Users/cjohn/Entwicklung/MND/my-nutri-diary/mnd/platforms/android/app/src/main/res/values-zh-rhant: Error: Invalid resource directory name

Would be great if someone could help. Thanks!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先跟踪 @nativescript/localize 如何将语言文件名转换为 Android 资源目录,并使用 zh.json 和 zh-hant.json 作为复现案例。运行 Android 构建,并验证为区域语言生成的目录使用有效的 Android 资源名称,且构建成功。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, typescript
领域
build-system, localization, mobile-dev
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。