Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zer0Kerbal opened this issue Mar 6, 2020 · 2 comments
Open

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

zer0Kerbal opened this issue Mar 6, 2020 · 2 comments

Comments

@zer0Kerbal
Copy link

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
👍 🚧

@7ranceaddic7
Copy link

@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 :

@tinygrox
Copy link

tinygrox commented May 4, 2023

@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 :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants