6 Replies Latest reply on Jun 15, 2012 2:55 PM by juherr

    Errors with generation of Weld translations

    juherr

      Hi !

       

      I hope I post in the good section.

       

      In order to improve the french translation, I would like to generate Weld translations.

       

      I followed the guideline (with zanata rather than flies) and I had the following message:

      [INFO] 
      [INFO] --- maven-jdocbook-plugin:2.3.3:translate (default) @ weld-reference-guide ---
      terminate called after throwing an instance of 'antlr::TokenStreamRecognitionException'
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 31.068s
      [INFO] Finished at: Sat Jun 09 17:20:32 CEST 2012
      [INFO] Final Memory: 10M/81M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.3.3:translate (default) on project weld-reference-guide: Unexpected problem: unable to execute po2xml : Process exited with an error: 134(Exit value: 134) -> [Help 1]
      [ERROR] 
      

       

      I can reproduce this problem with te command:

      $ po2xml target/draft/en-US/Book_Info.xml target/draft/fr-FR/Book_Info.po 
      terminate called after throwing an instance of 'antlr::TokenStreamRecognitionException'
      Abort trap
      $ 
      

      The problem is identical with other languages, files or either SCM tags.

       

      I think it is po2xml command problem but I had the same problem with lot of different up-to-date OS (Debian, Ubuntu, Fedora 32bits, Fedora 64bits and MacOS).

       

      Is someone could generate the weld translations and explain to me his secret ?

       

      Thanks !

        • 1. Re: Errors with generation of Weld translations
          sflanigan

          I assume you're trying to run the script zanata_draft_build.  I was just able to run it successfully, but I did have to upgrade the version of the Zanata plugin.  I'm just putting in a pull request now.  (I'm also changing Flies to Zanata in the readme.)

          • 2. Re: Errors with generation of Weld translations
            sflanigan
            1 of 1 people found this helpful
            • 3. Re: Errors with generation of Weld translations
              juherr

              I tried your modifications without succes.

               

              The only difference I saw is:

              $ diff ~/Projects/seanf-weld-core/docs/reference/target/draft/fr-FR/Book_Info.po ~/Projects/weld-core/docs/reference/target/draft/fr-FR/Book_Info.po 
              5a6
              > #, fuzzy
              $
              

               

              I attach to the post an example of files which fail with the po2xml command:

              • before_Book_Info.po, which is the result of ./src/main/scripts/zanata_draft_build in the master branch of weld-core ;
              • after_Book_Info.po, which is the result of ./src/main/scripts/zanata_draft_build in your update_zanata_160 branch.

               

              Both produce the same result:

              $ po2xml target/draft/en-US/Author_Group.xml /tmp/before_Book_Info.po 
              terminate called after throwing an instance of 'antlr::TokenStreamRecognitionException'
              Abandon (core dumped)
              $ po2xml target/draft/en-US/Author_Group.xml /tmp/after_Book_Info.po 
              terminate called after throwing an instance of 'antlr::TokenStreamRecognitionException'
              Abandon (core dumped)
              $
              

               

              Could you attach the french pdf resulting of your successful production in your next message ? It will permit me to continue the translation during investigations.

              • 4. Re: Errors with generation of Weld translations
                sflanigan

                Sorry, I didn't let zanata_draft_build finish before, so I didn't see the same problem you're getting.

                 

                Looks like the .po files are being exported with spurious

                     msgctxt ""

                lines.  I'll have to look into it.

                • 5. Re: Errors with generation of Weld translations
                  sflanigan

                  Hi Julien

                   

                  It looks like the original .pot files were imported with the spurious msgctxt "" lines, probably due to an old bug in Flies (before it was named Zanata). 

                   

                  I've exported all the files, removed all the blank msgctxt lines, and pushed them back to translate.jboss.org.

                   

                  However, I still can't build the French pdf because of some problems with the text.  I fixed an unclosed <emphasis> tag, but there seem to be problems with things like <???> in the document 'eee' and in 'resources'.  Might be an encoding issue, or someone might be using them as placeholders.  If it's placeholders, I recommend using the Save as Fuzzy feature (looks like a red flag) rather than the usual Save as Approved, so that they don't accidentally get built into the documentation.  In any case, DocBook doesn't like them, because the angle brackets make them look like bad XML tags.

                   

                  Sean.

                   

                  EDIT: Turns out there was only one <???> string which was marked as Approved, so I've marked it as Fuzzy, and then I was able to build all the translations.  I have attached the fr-FR pdf.

                  • 6. Re: Errors with generation of Weld translations
                    juherr

                    It's works now and I'm able to produce all pdf.

                     

                    Thanks Sean !