klikli-dev / modonomicon

Data-driven minecraft in-game documentation with progress visualization.
22 stars 9 forks source link

Added missing lang for condition.mod_loaded #193

Closed DaFuqs closed 3 months ago

DaFuqs commented 3 months ago

Missing translation

The mod_loaded condition is set up to display a tooltip, but that string was missing from the lang file. I added and ran datagen to add it.

Raw mods.mod_id.name?

The tooltip was set up to resolve as Component.translatable(Tooltips.CONDITION_MOD_LOADED, "mods." + modId + ".name");. I am not entirely sure what the "mods." + modId + ".name" part is about. It it a convention in forge to add "mod." + mod_id + ".name" to ones lang file? In that case it should probably have been Component.translatable(Tooltips.CONDITION_MOD_LOADED).append(Component.translatable("mod." + mod_id + ".name")) to display correctly.

But when the mod is not present, there is a 99.9% chance that the "mods." + modId + ".name" translation lookup fails to resolve in the first place, so I opted to just display the mod id instead.

Screenshots

Before: image

After: image

klikli-dev commented 3 months ago

Good point and thanks for the fix!