2 Replies Latest reply on Apr 19, 2016 2:26 PM by christian.bauer

    [4.0.0-SNAPSHOT] I18N conflict with logging?

    christian.bauer

      Trying this demo code: https://github.com/errai/errai/tree/e1f27acd0fc18772ea486e9f8bcfeff2d8267f1b/errai-demos/errai-ui-demo-i18n

       

      I've copied the code and used my own gwt.xml:

       

      <module rename-to="MyApp">

       

        <inherits name="org.jboss.errai.ui.UI" />

        <inherits name="org.jboss.errai.enterprise.CDI" />

        <inherits name="org.jboss.errai.ui.nav.Navigation" />

       

        <set-property name="gwt.logging.logLevel" value="FINEST"/>

       

        <!-- TODO This breaks Errai i18n?!
        <set-property name="gwt.logging.enabled" value="TRUE"/>
        -->
       
      </module>

       

      With GWT logging enabled, Errai did not generate any bundles/translations and there was no error messages. I find it hard to believe that this is the cause, but I was only able to narrow the problem down to this element in gwt.xml.

       

      This is another test that fails the same way:

       

      <!DOCTYPE html>

      <html lang="en">

      <head>

        <meta charset="UTF-8">

        <title>Baz</title>

      </head>

      <body>

       

      <div id="baz">

        <span data-i18n-key="foo">foo</span>

      </div>

       

      </body>

      </html>


      @Bundle("bundle.json")

      @Templated("#baz")

      @Page(path = "baz", role = DefaultPage.class)

      public class Baz {

      }

       

      {

        "Baz.foo": "FOOOOOOOOO"
      }

       

      If gwt.logging.enabled is FALSE, this works.

        • 1. Re: [4.0.0-SNAPSHOT] I18N conflict with logging?
          mbarkley

          Hi Christian,

           

          So I tried running the i18n demo with the *.gwt.xml you posted and didn't see any issues. Then I added in the Baz.* files you posted and I was able to observe Baz.foo not being translated. But afterwards I deleted the gwt-codeserver-*.tmp folder in /tmp folder and now I am unable to see the problem again.

           

          I'm still not sure what the problem is exactly, but it seems like it can be fixed by deleting the codeserver's cache files after adding a new @Bundle annotation.

          • 2. Re: [4.0.0-SNAPSHOT] I18N conflict with logging?
            christian.bauer

            Cleaning up all caches solved the problem, but I had to wait for the /var/folders/tmp* directory to disappear after I ended SDM... this is frustrating.