Browse Source

start working on localization

Nikolay Suslov 7 years ago
parent
commit
fd99da3bba

+ 112 - 16
public/index.html

@@ -12,7 +12,8 @@
   <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
   <script src="./web/lib/socketio/socket.io.js"></script>
   <link rel="stylesheet" href="./web/lib/app.css">
-  <script src="./web/lib/app.js"></script>
+  <!--<script src="./web/lib/polyglot-lang.js" type="module"></script> -->
+ <!-- <script src="./web/lib/app.js" type="module"></script> -->
 
   <!-- Global Site Tag (gtag.js) - Google Analytics -->
   <script async src="https://www.googletagmanager.com/gtag/js?id=UA-11815598-9"></script>
@@ -24,48 +25,143 @@
     gtag('config', 'UA-11815598-9');
 
   </script>
-
+  <!-- <script src="./web/lib/polyglot/polyglot.min.js"></script> -->
+  <script type="module">
+    import {getAppDetails} from '/web/lib/app.js';
+    //var socket = initWebSocket();
+    window.onload = getAppDetails('webapps.json');
+  </script>
 
 </head>
 
 <body class="mdc-typography">
 
-  <a href="https://github.com/NikolaySuslov/livecodingspace"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png"></a>
+  <a href="https://github.com/NikolaySuslov/livecodingspace">
+    <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67"
+      alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png">
+  </a>
 
   <div id="header" class="mdc-layout-grid mdc-layout-grid--align-left">
     <div class="mdc-layout-grid__inner">
-      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
+      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-10">
         <h1 class="mdc-typography--display3 mdc-theme--text-secondary-on-background mdc-typography">
-          <strong>LiveCoding</strong>.space
+            <a class="mdc-typography link-in-text" style="cursor: pointer;" onclick="window.location.reload(true)"><strong>LiveCoding</strong>.space</a>
+          <!--<strong>LiveCoding</strong>.space -->
         </h1>
       </div>
+      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2">
+          <span class="mdc-typography--subheading2 mdc-theme--text-secondary-on-background mdc-typography">
+              <a class="mdc-typography link-in-text mdc-theme--text-hint-on-background" href="#">RU</a>
+            <!--<strong>LiveCoding</strong>.space -->
+          </span>
+          <span class="mdc-typography--subheading2 mdc-theme--text-secondary-on-background mdc-typography">
+              <a class="mdc-typography link-in-text mdc-theme--text-hint-on-background" href="#">EN</a>
+            <!--<strong>LiveCoding</strong>.space -->
+          </span>
+        </div>
       <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
         <h1 class="mdc-typography mdc-typography--headline mdc-typography--adjust-margin mdc-theme--text-hint-on-background">
-          Collaborative Live Coding Space with support of user-defined languages and WebVR ready 3D graphics. <br> Based on: <strong>Virtual World Framework | A-Frame | Ohm language | OSC.js | and more... </strong> by Krestianstvo.org
+          Collaborative Live Coding Space with support of user-defined languages and WebVR ready 3D graphics.
+          <br> Based on:
+          <strong>Virtual World Framework | A-Frame | Ohm language | OSC.js | and more... </strong> by
+          <a class="mdc-typography link-in-text mdc-theme--text-hint-on-background"
+            href="https://www.krestianstvo.org"><strong>Krestianstvo.org</strong></a>
         </h1>
       </div>
-      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
-        <iframe src="https://player.vimeo.com/video/239924195?title=0&byline=0&portrait=0" width="600" height="338" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
+    </div>
+  </div>
+  <div id="about" class="mdc-layout-grid">
+    <div class="mdc-layout-grid__inner">
+      <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
+        <h1 class="mdc-typography--display1 mdc-theme--text-hint-on-background">Features</h1>
+
+        <ul class="featureList mdc-typography mdc-typography--title mdc-theme--text-hint-on-background">
+          <li>
+            <strong>Decentralized network model</strong> for
+            <strong>A-Frame</strong> components and entities based on
+            <strong>VWF</strong> replicated computation architecture</li>
+          <li>
+            <strong>Ohm</strong> language driver for sharing user-defined grammars, parsers, tokenisers inside virtual space</li>
+          <li>In browser
+            <strong>Code and Properties editor</strong> based on Cell.js</li>
+          <li>
+            <strong>OSC </strong>messaging through
+            <a class="mdc-typography link-in-text mdc-theme--text-hint-on-background" href="https://github.com/NikolaySuslov/osc-relay-lcs">OSC relay</a> on the client</li>
+          <li>
+            <strong>Avatars</strong> (Simple and GLTF models with animation)</li>
+          <li>
+            <strong>Multi-window</strong> or multi-monitor/multi-machine setups with view
+            <strong>offset cameras</strong>
+          </li>
+          <li>
+            <strong>WebRTC</strong> for video/audio streaming,
+            <strong>3D positional audio</strong> support</li>
+          <li>
+            <strong>GearVR, Windows MixedReality</strong> motion controllers</li>
+        </ul>
+      </div>
+
+      <div class="mdc-layout-grid__cell mdc-layout-grid__cell">
+        <iframe src="https://player.vimeo.com/video/239924195?title=0&byline=0&portrait=0" width="600" height="338" frameborder="0"
+          webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
+
       </div>
-      <hr class="mdc-list-divider"/>
+
+    </div>
+  </div>
+  <hr class="mdc-list-divider mdc-theme--text-hint-on-background divider" />
+
+  <div id="info" class="mdc-layout-grid">
+    <div class="mdc-layout-grid__inner">
       <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
+        <h1 class="mdc-typography--display1 mdc-theme--text-hint-on-background">Virtual Worlds</h1>
         <h1 class="mdc-typography mdc-typography--headline mdc-theme--text-hint-on-background">
-          To begin collaborative coding in virtual space, just start one of the listed prototypes and connect to it from another browser window using the generated link. The link will apper near the <strong>Start new</strong> button.
+          To begin collaborative coding in virtual space, just start one of the listed prototypes and connect to it from another browser
+          window using the generated link. The link will apper near the
+          <strong>Start new</strong> button.
         </h1>
       </div>
     </div>
   </div>
 
-  
-
   <div id="main">
   </div>
+  <hr class="mdc-list-divider mdc-theme--text-hint-on-background divider" />
 
+  <div id="videoList">
+    <div id="about" class="mdc-layout-grid">
+      <div class="mdc-layout-grid__inner">
+        <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
+          <h1 class="mdc-typography--display1 mdc-theme--text-hint-on-background">Demo videos</h1>
 
-  <script>
-    //var socket = initWebSocket();
-    window.onload = getAppDetails('webapps.json');
-  </script>
+          <iframe src="https://player.vimeo.com/video/243291223?title=0&byline=0&portrait=0" width="600" height="337" frameborder="0"
+            webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
+
+
+          <iframe src="https://player.vimeo.com/video/251057056?title=0&byline=0&portrait=0" width="600" height="338" frameborder="0"
+            webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
+        </div>
+      </div>
+    </div>
+  </div>
+  <hr class="mdc-list-divider mdc-theme--text-hint-on-background divider" /> 
+
+  <div id="footer">
+<div id="about" class="mdc-layout-grid">
+      <div class="mdc-layout-grid__inner">
+          <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-10">
+
+            </div>
+        <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-2">
+          <h3 class="mdc-typography--subheading2 mdc-theme--text-hint-on-background"><a class="mdc-typography link-in-text mdc-theme--text-hint-on-background"
+            href="https://www.krestianstvo.org">Krestianstvo.org</a> 2018</h3>
+        </div>
+      </div>
+    </div>
+   
+  </div>
+ 
+  
 
   <script>
     mdc.autoInit()

+ 47 - 0
public/web/lib/app.css

@@ -30,3 +30,50 @@ background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(
   background: #E7E7E7;
 }
 
+
+a.link-in-text {
+  outline: none;
+  text-decoration: none;
+  color: inherit;
+  border-bottom: 1px solid;
+}
+
+
+a.link-in-text:link {
+  border-bottom: 1px solid;
+}
+
+
+
+a.link-in-text:visited {
+  border-bottom: 1px solid;
+}
+
+
+a.link-in-text:focus {
+  border-bottom: 2px solid; 
+  
+}
+
+a.link-in-text:hover {   
+  border-bottom: 2px solid; 
+}
+
+a.link-in-text:active {
+  
+  border-bottom: 1px solid; 
+}
+
+/* 
+border-bottom: 1px solid; 
+background: rgb(237, 237, 237);
+background: rgb(217, 217, 217);
+*/
+
+.featureList {
+  list-style: square;
+}
+
+.divider {
+  border-bottom-width: thin;
+}

+ 37 - 4
public/web/lib/app.js

@@ -1,3 +1,5 @@
+import { Lang } from '/web/lib/polyglot-lang.js';
+
 var options = {
     
         query: 'pathname=' + window.location.pathname.slice(1,
@@ -64,6 +66,38 @@ var options = {
             });
     }
     
+    function getSiteHeader(){
+        return  {
+            $type: "div",
+            class: "mdc-layout-grid",
+            $components: [
+                {
+                    $type: "div",
+                    class: "mdc-layout-grid__inner",
+                    $components: [
+                        {
+                            $cell: true,
+                            $type: "div",
+                            class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
+                            $components: [
+                                
+                        {
+                            $cell: true,
+                            $type: "h1",
+                            class: "mdc-typography--display1 mdc-theme--text-hint-on-background",
+                            $text: "Virtual Worlds"
+                        }
+                    ]
+                }
+                    ]
+                }
+            ]
+
+        }
+        
+        
+    }
+
     function parseWebAppDataForCell(data) {
     
         document.querySelector("#main").$cell({
@@ -93,7 +127,7 @@ var options = {
             },
             $update: function () {
                 this.$components = [
-                    // siteHeader,
+                   //getSiteHeader(),// siteHeader,
                     {
                         $type: "div",
                         class: "mdc-layout-grid",
@@ -148,7 +182,7 @@ var options = {
                             $components: [
                                 {
                                     $type: "a",
-                                    class: "mdc-button mdc-button--compact mdc-card__action mdc-button--raised",
+                                    class: "mdc-button mdc-button--compact mdc-card__action mdc-button--stroked",
                                     $text: "Start new",
                                     target: "_blank",
                                     href: "/" + desc[0],
@@ -289,5 +323,4 @@ var options = {
         }
     }
     
-    
-    
+    export {getAppDetails};

File diff suppressed because it is too large
+ 257 - 974
public/web/lib/mdc/dist/material-components-web.css


File diff suppressed because it is too large
+ 449 - 468
public/web/lib/mdc/dist/material-components-web.js


File diff suppressed because it is too large
+ 0 - 0
public/web/lib/mdc/dist/material-components-web.min.css


File diff suppressed because it is too large
+ 0 - 0
public/web/lib/mdc/dist/material-components-web.min.js


+ 38 - 0
public/web/lib/polyglot-lang.js

@@ -0,0 +1,38 @@
+class Lang {
+    constructor() {
+        console.log("lang constructor");
+        this.polyglot = Polyglot;
+
+        if (localStorage.getItem('krestianstvo_locale')) {
+        } else {
+            localStorage.setItem('krestianstvo_locale', 'en');
+        }
+        this.locale = localStorage.getItem('krestianstvo_locale');
+    }
+
+    async getLang(langID) {
+        let response = await fetch("/web/locale/" + langID + ".json");
+        let data = await response.json();
+        return data
+    }
+
+    setLanguage(langID) {
+        var self = this;
+        return this.getLang(langID).then(phrases => {
+            this.language = new Polyglot({ phrases });
+        });
+    }
+
+    setLocale(langID){
+        localStorage.setItem('krestianstvo_locale', langID);
+        this.locale = langID;
+    }
+
+    changeLanguageTo(langID){
+        this.setLocale(langID);
+        this.setLanguage(langID);
+    }
+
+}
+
+  export {Lang};

+ 301 - 0
public/web/lib/polyglot/polyglot.js

@@ -0,0 +1,301 @@
+//     (c) 2012 Airbnb, Inc.
+//
+//     polyglot.js may be freely distributed under the terms of the BSD
+//     license. For all licensing information, details, and documention:
+//     http://airbnb.github.com/polyglot.js
+//
+//
+// Polyglot.js is an I18n helper library written in JavaScript, made to
+// work both in the browser and in Node. It provides a simple solution for
+// interpolation and pluralization, based off of Airbnb's
+// experience adding I18n functionality to its Backbone.js and Node apps.
+//
+// Polylglot is agnostic to your translation backend. It doesn't perform any
+// translation; it simply gives you a way to manage translated phrases from
+// your client- or server-side JavaScript application.
+//
+
+
+(function(root, factory) {
+  if (typeof define === 'function' && define.amd) {
+    define([], function() {
+      return factory(root);
+    });
+  } else if (typeof exports === 'object') {
+    module.exports = factory(root);
+  } else {
+    root.Polyglot = factory(root);
+  }
+}(this, function(root) {
+  'use strict';
+
+  // ### Polyglot class constructor
+  function Polyglot(options) {
+    options = options || {};
+    this.phrases = {};
+    this.extend(options.phrases || {});
+    this.currentLocale = options.locale || 'en';
+    this.allowMissing = !!options.allowMissing;
+    this.warn = options.warn || warn;
+  }
+
+  // ### Version
+  Polyglot.VERSION = '0.4.3';
+
+  // ### polyglot.locale([locale])
+  //
+  // Get or set locale. Internally, Polyglot only uses locale for pluralization.
+  Polyglot.prototype.locale = function(newLocale) {
+    if (newLocale) this.currentLocale = newLocale;
+    return this.currentLocale;
+  };
+
+  // ### polyglot.extend(phrases)
+  //
+  // Use `extend` to tell Polyglot how to translate a given key.
+  //
+  //     polyglot.extend({
+  //       "hello": "Hello",
+  //       "hello_name": "Hello, %{name}"
+  //     });
+  //
+  // The key can be any string.  Feel free to call `extend` multiple times;
+  // it will override any phrases with the same key, but leave existing phrases
+  // untouched.
+  //
+  // It is also possible to pass nested phrase objects, which get flattened
+  // into an object with the nested keys concatenated using dot notation.
+  //
+  //     polyglot.extend({
+  //       "nav": {
+  //         "hello": "Hello",
+  //         "hello_name": "Hello, %{name}",
+  //         "sidebar": {
+  //           "welcome": "Welcome"
+  //         }
+  //       }
+  //     });
+  //
+  //     console.log(polyglot.phrases);
+  //     // {
+  //     //   'nav.hello': 'Hello',
+  //     //   'nav.hello_name': 'Hello, %{name}',
+  //     //   'nav.sidebar.welcome': 'Welcome'
+  //     // }
+  //
+  // `extend` accepts an optional second argument, `prefix`, which can be used
+  // to prefix every key in the phrases object with some string, using dot
+  // notation.
+  //
+  //     polyglot.extend({
+  //       "hello": "Hello",
+  //       "hello_name": "Hello, %{name}"
+  //     }, "nav");
+  //
+  //     console.log(polyglot.phrases);
+  //     // {
+  //     //   'nav.hello': 'Hello',
+  //     //   'nav.hello_name': 'Hello, %{name}'
+  //     // }
+  //
+  // This feature is used internally to support nested phrase objects.
+  Polyglot.prototype.extend = function(morePhrases, prefix) {
+    var phrase;
+
+    for (var key in morePhrases) {
+      if (morePhrases.hasOwnProperty(key)) {
+        phrase = morePhrases[key];
+        if (prefix) key = prefix + '.' + key;
+        if (typeof phrase === 'object') {
+          this.extend(phrase, key);
+        } else {
+          this.phrases[key] = phrase;
+        }
+      }
+    }
+  };
+
+  // ### polyglot.clear()
+  //
+  // Clears all phrases. Useful for special cases, such as freeing
+  // up memory if you have lots of phrases but no longer need to
+  // perform any translation. Also used internally by `replace`.
+  Polyglot.prototype.clear = function() {
+    this.phrases = {};
+  };
+
+  // ### polyglot.replace(phrases)
+  //
+  // Completely replace the existing phrases with a new set of phrases.
+  // Normally, just use `extend` to add more phrases, but under certain
+  // circumstances, you may want to make sure no old phrases are lying around.
+  Polyglot.prototype.replace = function(newPhrases) {
+    this.clear();
+    this.extend(newPhrases);
+  };
+
+
+  // ### polyglot.t(key, options)
+  //
+  // The most-used method. Provide a key, and `t` will return the
+  // phrase.
+  //
+  //     polyglot.t("hello");
+  //     => "Hello"
+  //
+  // The phrase value is provided first by a call to `polyglot.extend()` or
+  // `polyglot.replace()`.
+  //
+  // Pass in an object as the second argument to perform interpolation.
+  //
+  //     polyglot.t("hello_name", {name: "Spike"});
+  //     => "Hello, Spike"
+  //
+  // If you like, you can provide a default value in case the phrase is missing.
+  // Use the special option key "_" to specify a default.
+  //
+  //     polyglot.t("i_like_to_write_in_language", {
+  //       _: "I like to write in %{language}.",
+  //       language: "JavaScript"
+  //     });
+  //     => "I like to write in JavaScript."
+  //
+  Polyglot.prototype.t = function(key, options) {
+    var phrase, result;
+    options = options == null ? {} : options;
+    // allow number as a pluralization shortcut
+    if (typeof options === 'number') {
+      options = {smart_count: options};
+    }
+    if (typeof this.phrases[key] === 'string') {
+      phrase = this.phrases[key];
+    } else if (typeof options._ === 'string') {
+      phrase = options._;
+    } else if (this.allowMissing) {
+      phrase = key;
+    } else {
+      this.warn('Missing translation for key: "'+key+'"');
+      result = key;
+    }
+    if (typeof phrase === 'string') {
+      options = clone(options);
+      result = choosePluralForm(phrase, this.currentLocale, options.smart_count);
+      result = interpolate(result, options);
+    }
+    return result;
+  };
+
+
+  // ### polyglot.has(key)
+  //
+  // Check if polyglot has a translation for given key
+  Polyglot.prototype.has = function(key) {
+    return key in this.phrases;
+  };
+
+
+  // #### Pluralization methods
+  // The string that separates the different phrase possibilities.
+  var delimeter = '||||';
+
+  // Mapping from pluralization group plural logic.
+  var pluralTypes = {
+    chinese:   function(n) { return 0; },
+    german:    function(n) { return n !== 1 ? 1 : 0; },
+    french:    function(n) { return n > 1 ? 1 : 0; },
+    russian:   function(n) { return n % 10 === 1 && n % 100 !== 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2; },
+    czech:     function(n) { return (n === 1) ? 0 : (n >= 2 && n <= 4) ? 1 : 2; },
+    polish:    function(n) { return (n === 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2); },
+    icelandic: function(n) { return (n % 10 !== 1 || n % 100 === 11) ? 1 : 0; }
+  };
+
+  // Mapping from pluralization group to individual locales.
+  var pluralTypeToLanguages = {
+    chinese:   ['fa', 'id', 'ja', 'ko', 'lo', 'ms', 'th', 'tr', 'zh'],
+    german:    ['da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hu', 'it', 'nl', 'no', 'pt', 'sv'],
+    french:    ['fr', 'tl', 'pt-br'],
+    russian:   ['hr', 'ru'],
+    czech:     ['cs'],
+    polish:    ['pl'],
+    icelandic: ['is']
+  };
+
+  function langToTypeMap(mapping) {
+    var type, langs, l, ret = {};
+    for (type in mapping) {
+      if (mapping.hasOwnProperty(type)) {
+        langs = mapping[type];
+        for (l in langs) {
+          ret[langs[l]] = type;
+        }
+      }
+    }
+    return ret;
+  }
+
+  // Trim a string.
+  function trim(str){
+    var trimRe = /^\s+|\s+$/g;
+    return str.replace(trimRe, '');
+  }
+
+  // Based on a phrase text that contains `n` plural forms separated
+  // by `delimeter`, a `locale`, and a `count`, choose the correct
+  // plural form, or none if `count` is `null`.
+  function choosePluralForm(text, locale, count){
+    var ret, texts, chosenText;
+    if (count != null && text) {
+      texts = text.split(delimeter);
+      chosenText = texts[pluralTypeIndex(locale, count)] || texts[0];
+      ret = trim(chosenText);
+    } else {
+      ret = text;
+    }
+    return ret;
+  }
+
+  function pluralTypeName(locale) {
+    var langToPluralType = langToTypeMap(pluralTypeToLanguages);
+    return langToPluralType[locale] || langToPluralType.en;
+  }
+
+  function pluralTypeIndex(locale, count) {
+    return pluralTypes[pluralTypeName(locale)](count);
+  }
+
+  // ### interpolate
+  //
+  // Does the dirty work. Creates a `RegExp` object for each
+  // interpolation placeholder.
+  function interpolate(phrase, options) {
+    for (var arg in options) {
+      if (arg !== '_' && options.hasOwnProperty(arg)) {
+        // We create a new `RegExp` each time instead of using a more-efficient
+        // string replace so that the same argument can be replaced multiple times
+        // in the same phrase.
+        phrase = phrase.replace(new RegExp('%\\{'+arg+'\\}', 'g'), options[arg]);
+      }
+    }
+    return phrase;
+  }
+
+  // ### warn
+  //
+  // Provides a warning in the console if a phrase key is missing.
+  function warn(message) {
+    root.console && root.console.warn && root.console.warn('WARNING: ' + message);
+  }
+
+  // ### clone
+  //
+  // Clone an object.
+  function clone(source) {
+    var ret = {};
+    for (var prop in source) {
+      ret[prop] = source[prop];
+    }
+    return ret;
+  }
+
+  return Polyglot;
+}));

File diff suppressed because it is too large
+ 16 - 0
public/web/lib/polyglot/polyglot.min.js


+ 2 - 0
support/client/lib/index.css

@@ -256,8 +256,10 @@ input {
   /*visibility: hidden;*/
 }
 
+/* 
 .loadText {
 }
+*/
 
 
 .requirements {

+ 2 - 2
support/client/lib/vwf/view/editor-new.js

@@ -3276,7 +3276,7 @@ define([
                             $text: "EN",
                             onclick: function(){
                                 //self.lang.changeLanguageTo('en')
-                                localStorage.setItem('locale', 'en');
+                                localStorage.setItem('krestianstvo_locale', 'en');
                                 window.location.reload(true);
                         }
                         },
@@ -3287,7 +3287,7 @@ define([
                             $text: "RU",
                             onclick: function(){
                                 //self.lang.changeLanguageTo('ru')
-                                localStorage.setItem('locale', 'ru');
+                                localStorage.setItem('krestianstvo_locale', 'ru');
                                 window.location.reload(true);
                         }
                         },

+ 4 - 4
support/client/lib/vwf/view/polyglot-editor.js

@@ -11,11 +11,11 @@ define([
             console.log("lang constructor");
             this.polyglot = polyglot;
 
-            if (localStorage.getItem('locale')) {
+            if (localStorage.getItem('krestianstvo_locale')) {
             } else {
-                localStorage.setItem('locale', 'en');
+                localStorage.setItem('krestianstvo_locale', 'en');
             }
-            this.locale = localStorage.getItem('locale');
+            this.locale = localStorage.getItem('krestianstvo_locale');
             this.setLanguage(this.locale);
 
         }
@@ -33,7 +33,7 @@ define([
         }
 
         setLocale(langID){
-            localStorage.setItem('locale', langID);
+            localStorage.setItem('krestianstvo_locale', langID);
             this.locale = langID;
         }
 

Some files were not shown because too many files changed in this diff