Koha/misc/translator
Bernardo Gonzalez Kriegel 7a325b55d1 Bug 12061 - tmpl_process3.pl - Include/exclude file by name
This patch adds options to include/exclude files by matching their names.
Also modifies current code to check only filenames (not dirs)
Checking is case insensitive !!

NOTE: The difference between -f and -m is subtle, but important.
They differs mainly on update,: -f do a merge, -m a replace

To test after patch:

A) Include only 'normarc'
1. create
cd misc/translator
perl tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s normarc.po -r -m normarc
- check provenance of strings
egrep "^#:" normarc.po | cut -d":" -f2 | sort | uniq
- only files with normarc in their names must be present

2. update
perl tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s normarc.po -r -m normarc
- repeat check

3. install
mkdir test
perl tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/bootstrap/en -o ./test -s normarc.po -r -m normarc
- check name of created files

rm -rf test normarc.po

B) Exclude
4. create
perl tmpl_process3.pl create -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s xnormarc.po -r -n normarc
- check provenance
egrep "^#:" xnormarc.po | cut -d":" -f2 | sort | uniq | grep -i normarc
- there must be no results

5. update
perl tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/bootstrap/en -s xnormarc.po -r -n normarc
- check provenance

6. install
mkdir test
perl tmpl_process3.pl install -i ../../koha-tmpl/opac-tmpl/bootstrap/en -o ./test -s xnormarc.po -r -n normarc
- check files
find test | grep -i normarc
- there must be no results

You can also try another combination, use for example "-m patron -m user -m bottom" (or use -n)
or mixed "-m marc -n normarc", do create/install and look filenames

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-01 11:00:15 -03:00
..
po Translation updates for 3.16.00 final release 2014-05-22 14:35:05 +00:00
LangInstaller.pm Bug 11848: Make Koha::I18N easier to use 2014-05-05 04:30:02 +00:00
Makefile
text-extract.pl
text-extract2.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
tmpl_process3.pl Bug 12061 - tmpl_process3.pl - Include/exclude file by name 2014-09-01 11:00:15 -03:00
TmplTokenizer.pm Bug 12301: Remove warnings on translate scripts 2014-05-30 15:46:17 -03:00
translate Bug 12301: Remove warnings on translate scripts 2014-05-30 15:46:17 -03:00
translator_doc.html
translator_doc.txt
VerboseWarnings.pm
xgettext.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00