Simplification
|
@ -116,7 +116,35 @@ public class DeepL {
|
|||
|
||||
int frequency = prefs.getInt("translated_" + target, 0);
|
||||
|
||||
String resname = "language_" + target.toLowerCase().replace('-', '_');
|
||||
String flag;
|
||||
if ("CS".equals(target))
|
||||
flag = "CZ";
|
||||
else if ("DA".equals(target))
|
||||
flag = "DK";
|
||||
else if ("EL".equals(target))
|
||||
flag = "GR";
|
||||
else if ("ET".equals(target))
|
||||
flag = "EE";
|
||||
else if ("JA".equals(target))
|
||||
flag = "JP";
|
||||
else if ("KO".equals(target))
|
||||
flag = "KR";
|
||||
else if ("NB".equals(target))
|
||||
flag = "NO";
|
||||
else if ("SL".equals(target))
|
||||
flag = "SI";
|
||||
else if ("SV".equals(target))
|
||||
flag = "SE";
|
||||
else if ("UK".equals(target))
|
||||
flag = "UA";
|
||||
else if ("ZH".equals(target))
|
||||
flag = "CN";
|
||||
else {
|
||||
String[] t = target.split("-");
|
||||
flag = t[t.length - 1];
|
||||
}
|
||||
|
||||
String resname = "flag_" + flag.toLowerCase();
|
||||
int resid = res.getIdentifier(resname, "drawable", pkg);
|
||||
|
||||
languages.add(new Language(name, target, formality,
|
||||
|
|
Before Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 112 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 655 B |
Before Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 133 B |
Before Width: | Height: | Size: 114 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 797 B |
Before Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 350 B |