aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/BaseActivity.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java12
2 files changed, 16 insertions, 8 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/BaseActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/BaseActivity.java
index ccc00968..e2f02bdd 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/BaseActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/BaseActivity.java
@@ -67,10 +67,18 @@ public abstract class BaseActivity extends AppCompatActivity {
SharedPreferences mSharedPreferences = getDefaultSharedPreferences();
String language = mSharedPreferences.getString(SharedPreferencesUtils.LANGUAGE, SharedPreferencesUtils.LANGUAGE_DEFAULT_VALUE);
+ Locale systemLocale = Resources.getSystem().getConfiguration().locale;
+ Locale locale;
if (language.equals(SharedPreferencesUtils.LANGUAGE_DEFAULT_VALUE)) {
- language = Resources.getSystem().getConfiguration().locale.getLanguage();
+ language = systemLocale.getLanguage();
+ locale = new Locale(language, systemLocale.getCountry());
+ } else {
+ if (language.contains("-")) {
+ locale = new Locale(language.substring(0, 2), language.substring(4));
+ } else {
+ locale = new Locale(language);
+ }
}
- Locale locale = new Locale(language);
Locale.setDefault(locale);
Resources resources = getResources();
Configuration config = resources.getConfiguration();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java
index 28206e3e..766a57af 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/Translation.java
@@ -18,27 +18,27 @@ public class Translation {
public static ArrayList<Translation> getTranslationContributors() {
ArrayList<Translation> translationContributors = new ArrayList<>();
translationContributors.add(new Translation("български", "zerw, Кристиян", R.drawable.flag_bulgaria));
- translationContributors.add(new Translation("简体中文", "3273676671, Angela Thayer, cdggqa, Gloria, Justin, Ray, Steps, wert", R.drawable.flag_china));
+ translationContributors.add(new Translation("简体中文", "1, 3273676671, AaronFeng, Angela Thayer, cdggqa, Gloria, History_exe, Justin, Ray, Steps, Tunicar, wert", R.drawable.flag_china));
translationContributors.add(new Translation("繁體中文", "Angela Thayer, Ray", R.drawable.flag_china));
translationContributors.add(new Translation("Hrvatski", "Josip", R.drawable.flag_croatia));
translationContributors.add(new Translation("Nederlands", "Khawkfist, Mert", R.drawable.flag_netherlands));
translationContributors.add(new Translation("Française", "367, Darlene Sonalder, Finn Olmsted, Imperator, Johan, oursonbleu, Owen, pinembour", R.drawable.flag_france));
- translationContributors.add(new Translation("Deutsche", "ducc1, Joe, Jorge, Netto Hikari, Nikodiamond3, NotABot34, translatewingman, translatorwiz", R.drawable.flag_germany));
+ translationContributors.add(new Translation("Deutsche", "adth03, ducc1, Joe, Jorge, Netto Hikari, Nikodiamond3, NotABot34, translatewingman, translatorwiz", R.drawable.flag_germany));
translationContributors.add(new Translation("Ελληνικά", "Marios, Viktor", R.drawable.flag_greece));
translationContributors.add(new Translation("हिंदी", "a, Arya, charu, Harshit S Lawaniya, Mrigendra Bhandari, prat, raghav, Sachin, Ved", R.drawable.flag_india));
translationContributors.add(new Translation("Magyar", "Zoltan", R.drawable.flag_hungary));
translationContributors.add(new Translation("Italiana", "Daniele Basso, DanOlivaw, Gianni00palmieri, Gillauino, Matisse, Simoneg. work, ztiaa", R.drawable.flag_italy));
- translationContributors.add(new Translation("日本語", "Hira, Issa, Mrigendra Bhandari, Ryan", R.drawable.flag_japan));
+ translationContributors.add(new Translation("日本語", "Hira, Issa, Kerim Demirkaynak, Mrigendra Bhandari, Ryan", R.drawable.flag_japan));
translationContributors.add(new Translation("한국어", "noname", R.drawable.flag_south_korea));
translationContributors.add(new Translation("norsk", "", R.drawable.flag_norway));
translationContributors.add(new Translation("Polskie", "Chupacabra, Maks", R.drawable.flag_poland));
translationContributors.add(new Translation("Português", "., Bruno Guerreiro, Lucas, Ricky", R.drawable.flag_portugal));
translationContributors.add(new Translation("Português (BR)", "., Davy, Laura Vasconcellos Pereira Felippe, Ricardo, Ricky, Super_Iguanna", R.drawable.flag_brazil));
translationContributors.add(new Translation("Română", "Loading Official", R.drawable.flag_romania));
- translationContributors.add(new Translation("русский язык", "Angela Thayer, aveblazer, flexagoon, Georgiy, Vova", R.drawable.flag_russia));
- translationContributors.add(new Translation("Español", "Alejandro, Angela Thayer, Gaynus, Jorge, Miguel, mvstermoe, Nana Snixx, Sofia Flores", R.drawable.flag_spain));
+ translationContributors.add(new Translation("русский язык", "Angela Thayer, aveblazer, Coolant, flexagoon, Georgiy, Vova", R.drawable.flag_russia));
+ translationContributors.add(new Translation("Español", "Alejandro, Alfredo, Angel, Angela Thayer, Gaynus, Jorge, Luis Antonio, Miguel, mvstermoe, Nana Snixx, Sofia Flores", R.drawable.flag_spain));
translationContributors.add(new Translation("svenska", "Marcus Nordberg", R.drawable.flag_sweden));
- translationContributors.add(new Translation("Türkçe", "Berk Bakır \"Faoiltiarna\", Emir481, Faoiltiarna, Kerim Demirkaynak, Mehmet Yavuz, Serif", R.drawable.flag_turkey));
+ translationContributors.add(new Translation("Türkçe", "adth03, Berk Bakır \"Faoiltiarna\", Emir481, Faoiltiarna, Kerim Demirkaynak, Mehmet Yavuz, Serif", R.drawable.flag_turkey));
translationContributors.add(new Translation("Tiếng Việt", "Kai, Laezzy, Lmao, Ryan, viecdet69", R.drawable.flag_vietnam));
return translationContributors;
}