Add help translation strings

This commit is contained in:
Misode
2019-11-14 11:33:20 +01:00
parent 2198bdf58f
commit 9377dfd78d
2 changed files with 11 additions and 2 deletions

View File

@@ -206,6 +206,15 @@
"function.zoom": "Zoom",
"function_add": "Add Function",
"function_remove": "Remove Function",
"help.entry.type.alternatives": "Tests conditions of the child entries and executes the first that can run",
"help.entry.type.dynamic": "Gets block specific drops",
"help.entry.type.empty": "Adds nothing to the pool",
"help.entry.type.group": "Executes all child entries when own conditions pass",
"help.entry.type.item": "Adds a single item",
"help.entry.type.loot_table": "Adds the contents of another loot table",
"help.entry.type.sequence": "Executes child entries until the first one that can't run due to conditions",
"help.entry.type.tag": "Adds the contents of an item tag",
"help.pool.rolls": "The amount of entries that are randomly chosen",
"hide_source": "Hide Source",
"item.count": "Count",
"item.durability": "Durability",

View File

@@ -5,7 +5,7 @@ let collections;
i18next.on('initialized', () => {
$('[data-help]').each(function() {
console.log('ahhh');
$(this).tooltip({title: i18next.t('$help.' + $(this).attr('data-help'))});
$(this).tooltip({title: i18next.t('help.' + $(this).attr('data-help'))});
});
});
@@ -462,7 +462,7 @@ function generateField(data, field, parent) {
function generateTooltip(str) {
let $el = $('<button type="button" class="btn help-tooltip ml-2" data-toggle="tooltip" data-help="' + str + '">?</button>');
$el.tooltip({title: i18next.t('$help.' + str)});
$el.tooltip({title: i18next.t('help.' + str)});
return $el;
}