Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Ortiz <rafael@activitycentral.com>2011-10-13 17:11:58 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2011-10-13 17:11:58 (GMT)
commit0323fd872307dd5f6216f7d9760fbf1e89312a6f (patch)
treec53f63cce0e9695704c060c2b315f63252e899bd
parent3e91dd99e72c71b0da056b848e5a03274cb191bc (diff)
improving detection of lang for format (sl#2944)
-rwxr-xr-xclock.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/clock.py b/clock.py
index 1893b77..2f1fc94 100755
--- a/clock.py
+++ b/clock.py
@@ -96,7 +96,7 @@ from timewriter import TimeWriter
import dbus
import os
-
+import locale
# The display modes of the clock
_MODE_SIMPLE_CLOCK = 0
_MODE_NICE_CLOCK = 1
@@ -138,6 +138,15 @@ class ClockActivity(activity.Activity):
'<span foreground="#5E008C">%m</span>/' +
'<span foreground="#B20008">%d</span>/' +
'<span foreground="#9A5200">%Y</span></span></markup>')
+
+ loc = locale.getdefaultlocale()[0] or 'en_AU'
+ if loc == 'en_AU':
+ self._DATE_SHORT_FORMAT = _("Write Date",
+ '<markup><span lang="en" font_desc="Sans 20">'
+ '<span foreground="#B20008">%A</span>,'
+ '<span foreground="#5E008C">%d</span>/'
+ '<span foreground="#B20008">%m</span>/'
+ '<span foreground="#9A5200">%Y</span></span></markup>')
# Should we write the time in full letters?
self._write_time = False