From a26633003c89cc4e79aeb31d0f95452227cee7bb Mon Sep 17 00:00:00 2001 From: Brandon Labuschagne Date: Thu, 25 Apr 2019 16:49:58 +0200 Subject: [PATCH] Internationalisation of ide directory This is one of many MRs opened in order to improve the overall internationalisation of the GitLab codebase. i18n documentation https://docs.gitlab.com/ee/development/i18n/externalization.html --- app/assets/javascripts/ide/ide_router.js | 3 ++- .../ide/stores/modules/file_templates/getters.js | 5 +++-- locale/gitlab.pot | 9 +++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/ide/ide_router.js b/app/assets/javascripts/ide/ide_router.js index 518a9cf7a0f..8c84b98a108 100644 --- a/app/assets/javascripts/ide/ide_router.js +++ b/app/assets/javascripts/ide/ide_router.js @@ -3,6 +3,7 @@ import VueRouter from 'vue-router'; import { joinPaths } from '~/lib/utils/url_utility'; import flash from '~/flash'; import store from './stores'; +import { __ } from '~/locale'; Vue.use(VueRouter); @@ -94,7 +95,7 @@ router.beforeEach((to, from, next) => { }) .catch(e => { flash( - 'Error while loading the project data. Please try again.', + __('Error while loading the project data. Please try again.'), 'alert', document, null, diff --git a/app/assets/javascripts/ide/stores/modules/file_templates/getters.js b/app/assets/javascripts/ide/stores/modules/file_templates/getters.js index 628babe6a01..f10891a8e5b 100644 --- a/app/assets/javascripts/ide/stores/modules/file_templates/getters.js +++ b/app/assets/javascripts/ide/stores/modules/file_templates/getters.js @@ -1,4 +1,5 @@ import { activityBarViews } from '../../../constants'; +import { __ } from '~/locale'; export const templateTypes = () => [ { @@ -10,11 +11,11 @@ export const templateTypes = () => [ key: 'gitignores', }, { - name: 'LICENSE', + name: __('LICENSE'), key: 'licenses', }, { - name: 'Dockerfile', + name: __('Dockerfile'), key: 'dockerfiles', }, ]; diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 06f2f848925..c948c3a3b2d 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3271,6 +3271,9 @@ msgstr "" msgid "Do you want to customize how Google Code email addresses and usernames are imported into GitLab?" msgstr "" +msgid "Dockerfile" +msgstr "" + msgid "Domain" msgstr "" @@ -3739,6 +3742,9 @@ msgstr "" msgid "Error while loading the merge request. Please try again." msgstr "" +msgid "Error while loading the project data. Please try again." +msgstr "" + msgid "Error while migrating %{upload_id}: %{error_message}" msgstr "" @@ -5165,6 +5171,9 @@ msgstr "" msgid "LFSStatus|Enabled" msgstr "" +msgid "LICENSE" +msgstr "" + msgid "Label" msgstr ""