|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
BUG(s)? two different links to edit navigation documentHello all,
The following has been driving me crazy... I have a site with default language: pt. I'm at the ENGLISH version of the navigation document -- NOT the default version: http://daisy.riadealvor.org/riadealvor/3-DSY.html?branch=main&language=en Now you'll have to trust me, because you can't edit my site, but I have TWO different links for editing the navdoc: * Below the navdoc, in "Navigation doc: view|edit", the link under edit is: /riadealvor/3-DSY/edit?returnTo=%2Friadealvor%2F3-DSY.html%3Fbranch% 3Dmain%26language%3Den -- so I am editing the DEFAULT language navdoc. * In the Daisy action bar, menu Actions, option Edit, the link is: /riadealvor/3-DSY/edit?branch=main&language=en -- so I am editing THIS navdoc, which is what I wanted in the first place. Am I missing something totally obvious -- or is this a bug? If I use "Navigation doc: view|edit" I view and edit the DEFAULT LANGUAGE navdoc, and not the navdoc for the language of the current page. * * * In fact... second bug? If I am at a page in English, I still get the DEFAULT language navigation, even when I have an English version of the navigation document. See http://daisy.riadealvor.org/riadealvor/index.html?branch=main&language=en English page, Portuguese navigation -- because pt is the default language. In case you're wondering if I have an English navigation, just click 'download' from: http://daisy.riadealvor.org/riadealvor/3-DSY?branch=main&language=en Help!... Júlio. _______________________________________________ daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: BUG(s)? two different links to edit navigation documentA site always uses the same variant for the navigation document, which
is in the default branch and language specified in the siteconf.xml. When you visit [0], the edit link under the navigation always lets you edit the navigation document for that site (i.e. the variant in the default branch and language). The 'Actions -> Edit' link lets you edit the document you are currently viewing. This has nothing to do with the navigation document. [0] http://daisy.riadealvor.org/riadealvor/3-DSY.html?branch=main&language=en Perhaps you are getting confused because of site switching (or lack thereof). Normally when you have two sites (say one English and one Portuguese), site switching takes place: Daisy tries to show the document in the site that is most suitable (see [1] for more info). This means that when there is no suitable site, Daisy stays in the current site (and hence the navigation document does not follow the site of the active document). [1] http://cocoondev.org/daisydocs-2_2/374-cd/116-cd.html (§ site-search algorithm) The most common reasons for site switching not to take place are * there is only one site, or * site switching has been disabled (in siteconf.xml) I believe this explains both problems you are experiencing (If I understand them correctly). HTH, Karel On Fri, 2008-06-20 at 13:03 +0100, A Rocha Webmaster wrote: > Hello all, > > The following has been driving me crazy... > > I have a site with default language: pt. > > I'm at the ENGLISH version of the navigation document -- NOT the default > version: > http://daisy.riadealvor.org/riadealvor/3-DSY.html?branch=main&language=en > > Now you'll have to trust me, because you can't edit my site, but I have > TWO different links for editing the navdoc: > > * Below the navdoc, in "Navigation doc: view|edit", the link under edit > is: /riadealvor/3-DSY/edit?returnTo=%2Friadealvor%2F3-DSY.html%3Fbranch% > 3Dmain%26language%3Den -- so I am editing the DEFAULT language navdoc. > > * In the Daisy action bar, menu Actions, option Edit, the link > is: /riadealvor/3-DSY/edit?branch=main&language=en -- so I am editing > THIS navdoc, which is what I wanted in the first place. > > Am I missing something totally obvious -- or is this a bug? If I use > "Navigation doc: view|edit" I view and edit the DEFAULT LANGUAGE navdoc, > and not the navdoc for the language of the current page. > > * * * > > In fact... second bug? If I am at a page in English, I still get the > DEFAULT language navigation, even when I have an English version of the > navigation document. See > http://daisy.riadealvor.org/riadealvor/index.html?branch=main&language=en > > English page, Portuguese navigation -- because pt is the default > language. In case you're wondering if I have an English navigation, just > click 'download' from: > http://daisy.riadealvor.org/riadealvor/3-DSY?branch=main&language=en > > Help!... > > Júlio. > > _______________________________________________ > daisy community mailing list > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > mail to: daisy@... > list information: http://lists.cocoondev.org/mailman/listinfo/daisy daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: BUG(s)? two different links to edit navigation documentThanks for your reply, Karel -- so it wasn't a bug, but a feature:
Seg, 2008-06-23 às 09:41 +0200, Karel Vervaeke escreveu: > A site always uses the same variant for the navigation document, which > is in the default branch and language specified in the siteconf.xml. May I ask -- why? In Daisy, translations are variants of pages; even navigation documents can be translated. And yet, one site cannot have language variants. I can't use the translation of a navigation document unless I define 'another site.' > Normally when you have two sites (say one English and one > Portuguese), site switching takes place I didn't have site switching in place because I had one site per each thing which *I* call a site. My mistake; I was indeed missing something, not obvious due to the way languages work: I was naturally extending the way Daisy works with pages, to whole sites. We have one main site (arocha.org) for twenty national organisations. I realised early on that I needed one site per national organisation, because we need to allow for different skins, and Daisy forces all pages in a site to share the same skin. We have information on each organisation in ten languages. Are you telling me that I need to define 20 x 10 = *two*hundred* 'sites' for my content? With unfriendly names like /portugal-ar /portugal-cs /portugal-fi /portugal-fr /portugal-en /portugal-es /portugal-nl /portugal-pt /portugal-zh-Hans /portugal-zh-Hant and so on for each country? And when we add a new country, we have to add as many sites as languages there are at the time? And if we add a language, that means another 20 sites? What does that sound to you? I hope there's a way around this issue. I have been trying to find the place in the Daisy chain where the navigation is inserted, to match the navigation language to the document language. I couldn't find such place in layout.xsl, or in documentlayout.xsl, or in document-to-html.xsl -- will I have to change the publisherRequest? Has anyone done this? Or is there some other kind of solution? My Daisy knowledge won't clearly be enough in the next few months to do something which should be in place already, so I appreciate any help you can offer. Thanks Júlio. _______________________________________________ daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: BUG(s)? two different links to edit navigation document>From your current setup I think two hundred sites is a possibility
(of course creating the sites by hand would be a chore, you probably would like to script this), however, read on... In our setups, we have always used one site per language. I don't know if this is a possibility for you, but consider 1 site per language, so that the navigation document has countries below the root node: en/portugal/... en/germany/... de/portugal/... de/germany/... (or even de/deutschland/...) It does not limit the number of documents, but it does limit the number of sites. On Mon, 2008-06-23 at 19:56 +0100, A Rocha Webmaster wrote: > Thanks for your reply, Karel -- so it wasn't a bug, but a feature: > > Seg, 2008-06-23 às 09:41 +0200, Karel Vervaeke escreveu: > > A site always uses the same variant for the navigation document, which > > is in the default branch and language specified in the siteconf.xml. > > May I ask -- why? That's just the way sites work: they have a default language and a default branch (i.e. a default variant space). In short, each site operates in a particular variant space. > > In Daisy, translations are variants of pages; even navigation documents > can be translated. And yet, one site cannot have language variants. I > can't use the translation of a navigation document unless I define > 'another site.' Ah. I just realised it should be possible to make the navigation tree match the language of the active document using publisher requests: http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html (I have never done or tried this approach, let us know about your experience if you end up doing things like this). Regards, Karel > > > Normally when you have two sites (say one English and one > > Portuguese), site switching takes place > > I didn't have site switching in place because I had one site per each > thing which *I* call a site. My mistake; I was indeed missing something, > not obvious due to the way languages work: I was naturally extending the > way Daisy works with pages, to whole sites. > > We have one main site (arocha.org) for twenty national organisations. I > realised early on that I needed one site per national organisation, > because we need to allow for different skins, and Daisy forces all pages > in a site to share the same skin. > > We have information on each organisation in ten languages. > > Are you telling me that I need to define 20 x 10 = *two*hundred* 'sites' > for my content? > > With unfriendly names like > /portugal-ar > /portugal-cs > /portugal-fi > /portugal-fr > /portugal-en > /portugal-es > /portugal-nl > /portugal-pt > /portugal-zh-Hans > /portugal-zh-Hant > and so on for each country? And when we add a new country, we have to > add as many sites as languages there are at the time? And if we add a > language, that means another 20 sites? > > What does that sound to you? I hope there's a way around this issue. > > I have been trying to find the place in the Daisy chain where the > navigation is inserted, to match the navigation language to the document > language. I couldn't find such place in layout.xsl, or in > documentlayout.xsl, or in document-to-html.xsl -- will I have to change > the publisherRequest? Has anyone done this? Or is there some other kind > of solution? > > My Daisy knowledge won't clearly be enough in the next few months to do > something which should be in place already, so I appreciate any help you > can offer. > > Thanks > Júlio. > > _______________________________________________ > daisy community mailing list > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > mail to: daisy@... > list information: http://lists.cocoondev.org/mailman/listinfo/daisy daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: BUG(s)? two different links to edit navigation documentI forgot to mention that with a multi-lingual setup,
it is likely that you will find the Daisy 2.2 translation management useful. Translation management (try introduction) http://cocoondev.org/daisydocs-2_2/537-cd/544-cd.html Guided tour (screenshot galore, skip the daisy-wiki-add-site stuff) http://cocoondev.org/daisydocs-2_2/537-cd/557-cd.html HTH, Karel On Tue, 2008-06-24 at 09:58 +0200, Karel Vervaeke wrote: > >From your current setup I think two hundred sites is a possibility > (of course creating the sites by hand would be a chore, you probably > would like to script this), however, read on... > > In our setups, we have always used one site per language. I don't know > if this is a possibility for you, but consider 1 site per language, so > that the navigation document has countries below the root node: > > en/portugal/... > en/germany/... > de/portugal/... > de/germany/... (or even de/deutschland/...) > > It does not limit the number of documents, > but it does limit the number of sites. > > On Mon, 2008-06-23 at 19:56 +0100, A Rocha Webmaster wrote: > > Thanks for your reply, Karel -- so it wasn't a bug, but a feature: > > > > Seg, 2008-06-23 às 09:41 +0200, Karel Vervaeke escreveu: > > > A site always uses the same variant for the navigation document, which > > > is in the default branch and language specified in the siteconf.xml. > > > > May I ask -- why? > > That's just the way sites work: they have a default language and a > default branch (i.e. a default variant space). In short, each site > operates in a particular variant space. > > > > > In Daisy, translations are variants of pages; even navigation documents > > can be translated. And yet, one site cannot have language variants. I > > can't use the translation of a navigation document unless I define > > 'another site.' > > Ah. I just realised it should be possible to make the navigation tree > match the language of the active document using publisher requests: > > http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html > > (I have never done or tried this approach, let us know about your > experience if you end up doing things like this). > > Regards, > Karel > > > > > > Normally when you have two sites (say one English and one > > > Portuguese), site switching takes place > > > > I didn't have site switching in place because I had one site per each > > thing which *I* call a site. My mistake; I was indeed missing something, > > not obvious due to the way languages work: I was naturally extending the > > way Daisy works with pages, to whole sites. > > > > We have one main site (arocha.org) for twenty national organisations. I > > realised early on that I needed one site per national organisation, > > because we need to allow for different skins, and Daisy forces all pages > > in a site to share the same skin. > > > > We have information on each organisation in ten languages. > > > > Are you telling me that I need to define 20 x 10 = *two*hundred* 'sites' > > for my content? > > > > With unfriendly names like > > /portugal-ar > > /portugal-cs > > /portugal-fi > > /portugal-fr > > /portugal-en > > /portugal-es > > /portugal-nl > > /portugal-pt > > /portugal-zh-Hans > > /portugal-zh-Hant > > and so on for each country? And when we add a new country, we have to > > add as many sites as languages there are at the time? And if we add a > > language, that means another 20 sites? > > > > What does that sound to you? I hope there's a way around this issue. > > > > I have been trying to find the place in the Daisy chain where the > > navigation is inserted, to match the navigation language to the document > > language. I couldn't find such place in layout.xsl, or in > > documentlayout.xsl, or in document-to-html.xsl -- will I have to change > > the publisherRequest? Has anyone done this? Or is there some other kind > > of solution? > > > > My Daisy knowledge won't clearly be enough in the next few months to do > > something which should be in place already, so I appreciate any help you > > can offer. > > > > Thanks > > Júlio. > > > > _______________________________________________ > > daisy community mailing list > > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > > mail to: daisy@... > > list information: http://lists.cocoondev.org/mailman/listinfo/daisy > _______________________________________________ > daisy community mailing list > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > mail to: daisy@... > list information: http://lists.cocoondev.org/mailman/listinfo/daisy daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: BUG(s)? two different links to edit navigation documentTer, 2008-06-24 às 09:58 +0200, Karel Vervaeke escreveu:
> it should be possible to make the navigation tree > match the language of the active document using publisher requests: > > http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html > > (I have never done or tried this approach, let us know about your > experience if you end up doing things like this). So this is what I am thinking of doing, please advise if it looks all right or whether I am overlooking something. I need some confidence boost, as I am still a Daisy newbie! 1. add this to daisywikidata/sites/siteconf.xml: <publisherRequestSet>matchlang</publisherRequestSet> 2. create daisydata/pubreqs/matchlang/mapping.xml: <?xml version="1.0"?> <m:publisherMapping xmlns:m="http://outerx.org/daisy/1.0#publishermapping"> <m:when test="InCollection('test')" use="matchlang.xml"/> <m:when test="not InCollection('test')" use="documentpage_pubreq.xml"/> </m:publisherMapping> (because I have a 'test' collection for things like these; if it works then 2nd clause is removed and 1st clause changed to when test="true") 3. copy daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml to daisydata/pubreqs/matchlang/documentpage_pubreq.xml 4. copy same file to daisydata/pubreqs/matchlang/matchlang.xml and then change the TWO occurrences of <p:navigationDocument id="${pageContext.siteConf.navigationDocId}" branch="${pageContext.siteConf.branchId}" language="${pageContext.siteConf.languageId}"/> in that file to <p:navigationDocument id="${pageContext.siteConf.navigationDocId}" branch="${pageContext.siteConf.branchId}" language="${language}"/> because ${language} is the document's language. But this last part is black magic -- I don't know if I have to change both occurrences of <p:navigationDocument>. Paths to the occurrence are: p:publisherRequest/p:document/p:preparedDocuments/p:navigationDocument and p:publisherRequest/jx:if test="${pageContext.layoutType == 'default'}"/p:navigationTree/p:navigationDocument -- do I need to change both? Is the above process correct? Help! Júlio. _______________________________________________ daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: BUG(s)? two different links to edit navigation documentThat's not correct: the documentpage_pubreq.xml file is not a valid
publisher request file on the repository side: - It is merely a template for generating publisher requests to send to the repository - The pageContext variable is only known on the wiki, and it is resolved before the request is sent to the repository. I just experimented a bit, it seems the whole publisher request set approach does not seem to work (Sorry). You could apply your changes directly to this file (daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml), but it might interfere the Site switching algorithm and other parts of the Wiki. Perhaps the introduced problems are greater than the amount of problems solved. There is another thing you could evaluate/try: if there is a web server in front of your Daisy installation, you could use rewrite rules (a la mod_proxy) to make the urls prettier (again, may have some other consequences) (e.g. translate (extranal) /en/portugal to (internal) daisy/en_portugal) HTH, Karel On Tue, 2008-06-24 at 18:57 +0100, A Rocha Webmaster wrote: > Ter, 2008-06-24 às 09:58 +0200, Karel Vervaeke escreveu: > > it should be possible to make the navigation tree > > match the language of the active document using publisher requests: > > > > http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html > > > > (I have never done or tried this approach, let us know about your > > experience if you end up doing things like this). > > So this is what I am thinking of doing, please advise if it looks all > right or whether I am overlooking something. I need some confidence > boost, as I am still a Daisy newbie! > > 1. add this to daisywikidata/sites/siteconf.xml: > > <publisherRequestSet>matchlang</publisherRequestSet> > > 2. create daisydata/pubreqs/matchlang/mapping.xml: > > <?xml version="1.0"?> > <m:publisherMapping > xmlns:m="http://outerx.org/daisy/1.0#publishermapping"> > <m:when test="InCollection('test')" use="matchlang.xml"/> > <m:when test="not InCollection('test')" > use="documentpage_pubreq.xml"/> > </m:publisherMapping> > > (because I have a 'test' collection for things like these; if it works > then 2nd clause is removed and 1st clause changed to when test="true") > > 3. copy > daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml > to daisydata/pubreqs/matchlang/documentpage_pubreq.xml > > 4. copy same file to daisydata/pubreqs/matchlang/matchlang.xml and then > change the TWO occurrences of > > <p:navigationDocument > id="${pageContext.siteConf.navigationDocId}" > branch="${pageContext.siteConf.branchId}" > language="${pageContext.siteConf.languageId}"/> > > in that file to > > <p:navigationDocument > id="${pageContext.siteConf.navigationDocId}" > branch="${pageContext.siteConf.branchId}" > language="${language}"/> > > because ${language} is the document's language. But this last part is > black magic -- I don't know if I have to change both occurrences of > <p:navigationDocument>. Paths to the occurrence are: > > p:publisherRequest/p:document/p:preparedDocuments/p:navigationDocument > > and > > p:publisherRequest/jx:if test="${pageContext.layoutType == > 'default'}"/p:navigationTree/p:navigationDocument > > -- do I need to change both? Is the above process correct? Help! > > Júlio. > > _______________________________________________ > daisy community mailing list > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > mail to: daisy@... > list information: http://lists.cocoondev.org/mailman/listinfo/daisy daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
navdoc language hack WORKS (was Re: BUG(s)? two different links to edit navigation document)Thanks for your reply Karel! I've applied the hack mentioned in 4.
directly to daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml and it works -- I'm getting the navdoc with the same language as the document variant being requested. Whoop whoop! :) Try this: go to http://daisy.arocha.org -- you're taken to http://daisy.arocha.org/arocha/2-DSY.html -- in English which is the default language. Use the Finnish or the Portuguese links at the top right after 'Other languages'. You get the home page in Finnish or Portuguese -- and a matching navdoc. This is exactly the behaviour I expected from Daisy from the start: first page given is the home page in the default language, and when a page in another language is requested, we immediately switch to the navigation in that language. Don't you agree that Daisy is more useful this way? And more intuitive? The idea that 'pages in different languages are variants' is now extended to 'sites in different languages are variants' Much simpler to use Daisy to manage complex multilanguage sites (it was already managing simple multilanguage sites like the beautiful www.veldenduin.be) I am not fond of requesting software improvements, but... please consider whether Daisy would be a better tool if it worked the way I've changed it. If the variant doesn't exist, I get an error message instead of a navigation: try clicking on the A Rocha logo, and then choosing the logo in Arabic, for instance. It's very graceful though, so no problem there. About your suspicion that "it might interfere with the Site switching algorithm and other parts of the Wiki" -- do you think so? Would you like to test it? Thanks for your help, without your direction I could never have done it! :) Júlio. Qua, 2008-06-25 às 17:45 +0200, Karel Vervaeke escreveu: > That's not correct: the documentpage_pubreq.xml file is not a valid > publisher request file on the repository side: > - It is merely a template for generating publisher requests to send to > the repository > - The pageContext variable is only known on the wiki, and it is > resolved before the request is sent to the repository. > > > I just experimented a bit, it seems the whole publisher request set > approach does not seem to work (Sorry). You could apply your changes > directly to this file > (daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml), > but it might interfere the Site switching algorithm and other parts of > the Wiki. Perhaps the introduced problems are greater than the amount > of problems solved. > > There is another thing you could evaluate/try: if there is a web server > in front of your Daisy installation, you could use rewrite rules (a la > mod_proxy) to make the urls prettier (again, may have some other > consequences) > (e.g. translate (extranal) /en/portugal to (internal) daisy/en_portugal) > > HTH, > Karel > > > On Tue, 2008-06-24 at 18:57 +0100, A Rocha Webmaster wrote: > > Ter, 2008-06-24 às 09:58 +0200, Karel Vervaeke escreveu: > > > it should be possible to make the navigation tree > > > match the language of the active document using publisher requests: > > > > > > http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html > > > > > > (I have never done or tried this approach, let us know about your > > > experience if you end up doing things like this). > > > > So this is what I am thinking of doing, please advise if it looks all > > right or whether I am overlooking something. I need some confidence > > boost, as I am still a Daisy newbie! > > > > 1. add this to daisywikidata/sites/siteconf.xml: > > > > <publisherRequestSet>matchlang</publisherRequestSet> > > > > 2. create daisydata/pubreqs/matchlang/mapping.xml: > > > > <?xml version="1.0"?> > > <m:publisherMapping > > xmlns:m="http://outerx.org/daisy/1.0#publishermapping"> > > <m:when test="InCollection('test')" use="matchlang.xml"/> > > <m:when test="not InCollection('test')" > > use="documentpage_pubreq.xml"/> > > </m:publisherMapping> > > > > (because I have a 'test' collection for things like these; if it works > > then 2nd clause is removed and 1st clause changed to when test="true") > > > > 3. copy > > daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml > > to daisydata/pubreqs/matchlang/documentpage_pubreq.xml > > > > 4. copy same file to daisydata/pubreqs/matchlang/matchlang.xml and then > > change the TWO occurrences of > > > > <p:navigationDocument > > id="${pageContext.siteConf.navigationDocId}" > > branch="${pageContext.siteConf.branchId}" > > language="${pageContext.siteConf.languageId}"/> > > > > in that file to > > > > <p:navigationDocument > > id="${pageContext.siteConf.navigationDocId}" > > branch="${pageContext.siteConf.branchId}" > > language="${language}"/> > > > > because ${language} is the document's language. But this last part is > > black magic -- I don't know if I have to change both occurrences of > > <p:navigationDocument>. Paths to the occurrence are: > > > > p:publisherRequest/p:document/p:preparedDocuments/p:navigationDocument > > > > and > > > > p:publisherRequest/jx:if test="${pageContext.layoutType == > > 'default'}"/p:navigationTree/p:navigationDocument > > > > -- do I need to change both? Is the above process correct? Help! > > > > Júlio. > > > > _______________________________________________ > > daisy community mailing list > > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > > mail to: daisy@... > > list information: http://lists.cocoondev.org/mailman/listinfo/daisy > _______________________________________________ > daisy community mailing list > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > mail to: daisy@... > list information: http://lists.cocoondev.org/mailman/listinfo/daisy _______________________________________________ daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
|
|
Re: navdoc language hack WORKS (was Re: BUG(s)? two different links to edit navigation document)I realise that the change you have made can be useful, but I don't think
the advantages outweigh the disadvantages: pro: - it works for you con: - it seriously alters the way the mechanisms wrt languages work in the wiki (affecting all users using Daisy with multi-language setups) - there is no way to account for all the implementations out there - as mentioned before: there are some side-effects that would need to be looked after (e.g. when you switch to the arocha logo in arabic the navigation tree is gone, which is something we would want to avoid). Perhaps when we port Daisy to our new webapp framework (Kauri - http://kauriproject.org) we could consider such a drastic change, but I don't feel it is appropriate to make such a change in the 2.x series. In short, I think the usual multilanguage setup (one site per language + auto-site-switching) is still better because it does not require an altered Daisy setup. Regards, Karel On Wed, 2008-06-25 at 18:03 +0100, A Rocha Webmaster wrote: > Thanks for your reply Karel! I've applied the hack mentioned in 4. > directly to > daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml > and it works -- I'm getting the navdoc with the same language as the > document variant being requested. Whoop whoop! :) > > Try this: go to http://daisy.arocha.org -- you're taken to > http://daisy.arocha.org/arocha/2-DSY.html -- in English which is the > default language. > > Use the Finnish or the Portuguese links at the top right after 'Other > languages'. You get the home page in Finnish or Portuguese -- and a > matching navdoc. > > This is exactly the behaviour I expected from Daisy from the start: > first page given is the home page in the default language, and when a > page in another language is requested, we immediately switch to the > navigation in that language. > > Don't you agree that Daisy is more useful this way? And more intuitive? > The idea that > 'pages in different languages are variants' > > is now extended to > 'sites in different languages are variants' > > Much simpler to use Daisy to manage complex multilanguage sites (it was > already managing simple multilanguage sites like the beautiful > www.veldenduin.be) > > I am not fond of requesting software improvements, but... please > consider whether Daisy would be a better tool if it worked the way I've > changed it. > > If the variant doesn't exist, I get an error message instead of a > navigation: try clicking on the A Rocha logo, and then choosing the logo > in Arabic, for instance. It's very graceful though, so no problem there. > > About your suspicion that "it might interfere with the Site switching > algorithm and other parts of the Wiki" -- do you think so? Would you > like to test it? > > Thanks for your help, without your direction I could never have done > it! :) > > Júlio. > > Qua, 2008-06-25 às 17:45 +0200, Karel Vervaeke escreveu: > > That's not correct: the documentpage_pubreq.xml file is not a valid > > publisher request file on the repository side: > > - It is merely a template for generating publisher requests to send to > > the repository > > - The pageContext variable is only known on the wiki, and it is > > resolved before the request is sent to the repository. > > > > > > I just experimented a bit, it seems the whole publisher request set > > approach does not seem to work (Sorry). You could apply your changes > > directly to this file > > (daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml), > > but it might interfere the Site switching algorithm and other parts of > > the Wiki. Perhaps the introduced problems are greater than the amount > > of problems solved. > > > > There is another thing you could evaluate/try: if there is a web server > > in front of your Daisy installation, you could use rewrite rules (a la > > mod_proxy) to make the urls prettier (again, may have some other > > consequences) > > (e.g. translate (extranal) /en/portugal to (internal) daisy/en_portugal) > > > > HTH, > > Karel > > > > > > On Tue, 2008-06-24 at 18:57 +0100, A Rocha Webmaster wrote: > > > Ter, 2008-06-24 às 09:58 +0200, Karel Vervaeke escreveu: > > > > it should be possible to make the navigation tree > > > > match the language of the active document using publisher requests: > > > > > > > > http://cocoondev.org/daisydocs-2_2/373-cd/194-cd/424-cd.html > > > > > > > > (I have never done or tried this approach, let us know about your > > > > experience if you end up doing things like this). > > > > > > So this is what I am thinking of doing, please advise if it looks all > > > right or whether I am overlooking something. I need some confidence > > > boost, as I am still a Daisy newbie! > > > > > > 1. add this to daisywikidata/sites/siteconf.xml: > > > > > > <publisherRequestSet>matchlang</publisherRequestSet> > > > > > > 2. create daisydata/pubreqs/matchlang/mapping.xml: > > > > > > <?xml version="1.0"?> > > > <m:publisherMapping > > > xmlns:m="http://outerx.org/daisy/1.0#publishermapping"> > > > <m:when test="InCollection('test')" use="matchlang.xml"/> > > > <m:when test="not InCollection('test')" > > > use="documentpage_pubreq.xml"/> > > > </m:publisherMapping> > > > > > > (because I have a 'test' collection for things like these; if it works > > > then 2nd clause is removed and 1st clause changed to when test="true") > > > > > > 3. copy > > > daisy-2.1/daisywiki/webapp/daisy/resources/xml/documentpage_pubreq.xml > > > to daisydata/pubreqs/matchlang/documentpage_pubreq.xml > > > > > > 4. copy same file to daisydata/pubreqs/matchlang/matchlang.xml and then > > > change the TWO occurrences of > > > > > > <p:navigationDocument > > > id="${pageContext.siteConf.navigationDocId}" > > > branch="${pageContext.siteConf.branchId}" > > > language="${pageContext.siteConf.languageId}"/> > > > > > > in that file to > > > > > > <p:navigationDocument > > > id="${pageContext.siteConf.navigationDocId}" > > > branch="${pageContext.siteConf.branchId}" > > > language="${language}"/> > > > > > > because ${language} is the document's language. But this last part is > > > black magic -- I don't know if I have to change both occurrences of > > > <p:navigationDocument>. Paths to the occurrence are: > > > > > > p:publisherRequest/p:document/p:preparedDocuments/p:navigationDocument > > > > > > and > > > > > > p:publisherRequest/jx:if test="${pageContext.layoutType == > > > 'default'}"/p:navigationTree/p:navigationDocument > > > > > > -- do I need to change both? Is the above process correct? Help! > > > > > > Júlio. > > > > > > _______________________________________________ > > > daisy community mailing list > > > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > > > mail to: daisy@... > > > list information: http://lists.cocoondev.org/mailman/listinfo/daisy > > _______________________________________________ > > daisy community mailing list > > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > > mail to: daisy@... > > list information: http://lists.cocoondev.org/mailman/listinfo/daisy > > _______________________________________________ > daisy community mailing list > Professional Daisy support: http://outerthought.org/en/services/daisy/support.html > mail to: daisy@... > list information: http://lists.cocoondev.org/mailman/listinfo/daisy daisy community mailing list Professional Daisy support: http://outerthought.org/en/services/daisy/support.html mail to: daisy@... list information: http://lists.cocoondev.org/mailman/listinfo/daisy |
| Free Forum Powered by Nabble | Forum Help |