WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.63k stars 1.02k forks source link

IDML Translation & InDesign XML Tags #4468

Closed draganstudios closed 4 years ago

draganstudios commented 4 years ago

Hi there,

We are doing some testing with Weblate 4.2.1 and using the Adobe InDesign Markup Language (IDML) files. We understand IDML support was recently added and it's still in beta.

While we are still learning and discovering Weblate, we were able to successfully import the IDML file, translate it, and download the translated version. Works great!

My question is about the InDesign XML tags that are visible in the textarea for translators. Is this the expected behavior?

<x id="22" xid="idPkg:Story[0]/{}Story[0]/{}ParagraphStyleRange[1]/{}CharacterStyleRange[4]/{}Br[0]"/><x id="23" xid="idPkg:Story[0]/{}Story[0]/{}ParagraphStyleRange[1]/{}CharacterStyleRange[4]/{}Br[1]"/></g>

(Ignore the encoding issues, we are looking into that, assuming that's on us to configure properly.) idml-translation

Is there a way to manage these InDesign XML tags? We understand that some tags are needed, e.g. a tag to indicate bold or italic in the middle of a string, but we are concerned that the translator might accidentally delete a tag and break it.

idml-xml-error

Unfortunately I was not able to find much documentation about IDML support, or how to properly configure them, so this could be totally on our side. If you can point me to the right direction, that would be much appreciated.

If there is a way to improve it, we are open to help and contribute back to the project.

Thank you for your help, D.

github-actions[bot] commented 4 years ago

This issue looks like a support question. We try to answer these reasonably fast, but in case you are looking for faster resolution, please consider purchasing support subscription and make Weblate stronger.

nijel commented 4 years ago

I think the code just takes the inner XML and presents it to the translator. However, I have no knowledge of IDML format either... The code for it is in https://github.com/translate/translate/blob/master/translate/storage/idml.py and https://github.com/translate/translate/blob/master/translate/storage/xml_extract/extract.py.

Weblate XML markup check should be able to catch this and report properly to the translator. You can configure it as enforcing check to mark such strings as needing review, but that still won't prevent Weblate from saving it. This might be addressed by https://github.com/WeblateOrg/weblate/issues/3745, but it's currently not on our roadmap.

draganstudios commented 4 years ago

Hi @nijel ,

Thank you for your reply! We'll take a look at the code and see what we can do.

We are still looking into the encoding issue with IDML files. We have tried JSON files with no issues, the files are encoded perfectly, but with IDML we're still experiencing issues. We'll keep looking...

Thanks again and have a great day, D.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.