RE: RE: [xwiki-users] Object properties' translations
Thank you Sergiu! That information clarified the issue for me and helps me a lot in planning. I can see from the schema and id generation algorithms that object linking on document translation level is not too simple thing to change. Maybe that’s a little too heavy an issue for me to contribute, but of curiosity: do you have plans already how to solve this? Code in SVN? In any case I’m interested of the panel and page code you mentioned so please send it to me. Thanks! Petteri From: Sergiu Dumitriu [mailto:sergiu.dumitriu@gmail.com] Sent: 9. tammikuuta 2007 1:25 To: xwiki-users@objectweb.org Subject: Re: RE: [xwiki-users] Object properties' translations {quote} If you have more than one objects that must be translated on a page, you cannot use this function, because, as you see, there is no "number" parameter. However, you can write you own code that iterates over all objects. {/quote} Generally, it is recommended to have one main object per page. It is not a must, the final decision is yours, and it depends on the application profile. Sergiu On 1/9/07, Sergiu Dumitriu <HYPERLINK "mailto:sergiu.dumitriu@gmail.com"sergiu.dumitriu@gmail.com> wrote: Hi, Internally, a document has only one principal version, the one in the original language. Translations are just variants of that original document. Objects are attached to a document, meaning that an object is bound to the original document. This way you can't have (for the moment) objects attached to a translation. This is bound to change in 1.1 (or later). However, you can simulate this by using (indeed) a language property. In detail: 1. You must add a StringProperty for each class you would like to be translatable, named "lang" (or any other name you like) 2. Replace doc.getObject("MyClass") with doc.getObject("MyClass", "lang", $context.language[, true]). This return an object with the "lang" property set to the current language. Of course, you can replace $context.language with a specific language. The optional true parameter stands for failover, meaning that if an object with the requested language was not found, try again without the language filter. You cannot automatically translate objects with the current skin. If you are interested, I can give you the code for a panel and a page that can be used for this. If you have more than one objects that must be translated on a page, you cannot use this function, because, as you see, there is no "number" parameter. However, you can write you own code that iterates over all objects. On 1/9/07, HYPERLINK "mailto:petteri.karttunen@kuopionkonservatorio.fi" \npetteri.karttunen@kuopionkonservatorio.fi <HYPERLINK "mailto:petteri.karttunen@kuopionkonservatorio.fi" \n petteri.karttunen@kuopionkonservatorio.fi> wrote: Yes, the wizard works correctly as far as I can see. The problem is perhaps more obvious with tagging for example (default XWiki.TagClass) ; if you want to tag the content of the same page differently depending on the page translation you have to add a TagClass instance for every translation and somehow bind them to translation in question(?) So is there a reason why the object's properties should be language independent? These are fundamental questions for me when planning the structure of my xwiki-based translation portal by no means impassable obstacles. Before fixing the custom class structure I would anyway very much like to hear your thoughts and developers' plans if the logic is going to stay this way in future releases. Thanks! Petteri -- You receive this message as a subscriber of the HYPERLINK "mailto:xwiki-users@objectweb.org" \nxwiki-users@objectweb.org mailing list. To unsubscribe: mailto:HYPERLINK "mailto:xwiki-users-unsubscribe@objectweb.org" \n xwiki-users-unsubscribe@objectweb.org For general help: mailto:HYPERLINK "mailto:sympa@objectweb.org" \nsympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: HYPERLINK "http://www.objectweb.org/wws" \nhttp://www.objectweb.org/wws -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.7/619 - Release Date: 7.1.2007 18:29 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.16.7/619 - Release Date: 7.1.2007 18:29
Indeed, very interesting. Could we record this discussion somewhere on a page at xwiki.org? And I would take the code as well if you'd like to share it. Thanks! On Monday 08 January 2007 19:17, Karttunen Petteri wrote:
Thank you Sergiu! That information clarified the issue for me and helps me a lot in planning. I can see from the schema and id generation algorithms that object linking on document translation level is not too simple thing to change. Maybe that’s a little too heavy an issue for me to contribute, but of curiosity: do you have plans already how to solve this? Code in SVN?
In any case I’m interested of the panel and page code you mentioned so please send it to me. Thanks!
Here are the two files. You should create a new Panel object (introduced in XWiki 1.0 beta-s) and copy the contents of the Panels.TranslateSpecial file into the panel code. Note that you must change the names of the classes which you would like translated. Then, you should modify the XWiki global preferences to include the new panel. Second, You should create a document named XWiki.TranslateSpecial and copy the content from the other file. The Translate panel must be adapted to support more than two languages, as I didn't have the time to make it extensible enough. Now it just works with two languages. Regarding the code, no, there's nothing written yet, just a bunch of ideas waiting to be implemented. On 1/9/07, Marc Lijour <marc@lijour.net> wrote:
Indeed, very interesting.
Could we record this discussion somewhere on a page at xwiki.org? And I would take the code as well if you'd like to share it.
Thanks!
On Monday 08 January 2007 19:17, Karttunen Petteri wrote:
Thank you Sergiu! That information clarified the issue for me and helps me a lot in planning. I can see from the schema and id generation algorithms that object linking on document translation level is not too simple thing to change. Maybe that's a little too heavy an issue for me to contribute, but of curiosity: do you have plans already how to solve this? Code in SVN?
In any case I'm interested of the panel and page code you mentioned so please send it to me. Thanks!
-- You receive this message as a subscriber of the xwiki-users@objectweb.orgmailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Thank you. Great help! On Monday 08 January 2007 20:06, Sergiu Dumitriu wrote:
Here are the two files.
You should create a new Panel object (introduced in XWiki 1.0 beta-s) and copy the contents of the Panels.TranslateSpecial file into the panel code. Note that you must change the names of the classes which you would like translated. Then, you should modify the XWiki global preferences to include the new panel.
Second, You should create a document named XWiki.TranslateSpecial and copy the content from the other file.
The Translate panel must be adapted to support more than two languages, as I didn't have the time to make it extensible enough. Now it just works with two languages.
Regarding the code, no, there's nothing written yet, just a bunch of ideas waiting to be implemented.
On 1/9/07, Marc Lijour <marc@lijour.net> wrote:
Indeed, very interesting.
Could we record this discussion somewhere on a page at xwiki.org? And I would take the code as well if you'd like to share it.
Thanks!
On Monday 08 January 2007 19:17, Karttunen Petteri wrote:
Thank you Sergiu! That information clarified the issue for me and helps
me
a lot in planning. I can see from the schema and id generation
algorithms
that object linking on document translation level is not too simple
thing
to change. Maybe that's a little too heavy an issue for me to
contribute,
but of curiosity: do you have plans already how to solve this? Code in
SVN?
In any case I'm interested of the panel and page code you mentioned so please send it to me. Thanks!
-- You receive this message as a subscriber of the xwiki-users@objectweb.orgmailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Marc (and everyone), I have created a zone on xwiki.org for recording ideas and discussions. It's in the Idea space here: http://www.xwiki.org/xwiki/bin/view/Idea/ Feel free to create new ideas there. I think the process could be: * first discuss on the list * once a first conclusion is reached document it on the wiki in the idea space * create a jira issue so that it's not forgotten and reference the idea page in the wiki * continue improving the idea implementation on the wiki * Once the jira issue is implemented copy the wiki text of the idea in the jira issue for reference and delete the wiki page I've actually documented this too in the Idea space... Thanks -Vincent
-----Original Message----- From: Marc Lijour [mailto:marc@lijour.net] Sent: mardi 9 janvier 2007 01:31 To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] Object properties' translations
Indeed, very interesting.
Could we record this discussion somewhere on a page at xwiki.org? And I would take the code as well if you'd like to share it.
Thanks!
On Monday 08 January 2007 19:17, Karttunen Petteri wrote:
Thank you Sergiu! That information clarified the issue for me and helps me a lot in planning. I can see from the schema and id generation algorithms that object linking on document translation level is not too simple thing to change. Maybe that’s a little too heavy an issue for me to contribute, but of curiosity: do you have plans already how to solve this? Code in SVN?
In any case I’m interested of the panel and page code you mentioned so please send it to me. Thanks!
___________________________________________________________________________ D�couvrez une nouvelle fa�on d'obtenir des r�ponses � toutes vos questions ! Profitez des connaissances, des opinions et des exp�riences des internautes sur Yahoo! Questions/R�ponses http://fr.answers.yahoo.com
Petteri, If you got something better out of the code I sent you, working for more than two languages, it would be great to post it on the Code zone ( http://www.xwiki.org/xwiki/bin/view/Code/ ). Thanks, Sergiu On 1/9/07, Vincent Massol <vincent@massol.net> wrote:
Marc (and everyone),
I have created a zone on xwiki.org for recording ideas and discussions. It's in the Idea space here: http://www.xwiki.org/xwiki/bin/view/Idea/
Feel free to create new ideas there. I think the process could be: * first discuss on the list * once a first conclusion is reached document it on the wiki in the idea space * create a jira issue so that it's not forgotten and reference the idea page in the wiki * continue improving the idea implementation on the wiki * Once the jira issue is implemented copy the wiki text of the idea in the jira issue for reference and delete the wiki page
I've actually documented this too in the Idea space...
Thanks -Vincent
-----Original Message----- From: Marc Lijour [mailto:marc@lijour.net] Sent: mardi 9 janvier 2007 01:31 To: xwiki-users@objectweb.org Subject: Re: [xwiki-users] Object properties' translations
Indeed, very interesting.
Could we record this discussion somewhere on a page at xwiki.org? And I would take the code as well if you'd like to share it.
Thanks!
On Monday 08 January 2007 19:17, Karttunen Petteri wrote:
Thank you Sergiu! That information clarified the issue for me and helps me a lot in planning. I can see from the schema and id generation algorithms that object linking on document translation level is not too simple thing to change. Maybe that's a little too heavy an issue for me to contribute, but of curiosity: do you have plans already how to solve this? Code in SVN?
In any case I'm interested of the panel and page code you mentioned so please send it to me. Thanks!
___________________________________________________________________________ D�couvrez une nouvelle fa�on d'obtenir des r�ponses � toutes vos questions ! Profitez des connaissances, des opinions et des exp�riences des internautes sur Yahoo! Questions/R�ponses http://fr.answers.yahoo.com
-- You receive this message as a subscriber of the xwiki-users@objectweb.orgmailing list. To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org For general help: mailto:sympa@objectweb.org?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
participants (4)
-
Karttunen Petteri -
Marc Lijour -
Sergiu Dumitriu -
Vincent Massol