hbb20 / hbb20/CountryCodePickerProject

Using Java's own Locale data for region names

未关闭
#302 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
1.5k
派生
509
PR 合并指标
30 天内没有已合并 PR

描述

Instead of having to duplicate and manually translate the region names and data with the raw xml files, Java's build-in Locale data could probably be used.

Current we are using a following trick to generate a list of localized country names for the user to select from:

// Code in Kotlin
```
Locale
.getISOCountries() // Fetch list of ISO 3166 country codes
.map { // Create a new Locale in users default language, but set country to X
it to Locale("", it).displayCountry // then extract the localized name of the country.
}
.toMap() // Turn into Map with ISO 3166 key and Localised country name as value
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

该 issue 提到了原始 XML 文件和 Kotlin Locale.getISOCountries().displayCountry 流程,但没有提到任何仓库文件或测试。请定位当前的地区名称数据和生成入口,然后将其与 Java Locale 的行为进行比较。完成的标准是选定一致同意的数据源,并更新国家名称生成,同时为现有用例进行验证。

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

评估

技术栈
android, java, kotlin
领域
internationalization, mobile
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

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