From 53d4927b5fabf0991fe01db28d6eab69ca78a7c1 Mon Sep 17 00:00:00 2001 From: SPGoding Date: Tue, 16 Jul 2019 16:06:13 +0800 Subject: [PATCH] Internationalization --- i18n.js | 12 + index.html | 753 ++++++++++++++++++++++++------------------------ locales/en.json | 288 ++++++++++++++++++ 3 files changed, 679 insertions(+), 374 deletions(-) create mode 100644 i18n.js create mode 100644 locales/en.json diff --git a/i18n.js b/i18n.js new file mode 100644 index 00000000..44fb3bda --- /dev/null +++ b/i18n.js @@ -0,0 +1,12 @@ +i18next + .use(i18nextBrowserLanguageDetector) + .use(i18nextXHRBackend) + .init({ + backend: { loadPath: 'locales/{{lng}}.json' }, + whitelist: ['en'], + fallbackLng: 'en' + }) + .then(() => { + jqueryI18next.init(i18next, $, { parseDefaultValueFromContent: false }) + $('html').localize() + }) diff --git a/index.html b/index.html index 6b77dab6..b55ebb4b 100644 --- a/index.html +++ b/index.html @@ -3,37 +3,37 @@ - Loot Table Generator +
- +
- Type +
- +
- +
@@ -43,17 +43,17 @@
- +
- - + +
@@ -65,219 +65,219 @@
- - - + + +
- Rolls +
- Min + - Max + - n + - p +
- Bonus Rolls +
- Min + - Max + - n + - p +
- - - + + +
- Type +
- Name +
- Weight +
- Quality +
- +
- - + +
- Function +
- Count + Count
- Min + - Max + - n + - p +
- Damage +
- Min + - Max + - n + - p +
- NBT +
- Levels +
- Min + - Max + - n + - p +
- +
- Limit +
- +
- Source +
- Name +
- limit +
- Min + - Max +
- +
@@ -354,53 +354,53 @@
- +
- Entity +
- +
- Enchantment + Enchantment
- Formula +
- Multiplier +
- Extra +
- Propability +
@@ -408,79 +408,79 @@
- +
- Attribute +
- Name +
- Amount +
- Min + - Max + - n + - p +
- Operation +
- Slots +
-
+
`
@@ -489,145 +489,145 @@
- +
- Source +
- Target +
- Operation +
- +
- Condition +
- Chance +
- Looting Multiplier +
- +
- Entity +
- +
- +
- +
- Block +
- +
- +
- Raining +
- - + +
- Thundering +
- - + +
- Enchantment +
- Chances +
@@ -638,17 +638,17 @@
- Min + - Max +
- +
@@ -657,60 +657,60 @@
- +
- +
- X +
- Min + - Max +
- Y + Y
- Min + - Max +
- Z + Z
- Min + - Max +
- Biome +
- Feature +
- Dimension +
@@ -719,264 +719,264 @@
- Type +
- NBT +
- +
- Item +
- Name + - Tag +
- Count +
- Min + - Max +
- Durability +
- Min + - Max +
- Potion +
- NBT +
- +
- +
- Projectile +
- - + +
- Explosion +
- - + +
- Fire +
- - + +
- Magic +
- - + +
- Lightning +
- - + +
- Starvation +
- - + +
- Void +
- - + +
- Bypass Armor +
- - + +
- Dealt +
- Min + - Max +
- Taken +
- Min + - Max +
- Blocked +
- - + +
- +
- +
- +
- Enchantment +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ch
- Levels +
- Min + - Max +
@@ -986,6 +986,11 @@ + + + + + diff --git a/locales/en.json b/locales/en.json new file mode 100644 index 00000000..5d99836f --- /dev/null +++ b/locales/en.json @@ -0,0 +1,288 @@ +{ + "$condition": { + "alternative": "Alternative", + "inverted": "Inverted", + "entity_properties": "Entity Properties", + "blockstate_propery": "Block Properties", + "match_tool": "Tool Properties", + "damage_source_properties": "Damage Source", + "location_check": "Location", + "weather_check": "Weather", + "entity_scores": "Entity Scores", + "random_chance": "Random Chance", + "random_chance_with_looting": "Random Chance with Looting", + "table_bonus": "Table Bonus", + "killed_by_player": "Killed by Player", + "survives_explosion": "Survives Explosion", + "$terms": { + "term": "Term" + } + }, + "$damage": { + "damage_type": "Damage Type", + "projectile": "Projectile", + "explosion": "Explosion", + "location": "Location", + "fire": "Fire", + "magic": "Magic", + "lightning": "Lightning", + "starvation": "Starvation", + "void": "Void", + "bypass_armor": "Bypass Armor", + "dealt": "Dealt", + "taken": "Taken", + "blocked": "Blocked", + "source_enitity": "Source Entity", + "direct_enitity": "Direct Entity" + }, + "$dimension": { + "overworld": "Overworld", + "the_nether": "The Nether", + "the_end": "The End" + }, + "$enchantment": { + "aqua_affinity": "Aqua Affinity", + "bane_of_arthropods": "Bane of Arthropods", + "blast_protection": "Blast Protection", + "channeling": "Channeling", + "binding_curse": "Curse of Binding", + "vanishing_curse": "Curse of Vanishing", + "depth_strider": "Depth Strider", + "efficiency": "Efficiency", + "feather_falling": "Feather Falling", + "fire_aspect": "Fire Aspect", + "fire_protection": "Fire Protection", + "flame": "Flame", + "fortune": "Fortune", + "frost_walker": "Frost Walker", + "impaling": "Impaling", + "infinity": "Infinity", + "knockback": "Knockback", + "looting": "Looting", + "loyalty": "Loyalty", + "luck_of_the_sea": "Luck of the Sea", + "lure": "Lure", + "mending": "Mending", + "multishot": "Multishot", + "piercing": "Piercing", + "power": "Power", + "projectile_protection": "Projectile Protection", + "protection": "Protection", + "punch": "Punch", + "quick_charge": "Quick Charge", + "respiration": "Respiration", + "riptide": "Riptide", + "sharpness": "Sharpness", + "silk_touch": "Silk Touch", + "smite": "Smite", + "sweeping": "Sweeping Edge", + "thorns": "Thorns", + "unbreaking": "Unbreaking" + }, + "$entry": { + "name": "Name", + "type": "Type", + "$type": { + "empty": "Empty", + "item": "Item", + "tag": "Item Tag", + "loot_table": "Loot Table", + "alternatives": "Alternatives", + "sequence": "Sequence", + "group": "Group", + "dynamic": "Dynamic" + }, + "weight": "Weight", + "quality": "Quality" + }, + "$function": { + "set_count": "Set Count", + "set_damage": "Set Damage", + "set_name": "Set Name", + "set_lore": "Set Lore", + "set_nbt": "Set NBT", + "set_attributes": "Set Attributes", + "set_contents": "Set Contents", + "enchant_randomly": "Enchant Randomly", + "enchant_with_levels": "Enchant With Levels", + "looting_enchant": "Looting Enchant", + "limit_count": "Limit Count", + "furnace_smelt": "Furnace Smelt", + "explosion_decay": "Explosion Decay", + "fill_player_head": "Fill Player Head", + "copy_name": "Copy Name", + "copy_nbt": "Copy NBT", + "apply_bonus": "Apply Bonus", + "$damage": { + "damage": "Damage" + }, + "$ench_rand": { + "ench": "Optional Enchantments" + }, + "$limit": { + "limit": "Limit" + }, + "$name": { + "name": "Name" + }, + "$lore_replace": { + "replace": "Replace" + }, + "$entity": { + "entity": "Entity" + }, + "$operations": { + "add_op": "Add Operation" + }, + "$enchantment": { + "ench": "Enchantment" + }, + "$formula": { + "formula": "Formula", + "uniform_bonus_count": "Uniform Bonus Count", + "binomial_with_bonus_count": "Binomial with Bonus Count", + "ore_drops": "Ore Drops" + }, + "$bonus_multiplier": { + "multiplier": "Multiplier" + }, + "$bonus_extra": { + "extra": "Extra" + }, + "$bonus_probability": { + "probability": "Propability" + } + }, + "$modifier": { + "attribute": "Attribute", + "generic_maxHealth": "Max Health", + "generic_followRange": "Follow Range", + "generic_knockbackResistance": "Knockback Resistance", + "generic_movementSpeed": "Movement Speed", + "generic_attackDamage": "Attack Damage", + "generic_armor": "Armor", + "generic_armorThoughness": "Armor Toughness", + "generic_attackSpeed": "Attack Speed", + "generic_luck": "Luck", + "horse_jumpStrength": "Jump Strength", + "generic_attackKnockback": "Attack Knockback", + "generic_flyingSpeed": "Flying Speed", + "zombie_spawnReinforcements": "Spawn Reinforcements", + "name": "Name", + "amount": "Amount", + "operation": "Operation", + "$operation": { + "addition": "Addition", + "multiply_base": "Multiply Base", + "multiply_total": "Multiply Total" + }, + "slots": "Slots" + }, + "$operation": { + "source": "Source", + "target": "Target", + "operation": "Operation", + "$operation": { + "replace": "Replace", + "append": "Append", + "merge": "Merge" + } + }, + "$pool": { + "rolls": "Rolls", + "bonus_rolls": "Bonus Rolls" + }, + "$range": { + "exact": "Exact", + "range": "Range", + "$range": { + "min": "Min", + "max": "Max" + }, + "binomial": "Binomial", + "$binomial": { + "n": "n", + "p": "p" + } + }, + "$slot": { + "mainhand": "Mainhand", + "offhand": "Offhand", + "head": "Head", + "chest": "Chest", + "legs": "Legs", + "feet": "Feet" + }, + "$source": { + "block_entity": "Block Entity", + "this": "This", + "killer": "Killer", + "killer_player": "Killer Player" + }, + "$table": { + "type": "Type", + "$type": { + "empty": "Empty", + "entity": "Entity", + "block": "Block", + "chest": "Chest", + "fishing": "Fishing", + "generic": "Generic" + } + }, + "2_spaces": "2 Spaces", + "4_spaces": "4 Spaces", + "add": "Add ", + "author": "by Misode", + "biome": "Biome", + "block": "Block", + "block_state": "Block State", + "chance": "Chance", + "chance_plural": "Chances", + "child": "Child", + "condition": "Condition", + "copy": "Copy", + "count": "Count", + "description": "Loot Table Generator for Minecraft 1.14", + "dimension": "Dimension", + "durability": "Durability", + "enchatment": "Enchantment", + "entity": "Entity", + "entry": "Entry", + "false": "False", + "feature": "Feature", + "function": "Function", + "hide_source": "Hide Source", + "inverted": "Inverted", + "item": "Item", + "level_plural": "Levels", + "looting_multiplier": "Looting Multiplier", + "luck_based": "Luck-based", + "modifier": "Modifier", + "more": "More", + "name": "Name", + "nbt": "NBT", + "objective": "Objective", + "operation": "Operation", + "pool": "Pool", + "position": "Position", + "potion": "Potion", + "raining": "Raining", + "remove": "Remove ", + "score": "Score", + "share": "Share", + "show_source": "Show Source", + "source": "Source", + "table": "Loot Table", + "tabs": "Tabs", + "tag": "Tag", + "thundering": "Thundering", + "title": "Loot Table Generator", + "treasure": "Treasure", + "true": "True", + "type": "Type", + "unset": "Unset", + "x": "X", + "y": "Y", + "z": "Z" +}