Skip to content

Commit

Permalink
Merge pull request #5426 from ZZZank/even_more_locali
Browse files Browse the repository at this point in the history
Complete infrastructures for localizing tooltips/descriptions
  • Loading branch information
NielsPilgaard authored Nov 27, 2023
2 parents 4c7d1e6 + 56a146d commit 00248ac
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 145 deletions.
62 changes: 61 additions & 1 deletion kubejs/assets/enigmatica/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
"bountiful.decree.witch.name": "Witch",
"bountiful.decree.druid.name": "Druid",

"tooltips.enigmatica.normal.apiaries_craft": "Crafting this will return any bees in the hives/apiaries used ONLY if all hives/apiaries have been previously placed in-world and recieved NBT.",
"tooltips.enigmatica.normal.": "",

"tooltips.enigmatica.expert.disabled": "Disabled in Expert Mode.",
"tooltips.enigmatica.expert.soulpickaxe": "Capable of mining Iesnium.",
"tooltips.enigmatica.expert.seared_melter": "Use the Smeltery Controller instead.",
Expand Down Expand Up @@ -236,7 +239,64 @@
"descriptions.enigmatica.base.roast_chicken": "Obtained by right-clicking a placed Roast Chicken with a Bowl.",
"descriptions.enigmatica.base.brewing_barrel": "Used for brewing various alcoholic beverages.\n \n● Beer\n● Cauim\n● Cider\n● Mead",
"descriptions.enigmatica.base.brewing_barrel_2": "● Sake\n● Tiswin\n● Vodka\n● Whiskey\n● Wine",
"descriptions.enigmatica.base.disabled_please_report": "This item has been disabled, if you managed to obtain it please report it on Enigmatica 6's issue tracker: https://github.com/EnigmaticaModpacks/Enigmatica6/issues",
"descriptions.enigmatica.base.can_be_dyed": "Can be dyed through crafting or by right clicking it with dye in-world.",
"descriptions.enigmatica.base.generatable_cobble":"Can be generated in a Vanilla Cobblestone Generator. The block below where the Cobblestone generates needs to be a Block of Iron.",
"descriptions.enigmatica.base.generatable_stone": "Can be generated in a Vanilla Stone Generator. The block below where the Stone generates needs to be a Block of Diamond.",
"descriptions.enigmatica.base.framed_drawers": "Must be painted with any block to be used. To paint, put in any crafting grid with one block directly above and to its left diagonally.\nYou can also put a different block directly on top of the drawer and/or directly to its left to customize it even further!",
"descriptions.enigmatica.base.beverages": "Brewed by right-clicking %s into a Brewing Barrel.\nGrants the imbiber %s.",
"descriptions.enigmatica.base.beverages.beer.ingredient": "Barley",
"descriptions.enigmatica.base.beverages.beer.effect": "Strength",
"descriptions.enigmatica.base.beverages.cauim.ingredient": "Cassava",
"descriptions.enigmatica.base.beverages.cauim.effect": "Jump Boost",
"descriptions.enigmatica.base.beverages.cider.ingredient": "Apples",
"descriptions.enigmatica.base.beverages.cider.effect": "Luck",
"descriptions.enigmatica.base.beverages.mead.ingredient": "Honeycomb",
"descriptions.enigmatica.base.beverages.mead.effect": "Haste",
"descriptions.enigmatica.base.beverages.sake.ingredient": "Rice",
"descriptions.enigmatica.base.beverages.sake.effect": "Speed",
"descriptions.enigmatica.base.beverages.tiswin.ingredient": "Cactus Fruit",
"descriptions.enigmatica.base.beverages.tiswin.effect": "a Health Boost",
"descriptions.enigmatica.base.beverages.vodka.ingredient": "Potatoes",
"descriptions.enigmatica.base.beverages.vodka.effect": "Resistance",
"descriptions.enigmatica.base.beverages.whiskey.ingredient": "Wheat",
"descriptions.enigmatica.base.beverages.whiskey.effect": "Absorption",
"descriptions.enigmatica.base.beverages.wine.ingredient": "Grapes",
"descriptions.enigmatica.base.beverages.wine.effect": "Regeneration",
"descriptions.enigmatica.base.": "",


"tooltips.enigmatica.base.integratedtunnels_fluid": "Max Fluid Transfer Rate has been limited to 65,536 mb per tick.",
"tooltips.enigmatica.base.integratedtunnels_energy": "Max Energy Transfer Rate has been limited to 65,536 FE per tick.",
"tooltips.enigmatica.base.lightning_charge": "Calls down a lightning bolt on impact.",
"tooltips.enigmatica.base.altered_recipe_indicator": "Recipe altered for Enigmatica 6: Expert. Refer to JEI.",
"tooltips.enigmatica.base.disabled_recipe_indicator": "Recipe disabled for Enigmatica 6",
"tooltips.enigmatica.base.tcon_station": "Craftable with any wood.",
"tooltips.enigmatica.base.tcon_anvil": "Craftable with any alloy blocks.",
"tooltips.enigmatica.base.wither_immune": "Immune to the Wither",
"tooltips.enigmatica.base.blast_upgrade": "Renders routers immune to the Wither",
"tooltips.enigmatica.base.illumination_wand": "Renders blocks immune to the Wither",
"tooltips.enigmatica.base.shield_block1": "Shield Projections are immune to the Wither",
"tooltips.enigmatica.base.quick_draw_anointment": "Grants Quick-Draw on Bows and Crossbows",
"tooltips.enigmatica.base.fortune_anointment": "Grants additional Fortune on Tools",
"tooltips.enigmatica.base.holy_water_anointment": "Grants bonus Smite damage on Melee Attacks.",
"tooltips.enigmatica.base.melee_anointment": "Grants bonus damage on Melee Attacks",
"tooltips.enigmatica.base.bow_power_anointment": "Grants bonus damage on Bows and Crossbows",
"tooltips.enigmatica.base.silk_touch_anointment": "Grants Silk Touch",
"tooltips.enigmatica.base.hidden_knowledge_anointment": "Grants bonus Experience from block harvests.",
"tooltips.enigmatica.base.smelting_anointment": "Grants Auto Smelt",
"tooltips.enigmatica.base.looting_anointment": "Grants additional Looting on Weapons",
"tooltips.enigmatica.base.bow_velocity_anointment": "Grants additional projectile velocity on Bows and Crossbows",
"tooltips.enigmatica.base.burning_hot": "Extremely hot!",
"tooltips.enigmatica.base.beehive": "Tiered Beehives have been depreciated.\nUse the Hive Upgrade items on nests found in the world instead.\nTiered Beehives can be converted to Hive Upgrades in a crafting grid.",
"tooltips.enigmatica.base.aura_generator": "Aura Generator",
"tooltips.enigmatica.base.clockout_block": "Outputs redstone when the player is online.",
"tooltips.enigmatica.base.soggy_treasure_box": "The lock appears broken... What could be inside?",
"tooltips.enigmatica.base.mm_mana_port": "Compatible with Mana Spreaders and Sparks.",
"tooltips.enigmatica.base.amadron_survey_tools": "Tools used by Amadron Drones to gather rare resources.",
"tooltips.enigmatica.base.monster_mash": "...It caught on in a flash...",
"tooltips.enigmatica.base.rs_silk_touch_upgrade": "Does not work on spawners.",
"tooltips.enigmatica.base.crystalline": "Fireproof",
"tooltips.enigmatica.base.": "",

"": ""
}
55 changes: 26 additions & 29 deletions kubejs/client_scripts/expert/item_modifiers/jei_descriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,32 @@ onEvent('jei.information', (event) => {
'bloodmagic:soulgemlesser'
],
text: [`${id_prefix}stage_unlock`]
},
{
// Disabled Items
items: [
'pneumaticcraft:air_compressor',
'pneumaticcraft:advanced_air_compressor',
'industrialforegoing:mob_slaughter_factory',
'integrateddynamics:energy_battery',
'integrateddynamics:mechanical_squeezer',
'integrateddynamics:mechanical_drying_basin',
'integrateddynamics:squeezer',
'integrateddynamics:drying_basin',
'integrateddynamics:coal_generator',
'mekanism:upgrade_filter',
'darkutils:rune_damage_player',
'integrateddynamics:coal_generator',
/darkutils:export_plate/,
/integrateddynamics:energy_battery/,
/powah:energy_cable_/,
'eidolon:crucible',
'eidolon:wooden_brewing_stand',
'engineersdecor:factory_placer',
'pedestals:coin/rfexpgen',
'pedestals:coin/rffuelgen'
],
text: [`descriptions.enigmatica.base.disabled_please_report`]
}
];

Expand All @@ -53,33 +79,4 @@ onEvent('jei.information', (event) => {
event.add(item, recipe.text);
});
});

const disabledItems = [
'pneumaticcraft:air_compressor',
'pneumaticcraft:advanced_air_compressor',
'industrialforegoing:mob_slaughter_factory',
'integrateddynamics:energy_battery',
'integrateddynamics:mechanical_squeezer',
'integrateddynamics:mechanical_drying_basin',
'integrateddynamics:squeezer',
'integrateddynamics:drying_basin',
'integrateddynamics:coal_generator',
'mekanism:upgrade_filter',
'darkutils:rune_damage_player',
'integrateddynamics:coal_generator',
/darkutils:export_plate/,
/integrateddynamics:energy_battery/,
/powah:energy_cable_/,
'eidolon:crucible',
'eidolon:wooden_brewing_stand',
'engineersdecor:factory_placer',
'pedestals:coin/rfexpgen',
'pedestals:coin/rffuelgen'
];
disabledItems.forEach((item) => {
event.add(
item,
"This item has been disabled in Expert mode, if you managed to obtain it please report it on Enigmatica 6's issue tracker: https://github.com/NillerMedDild/Enigmatica6/issues"
);
});
});
116 changes: 55 additions & 61 deletions kubejs/client_scripts/item_modifiers/jei_descriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ onEvent('jei.information', (event) => {
const id_prefix = 'descriptions.enigmatica.base.';

const recipes = [
/*
{
items: ['modid:item'],
text: ['description text accepts %s and %s', `${id_prefix}cheese_slice`, '%s'],
with: [
[Text.translate('language_key'), 'raw text'],
['language keys in `text` will be automatically converted to text defined in lang/xx_xx.json'],
['but note that `with` does not handle language key']
]
},
*/
{
items: ['simplefarming:cheese_slice'],
text: [`${id_prefix}cheese_slice`]
Expand Down Expand Up @@ -429,82 +440,65 @@ onEvent('jei.information', (event) => {
{
items: ['simplefarming:brewing_barrel'],
text: [`${id_prefix}brewing_barrel_2`]
},
{
items: disabledItems,
text: [`${id_prefix}disabled_please_report`]
},
{
items: generatableCobblestone,
text: [`${id_prefix}generatable_cobble`]
},
{
items: generatableStone,
text: [`${id_prefix}generatable_stone`]
},
{
items: refinedStorageItems.map((item) => `refinedstorage:${item}`),
text: [`${id_prefix}can_be_dyed`]
},
{
items: [
'compact_drawer',
'drawer_controller',
'slave',
'trim',
'full_one',
'full_two',
'full_four',
'half_one',
'half_two',
'half_four'
].map((item) => 'framedcompactdrawers:framed_' + item),
text: [`${id_prefix}framed_drawers`]
}
];

const simplefarming_beverages = [
{ type: 'beer', ingredient: 'Barley', effect: 'Strength' },
{ type: 'cauim', ingredient: 'Cassava', effect: 'Jump Boost' },
{ type: 'cider', ingredient: 'Apples', effect: 'Luck' },
{ type: 'mead', ingredient: 'Honeycomb', effect: 'Haste' },
{ type: 'sake', ingredient: 'Rice', effect: 'Speed' },
{ type: 'tiswin', ingredient: 'Cactus Fruit', effect: 'a Health Boost' },
{ type: 'vodka', ingredient: 'Potatoes', effect: 'Resistance' },
{ type: 'whiskey', ingredient: 'Wheat', effect: 'Absorption' },
{ type: 'wine', ingredient: 'Grapes', effect: 'Regeneration' }
];
const simplefarming_beverages = ['beer', 'cauim', 'cider', 'mead', 'sake', 'tiswin', 'vodka', 'whiskey', 'wine'];

simplefarming_beverages.forEach((beverage) => {
recipes.push({
items: [`simplefarming:${beverage.type}`],
text: [
`Brewed by right-clicking ${beverage.ingredient} into a Brewing Barrel.`,
`Grants the imbiber ${beverage.effect}.`
items: [`simplefarming:${beverage}`],
text: [`${id_prefix}beverages`],
with: [
[
Text.translate(`${id_prefix}beverages.${beverage}.ingredient`),
Text.translate(`${id_prefix}beverages.${beverage}.effect`)
]
]
});
});

recipes.forEach((recipe) => {
for (let i = 0; i < recipe.text.length; i++) {
recipe.text[i] = Text.translate(recipe.text[i]);
if (recipe.with[i]) {
recipe.text[i] = Text.translate(recipe.text[i], recipe.with[i]);
} else {
recipe.text[i] = Text.translate(recipe.text[i]);
}
}
recipe.items.forEach((item) => {
event.add(item, recipe.text);
});
});

disabledItems.forEach((item) => {
event.add(
item,
"This item has been disabled, if you managed to obtain it please report it on Enigmatica 6's issue tracker: https://github.com/EnigmaticaModpacks/Enigmatica6/issues"
);
});

refinedStorageItems.forEach((item) => {
event.add(`refinedstorage:${item}`, 'Can be dyed through crafting or by right clicking it with dye in-world.');
});

generatableCobblestone.forEach((cobblestone) => {
event.add(
cobblestone,
'Can be generated in a Vanilla Cobblestone Generator. The block below where the Cobblestone generates needs to be a Block of Iron.'
);
});

generatableStone.forEach((stone) => {
event.add(
stone,
'Can be generated in a Vanilla Stone Generator. The block below where the Stone generates needs to be a Block of Diamond.'
);
});

var framedDrawers = [
'compact_drawer',
'drawer_controller',
'slave',
'trim',
'full_one',
'full_two',
'full_four',
'half_one',
'half_two',
'half_four'
];

framedDrawers.forEach((drawer) => {
event.add('framedcompactdrawers:framed_' + drawer, [
'Must be painted with any block to be used. To paint, put in any crafting grid with one block directly above and to its left diagonally.',
'You can also put a different block directly on top of the drawer and/or directly to its left to customize it even further!'
]);
});
});
Loading

0 comments on commit 00248ac

Please sign in to comment.