Commit 168cd1ec authored by Fatih Acet's avatar Fatih Acet

Merge branch 'js-i18n-integrations' into 'master'

Internationalisation of integrations directory

See merge request gitlab-org/gitlab-ce!27682
parents 638ac8df a1102229
import $ from 'jquery'; import $ from 'jquery';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import flash from '../flash'; import flash from '../flash';
import { __ } from '~/locale';
export default class IntegrationSettingsForm { export default class IntegrationSettingsForm {
constructor(formSelector) { constructor(formSelector) {
...@@ -65,10 +66,10 @@ export default class IntegrationSettingsForm { ...@@ -65,10 +66,10 @@ export default class IntegrationSettingsForm {
* Toggle Submit button label based on Integration status and ability to test service * Toggle Submit button label based on Integration status and ability to test service
*/ */
toggleSubmitBtnLabel(serviceActive) { toggleSubmitBtnLabel(serviceActive) {
let btnLabel = 'Save changes'; let btnLabel = __('Save changes');
if (serviceActive && this.canTestService) { if (serviceActive && this.canTestService) {
btnLabel = 'Test settings and save changes'; btnLabel = __('Test settings and save changes');
} }
this.$submitBtnLabel.text(btnLabel); this.$submitBtnLabel.text(btnLabel);
...@@ -105,7 +106,7 @@ export default class IntegrationSettingsForm { ...@@ -105,7 +106,7 @@ export default class IntegrationSettingsForm {
if (data.test_failed) { if (data.test_failed) {
flashActions = { flashActions = {
title: 'Save anyway', title: __('Save anyway'),
clickHandler: e => { clickHandler: e => {
e.preventDefault(); e.preventDefault();
this.$form.submit(); this.$form.submit();
...@@ -121,7 +122,7 @@ export default class IntegrationSettingsForm { ...@@ -121,7 +122,7 @@ export default class IntegrationSettingsForm {
this.toggleSubmitBtnState(false); this.toggleSubmitBtnState(false);
}) })
.catch(() => { .catch(() => {
flash('Something went wrong on our end.'); flash(__('Something went wrong on our end.'));
this.toggleSubmitBtnState(false); this.toggleSubmitBtnState(false);
}); });
} }
......
...@@ -7931,6 +7931,9 @@ msgstr "" ...@@ -7931,6 +7931,9 @@ msgstr ""
msgid "Save Changes" msgid "Save Changes"
msgstr "" msgstr ""
msgid "Save anyway"
msgstr ""
msgid "Save application" msgid "Save application"
msgstr "" msgstr ""
...@@ -8962,6 +8965,9 @@ msgstr "" ...@@ -8962,6 +8965,9 @@ msgstr ""
msgid "Test failed." msgid "Test failed."
msgstr "" msgstr ""
msgid "Test settings and save changes"
msgstr ""
msgid "TestHooks|Ensure one of your projects has merge requests." msgid "TestHooks|Ensure one of your projects has merge requests."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment