PDA

View Full Version : How to translate skills label but using them in english ?



PolluxTroy
May 21st, 2017, 21:31
Hi,

I have scripted a lot of skills and spells with english names (like acrobatics, climb, etc...).
I'm a french player and i would like to have skills displayed in french in the character sheet.
But, everywhere in the ruleset, if i translate them, they appears in french but scripts with english skills don't work anymore.
Is there a kind of "label" i can give to skills but keepinh them in english for script ?

Thanks for your help,
Regards.

Trenloe
May 22nd, 2017, 00:17
I have scripted a lot of skills and spells with english names (like acrobatics, climb, etc...).
Where did you make the change?


But, everywhere in the ruleset, if i translate them, they appears in french but scripts with english skills don't work anymore.
Which scripts aren't working?

PolluxTroy
May 22nd, 2017, 00:21
I've tried to make the change in every files containing for example "Climb", trying each file one by one.
The only one for it to work is in the ruleset : Scripts\data_common.lua
The skill is translated correctly in the character sheet. But, for spell's script, if i use SKILL: +5 climb, it doesn't work anymore. But if i use the translated skill like SKILL: +5 escalade, it work.
The problem is i've scripted a tons of spells, and i don't wan't to do this work a second time.

Trenloe
May 22nd, 2017, 00:26
The correct place to change the skill names is in scripts\data_common.lua

If you have used effects that have a specific skill name, then the skill has to have that name - the effects can only match against the skill name that are in data_common.lua. If you've built a lot of effects that use the English skill name then you'll have to translate all of those, sorry. Or just stick to the English skill names! ;-)

PolluxTroy
May 22nd, 2017, 00:33
Ok, thanks for your answers, i'll try to translate spells scripts in batch mode with a text editor well ;)

Another things i'm thinking to try, is to create a new column in the skills list, with the translated skills name, just for reading them translated, do you know if it's possible to do that ?

Trenloe
May 22nd, 2017, 00:58
Another things i'm thinking to try, is to create a new column in the skills list, with the translated skills name, just for reading them translated, do you know if it's possible to do that ?
I think this would create a lot more issues than fix them. I wouldn't recommend doing this. For example: if you want it to work with your effects with untranslated skill names then you'll be seeing untranslated skill rolls in the chat window. Which really defeats you doing any translations as all you'd have is the translated skill name in the character sheet, everywhere else in FG you'd be seeing the base English name.

You're best translating your SKILL effects to use your translated skill names.

drvolk
May 22nd, 2017, 06:43
Did you allready take a look into the translation Project from duluz-oz?

https://www.fantasygrounds.com/forums/showthread.php?27202-LanguagePak-(LPak)-Community-Project-Program

There is also a french "LPak" for pathfinder available there.

Currently a transated "skillist" within a LPak is not supported for the Pathfinder ruleset because this list is build dynamicly from the global lua hash keywords "DataCommon.skilldata" defined in "data_common.lua" and these "keywords" were not implemented as translateable text resources.

For the my LPak of PFRPG i changed that by "reinitializing" the DataCommon.skilldata with translateable keywords like that:

function onInit()

DataCommon.skilldata = {
[Interface.getString("skilldata_label_appraise")] = {
stat = "intelligence"
},
...


Once the ruleset have to evaluate a skill check it will take a lookup to "DataCommon.skilldata[<given skillname to check>]" to get the ability modifier.
To get the value of the character for that skill it will search the corresponding "labelname" of the "<given skillname to check>" in the charsheet skillist (which has the value of the corresponding keyword in the DataCommon.skilldata ).

So, as Trenloe recommended, you have to decide: keep the english skill names or translate them everwhere :)

Trenloe
May 22nd, 2017, 14:27
You'll need to translate everywhere if you change the code to use string resources. If you hard code the names for a specific language in data_common.lua then the ruleset will replace those names. The issue we're discussing in this thread is that PolluxTroy has a lot of effects that have been built with the English skill names, and these don't match French skill names. So PolluxTroy has to change all of the effects they have built already to match the French skill names.

PolluxTroy
May 22nd, 2017, 19:56
Ok, thank you, i'll try to translate all the work i've already done ;)