[Jifty-commit] r6573 - jifty/trunk/lib/Jifty

Jifty commits jifty-commit at lists.jifty.org
Tue Mar 10 05:01:31 EDT 2009


Author: clkao
Date: Tue Mar 10 05:01:31 2009
New Revision: 6573

Modified:
   jifty/trunk/lib/Jifty/I18N.pm

Log:
hacky maketext translation from gettext po when skipping po load.

Modified: jifty/trunk/lib/Jifty/I18N.pm
==============================================================================
--- jifty/trunk/lib/Jifty/I18N.pm	(original)
+++ jifty/trunk/lib/Jifty/I18N.pm	Tue Mar 10 05:01:31 2009
@@ -211,8 +211,12 @@
 my $LAST_MODIFED = '';
 sub refresh {
     if ( Jifty->config->framework('L10N')->{'Disable'} && !$loaded) {
-        # skip loading po
-        __PACKAGE__->install_global_loc(\__PACKAGE__->get_handle);
+        # skip loading po, but still do the translation for maketext
+        require Locale::Maketext::Lexicon;
+        my $lh = __PACKAGE__->get_handle;
+        my $orig = Jifty::I18N::en->can('maketext');
+        *Jifty::I18N::en::maketext = Locale::Maketext::Lexicon->_style_gettext($orig);
+        __PACKAGE__->install_global_loc(\$lh);
         return;
     }
 


More information about the Jifty-commit mailing list