ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #05249
[Merge] lp:~gang65/ubuntu-clock-app/ubuntu-clock-app-australia-display-fix into lp:ubuntu-clock-app
Bartosz Kosiorek has proposed merging lp:~gang65/ubuntu-clock-app/ubuntu-clock-app-australia-display-fix into lp:ubuntu-clock-app.
Commit message:
Fix digital time display for English Australia locale (LP: #1384739)
Requested reviews:
Ubuntu Clock Developers (ubuntu-clock-dev)
Related bugs:
Bug #1384739 in Ubuntu Clock App: "Digital time display is wider than the circle it's drawn on, for English (Australia) locale"
https://bugs.launchpad.net/ubuntu-clock-app/+bug/1384739
For more details, see:
https://code.launchpad.net/~gang65/ubuntu-clock-app/ubuntu-clock-app-australia-display-fix/+merge/274183
Fix digital time display for English Australia locale (LP: #1384739)
--
Your team Ubuntu Clock Developers is requested to review the proposed merge of lp:~gang65/ubuntu-clock-app/ubuntu-clock-app-australia-display-fix into lp:ubuntu-clock-app.
=== modified file 'app/components/DigitalMode.qml'
--- app/components/DigitalMode.qml 2015-09-16 15:13:36 +0000
+++ app/components/DigitalMode.qml 2015-10-12 20:43:31 +0000
@@ -56,17 +56,20 @@
color: UbuntuColors.midAubergine
font.pixelSize: units.dp(1)
text: {
- if (localizedTimeString.search(Qt.locale().amText) !== -1) {
- // 12 hour format detected with the localised AM text
- return localizedTimeString.replace(Qt.locale().amText, "").trim()
- }
- else if (localizedTimeString.search(Qt.locale().pmText) !== -1) {
- // 12 hour format detected with the localised PM text
- return localizedTimeString.replace(Qt.locale().pmText, "").trim()
- }
- else {
- // 24-hour format detected, return full time string
- return localizedTimeString
+ // Fix for lp:1384739
+ if (localizedTimeString.split(" ").length > 1) {
+ localizedTimeString.split(" ")[0]
+ } else {
+ if (localizedTimeString.search(Qt.locale().amText) !== -1) {
+ // 12 hour format detected with the localised AM text
+ return localizedTimeString.replace(Qt.locale().amText, "").trim()
+ } else if (localizedTimeString.search(Qt.locale().pmText) !== -1) {
+ // 12 hour format detected with the localised PM text
+ return localizedTimeString.replace(Qt.locale().pmText, "").trim()
+ } else {
+ // 24-hour format detected, return full time string
+ return localizedTimeString
+ }
}
}
}
@@ -81,17 +84,20 @@
font.pixelSize: units.dp(1)
visible: text !== ""
text: {
- if (localizedTimeString.search(Qt.locale().amText) !== -1) {
- // 12 hour format detected with the localised AM text
- return Qt.locale().amText
- }
- else if (localizedTimeString.search(Qt.locale().pmText) !== -1) {
- // 12 hour format detected with the localised PM text
- return Qt.locale().pmText
- }
- else {
- // 24-hour format detected
- return ""
+ // Fix for lp:1384739
+ if (localizedTimeString.split(" ").length > 1) {
+ localizedTimeString.split(" ")[1]
+ } else {
+ if (localizedTimeString.search(Qt.locale().amText) !== -1) {
+ // 12 hour format detected with the localised AM text
+ return Qt.locale().amText
+ } else if (localizedTimeString.search(Qt.locale().pmText) !== -1) {
+ // 12 hour format detected with the localised PM text
+ return Qt.locale().pmText
+ } else {
+ // 24-hour format detected
+ return ""
+ }
}
}
}
=== modified file 'debian/changelog'
--- debian/changelog 2015-09-17 04:33:11 +0000
+++ debian/changelog 2015-10-12 20:43:31 +0000
@@ -16,6 +16,7 @@
* Fix stopwatch issue appering during changing timezone during runtime (LP: #1493358)
* Fix Daylight Saving Time issues (LP: #1437805)
* Fix time for second location wrong after daylight saving started (LP: #1457523)
+ * Fix digital time display for English Australia locale (LP: #1384739)
-- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx> Wed, 02 Sep 2015 15:16:29 +0200
Follow ups