-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use defName
not label
for grammar rules for multilang support
#32
Comments
Please note that I'm not the one in your Discord so it would be better if you may answer here directly. I asked them to relay my words but I'll write here as well for history keeping anyway.
I suspect such "many things" are something like a trait and a skill sharing the same defName? But you can still specify the def family. As I said, unique ID for any given Def family, not the whole Def class.
Other than this I can't see why it can't be differentiated. |
I do hope that you are aware of Close this if you'd like. |
Hi @alattalatta ! Please consider this:
Here you can see there is one thoughtDefName==SleptInBedroom. About |
One can argue that rules (in context of scripting that is
ruleStrings
in RimWorld) should be a thing of invariance. And as you may know it, labels do change, especially when the user is changing language of the game.SpeakUp/SpeakUp/ExtraGrammarUtility.cs
Line 99 in bb8d7ed
SpeakUp/SpeakUp/ExtraGrammarUtility.cs
Lines 114 to 115 in bb8d7ed
SpeakUp/SpeakUp/ExtraGrammarUtility.cs
Line 156 in bb8d7ed
These rules all change when you change your language. Of course, translations should also include the rule in its whole form so one should be able to do this: (Note: Actually I can't, described below)
But in Korean (and supposedly almost all other languages), this does not work.
See, this is
Verse.Grammar.Rule_String.pattern
:It indeed is weird, but nothing is relevant except this:
(?<paramname>[a-zA-Z0-9_/]+)
Parameters MUSE use ASCII alphabets. This makes it impossible to translate SpeakUp even to other latin alphabet languages with extra characters.
Note that the parameter is obviously not just
INITIATOR_
. The regexp just couldn't recognize the rest.Fortunately we have unique ID for any given Def family: The
defName
. All four lines I linked at the beginning can simply usedefName
instead oflabel
orLabel
and all will be solved.Please do consider changing it. Thanks.
The text was updated successfully, but these errors were encountered: