Coder Social home page Coder Social logo

jason-fox / fox.jason.translate.xliff Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 4.0 1.1 MB

DITA-OT plug-in to create, auto-translate and re-merge XLIFF files, generating translated documentation in a targeted foreign language.

Home Page: https://jason-fox.github.io/dita-ot-plugins/translate.xliff

License: Apache License 2.0

XSLT 70.27% Java 29.73%
dita-ot-plugin dita xliff dita-ot language-translation watson-translator yandex-translate bing-translator deepl

fox.jason.translate.xliff's Issues

'glossrefs' are missing from the translation

After translating a longer document, I realize that:
'glossrefs' are missing from the translation.

I saw the file 'no-translate-elements.xsl' which seems to specify elements which are not translated.
After the translation the <codeph>-tag is missing

<p> inside <ul> <li> are missing: everything is 1 long line

Questions around @translate

Three questions received from @xephon2

Does it take the @translate attribute into account?
Are there any limitation on complex file structures?
What about profiling attributes? I could not find any info about this in the docs.

translate.xlf does not contain contents since DITA-OT 4.1

It looks like the plugin isn't working anymore since DITA-OT 4.1. With DITA-OT 4.0.2 the result looks as expected.
The skl files are created correctly but the translate.xlf file contains nothing more than

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0"
        xmlns:fs="urn:oasis:names:tc:xliff:fs:2.0"
        srcLang="en"
        trgLang="de"
        version="2.0"/>

For now thats all I found out. I'll update on this when I know more about it.

xliff-translate error

I have installed dita-ot3.6.1 and translate.xliff and face following warnings and errors:
xliff-create is running with some warnings which seem to cause errors during xliff-translate.

xliff-create:

[copy] Copying 68 files to C:\Users\Michael\Documents\CE\Documentation\eLABin1 xml (eng)\eLABin1\SCPI\out2\skl
 [copy] Copied 10 empty directories to 2 empty directories under C:\Users\Michael\Documents\CE\Documentation\eLABin1 xml (eng)\eLABin1\SCPI\out2\skl
[xliff-gen] Transforming into C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\xliff
[xliff-gen] Processing C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\md5\SCPI.ditamap.xml to C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\xliff\SCPI.ditamap.xlf.xml
[xliff-gen] Loading stylesheet C:\Users\Michael\Documents\CE\Documentation\dita-ot-3.6.1\plugins\fox.jason.translate.xliff\xsl\2\dita-xliff.xsl
[xliff-gen] C:\Users\Michael\Documents\CE\Documentation\dita-ot-3.6.1\plugins\fox.jason.translate.xliff\xsl\2\dita-xliff.xsl:28:9: Warning! Exception thrown by URIResolver Cause: java.lang.reflect.InvocationTargetException`
later (many times):
`[xliff-gen] Processing C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\md5\topics\c_scpi_basics.dita.xml to C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\xliff\topics\c_scpi_basics.dita.xlf.xml
[xliff-gen] C:\Users\Michael\Documents\CE\Documentation\dita-ot-3.6.1\plugins\fox.jason.translate.xliff\xsl\2\dita-xliff.xsl:28:9: Warning! Document has been marked not available: file:/C:/Users/Michael/Documents/CE/Documentation/dita-ot-3.6.1/plugins/fox.jason.translate.xliff/xsl/2/dita-xliff.xsl/../C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\null464186473.xml
[xliff-gen] Processing C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\md5\topics\c_scpi_prog.dita.xml to C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\xliff\topics\c_scpi_prog.dita.xlf.xml
[xliff-gen] C:\Users\Michael\Documents\CE\Documentation\dita-ot-3.6.1\plugins\fox.jason.translate.xliff\xsl\2\dita-xliff.xsl:28:9: Warning! Document has been marked not available: file:/C:/Users/Michael/Documents/CE/Documentation/dita-ot-3.6.1/plugins/fox.jason.translate.xliff/xsl/2/dita-xliff.xsl/../C:\Users\Michael\AppData\Local\Temp\temp20210427162002286\null464186473.xml

xliff-translate:

Error: The following error occurred while executing this line:
jar:file:/C:/Users/Michael/Documents/CE/Documentation/dita-ot-3.6.1/bin/../plugins/fox.jason.translate.xliff/lib/translate-1.1.jar!/fox/jason/translate/antlib.xml:445: C:\Users\Michael\AppData\Local\Temp\temp20210427163100231\null1168852439.txt doesn't exist

The whole dita-document seems ok, as I don't have any issues creating PDFs.

net.sf.saxon.trans.XPathException error

Hello - when I try to execute the xliff-create transformation, the console prints this error message:
Error: net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/atrujillo/Core/prototype/en/main-product-maps/topics/common-topics/parasoft-settings/dtp-settings/dtp.autoconfig.dita: /Users/atrujillo/Core/prototype/en/main-product-maps/topics/common-topics/parasoft-settings/dtp-settings/topic.dtd (No such file or directory)

I've successfully validated all of the dita and ditamap files in my project and do not understand what might be throwing the error. I am able to execute the other transformations (e.g., html5) with problem.

I am using DITA-OT 3.5.1 and have installed the org.doctales.xmltask plugin per the instructions.

Please let me know if any other information is necessary to help determine if this is a bug.

Thanks,
Adam

Question: will there be a new release soon?

The current release (3.5.0) does not work with the current release of org.doctales.xmltask (1.16.1).
Explicitly the command dita -f xliff-dita %restofarguments% throws an error the following one:

jar:file:/opt/dita/plugins/fox.jason.translate.xliff/lib/translate-1.2.jar!/fox/jason/translate/antlib.xml:574: java.lang.IllegalAccessError: class com.oopsconsultancy.xmltask.jdk15.XPathAnalyser15 (in unnamed module @0x45283ce2) cannot access class com.sun.org.apache.xpath.internal.XPathAPI (in module java.xml) because module java.xml does not export com.sun.org.apache.xpath.internal to unnamed module @0x45283ce2

Edit: I use openjdk-17 since DITA-OT requires version 17 or newer

These are the configurations I tested:
fox.jason.translate.xliff 3.5.0 & org.doctales.xmltask 1.16.1 -> is the current configuration in the DITA-OT registry, does not work due to the stated error
fox.jason.translate.xliff 3.5.0 & org.jung.xmltask master HEAD -> does not work because the name changed from org.doctales.xmltask to org.jung.xmltask, can be fixed easily
fox.jason.translate.xliff master HEAD (with dependency correction in plugin.xml) & org.jung.xmltask master HEAD -> WORKS!

Since org.jung.xmltask is changed frequently at the moment it would be nice to coordinate a release for both of them.
Feel free to reach out to me if my description isn't precise enough :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.