summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-08-03 15:26:57 -0400
committerMike Lockwood <lockwood@android.com>2011-08-03 15:29:02 -0400
commitec9a50bccf6163302f41fcc410b7fe80258bb0ea (patch)
tree89c58942100b49865562ace345349a57c16913d7 /packages
parent62c7b37590b1a692384a55949d3b9eba221a3652 (diff)
downloadframeworks_base-ec9a50bccf6163302f41fcc410b7fe80258bb0ea.zip
frameworks_base-ec9a50bccf6163302f41fcc410b7fe80258bb0ea.tar.gz
frameworks_base-ec9a50bccf6163302f41fcc410b7fe80258bb0ea.tar.bz2
Add support for localizing order of day of week and date in status bar date view
In Japanese, the day of week should follow the date Bug: 4606219 Change-Id: If385b3f9989bbe5f1b4bc21293d9be651e187c1f Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/values-ja/strings.xml4
-rw-r--r--packages/SystemUI/res/values/strings.xml5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java4
3 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index d97b90f..1446099 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -135,4 +135,8 @@
<skip />
<!-- no translation found for gps_notification_found_text (4619274244146446464) -->
<skip />
+
+ <!-- in Japanese the day of week should follow the date -->
+ <string name="status_bar_date_formatter">%2$s\n%1$s</string>
+
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 2b3118d..03b82fd 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -41,8 +41,9 @@
<!-- Title shown in recents popup for inspecting an application's properties -->
<string name="status_bar_recent_inspect_item_title">Inspect</string>
-
-
+ <!-- For formatting day of week and date in DateView. Day of week precedes date by default,
+ but this may be overridden on a per-locale basis if necessary. -->
+ <string name="status_bar_date_formatter">%1$s\n%2$s</string>
<!-- The label in the bar at the top of the status bar when there are no notifications
showing. [CHAR LIMIT=40]-->
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
index 6ab03e1..a171514 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -28,6 +28,8 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
+import com.android.systemui.R;
+
import java.util.Date;
public final class DateView extends TextView {
@@ -90,7 +92,7 @@ public final class DateView extends TextView {
Date now = new Date();
CharSequence dow = DateFormat.format("EEEE", now);
CharSequence date = DateFormat.getMediumDateFormat(getContext()).format(now);
- setText(dow + "\n" + date);
+ setText(context.getString(R.string.status_bar_date_formatter, dow, date));
}
private boolean isVisible() {