[Koha-bugs] [Bug 11848] Make Koha::I18N easier to user
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Feb 26 17:05:18 CET 2014
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11848
Julian Maurice <julian.maurice at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |Needs Signoff
--- Comment #3 from Julian Maurice <julian.maurice at biblibre.com> ---
Test plan (for developpers):
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.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list