App-I18N
view release on metacpan or search on metacpan
# App::I18N
## Description
App::I18N borrows some good stuff from Jifty::I18N and tries to provide a general
po management script for all frameworks | applications.
## Basic flow
### Basic po file manipulation:
parse strings from `lib` path:
$ cd app
$ po parse lib
lib/App/I18N.pm view on Meta::CPAN
=head1 NAME
App::I18N - I18N utility.
=head1 DESCRIPTION
I18N management utility, provides an command-line interface to parse /
translate / update mo file i18n messages.
App::I18N borrows some good stuff from L<Jifty::I18N> and L<Jifty::Script::Po>
and tries to provide a general po management script for all frameworks |
applications.
=head1 USAGE
=head2 Basic flow
=head3 Basic po file manipulation:
parse strings from `lib` path:
lib/App/I18N/I18N.pm view on Meta::CPAN
#
# Locale::Maketext::Lexicon->import(
# { '*' => \@import,
# _decode => 1,
# _auto => 1,
# _style => 'gettext',
# }
# );
#
# # Allow hard-coded languages in the config file
# my $lang = Jifty->config->framework('L10N')->{'Lang'};
# $lang = [defined $lang ? $lang : ()] unless ref($lang) eq 'ARRAY';
#
# # Allow hard-coded allowed-languages in the config file
# my $allowed_lang = Jifty->config->framework('L10N')->{'AllowedLang'};
# $allowed_lang = [defined $allowed_lang ? $allowed_lang : ()] unless ref($allowed_lang) eq 'ARRAY';
#
# if (@$allowed_lang) {
# my $allowed_regex = join '|', map {
# my $it = $_;
# $it =~ tr<-A-Z><_a-z>; # lc, and turn - to _
# $it =~ tr<_a-z0-9><>cd; # remove all but a-z0-9_
# $it;
# } @$allowed_lang;
#
share/static/jquery-1.4.2.js view on Meta::CPAN
if ( document.addEventListener ) {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
// A fallback to window.onload, that will always work
window.addEventListener( "load", jQuery.ready, false );
// If IE event model is used
} else if ( document.attachEvent ) {
// ensure firing before onload,
// maybe late but safe also for iframes
document.attachEvent("onreadystatechange", DOMContentLoaded);
// A fallback to window.onload, that will always work
window.attachEvent( "onload", jQuery.ready );
// If IE and not a frame
// continually check to see if the document is ready
var toplevel = false;
try {
toplevel = window.frameElement == null;
} catch(e) {}
if ( document.documentElement.doScroll && toplevel ) {
doScrollCheck();
}
}
},
// See test/unit/core.js for details concerning isFunction.
// Since version 1.3, DOM methods and functions like alert
share/static/jquery-1.4.2.js view on Meta::CPAN
jQuery.props = {
"for": "htmlFor",
"class": "className",
readonly: "readOnly",
maxlength: "maxLength",
cellspacing: "cellSpacing",
rowspan: "rowSpan",
colspan: "colSpan",
tabindex: "tabIndex",
usemap: "useMap",
frameborder: "frameBorder"
};
var expando = "jQuery" + now(), uuid = 0, windowData = {};
jQuery.extend({
cache: {},
expando:expando,
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
share/static/jquery-1.4.2.js view on Meta::CPAN
// Bind an event to an element
// Original by Dean Edwards
add: function( elem, types, handler, data ) {
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
// For whatever reason, IE has trouble passing the window object
// around, causing it to be cloned in the process
if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
elem = window;
}
var handleObjIn, handleObj;
if ( handler.handler ) {
handleObjIn = handler;
handler = handleObjIn.handler;
}
share/static/jquery-1.4.2.js view on Meta::CPAN
});
// Prevent memory leaks in IE
// Window isn't included so as not to unbind existing unload events
// More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
if ( window.attachEvent && !window.addEventListener ) {
window.attachEvent("onunload", function() {
for ( var id in jQuery.cache ) {
if ( jQuery.cache[ id ].handle ) {
// Try/Catch is to handle iframes being unloaded, see #4280
try {
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
} catch(e) {}
}
}
});
}
/*!
* Sizzle CSS Selector Engine - v1.0
* Copyright 2009, The Dojo Foundation
share/static/jquery-1.4.2.js view on Meta::CPAN
}
var contains = document.compareDocumentPosition ? function(a, b){
return !!(a.compareDocumentPosition(b) & 16);
} : function(a, b){
return a !== b && (a.contains ? a.contains(b) : true);
};
var isXML = function(elem){
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
var posProcess = function(selector, context){
var tmpSet = [], later = "", match,
root = context.nodeType ? [context] : context;
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
share/static/jquery-1.4.2.js view on Meta::CPAN
prevUntil: function( elem, i, until ) {
return jQuery.dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
return jQuery.sibling( elem.parentNode.firstChild, elem );
},
children: function( elem ) {
return jQuery.sibling( elem.firstChild );
},
contents: function( elem ) {
return jQuery.nodeName( elem, "iframe" ) ?
elem.contentDocument || elem.contentWindow.document :
jQuery.makeArray( elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until );
if ( !runtil.test( name ) ) {
selector = until;
}
( run in 0.545 second using v1.01-cache-2.11-cpan-e1769b4cff6 )