Skip to content
Snippets Groups Projects
Commit 7fd9ac34 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

set translations after locale has been set, fixes #2089

Closes #2089

Merge request studip/studip!1370
parent aee06a2a
No related branches found
No related tags found
No related merge requests found
import { $gettext } from '../lib/gettext.js'; import { $gettext } from '../lib/gettext.js';
import eventBus from "../lib/event-bus";
/* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------
* application.js * application.js
...@@ -180,9 +181,12 @@ jQuery.ui.accordion.prototype.options.icons = { ...@@ -180,9 +181,12 @@ jQuery.ui.accordion.prototype.options.icons = {
header: 'arrow_right', header: 'arrow_right',
activeHeader: 'arrow_down' activeHeader: 'arrow_down'
}; };
eventBus.on('studip:set-locale', () => {
jQuery.extend(jQuery.ui.dialog.prototype.options, { jQuery.extend(jQuery.ui.dialog.prototype.options, {
closeText: $gettext('Schließen') closeText: $gettext('Schließen')
}); });
});
/* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------
......
import { $gettext } from '../lib/gettext.js'; import { $gettext } from '../lib/gettext.js';
import eventBus from "../lib/event-bus";
STUDIP.domReady(() => { eventBus.on('studip:set-locale', () => {
$.extend($.ui.multiselect, { $.extend($.ui.multiselect, {
locale: { locale: {
addAll: $gettext('Alle hinzufügen'), addAll: $gettext('Alle hinzufügen'),
......
...@@ -6,7 +6,7 @@ import A11YDialogUI from './ui.js'; ...@@ -6,7 +6,7 @@ import A11YDialogUI from './ui.js';
export function updateVoiceLabel() { export function updateVoiceLabel() {
add('de', { add('de', {
'Rich Text Editor': $gettext('Rich Text Editor (Um Bedienhinweise zu erhalten, drücken Sie ALT+0 im Eingabefeld.)'), 'Rich Text Editor': 'Rich Text Editor (Um Bedienhinweise zu erhalten, drücken Sie ALT+0 im Eingabefeld.)',
}); });
} }
......
import { $gettext } from '../lib/gettext.js'; import { $gettext } from '../lib/gettext.js';
import eventBus from "./event-bus";
eventBus.on('studip:set-locale', () => {
Calendar.day_names = [
$gettext('Montag'),
$gettext('Dienstag'),
$gettext('Mittwoch'),
$gettext('Donnerstag'),
$gettext('Freitag'),
$gettext('Samstag'),
$gettext('Sonntag'),
];
});
/* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------
* calendar gui * calendar gui
...@@ -12,13 +25,13 @@ const Calendar = { ...@@ -12,13 +25,13 @@ const Calendar = {
click_in_progress: false, click_in_progress: false,
day_names: [ day_names: [
$gettext('Montag'), 'Montag',
$gettext('Dienstag'), 'Dienstag',
$gettext('Mittwoch'), 'Mittwoch',
$gettext('Donnerstag'), 'Donnerstag',
$gettext('Freitag'), 'Freitag',
$gettext('Samstag'), 'Samstag',
$gettext('Sonntag') 'Sonntag',
], ],
/** /**
......
import { $gettext } from "./gettext.js"; import { $gettext } from "./gettext.js";
import eventBus from "./event-bus";
eventBus.on('studip:set-locale', () => {
Forum.warning_text = $gettext('Wenn Sie die Seite verlassen, gehen ihre Änderungen verloren!');
});
const Forum = { const Forum = {
confirmDialog: null, confirmDialog: null,
current_area_id: null, current_area_id: null,
current_category_id: null, current_category_id: null,
seminar_id: null, seminar_id: null,
warning_text: $gettext('Wenn Sie die Seite verlassen, gehen ihre Änderungen verloren!'), warning_text: 'Wenn Sie die Seite verlassen, gehen ihre Änderungen verloren!',
clipboard: {}, clipboard: {},
getTemplate: _.memoize(function(name) { getTemplate: _.memoize(function(name) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment