7 Replies Latest reply on Jan 18, 2012 12:52 AM by williamfitz

    i18n improvements

      1) Home class default messages


      it would be nice, if the default messages (deletedMessage, createdMessage, ..) in the Home class could be set via resource bundle keys


      current-situation:



      • if the message with key ENTITY_update exists: use it

      • else: use the english hardcoded text (e.g. "Successfully updated")



      improved situation:



      • if the message with key ENTITY_update exists: use it

      • if message with key org.jboss.seam.EntityUpdated (or whatever) exists, use this

      • else: use the english hardcoded text (e.g. "Successfully updated")



      2) message interpolation


      Please forgive and correct me, if smth. like this already exists, but I suppose it's like that:
      when I want to use parameterized messages directly in a page, I have to call the interpolator and provide the proper message: e.g.


      #{interpolator.interpolate(messages['myKey'], seamComponent.getParam)}
      



      where myKey is e.g. some {0} text


      note: I do NOT want to use embedded EL:


      "some #{seamComponent.getParam} text"



      so, e.g. a convenience function like that would be great:


      #{interpolator.interpolateFromRessourceBundle('myKey', seamComponent.getParam)}



      does anyone else need this?

        • 1. Re: i18n improvements
          jlstyle.jlstyle.gmail.com

          Regarding 2) message interpolation:


          You can use the outputFormat tag to do this




          <h:outputFormat value="#{messages['myKey']}">
              <f:param value="#{seamComponent.param}"/>
          </h:outputFormat>


          • 2. Re: i18n improvements

            tx, james


            yeah, I forgot about that - thats the clean way.

            • 3. Re: i18n improvements
              pmuir

              Martin Trummer wrote on Mar 10, 2008 04:58 PM:


              1) Home class default messages

              it would be nice, if the default messages (deletedMessage, createdMessage, ..) in the Home class could be set via resource bundle keys

              current-situation:


              • if the message with key ENTITY_update exists: use it

              • else: use the english hardcoded text (e.g. "Successfully updated")



              improved situation:


              • if the message with key ENTITY_update exists: use it

              • if message with key org.jboss.seam.EntityUpdated (or whatever) exists, use this

              • else: use the english hardcoded text (e.g. "Successfully updated")





              Sounds reasonable. Put a patch into JIRA.

              • 4. Re: i18n improvements

                created jira:
                JBSEAM-2724


                I'll try to create a patch when I have some spare time.

                • 5. Re: i18n improvements

                  sorry, I couldn't make a real patch


                  I managed to checkout the seam source, but


                  ant build eclipseclasspath


                  stopped with an error


                       [java] [INFO] Velocity successfully started.
                       [java] [INFO] [cdk:generate {execution: default}]
                       [java] [INFO]  Parse config file C:\Dokumente und Einstellungen\martin.24AC
                  T\Eigene Dateien\Work\WebDev\rhds\main_workspace\jboss-seam\ui\src\main\config\c
                  omponent\button.xml
                       [java] [ERROR] Error on generate component
                       [java] org.ajax4jsf.builder.config.ParsingException: I/O error on parsing c
                  onfig file
                       [java]     at org.ajax4jsf.builder.config.BuilderConfig.parseConfig(Builder
                  Config.java:387)
                       [java]     at org.ajax4jsf.builder.mojo.GenerateMojo.createConfig(GenerateM
                  ojo.java:253)



                  so I just attached parts of the source I would use to the jira


                  hope this helps

                  • 6. Re: i18n improvements
                    pmuir

                    I believe this should work if you place Seam in a directory with no spaces in the path.

                    • 7. Re: i18n improvements
                      williamfitz

                      Just look at the improvement in the quality of life and the wealth of normal working people since the start of the industrial revolution and you will see the contribution that technical progress has made to all of our lives.
                      Free Essays