Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 eyeo GmbH |
anton
2017/08/08 05:43:41
it should be -2017
jens
2017/08/08 13:53:05
Acknowledged.
anton
2017/08/11 11:25:07
also please check `e` or `E` should used
jens
2017/08/11 13:27:23
Acknowledged.
| |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 { | 64 { |
65 locale = Resources.getSystem().getConfiguration().locale; | 65 locale = Resources.getSystem().getConfiguration().locale; |
66 } | 66 } |
67 | 67 |
68 return convertOldISOCodes(locale.getLanguage()); | 68 return convertOldISOCodes(locale.getLanguage()); |
69 } | 69 } |
70 | 70 |
71 /* | 71 /* |
72 * ISO 639 is not a stable standard; some of the language codes it defines | 72 * ISO 639 is not a stable standard; some of the language codes it defines |
73 * (specifically "iw", "ji", and "in") have changed. Android returns the old c odes | 73 * (specifically "iw", "ji", and "in") have changed. Android returns the old c odes |
74 * ("iw", "ji", and "in") but in subscriptions.xnl we use the new codes ("he", "yi", and "id"). | 74 * ("iw", "ji", and "in") but in subscriptions.xml we use the new codes ("he", "yi", and "id"). |
75 * To match the device language to a subscription, we need to convert the old codes. | 75 * To match the device language to a subscription, we need to convert the old codes. |
76 */ | 76 */ |
77 private static String convertOldISOCodes(String language) | 77 private static String convertOldISOCodes(String language) |
78 { | 78 { |
79 switch (language) | 79 switch (language) |
80 { | 80 { |
81 case HEBREW_OLD: | 81 case HEBREW_OLD: |
82 return HEBREW_NEW; | 82 return HEBREW_NEW; |
83 case YIDDISH_OLD: | 83 case YIDDISH_OLD: |
84 return YIDDISH_NEW; | 84 return YIDDISH_NEW; |
85 case INDONESIAN_OLD: | 85 case INDONESIAN_OLD: |
86 return INDONESIAN_NEW; | 86 return INDONESIAN_NEW; |
87 default: | 87 default: |
88 return language; | 88 return language; |
89 } | 89 } |
90 } | 90 } |
91 } | 91 } |
LEFT | RIGHT |