[gnome-maps/wip/mlundblad/capitalize-opening-hours] translations: Upper case first character of day interval



commit 30f1d01e729aead31be438abe724b4bfb6c31377
Author: Marcus Lundblad <ml update uu se>
Date:   Sat Jan 30 23:14:17 2021 +0100

    translations: Upper case first character of day interval
    
    Upper case the first character of day interval for opening
    hours. This makes sure the first character in each row in
    the opeing hours table is upper case even in languages
    where day names are not generally "proper noun"-cased
    when just embedded inside a string.

 src/translations.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/translations.js b/src/translations.js
index 732b55a9..be16f0d4 100644
--- a/src/translations.js
+++ b/src/translations.js
@@ -25,6 +25,7 @@ const C_ = imports.gettext.dgettext;
 const GLib = imports.gi.GLib;
 
 const Time = imports.time;
+const Utils = imports.utils;
 
 /* Translate an opening time specification tag value.
  * from OSM into a "two-dimensional" (array-of-arrays) grid of human-readable
@@ -80,7 +81,8 @@ function _translateOpeningHoursPart(string) {
         let timeIntervalSpec =
             _translateOpeningHoursTimeIntervalList(splitString[1].trim());
 
-        return [dayIntervalSpec, timeIntervalSpec];
+        return [Utils.firstToLocaleUpperCase(dayIntervalSpec),
+                timeIntervalSpec];
     } else {
         // for an unknown format, just output the raw value
         return [string];


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]