sarbian/ModuleManager

Feature request: @descripion ^= : $:#localization_xys :

zer0Kerbal opened this issue · 2 comments

Feature request:

I haven't been able to get this to work so I am asking it to be added as a feature.

#Localization support

work with the KSP localization system to allow #tags to be

@descripion ^= : $:#localization_xys :

currently if a #localization tag is patched in - MM doesn't expand the tag (unless I am just doing it incorrectly).

I have several mods that could immediately benefit from this, including Dockingport Descriptions.

Thank you in advance!
#118
👍 🚧

@descripion ^= : $:#localization_xys :

Did you get this to work? I think your problem is that you have a space before the end-of-line ($). This is telling the replace to search for a line that has extra white-space at the end of the description. Therefore, unless the author has gone against convention and purposefully inserted a space after the final period, you'll never get a match. The added spacing needs to be a part of the replacement string, not the search string.

Remove the space between the first colon (:) and the EoL ($). Then, insert a space before the localization string.

Use this:

@descripion ^= :$: #localization_xys :

@zer0Kerbal
actually you can write a MM patch just like this:
MM patch:

@descripion ^= #localization_xys

and in the localization file:

#localization_xys = :$: EN_SOME_LOC_TEXTS :  // Just keep everything

other languages:

#localization_xys = :$: Translated_TEXTS :