Shadows-of-Fire / Apotheosis

All things that should have been.
Other
151 stars 119 forks source link

[Feature Request] [Localization] Add `%s` to affix localizations to allow more reasonable affixed item names for some languages #1222

Open RaymondBlaze opened 3 months ago

RaymondBlaze commented 3 months ago

Currently, prefix and suffix are in the form of adj. and of noun. and added to the beginning/end of the item name.

This is reasonable for most language like English, however, languages like Chinese don't actually have a proper equivalent for suffix of noun.. More specifically, the common grammar for Chinese to express the meaning of suffix of noun. is usually something equivalent to prefix noun.'s. Additionally, Chinese doesn't use blank spaces to separate words.

In this case, the current implementation results in affixed item names looking bizarre in Chinese. I believe passing in the original or partial affixed item name as %s(eg. Aquatic -> Aquatic %s, of the Ocean -> %s of the Ocean) would allow localizations to have the freedom to format the name in their own grammar, thus making a better experience for players.

I am willing to make a PR for this feature if needed.

Shadows-of-Fire commented 1 month ago

The way that the actual affix name works is not compatible with such a structure, because of the component heirarchy. I have to maintain the original item name, which means the prefix/suffix components are not aware of eachother atm. It may be possible to change this for future versions, but it would brick all existing name formatting to do so in the middle of a MC version.

As of now, the concatenation rules are controlled by the following language keys, which are editable:

    "misc.apotheosis.affix_name.two": "%s %s",
    "misc.apotheosis.affix_name.three": "%s %s %s",
    "misc.apotheosis.affix_name.four": "%s %s %s %s",

.two is used for <prefix> <base name> .three is used for <prefix> <base name> <suffix> .four is used for <boss name> <prefix> <base name> <suffix>

Shadows-of-Fire commented 2 weeks ago

cc @mc-kaishixiaxue if you have any ideas on how to improve the structure going forward