Mekanism

Mekanism

111M Downloads

Custom names for blocks

Adaptivity opened this issue · 5 comments

commented

There many mods which allows translators to modify complex names (In most cases: complex name = X (where X is number of adjectives) adjectives plus one noun).
Example: Tinkers Construct .lang file - adjectives plus nouns. This system is good for English language. You don't need to write Alumite plus All tool names and etc. But for other languages this system just not enough.
In Russian, I can use Alumite adjective for Pickaxe but I can't use same Alumite string for hatchet or for hammer. I need to modify it. It still will the same adjective but with different ending.
Just look at this: "Алюмитовая" used for pickaxe and "Алюмитовый" can be used for both hatchet and for hammer but not for pickaxe. You don't need to read this. Just look at the ends, they are different.
So, basically you should allow us to use full item/block name instead of complex. I call them custom names because they doesn't replace complex names. So, en_US.lang won't be changed. They will only work if they are exist in .lang file, if they doesn't exist complex names will be used instead.
Examples how to do that:

  1. How it was done in AOBD: first commit, second
  2. How it was done in Tcon: first commit, second
    The things that we should be able to modify:
  3. Factory names
  4. All Plastic variations
  5. Glow Panel names
  6. Ballon names
    I call @Vexatos here if you still doesn't understand what I mean. He know how to explain better.
    Tied with #2445, #2406
commented

Also, and in tooltips hardcoded.

commented

Fixed the hardcoded "and." Going to go about what you mentioned now...

commented

Hopefully this is what you were looking for @Adaptivity.

commented

Mhm, I added optional hardcoded names to Forestry once. You could use StatCollector.canTranslate(key) and, if that returns false, default to the normal name. Your best bet is to look at how other mods do this.

commented

Sounds easy enough. Thanks for the explanation (and the suggestion @Vexatos). I'll see what I can do later this week.