mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Fix tooltips not being localized on load
This commit is contained in:
4
i18n.js
4
i18n.js
@@ -17,11 +17,11 @@ i18next
|
||||
})
|
||||
.then(() => {
|
||||
jqueryI18next.init(i18next, $, { parseDefaultValueFromContent: false })
|
||||
$('html').localize()
|
||||
updateView()
|
||||
})
|
||||
|
||||
function changeLng(code) {
|
||||
i18next.changeLanguage(code).then(() => {
|
||||
$('html').localize()
|
||||
updateView()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@
|
||||
"type": "boolean",
|
||||
"default": "false",
|
||||
"translate": "entry.expand",
|
||||
"help": true,
|
||||
"require": [
|
||||
"minecraft:tag"
|
||||
]
|
||||
|
||||
7
view.js
7
view.js
@@ -2,13 +2,6 @@ let structure;
|
||||
let components;
|
||||
let collections;
|
||||
|
||||
i18next.on('initialized', () => {
|
||||
$('[data-help]').each(function() {
|
||||
console.log('ahhh');
|
||||
$(this).tooltip({title: i18next.t('help.' + $(this).attr('data-help'))});
|
||||
});
|
||||
});
|
||||
|
||||
changeVersion('1.15');
|
||||
function changeVersion(version) {
|
||||
$.getJSON('schemas/' + version + '.json', json => {
|
||||
|
||||
Reference in New Issue
Block a user