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 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>

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

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>
:slightly_smiling_face:

Cheers

Thanks malloys, I’ll have a look at that. Would still appreciate Roku’s take on this.

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 within all and elements within the same .”

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

So…

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

Cheers

Thanks malloys, from what i see the Roku ignores the tag and the 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.