[gwt-contrib] Comment on UiBinderI18n in google-web-toolkit
Comment by benzheren: I am following example on wiki: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n to try out UiBinderi18n in the latest 2.0 MS 1 release. I wrote a sample ui.xml file like this: {{{ ?xml version=1.0 encoding=UTF-8? ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' ui:defaultLocale=en_us ui:generateKeys=com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator ui:generateFormat=com.google.gwt.i18n.rebind.format.PropertiesFormat ui:generateFilename=myapp_translate_source ui:generateLocales=default g:HTMLPanel table align=center tbody tr td style=font-weight: bold; colspan=2 ui:msg key=enterYourNamePlease enter your name:/ui:msg /td /tr tr td id=nameFieldContainer g:TextBox ui:field=nameField / /td td id=sendButtonContainer g:Button ui:field=sendButton text=Send / /td /tr /tbody /table /g:HTMLPanel /ui:UiBinder }}} But it does not generate any file, shall I do something extra to make it work? Thanks! For more information: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UiBinderI18n in google-web-toolkit
Comment by rj...@google.com: @sami.jaber Stuff like setToken is handled by BeanParser For more information: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UiBinderI18n in google-web-toolkit
Comment by sami.jaber: Ok, after digging more in the source code, its not a problem of i18n. This is just that ui:Hyperlink tag parser has not yet been implemented (in r6342). I have replaced the ui:Hyperlink by a ui:Button, it works fine. The impl contains the span tag and the addAndReplaceElement() statement. btw, instead of rendering the raw tag in the HTML page, it could be nice to raise an error when we use a gwt prefix with a non existing parser For more information: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UiBinderI18n in google-web-toolkit
Comment by t.broyer: @sami.jaber: it should be a gwt:Hyperlink (same namespace as HTMLPanel), not a ui:Hyperlink (same namespace as UiBinder, msg and ph=); there's no specific parser for Hyperlink because the parser for HasHTML is enough. For more information: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UiBinderI18n in google-web-toolkit
Comment by sami.jaber: Yes, that what I thought initially but as the attribute setToken() doesn't exist neither in the Hyperlink user.ui class, I suspected that another class/parser would exists elsewhere. Anyway, that works better now after changing the prefix, the attribute and the casing (it is not Hyper*L*ink but Hyper*l*ink) :-) Thanks Thomas. {{{ gwt:HTMLPanel ui:msg Damned Who wrote up this gwt:Hyperlink targetHistoryToken=/doThe#thingdoc/gwt:Hyperlink ? ;-) /ui:msg /gwt:HTMLPanel }}} For more information: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---
[gwt-contrib] Comment on UiBinderI18n in google-web-toolkit
Comment by sami.jaber: I have tested a scenario similar to what explained here _Message containing widgets with text bodies (HasText or HasHtml inside HTMLPanel)_ My ui.xml {{{ gwt:HTMLPanel ui:msg Hello ui:HyperLink token=/detail#burg ui:ph=myPhMister/ui:HyperLink , How are you ? /ui:msg /gwt:HTMLPanel }}} It doesn't generate what it is stated in this wiki but instead something like that : {{{ com.google.gwt.user.client.ui.HTMLPanel f_HTMLPanel1 = new com.google.gwt.user.client.ui.HTMLPanel( + messages.message1(ui:HyperLink token='/detail#burg',/ui:HyperLink) + ); }}} the msg Impl : {{{ public interface i18nScreenMyUiBinderImplGenMessages extends Messages { @DefaultMessage(Hello {0}Mister {1} , How are you ?) String message1( @Example(ui:HyperLink token='/detail#ancre') String myPhBegin, @Example(/ui:HyperLink) String myPhEnd ); } }}} ui:Hyperlink tag is generated in the HTML, which is not very useful. Maybe this parsing has not yet been implemented ? (I don't see any test case in UiBinder sample about that scenario) With r6342 For more information: http://code.google.com/p/google-web-toolkit/wiki/UiBinderI18n --~--~-~--~~~---~--~~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~--~~~~--~~--~--~---