[Koha-bugs] [Bug 9161] Translate only specific files

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 24 02:47:38 CEST 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9161

--- Comment #8 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 18362
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18362&action=edit
Bug 9161: Translate only specific files

The previous version of tmpl_process3.pl says in the pod:

  -i, --input=SOURCE          Get or update strings from SOURCE file.
                              SOURCE is a directory if -r is also specified.

But is was not possible to specify one or more files.

This patch allows us to give one or more specific file with the -f
parameter.

for eg.:

perl tmpl_process3.pl install -i
/home/koha/koha-tmpl/opac-tmpl/prog/en/modules/
    -o /home/koha/koha-tmpl/opac-tmpl/prog/fr-FR/modules/
    -s /home/koha/misc/translator/po/fr-FR-i-opac-t-prog-v-3006000.po
    -r
    -f opac-account.tt
    -f opac-main.tt

You can specify:
  -f advsearch.tt => translate all files with a filename containing
  'advsearch.tt'
or
  -f search => will translate acqui/histsearch.tt, acqui/z3950_search.tt, etc.

Bug 9161: Followup: Add a -f param for the translate script

Now you can directly call the translate script
(misc/translator/translate) with the -f parameter

eg.:
./translate install|create|update -f search.tt -f main.tt

Signed-off-by: Frédéric Demians <f.demians at tamil.fr>

I've squashed the 3 patches, and reported doc into 'translate' script.
It works as advertised.

Side note: It would be great to extend this functionnality in order to
be able to apply the translation to XSL files stored outside Koha
directories hierarchy. Useful to translate site-specific XSLs defined
with XSLTResultsDisplay, and other sysprefs.

Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list