summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-04-30 23:02:30 +0000
committerFatih Acet <acetfatih@gmail.com>2019-04-30 23:02:30 +0000
commita11022299fa112517d1f53419d8f3b45947b2a78 (patch)
tree62a6f6fa0369e4bb47359de4a129ad483cc4b32a
parent638ac8dfd62af927842981062ab1c1f7c1424be1 (diff)
downloadgitlab-ce-a11022299fa112517d1f53419d8f3b45947b2a78.tar.gz
Internationalisation of integrations 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
-rw-r--r--app/assets/javascripts/integrations/integration_settings_form.js9
-rw-r--r--locale/gitlab.pot6
2 files changed, 11 insertions, 4 deletions
diff --git a/app/assets/javascripts/integrations/integration_settings_form.js b/app/assets/javascripts/integrations/integration_settings_form.js
index 08b858305ab..a7746bb3a0b 100644
--- a/app/assets/javascripts/integrations/integration_settings_form.js
+++ b/app/assets/javascripts/integrations/integration_settings_form.js
@@ -1,6 +1,7 @@
import $ from 'jquery';
import axios from '../lib/utils/axios_utils';
import flash from '../flash';
+import { __ } from '~/locale';
export default class IntegrationSettingsForm {
constructor(formSelector) {
@@ -65,10 +66,10 @@ export default class IntegrationSettingsForm {
* Toggle Submit button label based on Integration status and ability to test service
*/
toggleSubmitBtnLabel(serviceActive) {
- let btnLabel = 'Save changes';
+ let btnLabel = __('Save changes');
if (serviceActive && this.canTestService) {
- btnLabel = 'Test settings and save changes';
+ btnLabel = __('Test settings and save changes');
}
this.$submitBtnLabel.text(btnLabel);
@@ -105,7 +106,7 @@ export default class IntegrationSettingsForm {
if (data.test_failed) {
flashActions = {
- title: 'Save anyway',
+ title: __('Save anyway'),
clickHandler: e => {
e.preventDefault();
this.$form.submit();
@@ -121,7 +122,7 @@ export default class IntegrationSettingsForm {
this.toggleSubmitBtnState(false);
})
.catch(() => {
- flash('Something went wrong on our end.');
+ flash(__('Something went wrong on our end.'));
this.toggleSubmitBtnState(false);
});
}
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index b97511eea73..68454457b76 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -7931,6 +7931,9 @@ msgstr ""
msgid "Save Changes"
msgstr ""
+msgid "Save anyway"
+msgstr ""
+
msgid "Save application"
msgstr ""
@@ -8962,6 +8965,9 @@ msgstr ""
msgid "Test failed."
msgstr ""
+msgid "Test settings and save changes"
+msgstr ""
+
msgid "TestHooks|Ensure one of your projects has merge requests."
msgstr ""