Commit 29a47bfc authored by Brandon Labuschagne's avatar Brandon Labuschagne

I18N JS files starting with s

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
parent a5f810c9
......@@ -2,7 +2,7 @@
import $ from 'jquery';
import { escape, throttle } from 'underscore';
import { s__, sprintf } from '~/locale';
import { s__, __, sprintf } from '~/locale';
import { getIdenticonBackgroundClass, getIdenticonTitle } from '~/helpers/avatar_helper';
import axios from './lib/utils/axios_utils';
import DropdownUtils from './filtered_search/dropdown_utils';
......@@ -439,7 +439,7 @@ export class SearchAutocomplete {
restoreMenu() {
var html;
html = '<ul><li class="dropdown-menu-empty-item"><a>Loading...</a></li></ul>';
html = `<ul><li class="dropdown-menu-empty-item"><a>${__('Loading...')}</a></li></ul>`;
return this.dropdownContent.html(html);
}
......
......@@ -31,7 +31,7 @@ export default class Star {
$this.prepend(spriteIcon('star', iconClasses));
}
})
.catch(() => Flash('Star toggle failed. Try again later.'));
.catch(() => Flash(__('Star toggle failed. Try again later.')));
});
}
}
import $ from 'jquery';
import { __ } from './locale';
export default function subscriptionSelect() {
$('.js-subscription-event').each((i, element) => {
......@@ -8,7 +9,7 @@ export default function subscriptionSelect() {
selectable: true,
fieldName,
toggleLabel(selected, el, instance) {
let label = 'Subscription';
let label = __('Subscription');
const $item = instance.dropdown.find('.is-active');
if ($item.length) {
label = $item.text();
......
......@@ -9056,6 +9056,9 @@ msgstr ""
msgid "Star a label to make it a priority label. Order the prioritized labels to change their relative priority, by dragging."
msgstr ""
msgid "Star toggle failed. Try again later."
msgstr ""
msgid "StarProject|Star"
msgstr ""
......@@ -9188,6 +9191,9 @@ msgstr ""
msgid "Subscribed"
msgstr ""
msgid "Subscription"
msgstr ""
msgid "Subtracts"
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