Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Aubry <matt@piwik.org>2015-10-30 02:42:52 +0300
committerMatthieu Aubry <matt@piwik.org>2015-10-30 02:42:52 +0300
commitfe36f931407ba99f3f8f708143e283f6846bb2f7 (patch)
tree155a0c9afc0cfddd98eddabe00024ac955ea15b0
parent2de7fef4d2176dc435a7dd9c1932b7cf6fdcf77c (diff)
parentc485c086be538e87ba92f26c1f3edd585c55bd46 (diff)
Merge pull request #9093 from piwik/timeformats
Allow user to change time formats (12/24-hour clock)
-rw-r--r--core/Date.php27
-rw-r--r--core/Intl/Data/Provider/DateTimeFormatProvider.php83
-rw-r--r--core/Period.php9
-rw-r--r--core/Version.php2
-rw-r--r--lang/en.json3
-rw-r--r--plugins/Intl/Commands/GenerateIntl.php8
-rw-r--r--plugins/Intl/DateTimeFormatProvider.php133
-rw-r--r--plugins/Intl/config/config.php5
-rw-r--r--plugins/Intl/lang/am.json8
-rw-r--r--plugins/Intl/lang/ar.json8
-rw-r--r--plugins/Intl/lang/be.json8
-rw-r--r--plugins/Intl/lang/bg.json8
-rw-r--r--plugins/Intl/lang/bn.json8
-rw-r--r--plugins/Intl/lang/bs.json8
-rw-r--r--plugins/Intl/lang/ca.json8
-rw-r--r--plugins/Intl/lang/cs.json8
-rw-r--r--plugins/Intl/lang/cy.json8
-rw-r--r--plugins/Intl/lang/da.json8
-rw-r--r--plugins/Intl/lang/de.json8
-rw-r--r--plugins/Intl/lang/el.json8
-rw-r--r--plugins/Intl/lang/en.json8
-rw-r--r--plugins/Intl/lang/es.json8
-rw-r--r--plugins/Intl/lang/et.json8
-rw-r--r--plugins/Intl/lang/eu.json8
-rw-r--r--plugins/Intl/lang/fa.json8
-rw-r--r--plugins/Intl/lang/fi.json8
-rw-r--r--plugins/Intl/lang/fr.json8
-rw-r--r--plugins/Intl/lang/gl.json8
-rw-r--r--plugins/Intl/lang/he.json8
-rw-r--r--plugins/Intl/lang/hi.json8
-rw-r--r--plugins/Intl/lang/hr.json8
-rw-r--r--plugins/Intl/lang/hu.json8
-rw-r--r--plugins/Intl/lang/id.json8
-rw-r--r--plugins/Intl/lang/is.json8
-rw-r--r--plugins/Intl/lang/it.json8
-rw-r--r--plugins/Intl/lang/ja.json8
-rw-r--r--plugins/Intl/lang/ka.json8
-rw-r--r--plugins/Intl/lang/ko.json8
-rw-r--r--plugins/Intl/lang/lt.json8
-rw-r--r--plugins/Intl/lang/lv.json8
-rw-r--r--plugins/Intl/lang/nb.json8
-rw-r--r--plugins/Intl/lang/nl.json8
-rw-r--r--plugins/Intl/lang/nn.json8
-rw-r--r--plugins/Intl/lang/pl.json8
-rw-r--r--plugins/Intl/lang/pt-br.json8
-rw-r--r--plugins/Intl/lang/pt.json8
-rw-r--r--plugins/Intl/lang/ro.json8
-rw-r--r--plugins/Intl/lang/ru.json8
-rw-r--r--plugins/Intl/lang/sk.json8
-rw-r--r--plugins/Intl/lang/sl.json8
-rw-r--r--plugins/Intl/lang/sq.json8
-rw-r--r--plugins/Intl/lang/sr.json8
-rw-r--r--plugins/Intl/lang/sv.json8
-rw-r--r--plugins/Intl/lang/ta.json8
-rw-r--r--plugins/Intl/lang/te.json8
-rw-r--r--plugins/Intl/lang/th.json8
-rw-r--r--plugins/Intl/lang/tl.json8
-rw-r--r--plugins/Intl/lang/tr.json8
-rw-r--r--plugins/Intl/lang/uk.json8
-rw-r--r--plugins/Intl/lang/vi.json8
-rw-r--r--plugins/Intl/lang/zh-cn.json8
-rw-r--r--plugins/Intl/lang/zh-tw.json8
-rw-r--r--plugins/LanguagesManager/API.php39
-rw-r--r--plugins/LanguagesManager/LanguagesManager.php14
-rw-r--r--plugins/LanguagesManager/Model.php31
-rw-r--r--plugins/LanguagesManager/Test/Integration/ModelTest.php136
-rw-r--r--plugins/LanguagesManager/Updates/2.15.1-b1.php32
-rw-r--r--plugins/UsersManager/Controller.php3
-rw-r--r--plugins/UsersManager/javascripts/usersSettings.js1
-rw-r--r--plugins/UsersManager/templates/userSettings.twig8
-rw-r--r--tests/PHPUnit/System/expected/test_OneVisitor_SeveralDays_ImportedInRandomOrderTest_shouldShowOneVisit_InEachOfThreeDays__Live.getLastVisitsDetails_month.xml18
-rw-r--r--tests/PHPUnit/System/expected/test_UserId_VisitorId__Live.getLastVisitsDetails_month.xml28
-rw-r--r--tests/PHPUnit/Unit/DateTest.php32
73 files changed, 836 insertions, 208 deletions
diff --git a/core/Date.php b/core/Date.php
index bac8ce7db2..cbbe866708 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -11,6 +11,8 @@ namespace Piwik;
use Exception;
use Piwik\Container\StaticContainer;
+use Piwik\Intl\Data\Provider\DateTimeFormatProvider;
+use Piwik\Plugins\LanguagesManager\LanguagesManager;
/**
* Utility class that wraps date/time related PHP functions. Using this class can
@@ -41,15 +43,15 @@ class Date
/** The default date time string format. */
const DATE_TIME_FORMAT = 'Y-m-d H:i:s';
- const DATETIME_FORMAT_LONG = 'Intl_Format_DateTime_Long';
- const DATETIME_FORMAT_SHORT = 'Intl_Format_DateTime_Short';
- const DATE_FORMAT_LONG = 'Intl_Format_Date_Long';
- const DATE_FORMAT_DAY_MONTH = 'Intl_Format_Date_Day_Month';
- const DATE_FORMAT_SHORT = 'Intl_Format_Date_Short';
- const DATE_FORMAT_MONTH_SHORT = 'Intl_Format_Month_Short';
- const DATE_FORMAT_MONTH_LONG = 'Intl_Format_Month_Long';
- const DATE_FORMAT_YEAR = 'Intl_Format_Year';
- const TIME_FORMAT = 'Intl_Format_Time';
+ const DATETIME_FORMAT_LONG = DateTimeFormatProvider::DATE_FORMAT_LONG;
+ const DATETIME_FORMAT_SHORT = DateTimeFormatProvider::DATETIME_FORMAT_SHORT;
+ const DATE_FORMAT_LONG = DateTimeFormatProvider::DATE_FORMAT_LONG;
+ const DATE_FORMAT_DAY_MONTH = DateTimeFormatProvider::DATE_FORMAT_DAY_MONTH;
+ const DATE_FORMAT_SHORT = DateTimeFormatProvider::DATE_FORMAT_SHORT;
+ const DATE_FORMAT_MONTH_SHORT = DateTimeFormatProvider::DATE_FORMAT_MONTH_SHORT;
+ const DATE_FORMAT_MONTH_LONG = DateTimeFormatProvider::DATE_FORMAT_MONTH_LONG;
+ const DATE_FORMAT_YEAR = DateTimeFormatProvider::DATE_FORMAT_YEAR;
+ const TIME_FORMAT = DateTimeFormatProvider::TIME_FORMAT;
/**
* Max days for months (non-leap-year). See {@link addPeriod()} implementation.
@@ -622,10 +624,9 @@ class Date
{
$template = $this->replaceLegacyPlaceholders($template);
- if (substr($template, 0, 5) == 'Intl_') {
- $translator = StaticContainer::get('Piwik\Translation\Translator');
- $template = $translator->translate($template);
- }
+ $dateTimeFormatProvider = StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider');
+
+ $template = $dateTimeFormatProvider->getFormatPattern($template);
$tokens = self::parseFormat($template);
diff --git a/core/Intl/Data/Provider/DateTimeFormatProvider.php b/core/Intl/Data/Provider/DateTimeFormatProvider.php
new file mode 100644
index 0000000000..90ffad609f
--- /dev/null
+++ b/core/Intl/Data/Provider/DateTimeFormatProvider.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Intl\Data\Provider;
+
+/**
+ * Provides date and time formats.
+ */
+class DateTimeFormatProvider
+{
+ const DATETIME_FORMAT_LONG = 1;
+ const DATETIME_FORMAT_SHORT = 2;
+ const DATE_FORMAT_LONG = 10;
+ const DATE_FORMAT_DAY_MONTH = 11;
+ const DATE_FORMAT_SHORT = 12;
+ const DATE_FORMAT_MONTH_SHORT = 13;
+ const DATE_FORMAT_MONTH_LONG = 14;
+ const DATE_FORMAT_YEAR = 15;
+ const TIME_FORMAT = 20;
+
+ /**
+ * Returns the format pattern for the given format type
+ *
+ * @param int $format one of the format constants
+ *
+ * @return string
+ */
+ public function getFormatPattern($format)
+ {
+ switch ($format) {
+ case self::DATETIME_FORMAT_LONG:
+ return 'EEEE, MMMM d, y HH:mm:ss';
+
+ case self::DATETIME_FORMAT_SHORT:
+ return 'MMM d, y HH:mm:ss';
+
+ case self::DATE_FORMAT_LONG:
+ return 'EEEE, MMMM d, y';
+
+ case self::DATE_FORMAT_DAY_MONTH:
+ return 'E, MMM d';
+
+ case self::DATE_FORMAT_SHORT:
+ return 'MMM d, y';
+
+ case self::DATE_FORMAT_MONTH_SHORT:
+ return 'MMM y';
+
+ case self::DATE_FORMAT_MONTH_LONG:
+ return 'MMMM y';
+
+ case self::DATE_FORMAT_YEAR:
+ return 'y';
+
+ case self::TIME_FORMAT:
+ return 'HH:mm:ss';
+ }
+
+ return $format;
+ }
+
+ /**
+ * Returns interval format pattern for the given format type
+ *
+ * @param bool $short whether to return short or long format pattern
+ * @param string $maxDifference maximal difference in interval dates (Y, M or D)
+ *
+ * @return string
+ */
+ public function getRangeFormatPattern($short=false, $maxDifference='Y')
+ {
+ if ($short) {
+ return 'MMM d, y – MMM d, y';
+ }
+
+ return 'MMMM d, y – MMMM d, y';
+ }
+}
diff --git a/core/Period.php b/core/Period.php
index 70a47d2905..aecf6362bf 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -371,12 +371,9 @@ abstract class Period
$maxDifference = 'M';
}
- return $this->translator->translate(
- sprintf(
- 'Intl_Format_Interval_%s_%s',
- $short ? 'Short' : 'Long',
- $maxDifference
- ));
+ $dateTimeFormatProvider = StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider');
+
+ return $dateTimeFormatProvider->getRangeFormatPattern($short, $maxDifference);
}
/**
diff --git a/core/Version.php b/core/Version.php
index ee5bad9caa..77b3d42f1c 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -20,7 +20,7 @@ final class Version
* The current Piwik version.
* @var string
*/
- const VERSION = '2.15.0';
+ const VERSION = '2.15.1-b1';
public function isStableVersion($version)
{
diff --git a/lang/en.json b/lang/en.json
index b70d71e53a..f235a6fa77 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1,5 +1,7 @@
{
"General": {
+ "12HourClock": "12-hour clock",
+ "24HourClock": "24-hour clock",
"AbandonedCarts": "Abandoned Carts",
"AboutPiwikX": "About Piwik %s",
"Action": "Action",
@@ -348,6 +350,7 @@
"TagCloud": "Tag Cloud",
"Tax": "Tax",
"TimeAgo": "%s ago",
+ "TimeFormat": "Time format",
"TimeOnPage": "Time on page",
"Total": "Total",
"TotalRatioTooltip": "This is %1$s of all %2$s %3$s.",
diff --git a/plugins/Intl/Commands/GenerateIntl.php b/plugins/Intl/Commands/GenerateIntl.php
index 45637452a8..d9710f5977 100644
--- a/plugins/Intl/Commands/GenerateIntl.php
+++ b/plugins/Intl/Commands/GenerateIntl.php
@@ -262,7 +262,9 @@ class GenerateIntl extends ConsoleCommand
$translations['Intl']['Time_AM'] = $calendarData['dayPeriods']['format']['wide']['am'];
$translations['Intl']['Time_PM'] = $calendarData['dayPeriods']['format']['wide']['pm'];
- $translations['Intl']['Format_Time'] = $calendarData['timeFormats']['medium'];
+ $translations['Intl']['Format_Time'] = '{time}';
+ $translations['Intl']['Format_Time_12'] = $calendarData['dateTimeFormats']['availableFormats']['hms'];
+ $translations['Intl']['Format_Time_24'] = $calendarData['dateTimeFormats']['availableFormats']['Hms'];
$translations['Intl']['Format_Date_Long'] = $calendarData['dateFormats']['full'];
$translations['Intl']['Format_Date_Day_Month'] = $calendarData['dateTimeFormats']['availableFormats']['MMMEd'];
$translations['Intl']['Format_Date_Short'] = $calendarData['dateFormats']['medium'];
@@ -273,8 +275,8 @@ class GenerateIntl extends ConsoleCommand
}
$translations['Intl']['Format_Year'] = $calendarData['dateTimeFormats']['availableFormats']['y'];
- $translations['Intl']['Format_DateTime_Long'] = $calendarData['dateFormats']['full'] . ' ' . $calendarData['timeFormats']['medium'];
- $translations['Intl']['Format_DateTime_Short'] = $calendarData['dateFormats']['medium'] . ' ' . $calendarData['timeFormats']['medium'];
+ $translations['Intl']['Format_DateTime_Long'] = $calendarData['dateFormats']['full'] . ' {time}';
+ $translations['Intl']['Format_DateTime_Short'] = $calendarData['dateFormats']['medium'] . ' {time}';
$translations['Intl']['Format_Interval_Long_D'] = $this->transformDateFormat($calendarData['dateTimeFormats']['intervalFormats']['yMMMd']['d'], array('MMMM' => 'MMM', 'LLLL' => 'LLL', 'MMM' => 'MMMM', 'LLL' => 'LLLL'));
$translations['Intl']['Format_Interval_Long_M'] = $this->transformDateFormat($calendarData['dateTimeFormats']['intervalFormats']['yMMMd']['M'], array('MMMM' => 'MMM', 'LLLL' => 'LLL', 'MMM' => 'MMMM', 'LLL' => 'LLLL'));
diff --git a/plugins/Intl/DateTimeFormatProvider.php b/plugins/Intl/DateTimeFormatProvider.php
new file mode 100644
index 0000000000..19fcd7acca
--- /dev/null
+++ b/plugins/Intl/DateTimeFormatProvider.php
@@ -0,0 +1,133 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\Intl;
+
+use Piwik\Plugins\LanguagesManager\LanguagesManager;
+use Piwik\Translation\Translator;
+
+/**
+ * Provides date and time formats.
+ */
+class DateTimeFormatProvider extends \Piwik\Intl\Data\Provider\DateTimeFormatProvider
+{
+ protected $use12HourClock;
+
+ /**
+ * @var Translator
+ */
+ protected $translator;
+
+ public function __construct(Translator $translator)
+ {
+ $this->translator = $translator;
+ }
+
+ /**
+ * Returns the format pattern for the given format type
+ *
+ * @param int $format one of the format constants
+ *
+ * @return string
+ */
+ public function getFormatPattern($format)
+ {
+
+ switch ($format) {
+ case self::DATETIME_FORMAT_LONG:
+ $pattern = $this->translator->translate('Intl_Format_DateTime_Long');
+ break;
+
+ case self::DATETIME_FORMAT_SHORT:
+ $pattern = $this->translator->translate('Intl_Format_DateTime_Short');
+ break;
+
+ case self::DATE_FORMAT_LONG:
+ $pattern = $this->translator->translate('Intl_Format_Date_Long');
+ break;
+
+ case self::DATE_FORMAT_DAY_MONTH:
+ $pattern = $this->translator->translate('Intl_Format_Date_Day_Month');
+ break;
+
+ case self::DATE_FORMAT_SHORT:
+ $pattern = $this->translator->translate('Intl_Format_Date_Short');
+ break;
+
+ case self::DATE_FORMAT_MONTH_SHORT:
+ $pattern = $this->translator->translate('Intl_Format_Month_Short');
+ break;
+
+ case self::DATE_FORMAT_MONTH_LONG:
+ $pattern = $this->translator->translate('Intl_Format_Month_Long');
+ break;
+
+ case self::DATE_FORMAT_YEAR:
+ $pattern = $this->translator->translate('Intl_Format_Year');
+ break;
+
+ case self::TIME_FORMAT:
+ $pattern = $this->translator->translate('Intl_Format_Time');
+ break;
+
+ default:
+ $pattern = $format;
+ }
+
+ if (strpos($pattern, '{time}') !== false) {
+ $pattern = str_replace('{time}', $this->getTimeFormat(), $pattern);
+ }
+
+ return $pattern;
+ }
+
+ /**
+ * Returns interval format pattern for the given format type
+ *
+ * @param bool $short whether to return short or long format pattern
+ * @param string $maxDifference maximal difference in interval dates (Y, M or D)
+ *
+ * @return string
+ */
+ public function getRangeFormatPattern($short=false, $maxDifference='Y')
+ {
+ return $this->translator->translate(
+ sprintf(
+ 'Intl_Format_Interval_%s_%s',
+ $short ? 'Short' : 'Long',
+ $maxDifference
+ ));
+ }
+
+ protected function getTimeFormat()
+ {
+ if (is_null($this->use12HourClock)) {
+ $this->use12HourClock = LanguagesManager::uses12HourClockForCurrentUser();
+ }
+
+ $timeFormat = 'Intl_Format_Time_24';
+
+ if ($this->use12HourClock) {
+ $timeFormat = 'Intl_Format_Time_12';
+ }
+
+ $template = $this->translator->translate($timeFormat);
+
+ return $template;
+ }
+
+ /**
+ * For testing purpose only: Overwrites time format
+ *
+ * @param bool $use12HourClock
+ */
+ public function forceTimeFormat($use12HourClock = false)
+ {
+ $this->use12HourClock = $use12HourClock;
+ }
+} \ No newline at end of file
diff --git a/plugins/Intl/config/config.php b/plugins/Intl/config/config.php
new file mode 100644
index 0000000000..11e540614e
--- /dev/null
+++ b/plugins/Intl/config/config.php
@@ -0,0 +1,5 @@
+<?php
+
+return array(
+ 'Piwik\Intl\Data\Provider\DateTimeFormatProvider' => DI\object('Piwik\Plugins\Intl\DateTimeFormatProvider')
+); \ No newline at end of file
diff --git a/plugins/Intl/lang/am.json b/plugins/Intl/lang/am.json
index 4999259850..e6fc689e52 100644
--- a/plugins/Intl/lang/am.json
+++ b/plugins/Intl/lang/am.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "ቅዳሜ",
"Day_Short_StandAlone_7": "እሑድ",
"EnglishLanguageName": "Amharic",
- "Format_DateTime_Long": "EEEE ፣d MMMM y h:mm:ss a",
- "Format_DateTime_Short": "d MMM y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE ፣d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E፣ MMM d",
"Format_Date_Long": "EEEE ፣d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "MMM d፣ y – MMM d፣ y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ሰዓቶች",
"Language_aa": "አፋርኛ",
diff --git a/plugins/Intl/lang/ar.json b/plugins/Intl/lang/ar.json
index 481c4e62ce..be7becbd50 100644
--- a/plugins/Intl/lang/ar.json
+++ b/plugins/Intl/lang/ar.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "السبت",
"Day_Short_StandAlone_7": "الأحد",
"EnglishLanguageName": "Arabic",
- "Format_DateTime_Long": "EEEE، d MMMM، y h:mm:ss a",
- "Format_DateTime_Short": "dd‏\/MM‏\/y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE، d MMMM، y {time}",
+ "Format_DateTime_Short": "dd‏\/MM‏\/y {time}",
"Format_Date_Day_Month": "E، d MMM",
"Format_Date_Long": "EEEE، d MMMM، y",
"Format_Date_Short": "dd‏\/MM‏\/y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM، y – d MMM، y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ساعات",
"Language_aa": "الأفارية",
diff --git a/plugins/Intl/lang/be.json b/plugins/Intl/lang/be.json
index 88bb7c14cb..c5b8f8c826 100644
--- a/plugins/Intl/lang/be.json
+++ b/plugins/Intl/lang/be.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Сб",
"Day_Short_StandAlone_7": "Нд",
"EnglishLanguageName": "Belarusian",
- "Format_DateTime_Long": "EEEE, d MMMM y HH.mm.ss",
- "Format_DateTime_Short": "d.M.y HH.mm.ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "d.M.y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "d.M.y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "LLLL y",
"Format_Month_Short": "LLL y",
- "Format_Time": "HH.mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "hh.mm.ss a",
+ "Format_Time_24": "HH.mm.ss",
"Format_Year": "y",
"Hours": "гадзіны",
"Language_ab": "Абхазская",
diff --git a/plugins/Intl/lang/bg.json b/plugins/Intl/lang/bg.json
index 02880b589d..511e99fffd 100644
--- a/plugins/Intl/lang/bg.json
+++ b/plugins/Intl/lang/bg.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Сб",
"Day_Short_StandAlone_7": "Нд",
"EnglishLanguageName": "Bulgarian",
- "Format_DateTime_Long": "EEEE, d MMMM y 'г'. H:mm:ss",
- "Format_DateTime_Short": "d.MM.y 'г'. H:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y 'г'. {time}",
+ "Format_DateTime_Short": "d.MM.y 'г'. {time}",
"Format_Date_Day_Month": "E, d.MM",
"Format_Date_Long": "EEEE, d MMMM y 'г'.",
"Format_Date_Short": "d.MM.y 'г'.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d.MM.y 'г'. – d.MM.y 'г'.",
"Format_Month_Long": "MMMM y 'г'.",
"Format_Month_Short": "MM.y 'г'.",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y 'г'.",
"Hours": "часове",
"Language_aa": "Афар",
diff --git a/plugins/Intl/lang/bn.json b/plugins/Intl/lang/bn.json
index 2bac13f1be..92676e3ab4 100644
--- a/plugins/Intl/lang/bn.json
+++ b/plugins/Intl/lang/bn.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "শনি",
"Day_Short_StandAlone_7": "রবি",
"EnglishLanguageName": "Bengali",
- "Format_DateTime_Long": "EEEE, d MMMM, y h:mm:ss a",
- "Format_DateTime_Short": "d MMM, y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE, d MMMM, y {time}",
+ "Format_DateTime_Short": "d MMM, y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEE, d MMMM, y",
"Format_Date_Short": "d MMM, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM, y – d MMM, y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ঘন্টা",
"Language_aa": "আফার",
diff --git a/plugins/Intl/lang/bs.json b/plugins/Intl/lang/bs.json
index 89e7950363..abd090f32c 100644
--- a/plugins/Intl/lang/bs.json
+++ b/plugins/Intl/lang/bs.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sub",
"Day_Short_StandAlone_7": "Ned",
"EnglishLanguageName": "Bosnian",
- "Format_DateTime_Long": "EEEE, dd. MMMM y. HH:mm:ss",
- "Format_DateTime_Short": "dd. MMM. y. HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, dd. MMMM y. {time}",
+ "Format_DateTime_Short": "dd. MMM. y. {time}",
"Format_Date_Day_Month": "E, dd. MMM",
"Format_Date_Long": "EEEE, dd. MMMM y.",
"Format_Date_Short": "dd. MMM. y.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd. MMM y. – dd. MMM y.",
"Format_Month_Long": "LLLL y.",
"Format_Month_Short": "MMM y.",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "hh:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y.",
"Hours": "sati",
"Language_aa": "Afarski",
diff --git a/plugins/Intl/lang/ca.json b/plugins/Intl/lang/ca.json
index d2b8a9a26e..7a0b18b324 100644
--- a/plugins/Intl/lang/ca.json
+++ b/plugins/Intl/lang/ca.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Ds.",
"Day_Short_StandAlone_7": "Dg.",
"EnglishLanguageName": "Catalan",
- "Format_DateTime_Long": "EEEE, d MMMM 'de' y H:mm:ss",
- "Format_DateTime_Short": "d MMM y H:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM 'de' y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM 'de' y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "LLLL 'de' y",
"Format_Month_Short": "LLL 'de' y",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "hores",
"Language_aa": "Àfar",
diff --git a/plugins/Intl/lang/cs.json b/plugins/Intl/lang/cs.json
index 813e0506ee..5d13f324a1 100644
--- a/plugins/Intl/lang/cs.json
+++ b/plugins/Intl/lang/cs.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "So",
"Day_Short_StandAlone_7": "Ne",
"EnglishLanguageName": "Czech",
- "Format_DateTime_Long": "EEEE d. MMMM y H:mm:ss",
- "Format_DateTime_Short": "d. M. y H:mm:ss",
+ "Format_DateTime_Long": "EEEE d. MMMM y {time}",
+ "Format_DateTime_Short": "d. M. y {time}",
"Format_Date_Day_Month": "E d. M.",
"Format_Date_Long": "EEEE d. MMMM y",
"Format_Date_Short": "d. M. y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. M. y – d. M. y",
"Format_Month_Long": "LLLL y",
"Format_Month_Short": "LLLL y",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y",
"Hours": "hodiny",
"Language_aa": "Afarština",
diff --git a/plugins/Intl/lang/cy.json b/plugins/Intl/lang/cy.json
index 69a71a6022..eea1cb48d6 100644
--- a/plugins/Intl/lang/cy.json
+++ b/plugins/Intl/lang/cy.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sad",
"Day_Short_StandAlone_7": "Sul",
"EnglishLanguageName": "Welsh",
- "Format_DateTime_Long": "EEEE, d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM, y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "oriau",
"Language_aa": "Affareg",
diff --git a/plugins/Intl/lang/da.json b/plugins/Intl/lang/da.json
index 3710ea0c0b..960a7be385 100644
--- a/plugins/Intl/lang/da.json
+++ b/plugins/Intl/lang/da.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Lør",
"Day_Short_StandAlone_7": "Søn",
"EnglishLanguageName": "Danish",
- "Format_DateTime_Long": "EEEE 'den' d. MMMM y HH.mm.ss",
- "Format_DateTime_Short": "d. MMM y HH.mm.ss",
+ "Format_DateTime_Long": "EEEE 'den' d. MMMM y {time}",
+ "Format_DateTime_Short": "d. MMM y {time}",
"Format_Date_Day_Month": "E d. MMM",
"Format_Date_Long": "EEEE 'den' d. MMMM y",
"Format_Date_Short": "d. MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMM y – d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH.mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h.mm.ss a",
+ "Format_Time_24": "HH.mm.ss",
"Format_Year": "y",
"Hours": "timer",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/de.json b/plugins/Intl/lang/de.json
index 813e67dde7..d6a6e7e70b 100644
--- a/plugins/Intl/lang/de.json
+++ b/plugins/Intl/lang/de.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sa",
"Day_Short_StandAlone_7": "So",
"EnglishLanguageName": "German",
- "Format_DateTime_Long": "EEEE, d. MMMM y HH:mm:ss",
- "Format_DateTime_Short": "dd.MM.y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d. MMMM y {time}",
+ "Format_DateTime_Short": "dd.MM.y {time}",
"Format_Date_Day_Month": "E, d. MMM",
"Format_Date_Long": "EEEE, d. MMMM y",
"Format_Date_Short": "dd.MM.y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMM y – d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "Stunden",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/el.json b/plugins/Intl/lang/el.json
index 2af13ce2f3..49c3bf9897 100644
--- a/plugins/Intl/lang/el.json
+++ b/plugins/Intl/lang/el.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Σάβ",
"Day_Short_StandAlone_7": "Κυρ",
"EnglishLanguageName": "Greek",
- "Format_DateTime_Long": "EEEE, d MMMM y h:mm:ss a",
- "Format_DateTime_Short": "d MMM y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd MMM y – dd MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ώρες",
"Language_aa": "Αφάρ",
diff --git a/plugins/Intl/lang/en.json b/plugins/Intl/lang/en.json
index a52b7b2cf6..db73bc9a08 100644
--- a/plugins/Intl/lang/en.json
+++ b/plugins/Intl/lang/en.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sat",
"Day_Short_StandAlone_7": "Sun",
"EnglishLanguageName": "English",
- "Format_DateTime_Long": "EEEE, MMMM d, y h:mm:ss a",
- "Format_DateTime_Short": "MMM d, y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE, MMMM d, y {time}",
+ "Format_DateTime_Short": "MMM d, y {time}",
"Format_Date_Day_Month": "E, MMM d",
"Format_Date_Long": "EEEE, MMMM d, y",
"Format_Date_Short": "MMM d, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "MMM d, y – MMM d, y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "hours",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/es.json b/plugins/Intl/lang/es.json
index 10590cb926..4a08bbae01 100644
--- a/plugins/Intl/lang/es.json
+++ b/plugins/Intl/lang/es.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sáb.",
"Day_Short_StandAlone_7": "Dom.",
"EnglishLanguageName": "Spanish",
- "Format_DateTime_Long": "EEEE, d 'de' MMMM 'de' y H:mm:ss",
- "Format_DateTime_Short": "d MMM y H:mm:ss",
+ "Format_DateTime_Long": "EEEE, d 'de' MMMM 'de' y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d 'de' MMMM 'de' y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM 'de' y",
"Format_Month_Short": "MMM y",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y",
"Hours": "horas",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/et.json b/plugins/Intl/lang/et.json
index db9277a739..bb9cdd7b16 100644
--- a/plugins/Intl/lang/et.json
+++ b/plugins/Intl/lang/et.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "L",
"Day_Short_StandAlone_7": "P",
"EnglishLanguageName": "Estonian",
- "Format_DateTime_Long": "EEEE, d. MMMM y H:mm.ss",
- "Format_DateTime_Short": "d. MMM y H:mm.ss",
+ "Format_DateTime_Long": "EEEE, d. MMMM y {time}",
+ "Format_DateTime_Short": "d. MMM y {time}",
"Format_Date_Day_Month": "E, d. MMM",
"Format_Date_Long": "EEEE, d. MMMM y",
"Format_Date_Short": "d. MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMM y – d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "H:mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm.ss a",
+ "Format_Time_24": "H:mm.ss",
"Format_Year": "y",
"Hours": "tunnid",
"Language_aa": "Afari",
diff --git a/plugins/Intl/lang/eu.json b/plugins/Intl/lang/eu.json
index a102605b6d..ec30c090f1 100644
--- a/plugins/Intl/lang/eu.json
+++ b/plugins/Intl/lang/eu.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Lr.",
"Day_Short_StandAlone_7": "Ig.",
"EnglishLanguageName": "Basque",
- "Format_DateTime_Long": "y('e')'ko' MMMM d, EEEE HH:mm:ss",
- "Format_DateTime_Short": "y MMM d HH:mm:ss",
+ "Format_DateTime_Long": "y('e')'ko' MMMM d, EEEE {time}",
+ "Format_DateTime_Short": "y MMM d {time}",
"Format_Date_Day_Month": "MMM d, E",
"Format_Date_Long": "y('e')'ko' MMMM d, EEEE",
"Format_Date_Short": "y MMM d",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y('e')'ko' MMM d – y('e')'ko' MMM d",
"Format_Month_Long": "y('e')'ko' MMMM",
"Format_Month_Short": "y MMM",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ordu",
"Language_ab": "Abkhazera",
diff --git a/plugins/Intl/lang/fa.json b/plugins/Intl/lang/fa.json
index 26110dfa0d..992ec00575 100644
--- a/plugins/Intl/lang/fa.json
+++ b/plugins/Intl/lang/fa.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "شنبه",
"Day_Short_StandAlone_7": "یکشنبه",
"EnglishLanguageName": "Persian",
- "Format_DateTime_Long": "EEEE d MMMM y H:mm:ss",
- "Format_DateTime_Short": "d MMM y H:mm:ss",
+ "Format_DateTime_Long": "EEEE d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E d LLL",
"Format_Date_Long": "EEEE d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y تا d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y",
"Hours": "ساعت",
"Language_aa": "آفاری",
diff --git a/plugins/Intl/lang/fi.json b/plugins/Intl/lang/fi.json
index eb8f503320..ce88fa7bd5 100644
--- a/plugins/Intl/lang/fi.json
+++ b/plugins/Intl/lang/fi.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "La",
"Day_Short_StandAlone_7": "Su",
"EnglishLanguageName": "Finnish",
- "Format_DateTime_Long": "cccc d. MMMM y H.mm.ss",
- "Format_DateTime_Short": "d.M.y H.mm.ss",
+ "Format_DateTime_Long": "cccc d. MMMM y {time}",
+ "Format_DateTime_Short": "d.M.y {time}",
"Format_Date_Day_Month": "ccc d. MMM",
"Format_Date_Long": "cccc d. MMMM y",
"Format_Date_Short": "d.M.y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMMM y – d. MMMM y",
"Format_Month_Long": "LLLL y",
"Format_Month_Short": "LLL y",
- "Format_Time": "H.mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h.mm.ss a",
+ "Format_Time_24": "H.mm.ss",
"Format_Year": "y",
"Hours": "tunnit",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/fr.json b/plugins/Intl/lang/fr.json
index 57438a91f0..3b66a6e02e 100644
--- a/plugins/Intl/lang/fr.json
+++ b/plugins/Intl/lang/fr.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sam.",
"Day_Short_StandAlone_7": "Dim.",
"EnglishLanguageName": "French",
- "Format_DateTime_Long": "EEEE d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEE d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "heures",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/gl.json b/plugins/Intl/lang/gl.json
index 15c88b8530..91d274e898 100644
--- a/plugins/Intl/lang/gl.json
+++ b/plugins/Intl/lang/gl.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sáb",
"Day_Short_StandAlone_7": "Dom",
"EnglishLanguageName": "Galician",
- "Format_DateTime_Long": "EEEE dd MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d MMM, y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE dd MMMM y {time}",
+ "Format_DateTime_Short": "d MMM, y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEE dd MMMM y",
"Format_Date_Short": "d MMM, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM, y – d MMM, y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "horas",
"Language_ab": "Abkhazo",
diff --git a/plugins/Intl/lang/he.json b/plugins/Intl/lang/he.json
index 50c63fc1d4..78f07a3bc1 100644
--- a/plugins/Intl/lang/he.json
+++ b/plugins/Intl/lang/he.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "שבת",
"Day_Short_StandAlone_7": "יום א׳",
"EnglishLanguageName": "Hebrew",
- "Format_DateTime_Long": "EEEE, d בMMMM y H:mm:ss",
- "Format_DateTime_Short": "d בMMM y H:mm:ss",
+ "Format_DateTime_Long": "EEEE, d בMMMM y {time}",
+ "Format_DateTime_Short": "d בMMM y {time}",
"Format_Date_Day_Month": "E, d בMMM",
"Format_Date_Long": "EEEE, d בMMMM y",
"Format_Date_Short": "d בMMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y",
"Hours": "שעות",
"Language_aa": "אפארית",
diff --git a/plugins/Intl/lang/hi.json b/plugins/Intl/lang/hi.json
index 73c68868e8..d9284fd761 100644
--- a/plugins/Intl/lang/hi.json
+++ b/plugins/Intl/lang/hi.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "शनि",
"Day_Short_StandAlone_7": "रवि",
"EnglishLanguageName": "Hindi",
- "Format_DateTime_Long": "EEEE, d MMMM y h:mm:ss a",
- "Format_DateTime_Short": "dd\/MM\/y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "dd\/MM\/y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "dd\/MM\/y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "घंटे",
"Language_aa": "अफ़ार",
diff --git a/plugins/Intl/lang/hr.json b/plugins/Intl/lang/hr.json
index 48bcdd8a09..39f7d403d9 100644
--- a/plugins/Intl/lang/hr.json
+++ b/plugins/Intl/lang/hr.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sub",
"Day_Short_StandAlone_7": "Ned",
"EnglishLanguageName": "Croatian",
- "Format_DateTime_Long": "EEEE, d. MMMM y. HH:mm:ss",
- "Format_DateTime_Short": "d. MMM y. HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d. MMMM y. {time}",
+ "Format_DateTime_Short": "d. MMM y. {time}",
"Format_Date_Day_Month": "E, d. MMM",
"Format_Date_Long": "EEEE, d. MMMM y.",
"Format_Date_Short": "d. MMM y.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd. MMM y. – dd. MMM y.",
"Format_Month_Long": "LLLL y.",
"Format_Month_Short": "LLL y.",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "hh:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y.",
"Hours": "sati",
"Language_aa": "Afarski",
diff --git a/plugins/Intl/lang/hu.json b/plugins/Intl/lang/hu.json
index 4df06ba706..e730da6862 100644
--- a/plugins/Intl/lang/hu.json
+++ b/plugins/Intl/lang/hu.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Szo",
"Day_Short_StandAlone_7": "V",
"EnglishLanguageName": "Hungarian",
- "Format_DateTime_Long": "y. MMMM d., EEEE H:mm:ss",
- "Format_DateTime_Short": "y. MMM d. H:mm:ss",
+ "Format_DateTime_Long": "y. MMMM d., EEEE {time}",
+ "Format_DateTime_Short": "y. MMM d. {time}",
"Format_Date_Day_Month": "MMM d., E",
"Format_Date_Long": "y. MMMM d., EEEE",
"Format_Date_Short": "y. MMM d.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y. MMM d. – y. MMM d.",
"Format_Month_Long": "y. MMMM",
"Format_Month_Short": "y. MMM",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "a h:mm:ss",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y.",
"Hours": "óra",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/id.json b/plugins/Intl/lang/id.json
index ef6ae7fafa..2ed5145d34 100644
--- a/plugins/Intl/lang/id.json
+++ b/plugins/Intl/lang/id.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sab",
"Day_Short_StandAlone_7": "Min",
"EnglishLanguageName": "Indonesian",
- "Format_DateTime_Long": "EEEE, dd MMMM y HH.mm.ss",
- "Format_DateTime_Short": "d MMM y HH.mm.ss",
+ "Format_DateTime_Long": "EEEE, dd MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, dd MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH.mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h.mm.ss a",
+ "Format_Time_24": "HH.mm.ss",
"Format_Year": "y",
"Hours": "jam",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/is.json b/plugins/Intl/lang/is.json
index 1160564dd8..b27b8783aa 100644
--- a/plugins/Intl/lang/is.json
+++ b/plugins/Intl/lang/is.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Lau.",
"Day_Short_StandAlone_7": "Sun.",
"EnglishLanguageName": "Icelandic",
- "Format_DateTime_Long": "EEEE, d. MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d. MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d. MMMM y {time}",
+ "Format_DateTime_Short": "d. MMM y {time}",
"Format_Date_Day_Month": "E, d. MMM",
"Format_Date_Long": "EEEE, d. MMMM y",
"Format_Date_Short": "d. MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMM y – d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "klukkustundir",
"Language_ab": "Abkasíska",
diff --git a/plugins/Intl/lang/it.json b/plugins/Intl/lang/it.json
index 5f88825369..a8fdaac903 100644
--- a/plugins/Intl/lang/it.json
+++ b/plugins/Intl/lang/it.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sab",
"Day_Short_StandAlone_7": "Dom",
"EnglishLanguageName": "Italian",
- "Format_DateTime_Long": "EEEE d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "dd MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE d MMMM y {time}",
+ "Format_DateTime_Short": "dd MMM y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEE d MMMM y",
"Format_Date_Short": "dd MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd MMM y – dd MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ore",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/ja.json b/plugins/Intl/lang/ja.json
index b1434f36d6..e63c4094d6 100644
--- a/plugins/Intl/lang/ja.json
+++ b/plugins/Intl/lang/ja.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "土",
"Day_Short_StandAlone_7": "日",
"EnglishLanguageName": "Japanese",
- "Format_DateTime_Long": "y年M月d日EEEE H:mm:ss",
- "Format_DateTime_Short": "y\/MM\/dd H:mm:ss",
+ "Format_DateTime_Long": "y年M月d日EEEE {time}",
+ "Format_DateTime_Short": "y\/MM\/dd {time}",
"Format_Date_Day_Month": "M月d日(E)",
"Format_Date_Long": "y年M月d日EEEE",
"Format_Date_Short": "y\/MM\/dd",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y年M月d日~y年M月d日",
"Format_Month_Long": "y年M月",
"Format_Month_Short": "y年M月",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "aK:mm:ss",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y年",
"Hours": "時間",
"Language_aa": "アファル語",
diff --git a/plugins/Intl/lang/ka.json b/plugins/Intl/lang/ka.json
index 819f7ba2a0..91af287421 100644
--- a/plugins/Intl/lang/ka.json
+++ b/plugins/Intl/lang/ka.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "შაბ",
"Day_Short_StandAlone_7": "კვი",
"EnglishLanguageName": "Georgian",
- "Format_DateTime_Long": "EEEE, dd MMMM, y HH:mm:ss",
- "Format_DateTime_Short": "d MMM. y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, dd MMMM, y {time}",
+ "Format_DateTime_Short": "d MMM. y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, dd MMMM, y",
"Format_Date_Short": "d MMM. y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd MMM. y – d MMM. y",
"Format_Month_Long": "MMMM, y",
"Format_Month_Short": "MMM. y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "საათი",
"Language_aa": "აფარი",
diff --git a/plugins/Intl/lang/ko.json b/plugins/Intl/lang/ko.json
index 70b13cb503..229b1e6144 100644
--- a/plugins/Intl/lang/ko.json
+++ b/plugins/Intl/lang/ko.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "토",
"Day_Short_StandAlone_7": "일",
"EnglishLanguageName": "Korean",
- "Format_DateTime_Long": "y년 M월 d일 EEEE a h:mm:ss",
- "Format_DateTime_Short": "y. M. d. a h:mm:ss",
+ "Format_DateTime_Long": "y년 M월 d일 EEEE {time}",
+ "Format_DateTime_Short": "y. M. d. {time}",
"Format_Date_Day_Month": "MMM d일 (E)",
"Format_Date_Long": "y년 M월 d일 EEEE",
"Format_Date_Short": "y. M. d.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y년 M월 d일 ~ y년 M월 d일",
"Format_Month_Long": "y년 MMMM",
"Format_Month_Short": "y년 MMM",
- "Format_Time": "a h:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "a h:mm:ss",
+ "Format_Time_24": "H시 m분 s초",
"Format_Year": "y년",
"Hours": "시간",
"Language_aa": "아파르어",
diff --git a/plugins/Intl/lang/lt.json b/plugins/Intl/lang/lt.json
index 7dc87c76a1..2fefcf67dc 100644
--- a/plugins/Intl/lang/lt.json
+++ b/plugins/Intl/lang/lt.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Št",
"Day_Short_StandAlone_7": "Sk",
"EnglishLanguageName": "Lithuanian",
- "Format_DateTime_Long": "y 'm'. MMMM d 'd'., EEEE HH:mm:ss",
- "Format_DateTime_Short": "y-MM-dd HH:mm:ss",
+ "Format_DateTime_Long": "y 'm'. MMMM d 'd'., EEEE {time}",
+ "Format_DateTime_Short": "y-MM-dd {time}",
"Format_Date_Day_Month": "MM-dd, E",
"Format_Date_Long": "y 'm'. MMMM d 'd'., EEEE",
"Format_Date_Short": "y-MM-dd",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y MMM d – y MMM d",
"Format_Month_Long": "y 'm'. LLLL",
"Format_Month_Short": "y-MM",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "hh:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "valandos",
"Language_aa": "Afarų",
diff --git a/plugins/Intl/lang/lv.json b/plugins/Intl/lang/lv.json
index 2a91a4b6fb..583d3e51a0 100644
--- a/plugins/Intl/lang/lv.json
+++ b/plugins/Intl/lang/lv.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Se",
"Day_Short_StandAlone_7": "Sv",
"EnglishLanguageName": "Latvian",
- "Format_DateTime_Long": "EEEE, y. 'gada' d. MMMM HH:mm:ss",
- "Format_DateTime_Short": "y. 'gada' d. MMM HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, y. 'gada' d. MMMM {time}",
+ "Format_DateTime_Short": "y. 'gada' d. MMM {time}",
"Format_Date_Day_Month": "E, d. MMM",
"Format_Date_Long": "EEEE, y. 'gada' d. MMMM",
"Format_Date_Short": "y. 'gada' d. MMM",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y. 'gada' d. MMM – y. 'gada' d. MMM",
"Format_Month_Long": "y. 'g'. MMMM",
"Format_Month_Short": "y. 'g'. MMM",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y. 'g'.",
"Hours": "stundas",
"Language_aa": "Afāru",
diff --git a/plugins/Intl/lang/nb.json b/plugins/Intl/lang/nb.json
index 84d427bd0b..812c461829 100644
--- a/plugins/Intl/lang/nb.json
+++ b/plugins/Intl/lang/nb.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Lør.",
"Day_Short_StandAlone_7": "Søn.",
"EnglishLanguageName": "Norwegian Bokmål",
- "Format_DateTime_Long": "EEEE d. MMMM y HH.mm.ss",
- "Format_DateTime_Short": "d. MMM y HH.mm.ss",
+ "Format_DateTime_Long": "EEEE d. MMMM y {time}",
+ "Format_DateTime_Short": "d. MMM y {time}",
"Format_Date_Day_Month": "E d. MMM",
"Format_Date_Long": "EEEE d. MMMM y",
"Format_Date_Short": "d. MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMM y–d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH.mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h.mm.ss a",
+ "Format_Time_24": "HH.mm.ss",
"Format_Year": "y",
"Hours": "timer",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/nl.json b/plugins/Intl/lang/nl.json
index 8c9cfa5953..66398aa589 100644
--- a/plugins/Intl/lang/nl.json
+++ b/plugins/Intl/lang/nl.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Za",
"Day_Short_StandAlone_7": "Zo",
"EnglishLanguageName": "Dutch",
- "Format_DateTime_Long": "EEEE d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEE d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "uur",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/nn.json b/plugins/Intl/lang/nn.json
index 6f913f08ea..cbbc0bfdda 100644
--- a/plugins/Intl/lang/nn.json
+++ b/plugins/Intl/lang/nn.json
@@ -296,8 +296,8 @@
"Day_Short_StandAlone_6": "La.",
"Day_Short_StandAlone_7": "Sø.",
"EnglishLanguageName": "Norwegian Nynorsk",
- "Format_DateTime_Long": "EEEE d. MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d. MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE d. MMMM y {time}",
+ "Format_DateTime_Short": "d. MMM y {time}",
"Format_Date_Day_Month": "E d. MMM",
"Format_Date_Long": "EEEE d. MMMM y",
"Format_Date_Short": "d. MMM y",
@@ -309,7 +309,9 @@
"Format_Interval_Short_Y": "d. MMM y–d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "hr",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/pl.json b/plugins/Intl/lang/pl.json
index 7183cd5cbc..f190ed6d4d 100644
--- a/plugins/Intl/lang/pl.json
+++ b/plugins/Intl/lang/pl.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sob.",
"Day_Short_StandAlone_7": "Niedz.",
"EnglishLanguageName": "Polish",
- "Format_DateTime_Long": "EEEE, d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "dd.MM.y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "dd.MM.y {time}",
"Format_Date_Day_Month": "E, d.MM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "dd.MM.y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd.MM.y–dd.MM.y",
"Format_Month_Long": "LLLL y",
"Format_Month_Short": "MM.y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "godziny",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/pt-br.json b/plugins/Intl/lang/pt-br.json
index 4e934e942d..9f2a028bb4 100644
--- a/plugins/Intl/lang/pt-br.json
+++ b/plugins/Intl/lang/pt-br.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sáb",
"Day_Short_StandAlone_7": "Dom",
"EnglishLanguageName": "Brazilian Portuguese",
- "Format_DateTime_Long": "EEEE, d 'de' MMMM 'de' y HH:mm:ss",
- "Format_DateTime_Short": "d 'de' MMM 'de' y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d 'de' MMMM 'de' y {time}",
+ "Format_DateTime_Short": "d 'de' MMM 'de' y {time}",
"Format_Date_Day_Month": "E, d 'de' MMM",
"Format_Date_Long": "EEEE, d 'de' MMMM 'de' y",
"Format_Date_Short": "d 'de' MMM 'de' y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d 'de' MMM 'de' y – d 'de' MMM 'de' y",
"Format_Month_Long": "MMMM 'de' y",
"Format_Month_Short": "MMM 'de' y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "horas",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/pt.json b/plugins/Intl/lang/pt.json
index bacafa576d..60270770df 100644
--- a/plugins/Intl/lang/pt.json
+++ b/plugins/Intl/lang/pt.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sábado",
"Day_Short_StandAlone_7": "Domingo",
"EnglishLanguageName": "Portuguese",
- "Format_DateTime_Long": "EEEE, d 'de' MMMM 'de' y HH:mm:ss",
- "Format_DateTime_Short": "dd\/MM\/y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d 'de' MMMM 'de' y {time}",
+ "Format_DateTime_Short": "dd\/MM\/y {time}",
"Format_Date_Day_Month": "E, d\/MM",
"Format_Date_Long": "EEEE, d 'de' MMMM 'de' y",
"Format_Date_Short": "dd\/MM\/y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d 'de' MMM 'de' y – d 'de' MMM 'de' y",
"Format_Month_Long": "MMMM 'de' y",
"Format_Month_Short": "MM\/y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "horas",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/ro.json b/plugins/Intl/lang/ro.json
index 2e8973de30..8f5b576ffb 100644
--- a/plugins/Intl/lang/ro.json
+++ b/plugins/Intl/lang/ro.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sâm.",
"Day_Short_StandAlone_7": "Dum.",
"EnglishLanguageName": "Romanian",
- "Format_DateTime_Long": "EEEE, d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ore",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/ru.json b/plugins/Intl/lang/ru.json
index b26d882971..593daf525d 100644
--- a/plugins/Intl/lang/ru.json
+++ b/plugins/Intl/lang/ru.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Сб",
"Day_Short_StandAlone_7": "Вс",
"EnglishLanguageName": "Russian",
- "Format_DateTime_Long": "EEEE, d MMMM y 'г'. H:mm:ss",
- "Format_DateTime_Short": "d MMM y 'г'. H:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y 'г'. {time}",
+ "Format_DateTime_Short": "d MMM y 'г'. {time}",
"Format_Date_Day_Month": "ccc, d MMM",
"Format_Date_Long": "EEEE, d MMMM y 'г'.",
"Format_Date_Short": "d MMM y 'г'.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y 'г'.",
"Format_Month_Long": "LLLL y 'г'.",
"Format_Month_Short": "LLL y 'г'.",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y",
"Hours": "часы",
"Language_aa": "Афар",
diff --git a/plugins/Intl/lang/sk.json b/plugins/Intl/lang/sk.json
index d926c8f1bd..db39d8d374 100644
--- a/plugins/Intl/lang/sk.json
+++ b/plugins/Intl/lang/sk.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "So",
"Day_Short_StandAlone_7": "Ne",
"EnglishLanguageName": "Slovak",
- "Format_DateTime_Long": "EEEE, d. MMMM y H:mm:ss",
- "Format_DateTime_Short": "d. M. y H:mm:ss",
+ "Format_DateTime_Long": "EEEE, d. MMMM y {time}",
+ "Format_DateTime_Short": "d. M. y {time}",
"Format_Date_Day_Month": "E d. M.",
"Format_Date_Long": "EEEE, d. MMMM y",
"Format_Date_Short": "d. M. y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. M. y – d. M. y",
"Format_Month_Long": "LLLL y",
"Format_Month_Short": "M\/y",
- "Format_Time": "H:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "H:mm:ss",
"Format_Year": "y",
"Hours": "hodiny",
"Language_aa": "Afarčina",
diff --git a/plugins/Intl/lang/sl.json b/plugins/Intl/lang/sl.json
index 054f53ca8b..2610cb1fa1 100644
--- a/plugins/Intl/lang/sl.json
+++ b/plugins/Intl/lang/sl.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sob",
"Day_Short_StandAlone_7": "Ned",
"EnglishLanguageName": "Slovenian",
- "Format_DateTime_Long": "EEEE, dd. MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d. MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, dd. MMMM y {time}",
+ "Format_DateTime_Short": "d. MMM y {time}",
"Format_Date_Day_Month": "E, d. MMM",
"Format_Date_Long": "EEEE, dd. MMMM y",
"Format_Date_Short": "d. MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d. MMM y–d. MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ur",
"Language_aa": "Afarščina",
diff --git a/plugins/Intl/lang/sq.json b/plugins/Intl/lang/sq.json
index ee9aa0eae3..1c9acf73d3 100644
--- a/plugins/Intl/lang/sq.json
+++ b/plugins/Intl/lang/sq.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sht",
"Day_Short_StandAlone_7": "Die",
"EnglishLanguageName": "Albanian",
- "Format_DateTime_Long": "EEEE, d MMMM y h:mm:ss a",
- "Format_DateTime_Short": "d MMM y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE, d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "orë",
"Language_ab": "Abkazisht",
diff --git a/plugins/Intl/lang/sr.json b/plugins/Intl/lang/sr.json
index 003e91483c..3e59d08f33 100644
--- a/plugins/Intl/lang/sr.json
+++ b/plugins/Intl/lang/sr.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Суб",
"Day_Short_StandAlone_7": "Нед",
"EnglishLanguageName": "Serbian",
- "Format_DateTime_Long": "EEEE, dd. MMMM y. HH.mm.ss",
- "Format_DateTime_Short": "dd.MM.y. HH.mm.ss",
+ "Format_DateTime_Long": "EEEE, dd. MMMM y. {time}",
+ "Format_DateTime_Short": "dd.MM.y. {time}",
"Format_Date_Day_Month": "E d. MMM",
"Format_Date_Long": "EEEE, dd. MMMM y.",
"Format_Date_Short": "dd.MM.y.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "dd. MMM y. – dd. MMM y.",
"Format_Month_Long": "MMMM y.",
"Format_Month_Short": "MMM y.",
- "Format_Time": "HH.mm.ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "hh.mm.ss a",
+ "Format_Time_24": "HH.mm.ss",
"Format_Year": "y.",
"Hours": "сати",
"Language_aa": "Афарски",
diff --git a/plugins/Intl/lang/sv.json b/plugins/Intl/lang/sv.json
index c829d88418..6652fd399b 100644
--- a/plugins/Intl/lang/sv.json
+++ b/plugins/Intl/lang/sv.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Lör",
"Day_Short_StandAlone_7": "Sön",
"EnglishLanguageName": "Swedish",
- "Format_DateTime_Long": "EEEE d MMMM y HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE d MMMM y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEE d MMMM y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y–d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "timmar",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/ta.json b/plugins/Intl/lang/ta.json
index 43708c2ba9..a24fad18e1 100644
--- a/plugins/Intl/lang/ta.json
+++ b/plugins/Intl/lang/ta.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "சனி",
"Day_Short_StandAlone_7": "ஞாயி.",
"EnglishLanguageName": "Tamil",
- "Format_DateTime_Long": "EEEE, d MMMM, y a h:mm:ss",
- "Format_DateTime_Short": "d MMM, y a h:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM, y {time}",
+ "Format_DateTime_Short": "d MMM, y {time}",
"Format_Date_Day_Month": "MMM d, E",
"Format_Date_Long": "EEEE, d MMMM, y",
"Format_Date_Short": "d MMM, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM, y – d MMM, y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "a h:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "a h:mm:ss",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "மணிநேரங்கள்",
"Language_aa": "அஃபார்",
diff --git a/plugins/Intl/lang/te.json b/plugins/Intl/lang/te.json
index 7c9679b3a1..9122d011da 100644
--- a/plugins/Intl/lang/te.json
+++ b/plugins/Intl/lang/te.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "శని",
"Day_Short_StandAlone_7": "ఆది",
"EnglishLanguageName": "Telugu",
- "Format_DateTime_Long": "d, MMMM y, EEEE h:mm:ss a",
- "Format_DateTime_Short": "d MMM, y h:mm:ss a",
+ "Format_DateTime_Long": "d, MMMM y, EEEE {time}",
+ "Format_DateTime_Short": "d MMM, y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "d, MMMM y, EEEE",
"Format_Date_Short": "d MMM, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM, y – d MMM, y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "గంటలు",
"Language_aa": "అఫార్",
diff --git a/plugins/Intl/lang/th.json b/plugins/Intl/lang/th.json
index afe4e21c49..52034808c2 100644
--- a/plugins/Intl/lang/th.json
+++ b/plugins/Intl/lang/th.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "ส.",
"Day_Short_StandAlone_7": "อา.",
"EnglishLanguageName": "Thai",
- "Format_DateTime_Long": "EEEEที่ d MMMM G y HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "EEEEที่ d MMMM G y {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "E d MMM",
"Format_Date_Long": "EEEEที่ d MMMM G y",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM G y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "ชั่วโมง",
"Language_aa": "อะฟาร์",
diff --git a/plugins/Intl/lang/tl.json b/plugins/Intl/lang/tl.json
index caebf74edf..793664da58 100644
--- a/plugins/Intl/lang/tl.json
+++ b/plugins/Intl/lang/tl.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Sab",
"Day_Short_StandAlone_7": "Lin",
"EnglishLanguageName": "Tagalog",
- "Format_DateTime_Long": "EEEE, MMMM d, y h:mm:ss a",
- "Format_DateTime_Short": "MMM d, y h:mm:ss a",
+ "Format_DateTime_Long": "EEEE, MMMM d, y {time}",
+ "Format_DateTime_Short": "MMM d, y {time}",
"Format_Date_Day_Month": "E, MMM d",
"Format_Date_Long": "EEEE, MMMM d, y",
"Format_Date_Short": "MMM d, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "MMM d, y – MMM d, y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "h:mm:ss a",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "mga oras",
"Language_ab": "Abkhazian",
diff --git a/plugins/Intl/lang/tr.json b/plugins/Intl/lang/tr.json
index 0d2b4082e6..3ceb15c281 100644
--- a/plugins/Intl/lang/tr.json
+++ b/plugins/Intl/lang/tr.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Cmt",
"Day_Short_StandAlone_7": "Paz",
"EnglishLanguageName": "Turkish",
- "Format_DateTime_Long": "d MMMM y EEEE HH:mm:ss",
- "Format_DateTime_Short": "d MMM y HH:mm:ss",
+ "Format_DateTime_Long": "d MMMM y EEEE {time}",
+ "Format_DateTime_Short": "d MMM y {time}",
"Format_Date_Day_Month": "d MMMM E",
"Format_Date_Long": "d MMMM y EEEE",
"Format_Date_Short": "d MMM y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "MMMM y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "a h:mm:ss",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "saat",
"Language_aa": "Afar",
diff --git a/plugins/Intl/lang/uk.json b/plugins/Intl/lang/uk.json
index 69ec802cbb..44d6c12e92 100644
--- a/plugins/Intl/lang/uk.json
+++ b/plugins/Intl/lang/uk.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Сб",
"Day_Short_StandAlone_7": "Нд",
"EnglishLanguageName": "Ukrainian",
- "Format_DateTime_Long": "EEEE, d MMMM y 'р'. HH:mm:ss",
- "Format_DateTime_Short": "d MMM y 'р'. HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, d MMMM y 'р'. {time}",
+ "Format_DateTime_Short": "d MMM y 'р'. {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, d MMMM y 'р'.",
"Format_Date_Short": "d MMM y 'р'.",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "d MMM y – d MMM y",
"Format_Month_Long": "LLLL y",
"Format_Month_Short": "LLL y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "години",
"Language_aa": "Афарська",
diff --git a/plugins/Intl/lang/vi.json b/plugins/Intl/lang/vi.json
index e89f2f527b..9da64b533a 100644
--- a/plugins/Intl/lang/vi.json
+++ b/plugins/Intl/lang/vi.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "Th 7",
"Day_Short_StandAlone_7": "CN",
"EnglishLanguageName": "Vietnamese",
- "Format_DateTime_Long": "EEEE, 'ngày' dd MMMM 'năm' y HH:mm:ss",
- "Format_DateTime_Short": "d MMM, y HH:mm:ss",
+ "Format_DateTime_Long": "EEEE, 'ngày' dd MMMM 'năm' y {time}",
+ "Format_DateTime_Short": "d MMM, y {time}",
"Format_Date_Day_Month": "E, d MMM",
"Format_Date_Long": "EEEE, 'ngày' dd MMMM 'năm' y",
"Format_Date_Short": "d MMM, y",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "'Ngày' dd 'tháng' M 'năm' y - 'Ngày' dd 'tháng' M 'năm' y",
"Format_Month_Long": "MMMM 'năm' y",
"Format_Month_Short": "MMM y",
- "Format_Time": "HH:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "h:mm:ss a",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y",
"Hours": "giờ",
"Language_aa": "Tiếng Afar",
diff --git a/plugins/Intl/lang/zh-cn.json b/plugins/Intl/lang/zh-cn.json
index 5b48c6c6d8..5cd4c2c680 100644
--- a/plugins/Intl/lang/zh-cn.json
+++ b/plugins/Intl/lang/zh-cn.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "周六",
"Day_Short_StandAlone_7": "周日",
"EnglishLanguageName": "Simplified Chinese",
- "Format_DateTime_Long": "y年M月d日EEEE ah:mm:ss",
- "Format_DateTime_Short": "y年M月d日 ah:mm:ss",
+ "Format_DateTime_Long": "y年M月d日EEEE {time}",
+ "Format_DateTime_Short": "y年M月d日 {time}",
"Format_Date_Day_Month": "M月d日E",
"Format_Date_Long": "y年M月d日EEEE",
"Format_Date_Short": "y年M月d日",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y年M月d日至y年M月d日",
"Format_Month_Long": "y年M月",
"Format_Month_Short": "y年M月",
- "Format_Time": "ah:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "ah:mm:ss",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y年",
"Hours": "小时",
"Language_aa": "阿法文",
diff --git a/plugins/Intl/lang/zh-tw.json b/plugins/Intl/lang/zh-tw.json
index 5fac85b0ec..1bc630d29a 100644
--- a/plugins/Intl/lang/zh-tw.json
+++ b/plugins/Intl/lang/zh-tw.json
@@ -300,8 +300,8 @@
"Day_Short_StandAlone_6": "週六",
"Day_Short_StandAlone_7": "週日",
"EnglishLanguageName": "Traditional Chinese",
- "Format_DateTime_Long": "y年M月d日 EEEE ah:mm:ss",
- "Format_DateTime_Short": "y年M月d日 ah:mm:ss",
+ "Format_DateTime_Long": "y年M月d日 EEEE {time}",
+ "Format_DateTime_Short": "y年M月d日 {time}",
"Format_Date_Day_Month": "M月d日 E",
"Format_Date_Long": "y年M月d日 EEEE",
"Format_Date_Short": "y年M月d日",
@@ -313,7 +313,9 @@
"Format_Interval_Short_Y": "y年M月d日至y年M月d日",
"Format_Month_Long": "y年M月",
"Format_Month_Short": "y年M月",
- "Format_Time": "ah:mm:ss",
+ "Format_Time": "{time}",
+ "Format_Time_12": "ah:mm:ss",
+ "Format_Time_24": "HH:mm:ss",
"Format_Year": "y年",
"Hours": "小時",
"Language_aa": "阿法文",
diff --git a/plugins/LanguagesManager/API.php b/plugins/LanguagesManager/API.php
index dc252abbda..9d75f62c2f 100644
--- a/plugins/LanguagesManager/API.php
+++ b/plugins/LanguagesManager/API.php
@@ -275,6 +275,45 @@ class API extends \Piwik\Plugin\API
return true;
}
+ /**
+ * Returns whether the user uses 12 hour clock
+ *
+ * @param string $login
+ * @return string
+ */
+ public function uses12HourClockForUser($login)
+ {
+ if ($login == 'anonymous') {
+ return false;
+ }
+
+ Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);
+
+ $lang = $this->getModel()->uses12HourClock($login);
+
+ return $lang;
+ }
+
+ /**
+ * Returns whether the user uses 12 hour clock
+ *
+ * @param string $login
+ * @param bool $use12HourClock
+ * @return string
+ */
+ public function set12HourClockForUser($login, $use12HourClock)
+ {
+ if ($login == 'anonymous') {
+ return false;
+ }
+
+ Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);
+
+ $lang = $this->getModel()->set12HourClock($login, $use12HourClock);
+
+ return $lang;
+ }
+
private function loadAvailableLanguages()
{
if (!is_null($this->availableLanguageNames)) {
diff --git a/plugins/LanguagesManager/LanguagesManager.php b/plugins/LanguagesManager/LanguagesManager.php
index 012de9cd50..2a468d550a 100644
--- a/plugins/LanguagesManager/LanguagesManager.php
+++ b/plugins/LanguagesManager/LanguagesManager.php
@@ -10,6 +10,7 @@
namespace Piwik\Plugins\LanguagesManager;
use Exception;
+use Piwik\API\Request;
use Piwik\Common;
use Piwik\Config;
use Piwik\Container\StaticContainer;
@@ -138,6 +139,19 @@ class LanguagesManager extends \Piwik\Plugin
}
/**
+ * @return boolean
+ */
+ public static function uses12HourClockForCurrentUser()
+ {
+ try {
+ $currentUser = Piwik::getCurrentUserLogin();
+ return Request::processRequest('LanguagesManager.uses12HourClockForUser', array('login' => $currentUser));
+ } catch (Exception $e) {
+ return false;
+ }
+ }
+
+ /**
* @return string Two letters language code, eg. "fr"
*/
public static function getLanguageCodeForCurrentUser()
diff --git a/plugins/LanguagesManager/Model.php b/plugins/LanguagesManager/Model.php
index e40452c134..fad84238cd 100644
--- a/plugins/LanguagesManager/Model.php
+++ b/plugins/LanguagesManager/Model.php
@@ -57,10 +57,41 @@ class Model
return true;
}
+ /**
+ * Returns whether the given user has choosen to use 12 hour clock
+ *
+ * @param $userLogin
+ * @return bool
+ * @throws \Exception
+ */
+ public function uses12HourClock($userLogin)
+ {
+ return (bool) Db::fetchOne('SELECT use_12_hour_clock FROM ' . $this->table .
+ ' WHERE login = ? ', array($userLogin));
+ }
+
+ /**
+ * Sets whether the given user wants to use 12 hout clock
+ *
+ * @param string $login
+ * @param string $use12HourClock
+ * @return bool
+ */
+ public function set12HourClock($login, $use12HourClock)
+ {
+ $query = 'INSERT INTO ' . $this->table .
+ ' (login, use_12_hour_clock) VALUES (?,?) ON DUPLICATE KEY UPDATE use_12_hour_clock=?';
+ $bind = array($login, $use12HourClock, $use12HourClock);
+ Db::query($query, $bind);
+
+ return true;
+ }
+
public static function install()
{
$userLanguage = "login VARCHAR( 100 ) NOT NULL ,
language VARCHAR( 10 ) NOT NULL ,
+ use_12_hour_clock TINYINT(1) NOT NULL DEFAULT 0 ,
PRIMARY KEY ( login )";
DbHelper::createTable(self::$rawPrefix, $userLanguage);
}
diff --git a/plugins/LanguagesManager/Test/Integration/ModelTest.php b/plugins/LanguagesManager/Test/Integration/ModelTest.php
new file mode 100644
index 0000000000..023b43f293
--- /dev/null
+++ b/plugins/LanguagesManager/Test/Integration/ModelTest.php
@@ -0,0 +1,136 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+namespace Piwik\Plugins\LanguagesManager\tests\Integration;
+
+use Piwik\Common;
+use Piwik\Db;
+use Piwik\Plugins\LanguagesManager\Model;
+use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
+
+/**
+ * @group LanguagesManager
+ * @group ModelTest
+ * @group Plugins
+ */
+class ModelTest extends IntegrationTestCase
+{
+
+ /**
+ * @var Model
+ */
+ protected $model;
+
+ public function setUp()
+ {
+ $this->model = new Model();
+ parent::setUp();
+ }
+
+ public function test_install_ShouldNotFailAndActuallyCreateTheDatabases()
+ {
+ $this->assertContainTables(array('user_language'));
+
+ $columns = Db::fetchAll('show columns from ' . Common::prefixTable('user_language'));
+ $this->assertCount(3, $columns);
+ }
+
+ public function test_uninstall_ShouldNotFailAndRemovesAllAlertTables()
+ {
+ Model::uninstall();
+
+ $this->assertNotContainTables(array('user_language'));
+
+ Model::install();
+ }
+
+ public function test_handlesUserLanguageEntriesCorrectly()
+ {
+ $this->model->setLanguageForUser('admin', 'de');
+
+ $this->assertTableEntryCount(1);
+
+ $this->assertEquals('de', $this->model->getLanguageForUser('admin'));
+
+ $this->model->deleteUserLanguage('admin');
+
+ $this->assertTableEntryCount(0);
+ }
+
+ public function test_handlesUserTimeFormatEntriesCorrectly()
+ {
+ $this->model->set12HourClock('admin', false);
+
+ $this->assertTableEntryCount(1);
+
+ $this->assertEquals(false, $this->model->uses12HourClock('admin'));
+
+ $this->model->deleteUserLanguage('admin');
+
+ $this->assertTableEntryCount(0);
+ }
+
+ public function test_handlesUserLanguageAndTimeFormatEntriesCorrectly()
+ {
+ $this->model->setLanguageForUser('admin', 'de');
+
+ $this->assertTableEntryCount(1);
+
+ $this->model->set12HourClock('admin', false);
+ $this->model->set12HourClock('user', true);
+
+ $this->assertTableEntryCount(2);
+
+ $this->assertEquals('de', $this->model->getLanguageForUser('admin'));
+ $this->assertEquals('', $this->model->getLanguageForUser('user'));
+ $this->assertEquals(false, $this->model->uses12HourClock('admin'));
+ $this->assertEquals(true, $this->model->uses12HourClock('user'));
+
+ $this->model->deleteUserLanguage('admin');
+
+ $this->assertTableEntryCount(1);
+ }
+
+ private function assertTableEntryCount($count)
+ {
+ $entryCount = Db::fetchOne('SELECT COUNT(*) FROM ' . Common::prefixTable('user_language'));
+
+ $this->assertEquals($count, $entryCount);
+
+ }
+
+ private function assertContainTables($expectedTables)
+ {
+ $tableNames = $this->getCurrentAvailableTableNames();
+
+ foreach ($expectedTables as $expectedTable) {
+ $this->assertContains(Common::prefixTable($expectedTable), $tableNames);
+ }
+ }
+
+ private function assertNotContainTables($expectedTables)
+ {
+ $tableNames = $this->getCurrentAvailableTableNames();
+
+ foreach ($expectedTables as $expectedTable) {
+ $this->assertNotContains(Common::prefixTable($expectedTable), $tableNames);
+ }
+ }
+
+ private function getCurrentAvailableTableNames()
+ {
+ $tables = Db::fetchAll('show tables');
+
+ $tableNames = array();
+ foreach ($tables as $table) {
+ $tableNames[] = array_shift($table);
+ }
+
+ return $tableNames;
+ }
+}
diff --git a/plugins/LanguagesManager/Updates/2.15.1-b1.php b/plugins/LanguagesManager/Updates/2.15.1-b1.php
new file mode 100644
index 0000000000..3465ad7b57
--- /dev/null
+++ b/plugins/LanguagesManager/Updates/2.15.1-b1.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+
+namespace Piwik\Plugins\LanguagesManager;
+
+use Piwik\Common;
+use Piwik\Updater;
+use Piwik\Updates;
+
+
+class Updates_2_15_1_b1 extends Updates
+{
+ public function getMigrationQueries(Updater $updater)
+ {
+ $updateSql = array(
+ 'ALTER TABLE `' . Common::prefixTable('user_language')
+ . '` ADD COLUMN `use_12_hour_clock` TINYINT(1) NOT NULL DEFAULT 0 AFTER `language`' => array(1060)
+ );
+ return $updateSql;
+ }
+
+ public function doUpdate(Updater $updater)
+ {
+ $updater->executeMigrationQueries(__FILE__, $this->getMigrationQueries($updater));
+ }
+}
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php
index 5ec39e9105..fee919680d 100644
--- a/plugins/UsersManager/Controller.php
+++ b/plugins/UsersManager/Controller.php
@@ -260,6 +260,7 @@ class Controller extends ControllerAdmin
$view->languages = APILanguagesManager::getInstance()->getAvailableLanguageNames();
$view->currentLanguageCode = LanguagesManager::getLanguageCodeForCurrentUser();
+ $view->currentTimeformat = LanguagesManager::uses12HourClockForCurrentUser();
$view->ignoreCookieSet = IgnoreCookie::isIgnoreCookieFound();
$view->piwikHost = Url::getCurrentHost();
$this->setBasicVariablesView($view);
@@ -380,12 +381,14 @@ class Controller extends ControllerAdmin
$defaultReport = Common::getRequestVar('defaultReport');
$defaultDate = Common::getRequestVar('defaultDate');
$language = Common::getRequestVar('language');
+ $timeFormat = Common::getRequestVar('timeformat');
$userLogin = Piwik::getCurrentUserLogin();
$this->processPasswordChange($userLogin);
LanguagesManager::setLanguageForSession($language);
APILanguagesManager::getInstance()->setLanguageForUser($userLogin, $language);
+ APILanguagesManager::getInstance()->set12HourClockForUser($userLogin, $timeFormat);
APIUsersManager::getInstance()->setUserPreference($userLogin,
APIUsersManager::PREFERENCE_DEFAULT_REPORT,
diff --git a/plugins/UsersManager/javascripts/usersSettings.js b/plugins/UsersManager/javascripts/usersSettings.js
index a72bb4db96..c6c909ea6b 100644
--- a/plugins/UsersManager/javascripts/usersSettings.js
+++ b/plugins/UsersManager/javascripts/usersSettings.js
@@ -38,6 +38,7 @@ function sendUserSettingsAJAX() {
postParams.defaultReport = defaultReport;
postParams.defaultDate = defaultDate;
postParams.language = $('#userSettingsTable #language').val();
+ postParams.timeformat = $('#userSettingsTable #timeformat').val();
var ajaxHandler = new ajaxHelper();
ajaxHandler.addParams({
diff --git a/plugins/UsersManager/templates/userSettings.twig b/plugins/UsersManager/templates/userSettings.twig
index 57e04dff85..1478368858 100644
--- a/plugins/UsersManager/templates/userSettings.twig
+++ b/plugins/UsersManager/templates/userSettings.twig
@@ -45,6 +45,14 @@
</div>
<div class="form-group">
+ <label for="timeformat">{{ 'General_TimeFormat'|translate }}</label>
+ <select name="timeformat" id="timeformat">
+ <option value="1" {% if currentTimeformat == 1 %}selected="selected"{% endif %} title="{{ 'General_12HourClock'|translate }}">{{ 'General_12HourClock'|translate }}</option>
+ <option value="0" {% if currentTimeformat == 0 %}selected="selected"{% endif %} title="{{ 'General_24HourClock'|translate }}">{{ 'General_24HourClock'|translate }}</option>
+ </select>
+ </div>
+
+ <div class="form-group">
<label>{{ 'UsersManager_ReportToLoadByDefault'|translate }}</label>
<label class="radio">
<input id="defaultReportRadioAll" type="radio" value="MultiSites"
diff --git a/tests/PHPUnit/System/expected/test_OneVisitor_SeveralDays_ImportedInRandomOrderTest_shouldShowOneVisit_InEachOfThreeDays__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_OneVisitor_SeveralDays_ImportedInRandomOrderTest_shouldShowOneVisit_InEachOfThreeDays__Live.getLastVisitsDetails_month.xml
index cc9433a13a..73cc01ca74 100644
--- a/tests/PHPUnit/System/expected/test_OneVisitor_SeveralDays_ImportedInRandomOrderTest_shouldShowOneVisit_InEachOfThreeDays__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_OneVisitor_SeveralDays_ImportedInRandomOrderTest_shouldShowOneVisit_InEachOfThreeDays__Live.getLastVisitsDetails_month.xml
@@ -10,7 +10,7 @@
<url>http://piwik.net/</url>
<pageTitle />
<pageIdAction>1</pageIdAction>
- <serverTimePretty>Apr 7, 2013 10:00:00 AM</serverTimePretty>
+ <serverTimePretty>Apr 7, 2013 10:00:00</serverTimePretty>
<pageId>1</pageId>
<customVariables>
<row>
@@ -91,10 +91,10 @@
<plugins />
<pluginsIcons />
<serverTimestamp>1365328800</serverTimestamp>
- <serverTimePretty>10:00:00 AM</serverTimePretty>
+ <serverTimePretty>10:00:00</serverTimePretty>
<serverDatePretty>Sunday, April 7, 2013</serverDatePretty>
<serverDatePrettyFirstAction>Sunday, April 7, 2013</serverDatePrettyFirstAction>
- <serverTimePrettyFirstAction>10:00:00 AM</serverTimePrettyFirstAction>
+ <serverTimePrettyFirstAction>10:00:00</serverTimePrettyFirstAction>
</row>
<row>
<idSite>1</idSite>
@@ -106,7 +106,7 @@
<url>http://piwik.net/</url>
<pageTitle />
<pageIdAction>1</pageIdAction>
- <serverTimePretty>Apr 6, 2013 11:00:00 AM</serverTimePretty>
+ <serverTimePretty>Apr 6, 2013 11:00:00</serverTimePretty>
<pageId>2</pageId>
<customVariables>
<row>
@@ -187,10 +187,10 @@
<plugins />
<pluginsIcons />
<serverTimestamp>1365246000</serverTimestamp>
- <serverTimePretty>11:00:00 AM</serverTimePretty>
+ <serverTimePretty>11:00:00</serverTimePretty>
<serverDatePretty>Saturday, April 6, 2013</serverDatePretty>
<serverDatePrettyFirstAction>Saturday, April 6, 2013</serverDatePrettyFirstAction>
- <serverTimePrettyFirstAction>11:00:00 AM</serverTimePrettyFirstAction>
+ <serverTimePrettyFirstAction>11:00:00</serverTimePrettyFirstAction>
</row>
<row>
<idSite>1</idSite>
@@ -202,7 +202,7 @@
<url>http://piwik.net/</url>
<pageTitle />
<pageIdAction>1</pageIdAction>
- <serverTimePretty>Apr 5, 2013 12:00:00 PM</serverTimePretty>
+ <serverTimePretty>Apr 5, 2013 12:00:00</serverTimePretty>
<pageId>3</pageId>
<customVariables>
<row>
@@ -283,9 +283,9 @@
<plugins />
<pluginsIcons />
<serverTimestamp>1365163200</serverTimestamp>
- <serverTimePretty>12:00:00 PM</serverTimePretty>
+ <serverTimePretty>12:00:00</serverTimePretty>
<serverDatePretty>Friday, April 5, 2013</serverDatePretty>
<serverDatePrettyFirstAction>Friday, April 5, 2013</serverDatePrettyFirstAction>
- <serverTimePrettyFirstAction>12:00:00 PM</serverTimePrettyFirstAction>
+ <serverTimePrettyFirstAction>12:00:00</serverTimePrettyFirstAction>
</row>
</result> \ No newline at end of file
diff --git a/tests/PHPUnit/System/expected/test_UserId_VisitorId__Live.getLastVisitsDetails_month.xml b/tests/PHPUnit/System/expected/test_UserId_VisitorId__Live.getLastVisitsDetails_month.xml
index c728abec68..b83a3d071d 100644
--- a/tests/PHPUnit/System/expected/test_UserId_VisitorId__Live.getLastVisitsDetails_month.xml
+++ b/tests/PHPUnit/System/expected/test_UserId_VisitorId__Live.getLastVisitsDetails_month.xml
@@ -9,7 +9,7 @@
<url>http://example.org/index.htm</url>
<pageTitle>incredible title!</pageTitle>
<pageIdAction>2</pageIdAction>
- <serverTimePretty>Mar 6, 2010 11:22:33 AM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 11:22:33</serverTimePretty>
<pageId>1</pageId>
<icon />
<timestamp>1267874553</timestamp>
@@ -28,7 +28,7 @@
<url>http://example.org/index2.htm</url>
<pageTitle>incredible title!</pageTitle>
<pageIdAction>3</pageIdAction>
- <serverTimePretty>Mar 6, 2010 11:25:33 AM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 11:25:33</serverTimePretty>
<pageId>2</pageId>
<timeSpent>180</timeSpent>
<timeSpentPretty>3 min 0s</timeSpentPretty>
@@ -40,7 +40,7 @@
<url>http://example.org/index3.htm</url>
<pageTitle>incredible title!</pageTitle>
<pageIdAction>4</pageIdAction>
- <serverTimePretty>Mar 6, 2010 11:28:33 AM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 11:28:33</serverTimePretty>
<pageId>3</pageId>
<icon />
<timestamp>1267874913</timestamp>
@@ -59,7 +59,7 @@
<url>http://example.org/no-user-id-set-but-should-appear-in-user-id-visit</url>
<pageTitle>no User Id set but it should appear in email@example.com!</pageTitle>
<pageIdAction>6</pageIdAction>
- <serverTimePretty>Mar 6, 2010 1:16:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 13:16:33</serverTimePretty>
<pageId>4</pageId>
<timeSpent>360</timeSpent>
<timeSpentPretty>6 min 0s</timeSpentPretty>
@@ -71,7 +71,7 @@
<url>http://example.org/index.htm</url>
<pageTitle>incredible title!</pageTitle>
<pageIdAction>2</pageIdAction>
- <serverTimePretty>Mar 6, 2010 1:22:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 13:22:33</serverTimePretty>
<pageId>5</pageId>
<timeSpent>360</timeSpent>
<timeSpentPretty>6 min 0s</timeSpentPretty>
@@ -83,7 +83,7 @@
<url>http://example.org/index.htm</url>
<pageTitle>second page</pageTitle>
<pageIdAction>2</pageIdAction>
- <serverTimePretty>Mar 6, 2010 1:28:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 13:28:33</serverTimePretty>
<pageId>6</pageId>
<icon />
<timestamp>1267882113</timestamp>
@@ -102,7 +102,7 @@
<url>http://example.org/index.htm</url>
<pageTitle>a new user id was set -&gt; new visit</pageTitle>
<pageIdAction>2</pageIdAction>
- <serverTimePretty>Mar 6, 2010 1:34:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 13:34:33</serverTimePretty>
<pageId>7</pageId>
<icon />
<timestamp>1267882473</timestamp>
@@ -121,7 +121,7 @@
<url>http://example.org/home</url>
<pageTitle>pageview - should not be tracked by our user id but in a new visit</pageTitle>
<pageIdAction>10</pageIdAction>
- <serverTimePretty>Mar 6, 2010 4:28:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 16:28:33</serverTimePretty>
<pageId>10</pageId>
<icon />
<timestamp>1267892913</timestamp>
@@ -140,7 +140,7 @@
<url>http://example.org/home</url>
<pageTitle>same user id was set -&gt; this is the same unique user</pageTitle>
<pageIdAction>10</pageIdAction>
- <serverTimePretty>Mar 6, 2010 4:22:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 16:22:33</serverTimePretty>
<pageId>8</pageId>
<timeSpent>360</timeSpent>
<timeSpentPretty>6 min 0s</timeSpentPretty>
@@ -152,7 +152,7 @@
<url>http://example.org/home</url>
<pageTitle>second pageview - by this user id</pageTitle>
<pageIdAction>10</pageIdAction>
- <serverTimePretty>Mar 6, 2010 4:28:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 16:28:33</serverTimePretty>
<pageId>9</pageId>
<timeSpent>720</timeSpent>
<timeSpentPretty>12 min 0s</timeSpentPretty>
@@ -165,7 +165,7 @@
<goalId>1</goalId>
<revenue>0</revenue>
<goalPageId />
- <serverTimePretty>Mar 6, 2010 4:34:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 16:34:33</serverTimePretty>
<url>http://example.org/home</url>
<icon>plugins/Morpheus/images/goal.png</icon>
<timestamp>1267893273</timestamp>
@@ -174,7 +174,7 @@
<type>ecommerceAbandonedCart</type>
<revenue>10000000000</revenue>
<items>1</items>
- <serverTimePretty>Mar 6, 2010 4:40:33 PM</serverTimePretty>
+ <serverTimePretty>Mar 6, 2010 16:40:33</serverTimePretty>
<itemDetails>
<row>
<itemSKU>sku-007-PRISM</itemSKU>
@@ -201,7 +201,7 @@
<url>http://example.org/index.htm</url>
<pageTitle>Page view by email@example.com</pageTitle>
<pageIdAction>2</pageIdAction>
- <serverTimePretty>Mar 14, 2010 11:22:33 AM</serverTimePretty>
+ <serverTimePretty>Mar 14, 2010 11:22:33</serverTimePretty>
<pageId>11</pageId>
<icon />
<timestamp>1268565753</timestamp>
@@ -220,7 +220,7 @@
<url>http://example.org/index.htm</url>
<pageTitle>A page view by new-user-id@one-weeklater</pageTitle>
<pageIdAction>2</pageIdAction>
- <serverTimePretty>Mar 14, 2010 11:46:33 AM</serverTimePretty>
+ <serverTimePretty>Mar 14, 2010 11:46:33</serverTimePretty>
<pageId>12</pageId>
<icon />
<timestamp>1268567193</timestamp>
diff --git a/tests/PHPUnit/Unit/DateTest.php b/tests/PHPUnit/Unit/DateTest.php
index ba18ce1e70..ee37aba1eb 100644
--- a/tests/PHPUnit/Unit/DateTest.php
+++ b/tests/PHPUnit/Unit/DateTest.php
@@ -9,8 +9,10 @@
namespace Piwik\Tests\Unit;
use Exception;
+use Piwik\Container\StaticContainer;
use Piwik\Date;
use Piwik\SettingsServer;
+use Piwik\Translate;
/**
*/
@@ -331,4 +333,34 @@ class DateTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($date->isLeapYear());
}
}
+
+
+ public function getLocalizedLongStrings()
+ {
+ return array(
+ array('en', false, '2000-01-01 16:05:52', '16:05:52'),
+ array('de', false, '2000-01-01 16:05:52', '16:05:52'),
+ array('en', true, '2000-01-01 16:05:52', '4:05:52 PM'),
+ array('de', true, '2000-01-01 04:05:52', '4:05:52 vorm.'),
+ array('zh-tw', true, '2000-01-01 04:05:52', '上午4:05:52'),
+ array('lt', true, '2000-01-01 16:05:52', '04:05:52 popiet'),
+ array('ar', true, '2000-01-01 04:05:52', '4:05:52 ص'),
+ );
+ }
+
+ /**
+ * @group Core
+ * @dataProvider getLocalizedLongStrings
+ */
+ public function testGetLocalizedTimeFormats($language, $use12HourClock, $time, $shouldBe)
+ {
+ Translate::loadAllTranslations();
+ StaticContainer::get('Piwik\Translation\Translator')->setCurrentLanguage($language);
+ StaticContainer::get('Piwik\Intl\Data\Provider\DateTimeFormatProvider')->forceTimeFormat($use12HourClock);
+
+ $date = Date::factory($time);
+
+ $this->assertEquals($shouldBe, $date->getLocalized(Date::TIME_FORMAT));
+ Translate::reset();
+ }
}