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@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@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>