]> _ Git - fluidbook-html5.git/commitdiff
#2170
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 14 Aug 2018 09:25:29 +0000 (11:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 14 Aug 2018 09:25:29 +0000 (11:25 +0200)
js/libs/fluidbook/fluidbook.l10n.js

index ed9e8a2258d62ca3768a8f1c707138b714a9b39e..1d683c9f8978083934e89b56f90f06680317ce8a 100644 (file)
@@ -43,7 +43,7 @@ FluidbookL10N.prototype = {
         }
 
         // Append country when lang is present more than one time in the list
-        if (this._langsCount[res] > 1) {
+        if (undefined !== this._langsCount && this._langsCount[res] > 1) {
             res += '_' + this.fluidbook.datas.country;
         }
         return res;
@@ -132,10 +132,6 @@ FluidbookL10N.prototype = {
 
     // Format the language name according to the settings
     getLanguageName: function (languageCode) {
-
-        // Todo: once we have the Fluidbook country/flag avialble (see ticket #2173), we need to use that to build the language code (ie. language_country)
-        // Todo: check if languageCode passed in includes underscore and if not, append the country to make the full language ID matched in this.multilang
-
         var details = this.multilang[languageCode],
             name = '';