How do I hide a string from translation? I can't find a function like SkipTranslation(string text) or something.
Fixed since 2.61 Beta 5:
"Make translation source..." outputs the default names of my hotspots (No hotspot, Hotspot 1, Hotspot 2, etc.).
Couldn't AGS just skip the default names? I'd like to keep the translation file as compact as possible.
Thanks
QuoteCouldn't AGS just skip the default names? I'd like to keep the translation file as compact as possible.
Sounds reasonable enough, I'll add it to my list.
QuoteEdit: Oh yeah, and how do I hide a string from translation? I can't find a function like SkipTranslation(string text) or something.
There's no special feature for this -- just don't translate that string and it will be unchanged.
QuoteSounds reasonable enough, I'll add it to my list.
Thank you!
QuoteThere's no special feature for this -- just don't translate that string and it will be unchanged.
I still don't think it's necessary to output property names and values that are used for the game mechanics and could potentially screw up the game if translated.
I think a function like SkipTranslation shouldn't be too hard to implement?
I'm not really sure where you're thinking the SkipTranslation command would go?
Property names should not be exported (any text in a call to GetXXXProperty should not be in the translation file).
Sorry, of course, the
properties and values themselves are not written, but I need to compare the returned string with a string, and THIS is the string I don't want to appear in the file, e.g.
GetHotspotPropertyText(GetHotspotAt(mouse.x,mouse.y),"IsExit",hotspotisexit);
if (StrCaseComp(hotspotisexit,"NE") == 0)
ChangeCursorGraphic(MODE_WALK,64);
I don't want "IsExit" and "NE" to appear in the translation file.
Edit:
Quoteany text in a call to GetXXXProperty should not be in the translation file
As I said, I removed all hotspot names, and I checked my scripts again, "IsExit" is indeed from the GetHotspotProperty call.
Ah - it only scans backwards 10 characters to check for the "GetxxxProperty", so since you've got a GetHotspotAt call in there it hasn't realised.
What you could do is a bit of a hack, like this:
function NoTranslateProperty(string text) {
return text;
}
then do:
if (StrCaseComp(hotspotisexit, NoTranslateProperty("NE")) == 0)
because the function name ends in "Property", the editor will ignore it for translation purposes.
string NoTranslateProperty(string text) {
return text;
}
Works great, thank you! :)