[gnome-software] Fixed subcategory names localization



commit 90123ee63e49c774b025125976656a58efd2e55d
Author: Marek Černocký <marek manet cz>
Date:   Thu Aug 3 16:42:55 2017 +0200

    Fixed subcategory names localization
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 plugins/core/gs-desktop-common.c            |  103 ++++++++++++++-------------
 plugins/core/gs-plugin-desktop-categories.c |    2 +-
 2 files changed, 53 insertions(+), 52 deletions(-)
---
diff --git a/plugins/core/gs-desktop-common.c b/plugins/core/gs-desktop-common.c
index 03870ba..ad3c3a6 100644
--- a/plugins/core/gs-desktop-common.c
+++ b/plugins/core/gs-desktop-common.c
@@ -27,19 +27,19 @@
 
 /* AudioVideo */
 static const GsDesktopMap map_audiovisual[] = {
-       { "all",                NC_("Menu of AudioVideo", "All"),
+       { "all",                NC_("Menu of Audio & Video", "All"),
                                        { "AudioVideo",
                                          NULL } },
-       { "featured",           NC_("Menu of AudioVideo", "Featured"),
+       { "featured",           NC_("Menu of Audio & Video", "Featured"),
                                        { "AudioVideo::Featured",
                                          NULL} },
-       { "creation-editing",   NC_("Menu of AudioVideo", "Audio Creation & Editing"),
+       { "creation-editing",   NC_("Menu of Audio & Video", "Audio Creation & Editing"),
                                        { "AudioVideo::AudioVideoEditing",
                                          "AudioVideo::Midi",
                                          "AudioVideo::DiscBurning",
                                          "AudioVideo::Sequencer",
                                          NULL} },
-       { "music-players",      NC_("Menu of AudioVideo", "Music Players"),
+       { "music-players",      NC_("Menu of Audio & Video", "Music Players"),
                                        { "AudioVideo::Music",
                                          "AudioVideo::Player",
                                          NULL} },
@@ -48,16 +48,16 @@ static const GsDesktopMap map_audiovisual[] = {
 
 /* Development */
 static const GsDesktopMap map_developertools[] = {
-       { "all",                NC_("Menu of Development", "All"),
+       { "all",                NC_("Menu of Developer Tools", "All"),
                                        { "Development",
                                          NULL } },
-       { "featured",           NC_("Menu of Development", "Featured"),
+       { "featured",           NC_("Menu of Developer Tools", "Featured"),
                                        { "Development::Featured",
                                          NULL} },
-       { "debuggers",          NC_("Menu of Development", "Debuggers"),
+       { "debuggers",          NC_("Menu of Developer Tools", "Debuggers"),
                                        { "Development:Debugger",
                                          NULL} },
-       { "ide",                NC_("Menu of Development", "IDEs"),
+       { "ide",                NC_("Menu of Developer Tools", "IDEs"),
                                        { "Development::IDE",
                                          "Development::GUIDesigner",
                                          NULL} },
@@ -66,37 +66,37 @@ static const GsDesktopMap map_developertools[] = {
 
 /* Education & Science */
 static const GsDesktopMap map_education_science[] = {
-       { "all",                NC_("Menu of Education and Science", "All"),
+       { "all",                NC_("Menu of Education & Science", "All"),
                                        { "Education",
                                          "Science",
                                          NULL } },
-       { "featured",           NC_("Menu of Education and Science", "Featured"),
+       { "featured",           NC_("Menu of Education & Science", "Featured"),
                                        { "Education::Featured",
                                          "Science::Featured",
                                          NULL} },
-       { "artificial-intelligence", NC_("Menu of Education and Science", "Artificial Intelligence"),
+       { "artificial-intelligence", NC_("Menu of Education & Science", "Artificial Intelligence"),
                                        { "Science::ArtificialIntelligence",
                                          NULL} },
-       { "astronomy",          NC_("Menu of Education and Science", "Astronomy"),
+       { "astronomy",          NC_("Menu of Education & Science", "Astronomy"),
                                        { "Education::Astronomy",
                                          "Science::Astronomy",
                                          NULL} },
-       { "chemistry",          NC_("Menu of Education and Science", "Chemistry"),
+       { "chemistry",          NC_("Menu of Education & Science", "Chemistry"),
                                        { "Education::Chemistry",
                                          "Science::Chemistry",
                                          NULL} },
-       { "languages",          NC_("Menu of Education and Science", "Languages"),
+       { "languages",          NC_("Menu of Education & Science", "Languages"),
                                        { "Education::Languages",
                                          "Education::Literature",
                                          NULL} },
-       { "math",               NC_("Menu of Education and Science", "Math"),
+       { "math",               NC_("Menu of Education & Science", "Math"),
                                        { "Education::Math",
                                          "Education::NumericalAnalysis",
                                          "Science::Math",
                                          "Science::Physics",
                                          "Science::NumericalAnalysis",
                                          NULL} },
-       { "robotics",           NC_("Menu of Education and Science", "Robotics"),
+       { "robotics",           NC_("Menu of Education & Science", "Robotics"),
                                        { "Science::Robotics",
                                          NULL} },
 
@@ -153,25 +153,25 @@ static const GsDesktopMap map_games[] = {
 
 /* Graphics */
 static const GsDesktopMap map_graphics[] = {
-       { "all",                NC_("Menu of Graphics", "All"),
+       { "all",                NC_("Menu of Graphics & Photography", "All"),
                                        { "Graphics",
                                          NULL } },
-       { "featured",           NC_("Menu of Graphics", "Featured"),
+       { "featured",           NC_("Menu of Graphics & Photography", "Featured"),
                                        { "Graphics::Featured",
                                          NULL} },
-       { "3d",                 NC_("Menu of Graphics", "3D Graphics"),
+       { "3d",                 NC_("Menu of Graphics & Photography", "3D Graphics"),
                                        { "Graphics::3DGraphics",
                                          NULL} },
-       { "photography",        NC_("Menu of Graphics", "Photography"),
+       { "photography",        NC_("Menu of Graphics & Photography", "Photography"),
                                        { "Graphics::Photography",
                                          NULL} },
-       { "scanning",           NC_("Menu of Graphics", "Scanning"),
+       { "scanning",           NC_("Menu of Graphics & Photography", "Scanning"),
                                        { "Graphics::Scanning",
                                          NULL} },
-       { "vector",             NC_("Menu of Graphics", "Vector Graphics"),
+       { "vector",             NC_("Menu of Graphics & Photography", "Vector Graphics"),
                                        { "Graphics::VectorGraphics",
                                          NULL} },
-       { "viewers",            NC_("Menu of Graphics", "Viewers"),
+       { "viewers",            NC_("Menu of Graphics & Photography", "Viewers"),
                                        { "Graphics::Viewer",
                                          NULL} },
        { NULL }
@@ -179,24 +179,24 @@ static const GsDesktopMap map_graphics[] = {
 
 /* Office */
 static const GsDesktopMap map_productivity[] = {
-       { "all",                NC_("Menu of Office", "All"),
+       { "all",                NC_("Menu of Productivity", "All"),
                                        { "Office",
                                          NULL } },
-       { "featured",           NC_("Menu of Office", "Featured"),
+       { "featured",           NC_("Menu of Productivity", "Featured"),
                                        { "Office::Featured",
                                          NULL} },
-       { "calendar",           NC_("Menu of Office", "Calendar"),
+       { "calendar",           NC_("Menu of Productivity", "Calendar"),
                                        { "Office::Calendar",
                                          "Office::ProjectManagement",
                                          NULL} },
-       { "database",           NC_("Menu of Office", "Database"),
+       { "database",           NC_("Menu of Productivity", "Database"),
                                        { "Office::Database",
                                          NULL} },
-       { "finance",            NC_("Menu of Office", "Finance"),
+       { "finance",            NC_("Menu of Productivity", "Finance"),
                                        { "Office::Finance",
                                          "Office::Spreadsheet",
                                          NULL} },
-       { "word-processor",     NC_("Menu of Office", "Word Processor"),
+       { "word-processor",     NC_("Menu of Productivity", "Word Processor"),
                                        { "Office::WordProcessor",
                                          "Office::Dictionary",
                                          NULL} },
@@ -205,50 +205,50 @@ static const GsDesktopMap map_productivity[] = {
 
 /* Addons */
 static const GsDesktopMap map_addons[] = {
-       { "fonts",              NC_("Menu of Addons", "Fonts"),
-                                       { "Addon::Font",
+       { "fonts",              NC_("Menu of Add-ons", "Fonts"),
+                                       { "Addons::Font",
                                          NULL} },
-       { "codecs",             NC_("Menu of Addons", "Codecs"),
-                                       { "Addon::Codec",
+       { "codecs",             NC_("Menu of Add-ons", "Codecs"),
+                                       { "Addons::Codec",
                                          NULL} },
-       { "input-sources",      NC_("Menu of Addons", "Input Sources"),
-                                       { "Addon::InputSource",
+       { "input-sources",      NC_("Menu of Add-ons", "Input Sources"),
+                                       { "Addons::InputSource",
                                          NULL} },
-       { "language-packs",     NC_("Menu of Addons", "Language Packs"),
-                                       { "Addon::LanguagePack",
+       { "language-packs",     NC_("Menu of Add-ons", "Language Packs"),
+                                       { "Addons::LanguagePack",
                                          NULL} },
-       { "shell-extensions",   NC_("Menu of Addons", "Shell Extensions"),
-                                       { "Addon::ShellExtension",
+       { "shell-extensions",   NC_("Menu of Add-ons", "Shell Extensions"),
+                                       { "Addons::ShellExtension",
                                          NULL} },
-       { "localization",       NC_("Menu of Addons", "Localization"),
-                                       { "Addon::Localization",
+       { "localization",       NC_("Menu of Add-ons", "Localization"),
+                                       { "Addons::Localization",
                                          NULL} },
-       { "drivers",            NC_("Menu of Addons", "Hardware Drivers"),
-                                       { "Addon::Driver",
+       { "drivers",            NC_("Menu of Add-ons", "Hardware Drivers"),
+                                       { "Addons::Driver",
                                          NULL} },
        { NULL }
 };
 
 /* Communication */
 static const GsDesktopMap map_communication[] = {
-       { "all",                NC_("Menu of Communication", "All"),
+       { "all",                NC_("Menu of Communication & News", "All"),
                                        { "Network",
                                          NULL } },
-       { "featured",           NC_("Menu of Communication", "Featured"),
+       { "featured",           NC_("Menu of Communication & News", "Featured"),
                                        { "Network::Featured",
                                          NULL} },
-       { "chat",               NC_("Menu of Communication", "Chat"),
+       { "chat",               NC_("Menu of Communication & News", "Chat"),
                                        { "Network::Chat",
                                          "Network::IRCClient",
                                          "Network::Telephony",
                                          "Network::VideoConference",
                                          "Network::Email",
                                          NULL} },
-       { "news",               NC_("Menu of Communication", "News"),
+       { "news",               NC_("Menu of Communication & News", "News"),
                                        { "Network::Feed",
                                          "Network::News",
                                          NULL} },
-       { "web-browsers",       NC_("Menu of Communication", "Web Browsers"),
+       { "web-browsers",       NC_("Menu of Communication & News", "Web Browsers"),
                                        { "Network::WebBrowser",
                                          NULL} },
        { NULL }
@@ -256,13 +256,13 @@ static const GsDesktopMap map_communication[] = {
 
 /* Utility */
 static const GsDesktopMap map_utilities[] = {
-       { "all",                NC_("Menu of Utility", "All"),
+       { "all",                NC_("Menu of Utilities", "All"),
                                        { "Utility",
                                          NULL } },
-       { "featured",           NC_("Menu of Utility", "Featured"),
+       { "featured",           NC_("Menu of Utilities", "Featured"),
                                        { "Utility::Featured",
                                          NULL} },
-       { "text-editors",       NC_("Menu of Utility", "Text Editors"),
+       { "text-editors",       NC_("Menu of Utilities", "Text Editors"),
                                        { "Utility::TextEditor",
                                          NULL} },
        { NULL }
@@ -307,6 +307,7 @@ static const GsDesktopMap map_reference[] = {
 };
 
 /* main categories */
+/* Please keep category name and subcategory context synchronized!!! */
 static const GsDesktopData msdata[] = {
        /* TRANSLATORS: this is the menu spec main category for Audio & Video */
        { "audio-video",        map_audiovisual,        N_("Audio & Video"),
diff --git a/plugins/core/gs-plugin-desktop-categories.c b/plugins/core/gs-plugin-desktop-categories.c
index 440cd5d..908608c 100644
--- a/plugins/core/gs-plugin-desktop-categories.c
+++ b/plugins/core/gs-plugin-desktop-categories.c
@@ -63,7 +63,7 @@ gs_plugin_add_categories (GsPlugin *plugin,
                        gs_category_add_key_color (category, &key_color);
                g_ptr_array_add (list, category);
                g_snprintf (msgctxt, sizeof(msgctxt),
-                           "Menu subcategory of %s", msdata[i].name);
+                           "Menu of %s", msdata[i].name);
 
                /* add subcategories */
                for (j = 0; msdata[i].mapping[j].id != NULL; j++) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]