[koha-commits] main Koha release repository branch master updated. v3.14.00-1147-g801c5e7
Git repo owner
gitmaster at git.koha-community.org
Mon May 5 06:25:15 CEST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".
The branch, master has been updated
via 801c5e77d0a7bdab5d2457d47b2fb2b852310c56 (commit)
via d24b24adee9d686c100b8b4e298abbb3ad89a950 (commit)
via 76e39750b7d1f767b9fd93ce328ab25a829898e3 (commit)
via fe32727fc55823ab1a3edba70597b89856cd0ea3 (commit)
via 061cff837d1667b0f714fbbfba59c2caed098d6b (commit)
via 75bd34df7acba7b20bc7981f2484e79e19032d4a (commit)
via 114f3dd49998be21643f83bec644f9837c6bdecc (commit)
from cf7d0c3a99d42fae2d23f9dafba136814dafa492 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 801c5e77d0a7bdab5d2457d47b2fb2b852310c56
Author: Julian Maurice <julian.maurice at biblibre.com>
Date: Mon Mar 17 23:25:37 2014 +0100
Bug 11848: Fix C4::Context::interface, add POD and UT
1/ Edit a Perl script, for example mainpage.pl
2/ add "use Koha::I18N;" to the top of file
3/ add a translatable message somewhere in the script (this have
to be after the call to get_template_and_user). For example:
warn gettext("This is a translated warning");
4/ Create or update the PO files with
misc/translator/translate create LANGCODE
or
misc/translator/translate update LANGCODE
(LANGCODE should be enable in syspref 'languages')
5/ In misc/translator/po/LANGCODE-messages.po you should have
your string, translate it (using a text editor or a PO file
editor, make sure you don't have the "fuzzy" flag for this
string).
6/ Go to mainpage.pl with active language being English with your
browser and check your logs. You should see your string "This
is a translated warning".
7/ Now change language to LANGCODE. Check your logs, you should
have the string translated.
Note: I chose to name the sub 'gettext' because it's the default
keyword for xgettext for Perl. We can change it to whatever we want.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Follow test plan, work as described.
No koha-qa errors.
Tests pass
Fixed small merge conflict on t/Context.t
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Passes all tests and QA script.
Copied test plan from bug.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
commit d24b24adee9d686c100b8b4e298abbb3ad89a950
Author: Julian Maurice <julian.maurice at biblibre.com>
Date: Wed Feb 26 16:45:59 2014 +0100
Bug 11848: Make Koha::I18N easier to use
Instead of writing
use CGI;
use Koha::I18N;
my $cgi = new CGI;
my $lh = Koha::I18N->get_handle_from_context($cgi, 'intranet');
print $lh->maketext('my translatable text');
you can now write
use Koha::I18N;
print gettext('my translatable text');
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
commit 76e39750b7d1f767b9fd93ce328ab25a829898e3
Author: Julian Maurice <julian.maurice at biblibre.com>
Date: Wed Feb 26 13:20:37 2014 +0100
Bug 11848: Move language detection function in C4::Languages
Also store interface (intranet, opac) in context to not have to pass it
as parameter.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>
No koha-qa errors
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Comments on last patch.
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
commit fe32727fc55823ab1a3edba70597b89856cd0ea3
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date: Thu Aug 15 15:19:32 2013 +0200
Bug 8044: (follow-up) ensure Modern::Perl is imported first
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
commit 061cff837d1667b0f714fbbfba59c2caed098d6b
Author: Julian Maurice <julian.maurice at biblibre.com>
Date: Mon Aug 20 13:51:27 2012 +0200
Bug 8044: (follow-up) add copyright block and use Modern::Perl
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
commit 75bd34df7acba7b20bc7981f2484e79e19032d4a
Author: Julian Maurice <julian.maurice at biblibre.com>
Date: Mon Aug 20 10:55:50 2012 +0200
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 at rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
commit 114f3dd49998be21643f83bec644f9837c6bdecc
Author: Julian Maurice <julian.maurice at biblibre.com>
Date: Fri May 4 14:33:10 2012 +0200
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 at rijksmuseum.nl>
Works as advertised. Some details needing further attention noted on bug
report.
Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc at esilibrary.com>
-----------------------------------------------------------------------
Summary of changes:
C4/Auth.pm | 7 +++-
C4/Context.pm | 25 +++++++++++
C4/Installer/PerlDependencies.pm | 10 +++++
C4/Languages.pm | 59 ++++++++++++++++++++++++--
C4/Templates.pm | 51 +---------------------
Koha/I18N.pm | 58 +++++++++++++++++++++++++
catalogue/search.pl | 5 ++-
misc/translator/LangInstaller.pm | 86 ++++++++++++++++++++++++++++++++++++++
opac/opac-search.pl | 4 +-
t/Context.t | 16 ++++++-
t/{Templates.t => Languages.t} | 9 ++--
11 files changed, 269 insertions(+), 61 deletions(-)
create mode 100644 Koha/I18N.pm
rename t/{Templates.t => Languages.t} (79%)
hooks/post-receive
--
main Koha release repository
More information about the koha-commits
mailing list