Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
squirreltown
Roku Guru

translation

In the translation XML files, I've noticed that it doesn't matter if the file name is correct or even if the trans-unit id is, but would like to do it correctly - should the trans-unit iD's be consecutive (not repeating) for the entire XML file or can they say start at zero within each <file> tag?
Also - its not required to have an english XML file if the code is in tr(english) Right?
thanks


<file original="Scroll.brs" source-language="en-US" target-language="es-ES" datatype="x-brs">
<body>
<trans-unit id="0">
<source>Detail • </source>
<target>Detalle • </target>
</trans-unit>
<trans-unit id="1">
<source> *arrow keys scroll</source>
<target>*teclas de flecha desplácese</target>
</trans-unit>
</body>
</file>
Kinetics Screensavers
0 Kudos
5 REPLIES 5
squirreltown
Roku Guru

Re: translation

Can someone from Roku please respond to this? You've formatted an XML file and then ignore most of the formatting. I would like to avoid having it stop working if you decide at some later date to be more strict about following your own set-up.
thanks
Kinetics Screensavers
0 Kudos
malloys
Visitor

Re: translation

I'm not speaking on behalf of Roku on this one, but...

I do know the translation file is based on the XLIFF standard.
The Roku firmware isn't 100% strict about the format at present, but IMHO, just in case it becomes more strict in the future, I'd just follow the XLIFF spec as best you can today: http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html. If you're like me, you may prefer the more concise XSD: http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd

Or...

<shameless_plug>
Use the Brightscript eclipse plugin, which automatically handles alot of the translation file formatting and translation activities for you via menu items and user prefs
</shameless_plug>
🙂

Cheers
0 Kudos
squirreltown
Roku Guru

Re: translation

Thanks malloys, I'll have a look at that. Would still appreciate Roku's take on this.
Kinetics Screensavers
0 Kudos
malloys
Visitor

Re: translation

BTW, to answer your specific question about the trans-unit id...
I haven't seen any real-world evidence that the Roku firmware cares about this at present, but...

From the XLIFF spec:
"The required id attribute is used to uniquely identify the <trans-unit> within all <trans-unit> and <bin-unit> elements within the same <file>."

And, the XLIFF XSD specifies the trans-unit id attribute as a string, not an integer.

So...

Within any single <file> tag, any unique string will do, for each trans-unit id value.

Cheers
0 Kudos
squirreltown
Roku Guru

Re: translation

Thanks malloys, from what i see the Roku ignores the <trans-unit-ID> tag and the <file> tag, so any translation is effectively global. I can't believe this is not an oversight on Roku's part. Different translations of the same string on different .brs files might be rare, but the spec is set up to do just that. Not respecting that in the firmware is just a little sloppy. If you have the same translation on different .brs files, the spec says you need to itemize them per .brs file, but the Roku will see duplicates. Hopefully that won't be a problem, it doesnt make any sense to set it up the wrong(Roku) way.

EDIT - it looks like duplicates are not a problem, so you can set up to strictly match your .brs files.
Kinetics Screensavers
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.