Fix code style of WoltLab/WCF/Language
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 18 May 2015 22:46:32 +0000 (00:46 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 18 May 2015 22:46:32 +0000 (00:46 +0200)
wcfsetup/install/files/js/WoltLab/WCF/Language.js

index 8bda567c5dd9cec1e6ffa513f4e65302e1a89f00..c34f31e0c442a68c192d782e4981c7b40f48fe22 100644 (file)
@@ -9,7 +9,7 @@
 define(['Dictionary', './Template'], function(Dictionary, Template) {
        "use strict";
        
-       var languageItems = new Dictionary();
+       var _languageItems = new Dictionary();
        
        /**
         * @constructor
@@ -21,8 +21,8 @@ define(['Dictionary', './Template'], function(Dictionary, Template) {
                 * 
                 * @param       {Object.<string, string>}       object
                 */
-               addObject: function (object) {
-                       languageItems.merge(Dictionary.fromObject(object));
+               addObject: function(object) {
+                       _languageItems.merge(Dictionary.fromObject(object));
                },
                
                /**
@@ -32,7 +32,7 @@ define(['Dictionary', './Template'], function(Dictionary, Template) {
                 * @param       {string}        value
                 */
                add: function(key, value) {
-                       languageItems.set(key, value);
+                       _languageItems.set(key, value);
                },
                
                /**
@@ -47,7 +47,7 @@ define(['Dictionary', './Template'], function(Dictionary, Template) {
                get: function(key, parameters) {
                        if (!parameters) parameters = { };
                        
-                       var value = languageItems.get(key);
+                       var value = _languageItems.get(key);
                        
                        if (value === undefined) {
                                console.warn("Trying to get() undefined language item.");
@@ -56,8 +56,8 @@ define(['Dictionary', './Template'], function(Dictionary, Template) {
                        
                        if (typeof value === 'string') {
                                // lazily convert to WCF.Template
-                               languageItems.set(key, new Template(value));
-                               value = languageItems.get(key);
+                               _languageItems.set(key, new Template(value));
+                               value = _languageItems.get(key);
                        }
                        
                        if (value instanceof Template) {