Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Character Sheet Guide - Translations

1700510160
GiGs
Pro
Sheet Author
API Scripter
I'm about to start work on the next step of the character sheet guide (seen here: <a href="https://cybersphere.me/roll20-sheet-author-master-list/" rel="nofollow">https://cybersphere.me/roll20-sheet-author-master-list/</a> ). My most recent guide chaper was on Custom Roll Parsing , and I've had a few people thank me on how much clearer it made that feature. Now it's Translations turn. The page on the wiki is complete, but not that easy to follow. <a href="https://wiki.roll20.net/Character_Sheet_Translation" rel="nofollow">https://wiki.roll20.net/Character_Sheet_Translation</a> What do you think I should cover? What aspects of Translations need to&nbsp; be explained for common use?
1700550885

Edited 1700551033
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Somewhere I wrote up an in depth explanation about how data-i18n-vars work. I'll see if I can find that in my list of forum replies. EDIT: Ah, actually, I planned ahead for once and the write up is actually what's in the wiki .
1700578484
GiGs
Pro
Sheet Author
API Scripter
Hehe, great, I'll look over it.
1700578786
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The only other thing I'd recommend for translations is that casing should not be done in the translation file. This puts styling in the hands of the translators who may or may not case the translation the way you wanted. Casing should instead be done via css with t xt-transform.
1700579935

Edited 1700579991
GiGs
Pro
Sheet Author
API Scripter
Interesting. And yes, relying on other people to interepret the text the way you want them to is iffy. I haven't done translations before, so any suggestions from people who have are welcomed.
1700580343
vÍnce
Pro
Sheet Author
Scott C. said: The only other thing I'd recommend for translations is that casing should not be done in the translation file. This puts styling in the hands of the translators who may or may not case the translation the way you wanted. Casing should instead be done via css with t xt-transform. Are you saying all values should be lower or upper case?&nbsp; I just assumed that a translator should "emulate" whatever I entered as the key's value, since I decided how I wanted the text presented.&nbsp; How should you capitalize, italicize, bold,&nbsp; certain words in the middle of a long translation?&nbsp; I've seen translations with simple formatting code inside the value as well...&nbsp; but I'm guessing that shouldn't be done?
1700580815
vÍnce
Pro
Sheet Author
I haven't checked in a while, but I believe that Changing Language-Specific Looks based on language is still broken.
1700582518
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
vÍnce said: Scott C. said: The only other thing I'd recommend for translations is that casing should not be done in the translation file. This puts styling in the hands of the translators who may or may not case the translation the way you wanted. Casing should instead be done via css with t xt-transform. Are you saying all values should be lower or upper case?&nbsp; I just assumed that a translator should "emulate" whatever I entered as the key's value, since I decided how I wanted the text presented.&nbsp; How should you capitalize, italicize, bold,&nbsp; certain words in the middle of a long translation?&nbsp; I've seen translations with simple formatting code inside the value as well...&nbsp; but I'm guessing that shouldn't be done? I do all lowercase because then I just have to apply the capitalization for my headers or what not. But I also tend to do everything in lowercase on a sheet. GiGs said: I haven't done translations before, so any suggestions from people who have are welcomed. The untranslated text as content of the element is optional in my opinion. I'm not even sure when it would actually show up. I also try to use the English word or phrase as the translation key. This should hopefully make it easier to translate. Exceptions are things like abbreviations that may not make sense out of context, in which case I use a descriptive key: { &nbsp; "strength abbreviation":"str" } The other big exception is if I'm going to use the variable replacement. In that case I include a description of what the untranslated indices are in the key: { &nbsp; "{{List number}} unharmed": "{{0}} unharmed" } And the final gotcha applies only to projects whose native language isn't English. The translation.json file that you upload to the repo is used as the English translation file. If your project's native language isn't English, you'll need to upload an English version as the translation.json and ask for permission to upload the native language as the appropriate jspn file in the translations directory (I'm hoping roll20 improves this work flow in the near future).
1700582955

Edited 1700583008
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Oh, and it's probably obvious but translations should be all or nothing (at least if you're starting a new project). Don't translate just a few elements on the sheet. Additionally, it is infinitely easier to just put translations in at the start of coding than it is to add them in later. I HIGHLY recommend just doing your translation keys as you add elements and updating your translation.jspn file as you go. The K-scaffold will actually automate the translation.json creation for you based on the data-i18ns you add to elements.
1700586836
GiGs
Pro
Sheet Author
API Scripter
Scott C. said: Oh, and it's probably obvious but translations should be all or nothing (at least if you're starting a new project). Don't translate just a few elements on the sheet. Oh yeah, thats a great point.
1700587428

Edited 1700587537
vÍnce
Pro
Sheet Author
GiGs said: Scott C. said: Oh, and it's probably obvious but translations should be all or nothing (at least if you're starting a new project). Don't translate just a few elements on the sheet. Oh yeah, thats a great point. I mean, who doesn't like a little red text? ;-P
1700590900
GiGs
Pro
Sheet Author
API Scripter
so pretty :)