summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-06-05 11:28:31 +0200
committerBrandon Labuschagne <blabuschagne@gitlab.com>2019-06-05 13:56:33 +0200
commit12b6a1d52cda50d6c1e3be16e70e99deb3633ce5 (patch)
treea1c84a0fbf1a1fdef13a8133b656b5b80f2356d0
parent31c32db2a97aab809e5b655889fb6b7b8b968060 (diff)
downloadgitlab-ce-12b6a1d52cda50d6c1e3be16e70e99deb3633ce5.tar.gz
I18N datetime utility filejs-i18n-datetime
This is one of many MRs opened in order to improve the overall internationalisation of the GitLab codebase. This commit only targets Vanilla JS files. i18n documentation https://docs.gitlab.com/ee/development/i18n/externalization.html
-rw-r--r--app/assets/javascripts/lib/utils/datetime_utility.js2
-rw-r--r--locale/gitlab.pot3
2 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/datetime_utility.js b/app/assets/javascripts/lib/utils/datetime_utility.js
index d3e6851496b..d521c462ad8 100644
--- a/app/assets/javascripts/lib/utils/datetime_utility.js
+++ b/app/assets/javascripts/lib/utils/datetime_utility.js
@@ -81,7 +81,7 @@ export const getDayName = date =>
*/
export const formatDate = datetime => {
if (_.isString(datetime) && datetime.match(/\d+-\d+\d+ /)) {
- throw new Error('Invalid date');
+ throw new Error(__('Invalid date'));
}
return dateFormat(datetime, 'mmm d, yyyy h:MMtt Z');
};
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 294c938d87d..21c65aeb0e9 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -5384,6 +5384,9 @@ msgstr ""
msgid "Invalid Login or password"
msgstr ""
+msgid "Invalid date"
+msgstr ""
+
msgid "Invalid feature"
msgstr ""