Commit a9e84c0e authored by DrKLO's avatar DrKLO

Added Korean locale, bug fixes

parent 28270a87
...@@ -80,7 +80,7 @@ android { ...@@ -80,7 +80,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 19 targetSdkVersion 19
versionCode 346 versionCode 349
versionName "1.9.3" versionName "1.9.3"
} }
} }
...@@ -216,6 +216,14 @@ public class LocaleController { ...@@ -216,6 +216,14 @@ public class LocaleController {
sortedLanguages.add(localeInfo); sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo); languagesDict.put(localeInfo.shortName, localeInfo);
localeInfo = new LocaleInfo();
localeInfo.name = "한국어";
localeInfo.nameEnglish = "Korean";
localeInfo.shortName = "ko";
localeInfo.pathToFile = null;
sortedLanguages.add(localeInfo);
languagesDict.put(localeInfo.shortName, localeInfo);
loadOtherLanguages(); loadOtherLanguages();
for (LocaleInfo locale : otherLanguages) { for (LocaleInfo locale : otherLanguages) {
...@@ -727,7 +735,11 @@ public class LocaleController { ...@@ -727,7 +735,11 @@ public class LocaleController {
formatString = "h:mm a"; formatString = "h:mm a";
} }
} }
if (lang.toLowerCase().equals("ar") || lang.toLowerCase().equals("ko")) {
formatterDay = FastDateFormat.getInstance(formatString, locale); formatterDay = FastDateFormat.getInstance(formatString, locale);
} else {
formatterDay = FastDateFormat.getInstance(formatString, Locale.US);
}
} }
public static String stringForMessageListDate(long date) { public static String stringForMessageListDate(long date) {
......
...@@ -630,7 +630,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen ...@@ -630,7 +630,7 @@ public class ChatProfileActivity extends BaseFragment implements NotificationCen
} }
if (count != 0 && onlineCount > 1) { if (count != 0 && onlineCount > 1) {
onlineText.setText(Html.fromHtml(String.format("%s, <font color='#357aa8'>%d %s</font>", LocaleController.formatPluralString("Members", count), onlineCount, LocaleController.formatPluralString("Online", onlineCount)))); onlineText.setText(Html.fromHtml(String.format("%s, <font color='#357aa8'>%s</font>", LocaleController.formatPluralString("Members", count), LocaleController.formatPluralString("Online", onlineCount))));
} else { } else {
onlineText.setText(LocaleController.formatPluralString("Members", count)); onlineText.setText(LocaleController.formatPluralString("Members", count));
} }
......
...@@ -587,7 +587,7 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -587,7 +587,7 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
} }
int rotation = manager.getDefaultDisplay().getRotation(); int rotation = manager.getDefaultDisplay().getRotation();
if (height > AndroidUtilities.dp(50)) { if (height > AndroidUtilities.dp(50) && keyboardVisible) {
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) { if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
keyboardHeightLand = height; keyboardHeightLand = height;
ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).edit().putInt("kbd_height_land3", keyboardHeightLand).commit(); ApplicationLoader.applicationContext.getSharedPreferences("emoji", 0).edit().putInt("kbd_height_land3", keyboardHeightLand).commit();
...@@ -598,14 +598,17 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -598,14 +598,17 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
} }
if (emojiPopup != null && emojiPopup.isShowing()) { if (emojiPopup != null && emojiPopup.isShowing()) {
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Context.WINDOW_SERVICE); int newHeight = 0;
final WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams)emojiPopup.getContentView().getLayoutParams();
layoutParams.width = AndroidUtilities.displaySize.x;
if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) { if (rotation == Surface.ROTATION_270 || rotation == Surface.ROTATION_90) {
layoutParams.height = keyboardHeightLand; newHeight = keyboardHeightLand;
} else { } else {
layoutParams.height = keyboardHeight; newHeight = keyboardHeight;
} }
final WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams)emojiPopup.getContentView().getLayoutParams();
if (layoutParams.width != AndroidUtilities.displaySize.x || layoutParams.height != newHeight) {
WindowManager wm = (WindowManager) ApplicationLoader.applicationContext.getSystemService(Context.WINDOW_SERVICE);
layoutParams.width = AndroidUtilities.displaySize.x;
layoutParams.height = newHeight;
wm.updateViewLayout(emojiPopup.getContentView(), layoutParams); wm.updateViewLayout(emojiPopup.getContentView(), layoutParams);
if (!keyboardVisible) { if (!keyboardVisible) {
sizeNotifierRelativeLayout.post(new Runnable() { sizeNotifierRelativeLayout.post(new Runnable() {
...@@ -619,6 +622,7 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen ...@@ -619,6 +622,7 @@ public class ChatActivityEnterView implements NotificationCenter.NotificationCen
}); });
} }
} }
}
boolean oldValue = keyboardVisible; boolean oldValue = keyboardVisible;
keyboardVisible = height > 0; keyboardVisible = height > 0;
......
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'الساعة\' %2$s</string> <string name="formatDateAtTime">%1$s الساعة %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'um\' %2$s</string> <string name="formatDateAtTime">%1$s um %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'a las\' %2$s</string> <string name="formatDateAtTime">%1$s a las %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'alle\' %2$s</string> <string name="formatDateAtTime">%1$s alle %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
This diff is collapsed.
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'om\' %2$s</string> <string name="formatDateAtTime">%1$s om %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'às\' %2$s</string> <string name="formatDateAtTime">%1$s às %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'às\' %2$s</string> <string name="formatDateAtTime">%1$s às %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<string name="formatterWeek">EEE</string> <string name="formatterWeek">EEE</string>
<string name="formatterDay24H">HH:mm</string> <string name="formatterDay24H">HH:mm</string>
<string name="formatterDay12H">h:mm a</string> <string name="formatterDay12H">h:mm a</string>
<string name="formatDateAtTime">%1$s \'at\' %2$s</string> <string name="formatDateAtTime">%1$s at %2$s</string>
<!--Don't change this! Not for localization!--> <!--Don't change this! Not for localization!-->
<string name="CacheTag">CACHE_TAG</string> <string name="CacheTag">CACHE_TAG</string>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment