aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js
diff options
context:
space:
mode:
authorherbert <herbert.eiselt@highstreet-technologies.com>2019-12-14 00:06:42 +0100
committerherbert <herbert.eiselt@highstreet-technologies.com>2019-12-14 00:07:02 +0100
commitda4fd6169717cfa04d644d0af0d23dd089a6e373 (patch)
tree3c7a2c804b001349dc24852f7e488061a2f733f4 /sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js
parent58f412ad18c1daf622e54ed36db6014f4e04f3f7 (diff)
remove old version
of devicemodel devicemanager oldux featureaggregator Issue-ID: SDNC-1004 Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com> Change-Id: I5337643181e2398e5a8097e4ee14fa4ac96d0d4c
Diffstat (limited to 'sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js')
-rw-r--r--sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js108
1 files changed, 0 insertions, 108 deletions
diff --git a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js b/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js
deleted file mode 100644
index 9765ded86..000000000
--- a/sdnr/wt/devicemanager/provider/src/main/resources/elasticsearch/plugins/head/_site/i18n.js
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Copyright 2010-2013 Ben Birch
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this software except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-(function() {
- /**
- * provides text formatting and i18n key storage features<br>
- * implements most of the Sun Java MessageFormat functionality.
- * @see <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/text/MessageFormat.html" target="sun">Sun's Documentation</a>
- */
-
- var keys = {};
-
- var format = function(message, args) {
- var substitute = function() {
- var format = arguments[1].split(',');
- var substr = escape(args[format.shift()]);
- if(format.length === 0) {
- return substr; // simple substitution eg {0}
- }
- switch(format.shift()) {
- case "number" : return (new Number(substr)).toLocaleString();
- case "date" : return (new Date(+substr)).toLocaleDateString(); // date and time require milliseconds since epoch
- case "time" : return (new Date(+substr)).toLocaleTimeString(); // eg i18n.text("Key", +(new Date())); for current time
- }
- var styles = format.join("").split("|").map(function(style) {
- return style.match(/(-?[\.\d]+)(#|<)([^{}]*)/);
- });
- var match = styles[0][3];
- for(var i=0; i<styles.length; i++) {
- if((styles[i][2] === "#" && (+styles[i][1]) === (+substr)) ||
- (styles[i][2] === "<" && ((+styles[i][1]) < (+substr)))) {
- match = styles[i][3];
- }
- }
- return match;
- };
-
- return message && message.replace(/'(')|'([^']+)'|([^{']+)|([^']+)/g, function(x, sq, qs, ss, sub) {
- do {} while(sub && (sub !== (sub = (sub.replace(/\{([^{}]+)\}/, substitute)))));
- return sq || qs || ss || unescape(sub);
- });
- };
-
- this.i18n = {
-
- setKeys: function(strings) {
- for(var key in strings) {
- keys[key] = strings[key];
- }
- },
-
- text: function() {
- var args = Array.prototype.slice.call(arguments),
- key = keys[args.shift()];
- if(args.length === 0) {
- return key;
- }
- return format(key, args);
- },
-
- complex: function() {
- var args = Array.prototype.slice.call(arguments),
- key = keys[args.shift()],
- ret = [],
- replacer = function(x, pt, sub) { ret.push(pt || args[+sub]); return ""; };
- do {} while(key && key !== (key = key.replace(/([^{]+)|\{(\d+)\}/, replacer )));
- return ret;
- }
-
- };
-
-})();
-
-(function() {
- var nav = window.navigator;
- var userLang = ( nav.languages && nav.languages[0] ) || nav.language || nav.userLanguage;
- var scripts = document.getElementsByTagName('script');
- var data = scripts[ scripts.length - 1].dataset;
- if( ! data["langs"] ) {
- return;
- }
- var langs = data["langs"].split(/\s*,\s*/);
- var script0 = scripts[0];
- function install( lang ) {
- var s = document.createElement("script");
- s.src = data["basedir"] + "/" + lang + '_strings.js';
- s.async = false;
- script0.parentNode.appendChild(s);
- script0 = s;
- }
-
- install( langs.shift() ); // always install primary language
- userLang && langs
- .filter( function( lang ) { return userLang.indexOf( lang ) === 0; } )
- .forEach( install );
-}());