Bug 8044: new module for translating strings in Perl source files

You have to use the new module Koha::I18N

Code example:
  use Koha::I18N;
  use CGI;

  my $input = new CGI;
  my $lh = Koha::I18N->get_handle_from_context($input, 'intranet');

  print $lh->maketext("Localized string!");

PO files are in misc/translator/po/LANG-messages.po.
Creation of PO files are integrated to existing workflow, so to create
PO file for a language, just run in misc/translator:
  ./translate create LANG
To update:
  ./translate update LANG
You can then translate the PO with your favorite editor. Strings will be
localized at runtime.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 114f3dd49998be21643f83bec644f9837c6bdecc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 8044: (follow-up) fix warning and error messages in translate.pl

CHARSET is now automatically replaced by UTF-8, and 'update' creates the
PO file if it does not exist.

Also do not try to create PO files if POT file creation failed (when
there is no messages to translate for example).

+ add some verbosity
+ add Locale::Maketext and Locale::Maketext::Lexicon to Koha
dependencies

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 75bd34df7acba7b20bc7981f2484e79e19032d4a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Conflicts:
	C4/Installer/PerlDependencies.pm
Bug 8044: (follow-up) add copyright block and use Modern::Perl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 061cff837d1667b0f714fbbfba59c2caed098d6b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 8044: (follow-up) ensure Modern::Perl is imported first

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fe32727fc55823ab1a3edba70597b89856cd0ea3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 9865: make SIP msg encoding configurable via SIPconfig.xml

The accounts->login tag in SIPconfig.xml can now accept a new
parameter, "encoding". It will be mostly used to encode to utf8.

For this, simply add the parameter: encoding="utf8"

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

Works as advertised, does nothing if encoding is not set.
Blows up all the machines that can't handled utf8 if it is set :) But
that's not Koha's fault. :)

Patch rebased by Christophe Croullebois  <christophe.croullebois@biblibre.com>

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>

But now I did it the right way! And I can confirm that this patch solves
all issues with mangled characters in SIP messages. Confirmed that it
looks good with Norwegian characters in patron name and in book titles.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 4a72f6b2375895c690dcaaaff26b07de53cfd518)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 9865 (follow-up) give better usage examples in example SIPconfig.xml

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 7b295e9dd7a1f2a9b1d1cf1882edbc2a0e70fe3a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>