[xwiki-users] MultiLanguage on class-object model
Hi, I'm trying some basic functionality on a multilanguage Wiki (3.1) I create a class I create the default Class sheet and add a object on it (like suggested in the default) I create the default Class template and add a object on it (like suggested in the default) Then I create a object; It creates a page containing the object, I use the inline form editor to enter some data and save. Now I want to create a translation in another language? How should I do that? The inline form editor does not have a translate option, when I create a translation with the wiki editor i'm probably create a new wiki document with a different language, but it seems to point to the SAME object. when I change the content of the object in the other language, these changes also show when I navigate back to the english page It looks like I should instantiate a new object of the class, but then the page language is still 'en' And how do we manage then that these objects still relate to each other? If I change the english version of a record this should be related to the content of the translations! Gerritjan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] MultiLanguage on class-object model
On Wed, Sep 28, 2011 at 9:29 AM, Gerritjan Koekkoek gerritjankoekk...@gmail.com wrote: Hi, I'm trying some basic functionality on a multilanguage Wiki (3.1) I create a class I create the default Class sheet and add a object on it (like suggested in the default) I create the default Class template and add a object on it (like suggested in the default) Then I create a object; It creates a page containing the object, I use the inline form editor to enter some data and save. Now I want to create a translation in another language? How should I do that? Translation is not supported for objects unfortunately. See http://jira.xwiki.org/browse/XWIKI-69. The inline form editor does not have a translate option, when I create a translation with the wiki editor i'm probably create a new wiki document with a different language, but it seems to point to the SAME object. when I change the content of the object in the other language, these changes also show when I navigate back to the english page It looks like I should instantiate a new object of the class, but then the page language is still 'en' And how do we manage then that these objects still relate to each other? If I change the english version of a record this should be related to the content of the translations! Gerritjan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] MultiLanguage on class-object model
On Sep 28, 2011, at 9:45 AM, Thomas Mortagne wrote: On Wed, Sep 28, 2011 at 9:29 AM, Gerritjan Koekkoek gerritjankoekk...@gmail.com wrote: Hi, I'm trying some basic functionality on a multilanguage Wiki (3.1) I create a class I create the default Class sheet and add a object on it (like suggested in the default) I create the default Class template and add a object on it (like suggested in the default) Then I create a object; It creates a page containing the object, I use the inline form editor to enter some data and save. Now I want to create a translation in another language? How should I do that? Translation is not supported for objects unfortunately. See http://jira.xwiki.org/browse/XWIKI-69. See also documentation at http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications And especially: http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications#HI18nofXWikiObjects Thanks -Vincent The inline form editor does not have a translate option, when I create a translation with the wiki editor i'm probably create a new wiki document with a different language, but it seems to point to the SAME object. when I change the content of the object in the other language, these changes also show when I navigate back to the english page It looks like I should instantiate a new object of the class, but then the page language is still 'en' And how do we manage then that these objects still relate to each other? If I change the english version of a record this should be related to the content of the translations! Gerritjan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] MultiLanguage on class-object model
As I understand, to internationalize I can use workaround as described on page advised by Vincent; Op 28 sep. 2011, om 09:51 heeft Vincent Massol het volgende geschreven: On Sep 28, 2011, at 9:45 AM, Thomas Mortagne wrote: On Wed, Sep 28, 2011 at 9:29 AM, Gerritjan Koekkoek gerritjankoekk...@gmail.com wrote: Hi, I'm trying some basic functionality on a multilanguage Wiki (3.1) I create a class I create the default Class sheet and add a object on it (like suggested in the default) I create the default Class template and add a object on it (like suggested in the default) Then I create a object; It creates a page containing the object, I use the inline form editor to enter some data and save. Now I want to create a translation in another language? How should I do that? Translation is not supported for objects unfortunately. See http://jira.xwiki.org/browse/XWIKI-69. See also documentation at http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications And especially: http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications#HI18nofXWikiObjects I have one page and for each language I add a object (having a language code field in attribute) (mutiple objects on ONE page(?)) In the sheet I have display code that selects the object based on context (language code) in browser What should I do to also get 'natural' results in livetable and lucene search So when context is language 'nl' both only will look at objects with language attibute set to 'nl' Thanks -Vincent The inline form editor does not have a translate option, when I create a translation with the wiki editor i'm probably create a new wiki document with a different language, but it seems to point to the SAME object. when I change the content of the object in the other language, these changes also show when I navigate back to the english page It looks like I should instantiate a new object of the class, but then the page language is still 'en' And how do we manage then that these objects still relate to each other? If I change the english version of a record this should be related to the content of the translations! Gerritjan ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] [Announcement] XWiki Enterprise 3.2 Milestone 3 released
The XWiki development team is proud to announce the availability of XWiki Enterprise 3.2 Milestone 3, the last milestone of the XWiki Enterprise 3.2 version (see the roadmap at http://enterprise.xwiki.org/xwiki/bin/Main/Roadmap ). Main new features include: * improved Lucene scoring * new implementation of the sheet system * support for OpenOffice 3.3 as the backend of the office importer * better support for IE9 in the WYSIWYG editor * many improvements in the extension manager and extension repository * the removal of the Albatross skin from the distribution * ... and quite a lot of dependency upgrades and bug fixes See the full release notes at http://www.xwiki.org/xwiki/bin/ReleaseNotes/ReleaseNotesXWikiEnterprise32M3 for more details. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] data model and velocity
I have a data model that follow this page structure: Detectors - Detector1 - Detector1History1 - Detector1History2 - Detector2 (Implemented with my DetectorClass and DetectorHistoryClass) The Detectors is like a dashboard for Detectors and their history. It's mostly working. My issue is that my Velocity code on that top dashboard page is looking pretty ugly. It has nested loops and I don't know how to do any encapsulation. If I could do things like detector1.getNewestHistory() that would be very helpful. But my Detector Object Class is limited to what I can define in XWiki. To my knowledge, XWiki's user defined classes aren't able to encapsulate code. Am I wrong? It seems like defining my Velocity macros would help, but my understanding is a macro can't return anything, just evaluates to output. If I'm wrong-headed, please correct me. Thanks, Scott ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] data model and velocity
If you only need string return values there is a workaround described here: http://old.nabble.com/macro-question-td23105606.html Better than nothing I guess. Cheers, Olaf Von: Scott Serr se...@theserrs.net An: users@xwiki.org Gesendet: 15:51 Mittwoch, 28.September 2011 Betreff: [xwiki-users] data model and velocity I have a data model that follow this page structure: Detectors - Detector1 - Detector1History1 - Detector1History2 - Detector2 (Implemented with my DetectorClass and DetectorHistoryClass) The Detectors is like a dashboard for Detectors and their history. It's mostly working. My issue is that my Velocity code on that top dashboard page is looking pretty ugly. It has nested loops and I don't know how to do any encapsulation. If I could do things like detector1.getNewestHistory() that would be very helpful. But my Detector Object Class is limited to what I can define in XWiki. To my knowledge, XWiki's user defined classes aren't able to encapsulate code. Am I wrong? It seems like defining my Velocity macros would help, but my understanding is a macro can't return anything, just evaluates to output. If I'm wrong-headed, please correct me. Thanks, Scott ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Velocity replaceALL split dato-string with Regex
I want to split a dato string like 2011.08.02 into year, month and days to calculate the age of a person. $year = 2011 $month = 08 $day = 02 $year =($date.replaceAll($'\d\d\d\d.','$1')) is not working. -- Volker Lapczynski http://RadWiki.net RadWiki.net -- View this message in context: http://xwiki.475771.n2.nabble.com/Velocity-replaceALL-split-dato-string-with-Regex-tp6841890p6841890.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] [Announcement] XWiki Enterprise 3.2 Milestone 3 released
On 09/28/2011 05:12 PM, Legeinfo wrote: Very nice Sergiu! With file storage: the work/storage folder is now in data/storage. Indeed, forgot to mention that in the release notes. Updated now, thanks! -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Velocity replaceALL split dato-string with Regex
On 09/28/2011 05:20 PM, Legeinfo wrote: I want to split a dato string like 2011.08.02 into year, month and days to calculate the age of a person. $year = 2011 $month = 08 $day = 02 $year =($date.replaceAll($'\d\d\d\d.','$1')) is not working. I'm not sure what you tried to write there, but it doesn't look right. There are many ways to do this. When you said split, the most straight-forward way to do this seems to be: #set ($date = 2011.08.02) #set ($datePieces = $date.split('\.')) $datePieces[0] $datePieces[1] $datePieces[2] If you really want a solution based on replaceAll, then this seems to work: #set ($date = 2011.08.02) #set ($year = $date.replaceAll('(\d{4})\..*', '$1')) #set ($month = $date.replaceAll('\d{4}\.(\d{1,2})\..*', '$1')) #set ($day = $date.replaceAll('.*\.(\d{2})$', '$1')) $year $month $day The most flexible way would be to use the jodatime plugin to parse this string into a real DateTime object, from which you can request the various date parts explicitly. #set ($date = 2011.08.02) #set ($dateObj = $xwiki.jodatime.getDateTimeFormatterForPattern('.MM.dd').parseDateTime($date)) $dateObj.year $dateObj.monthOfYear $dateObj.dayOfMonth -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] data model and velocity
On 09/28/2011 09:51 AM, Scott Serr wrote: I have a data model that follow this page structure: Detectors - Detector1 - Detector1History1 - Detector1History2 - Detector2 (Implemented with my DetectorClass and DetectorHistoryClass) The Detectors is like a dashboard for Detectors and their history. It's mostly working. My issue is that my Velocity code on that top dashboard page is looking pretty ugly. It has nested loops and I don't know how to do any encapsulation. If I could do things like detector1.getNewestHistory() that would be very helpful. But my Detector Object Class is limited to what I can define in XWiki. To my knowledge, XWiki's user defined classes aren't able to encapsulate code. Am I wrong? It seems like defining my Velocity macros would help, but my understanding is a macro can't return anything, just evaluates to output. If I'm wrong-headed, please correct me. From Velocity code only, you can't get very far towards clean domain-specific code. You should consider writing some Java code that wraps the XWiki plain data model into more useful rich objects. The way I see it, you should have Detector and DetectorHistory java classes that contain a com.xpn.xwiki.BaseObject object inside them to which they forwards data requests, plus new methods that bridge them together. Then, a ScriptService class that offers access to these objects from Velocity, which you would access with $services.detector in Velocity. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Disabling Forgot Your Password and Reset Password in XWiki 3.1
Hi All, I have successfully implemented XWiki 3.1 with LDAP authentication. Since user name and password managment is addressed by the LDAP provider it doesnt make sense to have these enabled on the LOGIN page. What is the best way to remove these links/options from that page. Thank you! Chris ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Disabling Forgot Your Password and Reset Password in XWiki 3.1
On 09/28/2011 07:53 PM, Chris Meyer wrote: Hi All, I have successfully implemented XWiki 3.1 with LDAP authentication. Since user name and password managment is addressed by the LDAP provider it doesnt make sense to have these enabled on the LOGIN page. What is the best way to remove these links/options from that page. Delete the XWiki.ResetPassword document. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] MultiLanguage on class-object model
On 09/28/2011 04:09 AM, Gerritjan Koekkoek wrote: As I understand, to internationalize I can use workaround as described on page advised by Vincent; Op 28 sep. 2011, om 09:51 heeft Vincent Massol het volgende geschreven: On Sep 28, 2011, at 9:45 AM, Thomas Mortagne wrote: On Wed, Sep 28, 2011 at 9:29 AM, Gerritjan Koekkoek gerritjankoekk...@gmail.com wrote: Hi, I'm trying some basic functionality on a multilanguage Wiki (3.1) I create a class I create the default Class sheet and add a object on it (like suggested in the default) I create the default Class template and add a object on it (like suggested in the default) Then I create a object; It creates a page containing the object, I use the inline form editor to enter some data and save. Now I want to create a translation in another language? How should I do that? Translation is not supported for objects unfortunately. See http://jira.xwiki.org/browse/XWIKI-69. See also documentation at http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications And especially: http://platform.xwiki.org/xwiki/bin/view/DevGuide/InternationalizingApplications#HI18nofXWikiObjects I have one page and for each language I add a object (having a language code field in attribute) (mutiple objects on ONE page(?)) Yes. In the sheet I have display code that selects the object based on context (language code) in browser Yes. What should I do to also get 'natural' results in livetable and lucene search So when context is language 'nl' both only will look at objects with language attibute set to 'nl' For the livetable you'd have to use a custom result generator. For lucene, it's more complex. Normally if you search for a Dutch word, you shouldn't hit English words that often, so the filtering happens naturally. If you want a perfect index, you'd have to patch the Lucene plugin to index things differently, either as different Lucene Documents, one for each language, or put the text extracted from the objects in different fields (right now they're all put in the full text content field), and customize the query parser to search in only one of these fields at a time, depending on the context language. Thanks -Vincent The inline form editor does not have a translate option, when I create a translation with the wiki editor i'm probably create a new wiki document with a different language, but it seems to point to the SAME object. when I change the content of the object in the other language, these changes also show when I navigate back to the english page It looks like I should instantiate a new object of the class, but then the page language is still 'en' And how do we manage then that these objects still relate to each other? If I change the english version of a record this should be related to the content of the translations! Gerritjan -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users