Bug 796094 - Fix Marketplace category names for webapps. r=myk
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Sat, 06 Oct 2012 22:04:36 -0400
changeset 109546 c92dd43099e7f881ca3dcf472beec89b2478fc1a
parent 109545 5364c43651c13fc8f90c1ab3d1d80c4d7631017c
child 109547 a5551c001a2110aed561416b16f6823d0ee0f1b6
push id23632
push userphilringnalda@gmail.com
push dateSun, 07 Oct 2012 19:14:37 +0000
treeherdermozilla-central@83d38854c21e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmyk
bugs796094
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 796094 - Fix Marketplace category names for webapps. r=myk
toolkit/webapps/WebappsInstaller.jsm
--- a/toolkit/webapps/WebappsInstaller.jsm
+++ b/toolkit/webapps/WebappsInstaller.jsm
@@ -783,17 +783,20 @@ LinuxNativeApp.prototype = {
       "social": "Chat",
       "travel": "Amusement",
       "utilities": "Utility"
     };
 
     // The trailing semicolon is needed as written in the freedesktop specification
     let categories = "";
     for (let category of this.app.categories) {
-      categories += translations[category] + ";";
+      let catLower = category.toLowerCase();
+      if (catLower in translations) {
+        categories += translations[catLower] + ";";
+      }
     }
 
     return categories;
   },
 
   _createConfigFiles: function() {
     // ${InstallDir}/webapp.json
     writeToFile(this.configJson, JSON.stringify(this.webappJson), function() {});