RE: [Koha-devel] question about templating and directory structure
-----Original Message----- From: paul POULAIN [mailto:paul.poulain@free.fr] Sent: Tuesday, October 01, 2002 8:03 AM To: koha-devel@lists.sourceforge.net; Finlay Thompson Subject: [Koha-devel] question about templating and directory structure
I'm working a little on templates, for MARC support, and i've some problems.
How templates are supposed to be organised ? I thought it was : includes/templates/[theme_name]/*
but i saw some posts about [language]/[theme_name]/*
I think that we need to include the language identification above the theme identification. includes/templates/[language]/[theme_name] makes sense to me.
and today, finlay released files into koha/koha-tmpl/intranet-tmpl/default/en/*
I think this is broken WRT previous discussions. It seems like thes should be includes/templates/en/default/intranet/* If I'm wrong, please let me know.
I begin to be lost, and think that before beginning translations and/or releasing templated koha we should say definetly where are templates, and modify move file accordingly...
to end, i think we should spend some time to merge 1.2 templating stuff to main branch too...
This is certainly true. Does anyone want to step up to running the merge? -pate
-- Paul
------------------------------------------------------- This sf.net email is sponsored by: DEDICATED SERVERS only $89! Linux or FreeBSD, FREE setup, FAST network. Get your own server today at http://www.ServePath.com/indexfm.htm _______________________________________________ Koha-devel mailing list Koha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/koha-devel
Eyler, Patrick wrote:
but i saw some posts about [language]/[theme_name]/*
I think that we need to include the language identification above the theme identification. includes/templates/[language]/[theme_name] makes sense to me.
But Templates.pl from 1.2 makes no use of [language]. It builds template list from templates/* dir only. and i've no problems with this. Why is language needed in template selection ? Templates name should be
to end, i think we should spend some time to merge 1.2 templating stuff to main branch too...
This is certainly true. Does anyone want to step up to running the merge?
I'm afraid i'm not volunteer. I already merged 1.2 and main a few months ago, and don't want to do it again. Note we should merge auth stuff too, and other things... We are, again, forgetting consistency of development. I pointed, after merging 1.2 and main branch the necessity for everybody to be careful of both branches, but i see that i've not been heard... -- Paul
On Tue, 1 Oct 2002, paul POULAIN wrote:
Eyler, Patrick wrote:
but i saw some posts about [language]/[theme_name]/*
I think that we need to include the language identification above the theme identification. includes/templates/[language]/[theme_name] makes sense to me.
But Templates.pl from 1.2 makes no use of [language]. It builds template list from templates/* dir only. and i've no problems with this. Why is language needed in template selection ? Templates name should be
Are y'all talking about the structure in the CVS repository, in the distribution tarball, or in the installed files? One thing I'm afraid of is combinatorial explosion: if there is a separate file in the CVS tree for each (theme, language) pair, then it'll be impossible to maintain: if you want to tweak a template, you shouldn't have to separately update the English, French, Portuguese, and Tagalog versions. A better approach, if possible, would be to have a single template file in the CVS repository, and translate it into the different available languages either when building the distribution, or at install-time (by the end-user; this might be better, since the end-user could decide which translations to install), or perhaps even at run-time. (Sorry if I'm belaboring the obvious, or repeating what's been said elsewhere.) -- Andrew Arensburger Actually, these _do_ represent the arensb@ooblick.com opinions of ooblick.com! Generic Tagline V 6.01
Andrew Arensburger wrote:
But Templates.pl from 1.2 makes no use of [language]. It builds template list from templates/* dir only. and i've no problems with this. Why is language needed in template selection ? Templates name should be
Are y'all talking about the structure in the CVS repository, in the distribution tarball, or in the installed files?
I'm talking about cvs structure, but I think it should be as close as possible to the installation file...
One thing I'm afraid of is combinatorial explosion: if there is a separate file in the CVS tree for each (theme, language) pair, then it'll be impossible to maintain: if you want to tweak a template, you shouldn't have to separately update the English, French, Portuguese, and Tagalog versions. A better approach, if possible, would be to have a single template file in the CVS repository, and translate it into the different available languages either when building the distribution, or at install-time (by the end-user; this might be better, since the end-user could decide which translations to install), or perhaps even at run-time. (Sorry if I'm belaboring the obvious, or repeating what's been said elsewhere.)
I don't think it's possible for at least 3 reasons : * languages differences makes automatic building from a "dictionnary" a dream. * themes can be completly differents, even in data presented. * "translation teams" for each language are responsible for their languages. When templating will be stabilised and more than 1 template be avaible, it will be necessary to have rules to modify koha and report modifications to translations teams. Note : when a template is not avaible for one theme, the "default" one is used. this functionnality is already in koha. -- Paul
I'm working a little on templates, for MARC support, and i've some problems.
How templates are supposed to be organised ? I thought it was : includes/templates/[theme_name]/* Nope
but i saw some posts about [language]/[theme_name]/* Nope
I think that we need to include the language identification above the theme identification. includes/templates/[language]/[theme_name] makes sense to me.
and today, finlay released files into koha/koha-tmpl/intranet-tmpl/default/en/*
Yes
I think this is broken WRT previous discussions. It seems like thes should be includes/templates/en/default/intranet/* Nope
If I'm wrong, please let me know. Yes ;-)
Finlay has made a website describing the whole templating-stuff: http://koha.org/contribute/templating/ The details are at: http://koha.org/contribute/templating/contribute.html The actual directory for templates in CVS is /koha/koha-tmpl/... and then intranet-tmpl or opac-tmpl, themename, language, template. The theme we are currently used to is called 'default'. It will be 'hlt' (Horowena Library Trust) in future and then let's see what to do with default. What is still unclear to me is where to store images, html and includes (on the server and in cvs) At the moment they are in /koha-html will they mix up with the templates or reside seperate from them? BTW: I'm now on irc for a few hours. Dorian
Dorian Meid wrote:
Yes ;-)
Finlay has made a website describing the whole templating-stuff: http://koha.org/contribute/templating/ The details are at: http://koha.org/contribute/templating/contribute.html
OK BUT : * in templated scripts, we have : my $theme=picktemplate($includes, $templatebase); my $template = HTML::Template->new(filename => "$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path => [$includes]); * in C4::Ouput.pm/picktemplate, we have : opendir (D, "$includes/templates"); So, template choosing depends only on theme, and not on language. So, I conclude that finlays speaks, and we do something else. Not the best way to reach the goal ;-\ If we want to change something to this, we MUST DO IT NOW. Otherwise, it will become painfull very soon... I propose : we should change the picktemplate function. It could return the complete path to the template : my $template_name=picktemplate($includes,$templatebase); my $template = HTML::Template->new(filename => $template_name, die_on_bad_params => 0, path => [$includes]); question : about language, can we "detect" it inside the picktemplate sub ? PS : find . -name *.tmpl from *koha.v1.2* says : /./koha-html/intranet-html/includes/templates/cmsd/catalogue/searchresults.tmpl ./koha-html/intranet-html/includes/templates/cmsd/catalogue/intranet-main.tmpl ./koha-html/intranet-html/includes/templates/cmsd/catalogue/opac-main.tmpl <SNIP> ./koha-html/intranet-html/includes/templates/default/catalogue/opac-search.tmpl ./koha-html/intranet-html/includes/templates/default/marcimport/AcceptBiblioitem.tmpl <SNIP> ./koha-html/intranet-html/includes/templates/default/marcimport/uploadmarc.tmpl ./koha-html/intranet-html/includes/templates/default/user/userpage.tmpl/ and from *koha.v1.3* : /./koha/koha-tmpl/intranet-tmpl/default/en/searchheader.tmpl <SNIP> ./koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl ./koha/koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl <SNIP> ./koha/koha-tmpl/opac-tmpl/default/en/opac-user.tmpl ./koha-html/intranet-html/includes/templates/cmsd/catalogue/searchresults.tmpl <SNIP> ./koha-html/intranet-html/includes/templates/cmsd/catalogue/opac-main.tmpl ./koha-html/intranet-html/includes/templates/default/catalogue/MARCdetail.tmpl <SNIP> ./koha-html/intranet-html/includes/templates/default/parameters/marc_subfields_structure.tmpl ./koha-html/intranet-html/includes/templates/french/catalogue/detail.tmpl <SNIP> ./koha-html/intranet-html/includes/templates/french/catalogue/subject.tmpl / Thus we don't respect finlay decisions neither in 1.2 nor in 1.3... We can drop french templates, i added them only for tests purposes. what about cmsd (steve ? -- Paul
participants (4)
-
Andrew Arensburger -
Dorian Meid -
Eyler, Patrick -
paul POULAIN