To test:
git checkout 3.6.x
cd misc/translator
./tmpl_process3.pl update -i ../../koha-tmpl/opac-tmpl/prog/en/ \
-s ./po/fr-FR-i-opac-t-prog-v-3006000.po -r
po/fr-FR-i-opac-t-prog-v-3006000.po contains broken diacritics for NORMARC
strings for example
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
fixes regression caused by bug 6752
use encoding(UTF-8) rather than utf-8 for stricter
encoding
Marking output as ':utf8' only flags the data as utf8
using :encoding(UTF-8) also checks it as valid utf-8
see binmode in perlfunc for more details
In accordance with the robustness principle input
filehandles have not been changed as code may make
the undocumented assumption that invalid utf-8 is present
in the imput
Fixes errors reported by t/00-testcritic.t
Where feasable some filehandles have been made lexical rather than
reusing global filehandle vars
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This is a fairly hacky solution, a counter patch would be more than
welcome
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Updated, translated and installed German po files after applying this patch.
No problems found.
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This will re-add any leading spaces, so formatting is not messed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
- all examples from the bug report are fixed now
- verified system preferences are still translated
- verified xslt displays are still translated
- verified javascript alerts are still translated
- verified switching languages works
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
This test validate Template Toolkit (TT) Koha files.
For the time being an unique validation is done: Test if TT files
contain TT directive within HTML tag. For example:
<li[% IF
This kind of constuction MUST be avoided because it break Koha
translation process.
This patch transform also translation specific modules into C4 modules
in order to be able to use them in test case:
C4::TTPaser
C4::TmplToken
C4::TmplTokenType
This patch is a Perl adaptation of a Haskell script from Frère Sébastien
Marie.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Notes on testing:
- translate install de-DE - worked ok
- translate update de-DE > translate install de-DE - worked ok
- running the test xt/tt_valid.t - worked ok and pointed out lots of problems.
Found no problems.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Display a warning for strings that don't have the same count of %s placeholders
that the English original strings. Don't warn for not translated string and
'fuzzy' string because those strings are not installed, and this is the
translator responsability to examine them.
Based on Frère Sébastien Marie work.
Signed-off-by: Frère Sébastien Marie <semarie-koha@latrappe.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
For Translator Manager (myself...). A translation installation may fail because
translator hasn't enter properly string parameters (%s). With this patch, the
message ID is displayed not only the parameter.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
In opac/staff templates .po files, we have comment lines contextualizing
extracted text in templates. Path to template are absolute. For example, we can
have:
#: /home/katrin/kohaclone/koha-tmpl/intranet-tmpl/prog/en/...
modules/cataloguing/addbiblio.tmpl:585
The first part of the pathname is useless. With this patch, we just keep
relative path to tempalte from Koha template main directory. The above example
becomes:
#: intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl:585
To be applied on [3.2]
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
[1] Update all .po files in once with this command:
translate update
[2] For sysprefs, quoted text wasn't properly retrieved from .po file and so
quoted strings wasn't translatable.
[3] The install process (translate -p install de-DE) was rewriting syspref
.po file which isn't required anymore.
MUST be applied to [3.2] to get all syspref proper translation.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
More podchecker cleanups to eliminate warnings / errors
Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
tmpl_process is patched to handle properly specific XML directives.
UNIMARC XSL files are modified to gain knowledge of HTML entity
which isn't the case by default. It may be necessary to do the same
thing for MARC21 XSL.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>