diff --git a/licenses/jquery.i18n.LICENSE.txt b/licenses/jquery.i18n.LICENSE.txt new file mode 100644 index 000000000..f3a03b7e1 --- /dev/null +++ b/licenses/jquery.i18n.LICENSE.txt @@ -0,0 +1,21 @@ +Copyright (c) 2012-2013 Santhosh Thottingal and other +contributors. See CREDITS for a list. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/licenses/recurser_jquery-i18n.LICENSE.txt b/licenses/recurser_jquery-i18n.LICENSE.txt deleted file mode 100644 index 978ee2ae8..000000000 --- a/licenses/recurser_jquery-i18n.LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Dave Perrett, http://recursive-design.com/ - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 009429d49..f20b0db84 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -345,6 +345,11 @@ function init() { "externals/jsoneditor/jsoneditor.js", "externals/select2/select2.min.js", "externals/jquery.lavalamp.min.js", + "externals/jquery.i18n.messagestore.js", + "externals/jquery.i18n.emitter.js", + "externals/jquery.i18n.parser.js", + "externals/jquery.i18n.emitter.js", + "externals/jquery.i18n.language.js", "scripts/util/misc.js", "scripts/util/url.js", @@ -429,6 +434,10 @@ function init() { "externals/imgareaselect/jquery.imgareaselect.js", "externals/date.js", "externals/jquery.i18n.js", + "externals/jquery.i18n.messagestore.js", + "externals/jquery.i18n.parser.js", + "externals/jquery.i18n.emitter.js", + "externals/jquery.i18n.language.js", "externals/underscore-min.js", "externals/jsoneditor/jsoneditor.js", @@ -541,6 +550,10 @@ function init() { "externals/imgareaselect/jquery.imgareaselect.js", "externals/date.js", "externals/jquery.i18n.js", + "externals/jquery.i18n.messagestore.js", + "externals/jquery.i18n.parser.js", + "externals/jquery.i18n.emitter.js", + "externals/jquery.i18n.language.js", "externals/underscore-min.js", "scripts/preferences.js", ] diff --git a/main/webapp/modules/core/externals/jquery.i18n.emitter.js b/main/webapp/modules/core/externals/jquery.i18n.emitter.js new file mode 100644 index 000000000..ef96d4969 --- /dev/null +++ b/main/webapp/modules/core/externals/jquery.i18n.emitter.js @@ -0,0 +1 @@ +!function(e){"use strict";var n=function(){this.language=e.i18n.languages[String.locale]||e.i18n.languages.default};n.prototype={constructor:n,emit:function(n,r){var t,a,u,i=this;switch(typeof n){case"string":case"number":t=n;break;case"object":if(a=e.map(n.slice(1),function(e){return i.emit(e,r)}),u=n[0].toLowerCase(),"function"!=typeof i[u])throw new Error('unknown operation "'+u+'"');t=i[u](a,r);break;case"undefined":t="";break;default:throw new Error("unexpected type in AST: "+typeof n)}return t},concat:function(n){var r="";return e.each(n,function(e,n){r+=n}),r},replace:function(e,n){var r=parseInt(e[0],10);return r1?["CONCAT"].concat(n):n[0]}function c(){var n=t([w,v,a]);return null===n?null:[n[0],n[2]]}function f(){var n=t([w,v,b]);return null===n?null:[n[0],n[2]]}function s(){var n=t([E,j,O]);return null===n?null:n[1]}var g,v,h,p,d,m,$,x,C,A,P,j,w,E,O,S,b,y,F=0;if(g=l("|"),v=l(":"),h=l("\\"),p=e(/^./),d=l("$"),m=e(/^\d+/),$=e(/^[^{}\[\]$\\]/),x=e(/^[^{}\[\]$\\|]/),C=e(/^[^{}\[\]$\s]/),r([i,C]),A=r([i,x]),P=r([i,$]),w=function(n,r){return function(){var t=n();return null===t?null:r(t)}}(e(/^[ !"$&'()*,.\/0-9;=?@A-Z\^_`a-z~\x80-\xFF+\-]+/),function(n){return n.toString()}),j=r([function(){var n=t([r([c,f]),u(0,o)]);return null===n?null:n[0].concat(n[1])},function(){var n=t([w,u(0,o)]);return null===n?null:[n[0]].concat(n[1])}]),E=l("{{"),O=l("}}"),S=r([s,a,function(){var n=u(1,P)();return null===n?null:n.join("")}]),b=r([s,a,function(){var n=u(1,A)();return null===n?null:n.join("")}]),null===(y=function(){var n=u(0,S)();return null===n?null:["CONCAT"].concat(n)}())||F!==n.length)throw new Error("Parse error at position "+F.toString()+" in input: "+n);return y}},n.extend(n.i18n.parser,new r)}(jQuery);