[gnome-settings-daemon] media-keys: translated hard-coded key names
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: translated hard-coded key names
- Date: Sun, 13 Jan 2013 00:29:54 +0000 (UTC)
commit 6d7ae9341f975e9d16dedd4d8862cc57019131d2
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jan 13 00:06:28 2013 +0100
media-keys: translated hard-coded key names
For conflict resolution in the shortcuts section of the Keyboard panel.
https://bugzilla.gnome.org/show_bug.cgi?id=691629
plugins/media-keys/shortcuts-list.h | 55 ++++++++++++++++++-----------------
po/POTFILES.in | 1 +
2 files changed, 29 insertions(+), 27 deletions(-)
---
diff --git a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
index 437ed2c..7265881 100644
--- a/plugins/media-keys/shortcuts-list.h
+++ b/plugins/media-keys/shortcuts-list.h
@@ -86,17 +86,18 @@ typedef enum {
static struct {
MediaKeyType key_type;
const char *settings_key;
+ const char *key_name;
const char *hard_coded;
} media_keys[] = {
- { TOUCHPAD_KEY, NULL, "XF86TouchpadToggle" },
- { TOUCHPAD_ON_KEY, NULL, "XF86TouchpadOn" },
- { TOUCHPAD_OFF_KEY, NULL, "XF86TouchpadOff" },
- { MUTE_KEY, "volume-mute", NULL },
- { VOLUME_DOWN_KEY, "volume-down", NULL },
- { VOLUME_UP_KEY, "volume-up", NULL },
- { MUTE_QUIET_KEY, NULL, "<Alt>XF86AudioMute" },
- { VOLUME_DOWN_QUIET_KEY, NULL, "<Alt>XF86AudioLowerVolume" },
- { VOLUME_UP_QUIET_KEY, NULL, "<Alt>XF86AudioRaiseVolume" },
+ { TOUCHPAD_KEY, NULL, N_("Touchpad toggle"), "XF86TouchpadToggle" },
+ { TOUCHPAD_ON_KEY, NULL, N_("Touchpad On"), "XF86TouchpadOn" },
+ { TOUCHPAD_OFF_KEY, NULL, N_("Touchpad Off"), "XF86TouchpadOff" },
+ { MUTE_KEY, "volume-mute", NULL, NULL },
+ { VOLUME_DOWN_KEY, "volume-down", NULL, NULL },
+ { VOLUME_UP_KEY, "volume-up", NULL, NULL },
+ { MUTE_QUIET_KEY, NULL, N_("Quiet Volume Mute"), "<Alt>XF86AudioMute" },
+ { VOLUME_DOWN_QUIET_KEY, NULL, N_("Quiet Volume Down"), "<Alt>XF86AudioLowerVolume" },
+ { VOLUME_UP_QUIET_KEY, NULL, N_("Quiet Volume Up"), "<Alt>XF86AudioRaiseVolume" },
{ LOGOUT_KEY, "logout", NULL },
{ EJECT_KEY, "eject", NULL },
{ HOME_KEY, "home", NULL },
@@ -105,7 +106,7 @@ static struct {
{ SEARCH_KEY, "search", NULL },
{ EMAIL_KEY, "email", NULL },
{ SCREENSAVER_KEY, "screensaver", NULL },
- { SCREENSAVER_KEY, NULL, "XF86ScreenSaver" },
+ { SCREENSAVER_KEY, NULL, N_("Lock Screen"), "XF86ScreenSaver" },
{ HELP_KEY, "help", NULL },
{ SCREENSHOT_KEY, "screenshot", NULL },
{ WINDOW_SCREENSHOT_KEY, "window-screenshot", NULL },
@@ -119,15 +120,15 @@ static struct {
{ STOP_KEY, "stop", NULL },
{ PREVIOUS_KEY, "previous", NULL },
{ NEXT_KEY, "next", NULL },
- { REWIND_KEY, NULL, "XF86AudioRewind" },
- { FORWARD_KEY, NULL, "XF86AudioForward" },
- { REPEAT_KEY, NULL, "XF86AudioRepeat" },
- { RANDOM_KEY, NULL, "XF86AudioRandomPlay"},
- { VIDEO_OUT_KEY, NULL, "<Super>p" },
+ { REWIND_KEY, NULL, N_("Rewind"), "XF86AudioRewind" },
+ { FORWARD_KEY, NULL, N_("Forward"), "XF86AudioForward" },
+ { REPEAT_KEY, NULL, N_("Repeat"), "XF86AudioRepeat" },
+ { RANDOM_KEY, NULL, N_("Random Play"), "XF86AudioRandomPlay"},
+ { VIDEO_OUT_KEY, NULL, N_("Video Out"), "<Super>p" },
/* Key code of the XF86Display key (Fn-F7 on Thinkpads, Fn-F4 on HP machines, etc.) */
- { VIDEO_OUT_KEY, NULL, "XF86Display" },
+ { VIDEO_OUT_KEY, NULL, N_("Video Out"), "XF86Display" },
/* Key code of the XF86RotateWindows key (present on some tablets) */
- { ROTATE_VIDEO_KEY, NULL, "XF86RotateWindows" },
+ { ROTATE_VIDEO_KEY, NULL, N_("Rotate Screen"), "XF86RotateWindows" },
{ MAGNIFIER_KEY, "magnifier", NULL },
{ SCREENREADER_KEY, "screenreader", NULL },
{ ON_SCREEN_KEYBOARD_KEY, "on-screen-keyboard", NULL },
@@ -136,17 +137,17 @@ static struct {
{ TOGGLE_CONTRAST_KEY, "toggle-contrast", NULL },
{ MAGNIFIER_ZOOM_IN_KEY, "magnifier-zoom-in", NULL },
{ MAGNIFIER_ZOOM_OUT_KEY, "magnifier-zoom-out", NULL },
- { POWER_KEY, NULL, "XF86PowerOff" },
+ { POWER_KEY, NULL, N_("Power Off"), "XF86PowerOff" },
/* the kernel / Xorg names really are like this... */
- { SLEEP_KEY, NULL, "XF86Suspend" },
- { SUSPEND_KEY, NULL, "XF86Sleep" },
- { HIBERNATE_KEY, NULL, "XF86Hibernate" },
- { SCREEN_BRIGHTNESS_UP_KEY, NULL, "XF86MonBrightnessUp" },
- { SCREEN_BRIGHTNESS_DOWN_KEY, NULL, "XF86MonBrightnessDown" },
- { KEYBOARD_BRIGHTNESS_UP_KEY, NULL, "XF86KbdBrightnessUp" },
- { KEYBOARD_BRIGHTNESS_DOWN_KEY, NULL, "XF86KbdBrightnessDown" },
- { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, NULL, "XF86KbdLightOnOff" },
- { BATTERY_KEY, NULL, "XF86Battery" },
+ { SLEEP_KEY, NULL, N_("Sleep"), "XF86Suspend" },
+ { SUSPEND_KEY, NULL, N_("Suspend"), "XF86Sleep" },
+ { HIBERNATE_KEY, NULL, N_("Hibernate"), "XF86Hibernate" },
+ { SCREEN_BRIGHTNESS_UP_KEY, NULL, N_("Brightness Up"), "XF86MonBrightnessUp" },
+ { SCREEN_BRIGHTNESS_DOWN_KEY, NULL, N_("Brightness Down"), "XF86MonBrightnessDown" },
+ { KEYBOARD_BRIGHTNESS_UP_KEY, NULL, N_("Keyboard Brightness Up"), "XF86KbdBrightnessUp" },
+ { KEYBOARD_BRIGHTNESS_DOWN_KEY, NULL, N_("Keyboard Brightness Down"), "XF86KbdBrightnessDown" },
+ { KEYBOARD_BRIGHTNESS_TOGGLE_KEY, NULL, N_("Keyboard Brightness Toggle"), "XF86KbdLightOnOff" },
+ { BATTERY_KEY, NULL, N_("Battery Status"), "XF86Battery" },
};
#endif /* __ACME_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c4e2380..cf0244e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -30,6 +30,7 @@ plugins/keyboard/gsd-keyboard-manager.c
plugins/media-keys/gsd-media-keys-manager.c
plugins/media-keys/gsd-screenshot-utils.c
plugins/media-keys/gvc/gvc-mixer-control.c
+plugins/media-keys/shortcuts-list.h
[type: gettext/ini]plugins/media-keys/media-keys.gnome-settings-plugin.in
plugins/mouse/gsd-mouse-manager.c
[type: gettext/ini]plugins/mouse/mouse.gnome-settings-plugin.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]