update keyboard texts table, and script to create it

This commit is contained in:
Helium314 2023-09-06 23:45:11 +02:00
parent 1978944e9f
commit 20a265e327
2 changed files with 76 additions and 67 deletions

View file

@ -188,12 +188,20 @@ public class MoreKeysResources {
for (final StringResourceMap resMap : mResourcesMap.values()) {
final Locale locale = resMap.mLocale;
final String localeStr = LocaleUtils.getLocaleCode(locale);
final String localeStr2 = localeStr.equals("he")
? "iw" // android still uses iw, but apparently with a newer java version iw ends up being converted to he
: localeStr;
if (localeStr.equals("he")) {
// android still uses iw, but with newer java versions iw ends up being converted to he
// to be safe, just use both locales
final String localeToDump = (locale == LocaleUtils.DEFAULT_LOCALE)
? String.format("\"%s\"", localeStr)
: String.format("\"%s\"%s", "iw", " ".substring(localeStr.length()));
out.format(" %s, %-12s /* %3d/%3d %s */\n",
localeToDump, getArrayNameForLocale(locale) + ",",
resMap.getResources().size(), resMap.getOutputArraySize(),
LocaleUtils.getLocaleDisplayName(locale));
}
final String localeToDump = (locale == LocaleUtils.DEFAULT_LOCALE)
? String.format("\"%s\"", localeStr)
: String.format("\"%s\"%s", localeStr2, " ".substring(localeStr.length()));
: String.format("\"%s\"%s", localeStr, " ".substring(localeStr.length()));
out.format(" %s, %-12s /* %3d/%3d %s */\n",
localeToDump, getArrayNameForLocale(locale) + ",",
resMap.getResources().size(), resMap.getOutputArraySize(),