Hi Ramon, First of all sorry for the late reply, I've been in holidays for the past two weeks.
On 08/18/2010 09:05 PM, Ramon Gomes Brandão - SERINT wrote: > Hi Marius, > > I’m a long-time enthusiast of XWiki and I think it’s the best wiki tool I'm happy to hear that! > ever. However, I feel some lack of updated documentation on how to > build it. I’m implementing a large instance of XWiki Enterprise 2.4 in > my work here in Brazil, and I’m facing an issue: detailed instructions > on how to build the new WYSIWYG editor. I’ve translated the > Strings.properties file in Portuguese, and I’m trying to use Eclipse > with m2eclipse to build it, but I definitively don’t know how to > proceed. I saw your messages on xwiki-users archives about this build. > Could you help me sending detailed steps on how to do this? Here are my > questions: > > 1) I’ve installed Eclipse+m2eclipse+subclipse and checked out the > platform/web/trunk folder. It contains the following sub-folders (modules): > > -gwt > > -standard > > -xwiki-gwt-dom > > -xwiki-gwt-user > > -xwiki-gwt-wysiwyg-client > > -xwiki-gwt-wysiwyg-server > > Do I need all the modules to proceed? The WYSIWYG editor code is split between xwiki-gwt-wysiwyg-client and xwiki-gwt-wysiwyg-server. The server side depends on the XWiki core, while the client side depends on xwiki-gwt-user and xwiki-gwt-dom. You can ignore the other two modules (gwt and standard). You can ignore xwiki-gwt-dom too if you don't plan to change/enhance the DOM API. > Where should I place > Strings_pt.properties ? Do I need to modify “extended-property …” both > on xwiki-gwt-user and > xwiki-gwt-wysiwyg-client/resources/…/Wysiwyg.gwt.xml or only in this > last one? There are three translation files as indicated on http://l10n.xwiki.org/xwiki/bin/view/Wysiwyg/ . One is included in xwiki-gwt-user and the other two are in xwiki-gwt-wysiwyg-client: http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-user/src/main/resources/org/xwiki/gwt/user/client/Strings.properties http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/client/Messages.properties http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/client/Strings.properties Best is to translate all these files. You should place the translated file (e.g. Strings_pt.properties) in the same directory as the corresponding source file (e.g. Strings.properties). Then you have to modify both: http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-user/src/main/resources/org/xwiki/gwt/user/User.gwt.xml and http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/resources/org/xwiki/gwt/wysiwyg/Wysiwyg.gwt.xml in order to update the locale property: <extend-property name="locale" values="...,pt"/> > > 2) Which modules do I need to build (with right click - > Run as -> > Maven build or Maven install)? In which order? I don't build from eclipse although I have m2eclpse installed. I prefer the console. The right build order is: xwiki-gwt-user > xwiki-gwt-wysiwyg-client > xwiki-gwt-wysiwyg-server xwiki-gwt-user and xwiki-gwt-wysiwyg-client generate jars that are used by xwiki-gwt-wysiwyg-server which generates a war. Note that building xwiki-gwt-wysiwyg-server takes a long time because GWT compilation is costly. > > 3) Does this build generates a war automatically? Where does it > generates the war (where I can find it)? The war generated by xwiki-gwt-wysiwyg-server is placed in the target directory (e.g. target/xwiki-web-gwt-wysiwyg-server-2.5-SNAPSHOT.war). I know this happens when you build from command line. Might be different when you build from eclipse, but you should be able to find the war anyway. In the worst case, if you run "mvn install" the war will be installed in your local repository: ~/.m2/repository/com/xpn/xwiki/platform/xwiki-web-gwt-wysiwyg-server/2.5-SNAPSHOT/xwiki-web-gwt-wysiwyg-server-2.5-SNAPSHOT.war > > 4) How to load the new build into my running XWiki Enterprise 2.4 > instance? You have to replace (don't merge!) webapps/xwiki/resources/js/xwiki/wysiwyg/xwe directory from your XWiki installation with the one from the previously generated war. If you change code on the WYSIWYG sever side then you have to update the jars from WEB-INF/lib (copy those from the generated war) but that's not your case from what I can see. Don't forget to clear the browser cache. > How to force always the WYSIWYG editor to be shown in Portuguese? > You can either configure the Portuguese language as the default language in XWiki (the clean way) or, the hard way, you can build the WYSIWYG editor only for Portuguese language by replacing: <extend-property name="locale" values="...,pt"/> with <set-property name="locale" value="pt" /> in the descriptors of the xwiki-gwt-user and xwiki-gwt-wysiwyg-client GWT modules. > Hope you can help me. Note that the best way to contribute a translation is to add it to l10n.xwiki.org . This way all the previous steps are done by us. The downside is that you have to wait for the next release to see the Portuguese translation in action. Hope this mail doesn't come too late, Marius > > Regards, > > *Ramon Gomes Brandão* > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

