[gnome-builder] i18n: remove context from shortcut menus



commit 9b58fc3f726ddde3aa07e40093ddc02b4cb07432
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jan 2 13:00:50 2020 -0800

    i18n: remove context from shortcut menus
    
    These cannot actually be translated because it requires the use of
    g_dpgettext2() to provide the context for the translation. These should
    have never been changed to NC_() to begin with. If the context is truly
    necessary, translators will need to find an alternate way to provide this
    by not using the same translation for every msgid using the same wording.

 src/libide/editor/ide-editor-page-shortcuts.c      | 54 +++++++++++-----------
 src/libide/editor/ide-editor-surface-shortcuts.c   | 30 ++++++------
 src/libide/foundry/ide-run-manager.c               |  6 +--
 src/libide/gui/ide-application-shortcuts.c         | 18 ++++----
 src/libide/gui/ide-frame-shortcuts.c               | 30 ++++++------
 src/libide/gui/ide-header-bar-shortcuts.c          | 12 ++---
 src/libide/gui/ide-search-button.c                 |  6 +--
 .../beautifier/gb-beautifier-editor-addin.c        |  8 ++--
 .../command-bar/gbp-command-bar-shortcuts.c        |  6 +--
 .../gbp-comment-code-editor-page-addin.c           | 12 ++---
 src/plugins/glade/gbp-glade-page-shortcuts.c       | 24 +++++-----
 .../spellcheck/gbp-spell-editor-page-addin.c       | 14 +++---
 src/plugins/symbol-tree/gbp-symbol-frame-addin.c   |  6 +--
 .../terminal/gbp-terminal-workspace-addin.c        | 18 ++++----
 14 files changed, 122 insertions(+), 122 deletions(-)
---
diff --git a/src/libide/editor/ide-editor-page-shortcuts.c b/src/libide/editor/ide-editor-page-shortcuts.c
index 17324771e..0b4734e1a 100644
--- a/src/libide/editor/ide-editor-page-shortcuts.c
+++ b/src/libide/editor/ide-editor-page-shortcuts.c
@@ -30,57 +30,57 @@
 static DzlShortcutEntry editor_view_shortcuts[] = {
   { "org.gnome.builder.editor-page.save",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Save the document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Save the document") },
 
   { "org.gnome.builder.editor-page.save-as",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Save the document with a new name") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Save the document with a new name") },
 
   { "org.gnome.builder.editor-page.print",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Print the document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Print the document") },
 
   { "org.gnome.builder.editor-page.find",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Find and replace"),
-    NC_("shortcut window", "Find") },
+    N_("Editor shortcuts"),
+    N_("Find and replace"),
+    N_("Find") },
 
   { "org.gnome.builder.editor-page.find-replace",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Find and replace"),
-    NC_("shortcut window", "Find and replace") },
+    N_("Editor shortcuts"),
+    N_("Find and replace"),
+    N_("Find and replace") },
 
   { "org.gnome.builder.editor-page.next-match",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Find and replace"),
-    NC_("shortcut window", "Move to the next match") },
+    N_("Editor shortcuts"),
+    N_("Find and replace"),
+    N_("Move to the next match") },
 
   { "org.gnome.builder.editor-page.prev-match",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Find and replace"),
-    NC_("shortcut window", "Move to the previous match") },
+    N_("Editor shortcuts"),
+    N_("Find and replace"),
+    N_("Move to the previous match") },
 
   { "org.gnome.builder.editor-page.next-error",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Find and replace"),
-    NC_("shortcut window", "Move to the next error") },
+    N_("Editor shortcuts"),
+    N_("Find and replace"),
+    N_("Move to the next error") },
 
   { "org.gnome.builder.editor-page.prev-error",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Find and replace"),
-    NC_("shortcut window", "Move to the previous error") },
+    N_("Editor shortcuts"),
+    N_("Find and replace"),
+    N_("Move to the previous error") },
 };
 
 void
diff --git a/src/libide/editor/ide-editor-surface-shortcuts.c 
b/src/libide/editor/ide-editor-surface-shortcuts.c
index 77b98b325..80c44f748 100644
--- a/src/libide/editor/ide-editor-surface-shortcuts.c
+++ b/src/libide/editor/ide-editor-surface-shortcuts.c
@@ -32,33 +32,33 @@
 static const DzlShortcutEntry editor_surface_entries[] = {
   { "org.gnome.builder.editor.new-file",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Create a new document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Create a new document") },
 
   { "org.gnome.builder.editor.open-file",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Open a document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Open a document") },
 
   { "org.gnome.builder.editor.navigation-panel",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Panels"),
-    NC_("shortcut window", "Toggle navigation panel") },
+    N_("Editor shortcuts"),
+    N_("Panels"),
+    N_("Toggle navigation panel") },
 
   { "org.gnome.builder.editor.utilities-panel",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Panels"),
-    NC_("shortcut window", "Toggle utilities panel") },
+    N_("Editor shortcuts"),
+    N_("Panels"),
+    N_("Toggle utilities panel") },
 
   { "org.gnome.builder.editor.close-all",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Close all files") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Close all files") },
 };
 
 void
diff --git a/src/libide/foundry/ide-run-manager.c b/src/libide/foundry/ide-run-manager.c
index 2bce69c60..b4483aa13 100644
--- a/src/libide/foundry/ide-run-manager.c
+++ b/src/libide/foundry/ide-run-manager.c
@@ -850,9 +850,9 @@ ide_run_manager_add_handler (IdeRunManager  *self,
 
   dzl_shortcut_manager_add_action (manager,
                                    action_name,
-                                   NC_("shortcut window", "Workbench shortcuts"),
-                                   NC_("shortcut window", "Build and Run"),
-                                   NC_("shortcut window", title),
+                                   N_("Workbench shortcuts"),
+                                   N_("Build and Run"),
+                                   g_dgettext (GETTEXT_PACKAGE, title),
                                    NULL);
 
   dzl_shortcut_theme_set_accel_for_action (theme,
diff --git a/src/libide/gui/ide-application-shortcuts.c b/src/libide/gui/ide-application-shortcuts.c
index c604e64e8..3ffdd8991 100644
--- a/src/libide/gui/ide-application-shortcuts.c
+++ b/src/libide/gui/ide-application-shortcuts.c
@@ -42,9 +42,9 @@ _ide_application_init_shortcuts (IdeApplication *self)
 
   dzl_shortcut_manager_add_action (manager,
                                    I_("app.help"),
-                                   NC_("shortcut window", "Workbench shortcuts"),
-                                   NC_("shortcut window", "Help"),
-                                   NC_("shortcut window", "Show the help window"),
+                                   N_("Workbench shortcuts"),
+                                   N_("Help"),
+                                   N_("Show the help window"),
                                    NULL);
   dzl_shortcut_theme_set_accel_for_action (theme,
                                            "app.help",
@@ -53,9 +53,9 @@ _ide_application_init_shortcuts (IdeApplication *self)
 
   dzl_shortcut_manager_add_action (manager,
                                    I_("app.preferences"),
-                                   NC_("shortcut window", "Workbench shortcuts"),
-                                   NC_("shortcut window", "Preferences"),
-                                   NC_("shortcut window", "Show the preferences window"),
+                                   N_("Workbench shortcuts"),
+                                   N_("Preferences"),
+                                   N_("Show the preferences window"),
                                    NULL);
   dzl_shortcut_theme_set_accel_for_action (theme,
                                            "app.preferences",
@@ -64,9 +64,9 @@ _ide_application_init_shortcuts (IdeApplication *self)
 
   dzl_shortcut_manager_add_action (manager,
                                    I_("app.shortcuts"),
-                                   NC_("shortcut window", "Workbench shortcuts"),
-                                   NC_("shortcut window", "Help"),
-                                   NC_("shortcut window", "Show the shortcuts window"),
+                                   N_("Workbench shortcuts"),
+                                   N_("Help"),
+                                   N_("Show the shortcuts window"),
                                    NULL);
   dzl_shortcut_theme_set_accel_for_action (theme,
                                            "app.shortcuts",
diff --git a/src/libide/gui/ide-frame-shortcuts.c b/src/libide/gui/ide-frame-shortcuts.c
index eef3655b6..c35233b0f 100644
--- a/src/libide/gui/ide-frame-shortcuts.c
+++ b/src/libide/gui/ide-frame-shortcuts.c
@@ -32,37 +32,37 @@ static const DzlShortcutEntry frame_shortcuts[] = {
   { "org.gnome.builder.frame.move-right",
     DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Move document to the right") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Move document to the right") },
 
   { "org.gnome.builder.frame.move-left",
     DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Move document to the left") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Move document to the left") },
 
   { "org.gnome.builder.frame.previous-document",
     DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Switch to the previous document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Switch to the previous document") },
 
   { "org.gnome.builder.frame.next-document",
     DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Switch to the next document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Switch to the next document") },
 
   { "org.gnome.builder.frame.close-page",
     DZL_SHORTCUT_PHASE_BUBBLE,
     NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Files"),
-    NC_("shortcut window", "Close the document") },
+    N_("Editor shortcuts"),
+    N_("Files"),
+    N_("Close the document") },
 };
 
 void
diff --git a/src/libide/gui/ide-header-bar-shortcuts.c b/src/libide/gui/ide-header-bar-shortcuts.c
index a0a3230ec..d16f8aa5d 100644
--- a/src/libide/gui/ide-header-bar-shortcuts.c
+++ b/src/libide/gui/ide-header-bar-shortcuts.c
@@ -31,15 +31,15 @@
 static DzlShortcutEntry workspace_shortcuts[] = {
   { "org.gnome.builder.workspace.show-menu",
     0, NULL,
-    NC_("shortcut window", "Window shortcuts"),
-    NC_("shortcut window", "General"),
-    NC_("shortcut window", "Show window menu") },
+    N_("Window shortcuts"),
+    N_("General"),
+    N_("Show window menu") },
 
   { "org.gnome.builder.workspace.fullscreen",
     0, NULL,
-    NC_("shortcut window", "Window shortcuts"),
-    NC_("shortcut window", "General"),
-    NC_("shortcut window", "Toggle window to fullscreen") },
+    N_("Window shortcuts"),
+    N_("General"),
+    N_("Toggle window to fullscreen") },
 };
 
 void
diff --git a/src/libide/gui/ide-search-button.c b/src/libide/gui/ide-search-button.c
index 701b1e006..dfcef08f1 100644
--- a/src/libide/gui/ide-search-button.c
+++ b/src/libide/gui/ide-search-button.c
@@ -40,9 +40,9 @@ struct _IdeSearchButton
 static const DzlShortcutEntry shortcuts[] = {
   { "org.gnome.builder.workspace.global-search",
     0, NULL,
-    NC_("shortcut window", "Workspace shortcuts"),
-    NC_("shortcut window", "Search"),
-    NC_("shortcut window", "Focus to the global search entry") },
+    N_("Workspace shortcuts"),
+    N_("Search"),
+    N_("Focus to the global search entry") },
 };
 
 G_DEFINE_TYPE (IdeSearchButton, ide_search_button, DZL_TYPE_SUGGESTION_BUTTON)
diff --git a/src/plugins/beautifier/gb-beautifier-editor-addin.c 
b/src/plugins/beautifier/gb-beautifier-editor-addin.c
index 72b86d33c..800660e96 100644
--- a/src/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/src/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -340,10 +340,10 @@ static const DzlShortcutEntry beautifier_shortcut_entry[] = {
   { "org.gnome.builder.editor-view.beautifier-default",
     0,
     "<primary><Alt>b",
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Editing"),
-    NC_("shortcut window", "Beautify the code"),
-    NC_("shortcut window", "Trigger the default entry") },
+    N_("Editor shortcuts"),
+    N_("Editing"),
+    N_("Beautify the code"),
+    N_("Trigger the default entry") },
 };
 
 static void
diff --git a/src/plugins/command-bar/gbp-command-bar-shortcuts.c 
b/src/plugins/command-bar/gbp-command-bar-shortcuts.c
index 6e9fb51e6..71621831d 100644
--- a/src/plugins/command-bar/gbp-command-bar-shortcuts.c
+++ b/src/plugins/command-bar/gbp-command-bar-shortcuts.c
@@ -33,9 +33,9 @@ static const DzlShortcutEntry command_bar_shortcuts[] = {
   { "org.gnome.builder.command-bar.reveal",
     DZL_SHORTCUT_PHASE_GLOBAL | DZL_SHORTCUT_PHASE_CAPTURE,
     NULL,
-    NC_("shortcut window", "Workspace Shortcuts"),
-    NC_("shortcut window", "Command Bar"),
-    NC_("shortcut window", "Show the workspace command bar") },
+    N_("Workspace Shortcuts"),
+    N_("Command Bar"),
+    N_("Show the workspace command bar") },
 };
 
 void
diff --git a/src/plugins/comment-code/gbp-comment-code-editor-page-addin.c 
b/src/plugins/comment-code/gbp-comment-code-editor-page-addin.c
index 7f8b6ca04..1516dd5a3 100644
--- a/src/plugins/comment-code/gbp-comment-code-editor-page-addin.c
+++ b/src/plugins/comment-code/gbp-comment-code-editor-page-addin.c
@@ -367,15 +367,15 @@ gbp_comment_code_editor_page_addin_comment_action (GSimpleAction *action,
 static const DzlShortcutEntry comment_code_shortcut_entries[] = {
   { "org.gnome.builder.editor-page.comment-code",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Editing"),
-    NC_("shortcut window", "Comment the code") },
+    N_("Editor shortcuts"),
+    N_("Editing"),
+    N_("Comment the code") },
 
   { "org.gnome.builder.editor-page.uncomment-code",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Editing"),
-    NC_("shortcut window", "Uncomment the code") },
+    N_("Editor shortcuts"),
+    N_("Editing"),
+    N_("Uncomment the code") },
 };
 
 static const GActionEntry actions[] = {
diff --git a/src/plugins/glade/gbp-glade-page-shortcuts.c b/src/plugins/glade/gbp-glade-page-shortcuts.c
index 9f4eaf6dc..090995cc3 100644
--- a/src/plugins/glade/gbp-glade-page-shortcuts.c
+++ b/src/plugins/glade/gbp-glade-page-shortcuts.c
@@ -33,27 +33,27 @@
 static DzlShortcutEntry glade_view_shortcuts[] = {
   { "org.gnome.builder.glade-view.save",
     0, NULL,
-    NC_("shortcut window", "Glade shortcuts"),
-    NC_("shortcut window", "Designer"),
-    NC_("shortcut window", "Save the interface design") },
+    N_("Glade shortcuts"),
+    N_("Designer"),
+    N_("Save the interface design") },
 
   { "org.gnome.builder.glade-view.preview",
     0, NULL,
-    NC_("shortcut window", "Glade shortcuts"),
-    NC_("shortcut window", "Designer"),
-    NC_("shortcut window", "Preview the interface design") },
+    N_("Glade shortcuts"),
+    N_("Designer"),
+    N_("Preview the interface design") },
 
   { "org.gnome.builder.glade-view.undo",
     0, NULL,
-    NC_("shortcut window", "Glade shortcuts"),
-    NC_("shortcut window", "Designer"),
-    NC_("shortcut window", "Undo the last command") },
+    N_("Glade shortcuts"),
+    N_("Designer"),
+    N_("Undo the last command") },
 
   { "org.gnome.builder.glade-view.redo",
     0, NULL,
-    NC_("shortcut window", "Glade shortcuts"),
-    NC_("shortcut window", "Designer"),
-    NC_("shortcut window", "Redo the next command") },
+    N_("Glade shortcuts"),
+    N_("Designer"),
+    N_("Redo the next command") },
 };
 
 void
diff --git a/src/plugins/spellcheck/gbp-spell-editor-page-addin.c 
b/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
index d28eaaed8..cb62be4f5 100644
--- a/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
+++ b/src/plugins/spellcheck/gbp-spell-editor-page-addin.c
@@ -96,13 +96,13 @@ static const GActionEntry actions[] = {
   { "cancel-spellcheck", gbp_spell_editor_page_addin_cancel },
 };
 
-  static const DzlShortcutEntry spellchecker_shortcut_entry[] = {
-    { "org.gnome.builder.editor-page.spellchecker",
-      0, NULL,
-      NC_("shortcut window", "Editor shortcuts"),
-      NC_("shortcut window", "Editing"),
-      NC_("shortcut window", "Show the spellchecker panel") },
-  };
+static const DzlShortcutEntry spellchecker_shortcut_entry[] = {
+  { "org.gnome.builder.editor-page.spellchecker",
+    0, NULL,
+    N_("Editor shortcuts"),
+    N_("Editing"),
+    N_("Show the spellchecker panel") },
+};
 
 static void
 gbp_spell_editor_page_addin_load (IdeEditorPageAddin *addin,
diff --git a/src/plugins/symbol-tree/gbp-symbol-frame-addin.c 
b/src/plugins/symbol-tree/gbp-symbol-frame-addin.c
index ce25848ee..ca39a38c0 100644
--- a/src/plugins/symbol-tree/gbp-symbol-frame-addin.c
+++ b/src/plugins/symbol-tree/gbp-symbol-frame-addin.c
@@ -52,9 +52,9 @@ typedef struct
 static DzlShortcutEntry symbol_tree_shortcuts[] = {
   { "org.gnome.builder.symbol-tree.search",
     0, NULL,
-    NC_("shortcut window", "Editor shortcuts"),
-    NC_("shortcut window", "Symbols"),
-    NC_("shortcut window", "Search symbols within document") },
+    N_("Editor shortcuts"),
+    N_("Symbols"),
+    N_("Search symbols within document") },
 };
 
 static void
diff --git a/src/plugins/terminal/gbp-terminal-workspace-addin.c 
b/src/plugins/terminal/gbp-terminal-workspace-addin.c
index abe4c058f..85dbb2038 100644
--- a/src/plugins/terminal/gbp-terminal-workspace-addin.c
+++ b/src/plugins/terminal/gbp-terminal-workspace-addin.c
@@ -354,21 +354,21 @@ static const GActionEntry terminal_actions[] = {
 static const DzlShortcutEntry gbp_terminal_shortcut_entries[] = {
   { "org.gnome.builder.workspace.new-terminal",
     0, NULL,
-    NC_("shortcut window", "Workspace shortcuts"),
-    NC_("shortcut window", "General"),
-    NC_("shortcut window", "Terminal") },
+    N_("Workspace shortcuts"),
+    N_("General"),
+    N_("Terminal") },
 
   { "org.gnome.builder.workspace.new-terminal-in-runtime",
     0, NULL,
-    NC_("shortcut window", "Workspace shortcuts"),
-    NC_("shortcut window", "General"),
-    NC_("shortcut window", "Terminal in Build Runtime") },
+    N_("Workspace shortcuts"),
+    N_("General"),
+    N_("Terminal in Build Runtime") },
 
   { "org.gnome.builder.workspace.new-terminal-in-runner",
     0, NULL,
-    NC_("shortcut window", "Workspace shortcuts"),
-    NC_("shortcut window", "General"),
-    NC_("shortcut window", "Terminal in Runtime") },
+    N_("Workspace shortcuts"),
+    N_("General"),
+    N_("Terminal in Runtime") },
 };
 
 static void


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