aboutsummaryrefslogtreecommitdiffstats
path: root/library/jquery.i18n/jquery.i18n.min.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-13 04:28:12 -0700
committerfriendica <info@friendica.com>2012-08-13 04:28:12 -0700
commit6fcb3b44156a89feda9293c289175d0dec79cd80 (patch)
tree5fd1216891dc617560dad393c954afc928452067 /library/jquery.i18n/jquery.i18n.min.js
parent184cf51d2f21782d8fa78d833b1439ed692126ff (diff)
downloadvolse-hubzilla-6fcb3b44156a89feda9293c289175d0dec79cd80.tar.gz
volse-hubzilla-6fcb3b44156a89feda9293c289175d0dec79cd80.tar.bz2
volse-hubzilla-6fcb3b44156a89feda9293c289175d0dec79cd80.zip
add jquery.i18n for client side translations
Diffstat (limited to 'library/jquery.i18n/jquery.i18n.min.js')
-rw-r--r--library/jquery.i18n/jquery.i18n.min.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/library/jquery.i18n/jquery.i18n.min.js b/library/jquery.i18n/jquery.i18n.min.js
new file mode 100644
index 000000000..5476ed910
--- /dev/null
+++ b/library/jquery.i18n/jquery.i18n.min.js
@@ -0,0 +1,13 @@
+/*
+ * jQuery i18n plugin
+ * @requires jQuery v1.1 or later
+ *
+ * See http://recursive-design.com/projects/jquery-i18n/
+ *
+ * Licensed under the MIT license:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Version: 0.9.2 (201204070102)
+ */
+(function(f){f.i18n={dict:null,setDictionary:function(a){this.dict=a},_:function(a,b){var d=a;if(this.dict&&this.dict[a])d=this.dict[a];return this.printf(d,b)},toEntity:function(a){for(var b="",d=0;d<a.length;d++)b+=a.charCodeAt(d)>128?"&#"+a.charCodeAt(d)+";":a.charAt(d);return b},stripStr:function(a){return a.replace(/^\s*/,"").replace(/\s*$/,"")},stripStrML:function(a){a=a.split("\n");for(var b=0;b<a.length;b++)a[b]=stripStr(a[b]);return stripStr(a.join(" "))},printf:function(a,b){if(!b)return a;
+for(var d="",e=/%(\d+)\$s/g;result=e.exec(a);){var c=parseInt(result[1],10)-1;a=a.replace("%"+result[1]+"$s",b[c]);b.splice(c,1)}e=a.split("%s");if(e.length>1)for(c=0;c<b.length;c++){if(e[c].lastIndexOf("%")==e[c].length-1&&c!=b.length-1)e[c]+="s"+e.splice(c+1,1)[0];d+=e[c]+b[c]}return d+e[e.length-1]}};f.fn._t=function(a,b){return f(this).text(f.i18n._(a,b))}})(jQuery);