From 56b473cd8d5a0a5e67d1fdfce1b60f9d892a1bdc Mon Sep 17 00:00:00 2001 From: sunilpaulmathew Date: Sun, 31 Mar 2024 19:19:18 +0200 Subject: [PATCH] Added Greek transaltions to language switch & updated credits Signed-off-by: sunilpaulmathew --- Credits.md | 1 + .../com/apk/editor/utils/AppSettings.java | 33 +++++-------------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/Credits.md b/Credits.md index 5e54e29..3462246 100644 --- a/Credits.md +++ b/Credits.md @@ -37,5 +37,6 @@ APK Explorer & Editor (AEE) is, and as always, an open-source project which is r * vuvov11 - Thai Translation * Me - Arabic (SA) Translation * asdfqw, Fsotm. mai, sardonicdozen, & 始 - Chinese (zh-Hans) Translation +* [VisionR1](https://github.com/VisionR1) - Greek Translation _If you think I missed your name, please let me know._ \ No newline at end of file diff --git a/app/src/main/java/com/apk/editor/utils/AppSettings.java b/app/src/main/java/com/apk/editor/utils/AppSettings.java index cc5369c..a01752b 100644 --- a/app/src/main/java/com/apk/editor/utils/AppSettings.java +++ b/app/src/main/java/com/apk/editor/utils/AppSettings.java @@ -132,6 +132,7 @@ public static List getCredits(Context context) { mData.add(new sSerializableItems(null, "Fsotm. mai", "Chinese (zh-Hans) Translation", null)); mData.add(new sSerializableItems(null, "sardonicdozen", "Chinese (zh-Hans) Translation", null)); mData.add(new sSerializableItems(null, "始", "Chinese (zh-Hans) Translation", null)); + mData.add(new sSerializableItems(null, "VisionR1", "Greek Translation", "https://github.com/VisionR1")); return mData; } @@ -171,6 +172,8 @@ public static String getLanguage(Context context) { return context.getString(R.string.language_lt); case "th": return context.getString(R.string.language_th); + case "el": + return context.getString(R.string.language_el); default: return context.getString(R.string.app_theme_auto); } @@ -324,77 +327,65 @@ public void onItemSelected(int itemPosition) { switch (itemPosition) { case 0: sCommonUtils.saveString("appLanguage", java.util.Locale.getDefault().getLanguage(), context); - restartApp(context); break; case 1: sCommonUtils.saveString("appLanguage", "ar", context); - restartApp(context); break; case 2: sCommonUtils.saveString("appLanguage", "zh", context); - restartApp(context); break; case 3: sCommonUtils.saveString("appLanguage", "cs", context); - restartApp(context); break; case 4: sCommonUtils.saveString("appLanguage", "de", context); - restartApp(context); break; case 5: sCommonUtils.saveString("appLanguage", "en_US", context); - restartApp(context); break; case 6: sCommonUtils.saveString("appLanguage", "fr", context); - restartApp(context); break; case 7: sCommonUtils.saveString("appLanguage", "es", context); - restartApp(context); break; case 8: sCommonUtils.saveString("appLanguage", "ru", context); - restartApp(context); break; case 9: sCommonUtils.saveString("appLanguage", "tr", context); - restartApp(context); break; case 10: sCommonUtils.saveString("appLanguage", "vi", context); - restartApp(context); break; case 11: sCommonUtils.saveString("appLanguage", "pl", context); - restartApp(context); break; case 12: sCommonUtils.saveString("appLanguage", "in", context); - restartApp(context); break; case 13: sCommonUtils.saveString("appLanguage", "hu", context); - restartApp(context); break; case 14: sCommonUtils.saveString("appLanguage", "uk", context); - restartApp(context); break; case 15: sCommonUtils.saveString("appLanguage", "hi", context); - restartApp(context); break; case 16: sCommonUtils.saveString("appLanguage", "lt", context); - restartApp(context); break; case 17: sCommonUtils.saveString("appLanguage", "th", context); - restartApp(context); + break; + case 18: + sCommonUtils.saveString("appLanguage", "el", context); break; } + Intent intent = new Intent(context, MainActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + context.startActivity(intent); } }.show(); } @@ -404,10 +395,4 @@ public static boolean isCustomKey(Context context) { sCommonUtils.getString("X509Certificate", null, context) != null; } - private static void restartApp(Context context) { - Intent intent = new Intent(context, MainActivity.class); - intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); - context.startActivity(intent); - } - } \ No newline at end of file