Patchouli

Patchouli

168M Downloads

Translation Macro (Text Format Code)

VT-14 opened this issue ยท 0 comments

commented

Describe the feature

Please allow local text localization using a Macro, without relying on the full book.json's i18n option.

Ideally this would be able to handle additional inputs as well, such as %d and %s.

Additional context

An example use-case would be to further document an error message, and not having to duplicate and later maintain two copies of the message.

For example, in en_us.json:

"modid.error.moar_pylons": "You must construct %d additional Pylons!"

in an entry:

"text": "If you see \"$(i18n)\"modid.error.moar_pylons\", 3 $(/i18n)\" then it means you must craft and place 3 more $(l:modid:pylons)Pylons$(/l).  Remember that these Pylons must be...

Would create a page that says

If you see "You must construct 3 additional Pylons!" then it means you must craft and place 3 more Pylons. Remember that these Pylons must be...