Make strings in confic.c translatable.

This commit is contained in:
Sebastian Ramacher 2012-03-05 12:39:53 +01:00
parent 81385dba21
commit 7c7a067938
3 changed files with 250 additions and 29 deletions

View file

@ -13,6 +13,7 @@
#include <girara/config.h>
#include <girara/commands.h>
#include <girara/gtk2-compat.h>
#include <glib/gi18n.h>
static void
cb_color_change(girara_session_t* session, const char* name, girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
@ -64,38 +65,38 @@ config_load_default(zathura_t* zathura)
girara_mode_set(gsession, zathura->modes.normal);
/* zathura settings */
girara_setting_add(gsession, "database", "plain", STRING, true, "Database backend", NULL, NULL);
girara_setting_add(gsession, "database", "plain", STRING, true, _("Database backend"), NULL, NULL);
int_value = 10;
girara_setting_add(gsession, "zoom-step", &int_value, INT, false, "Zoom step", NULL, NULL);
girara_setting_add(gsession, "zoom-step", &int_value, INT, false, _("Zoom step"), NULL, NULL);
int_value = 1;
girara_setting_add(gsession, "page-padding", &int_value, INT, true, "Padding between pages", NULL, NULL);
girara_setting_add(gsession, "page-padding", &int_value, INT, true, _("Padding between pages"), NULL, NULL);
int_value = 1;
girara_setting_add(gsession, "pages-per-row", &int_value, INT, false, "Number of pages per row", cb_pages_per_row_value_changed, NULL);
girara_setting_add(gsession, "pages-per-row", &int_value, INT, false, _("Number of pages per row"), cb_pages_per_row_value_changed, NULL);
float_value = 40;
girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, "Scroll step", NULL, NULL);
girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, _("Scroll step"), NULL, NULL);
int_value = 10;
girara_setting_add(gsession, "zoom-min", &int_value, INT, false, "Zoom minimum", NULL, NULL);
girara_setting_add(gsession, "zoom-min", &int_value, INT, false, _("Zoom minimum"), NULL, NULL);
int_value = 1000;
girara_setting_add(gsession, "zoom-max", &int_value, INT, false, "Zoom maximum", NULL, NULL);
girara_setting_add(gsession, "zoom-max", &int_value, INT, false, _("Zoom maximum"), NULL, NULL);
girara_setting_add(gsession, "recolor-darkcolor", NULL, STRING, false, "Recoloring (dark color)", cb_color_change, NULL);
girara_setting_add(gsession, "recolor-darkcolor", NULL, STRING, false, _("Recoloring (dark color)"), cb_color_change, NULL);
girara_setting_set(gsession, "recolor-darkcolor", "#FFFFFF");
girara_setting_add(gsession, "recolor-lightcolor", NULL, STRING, false, "Recoloring (light color)", cb_color_change, NULL);
girara_setting_add(gsession, "recolor-lightcolor", NULL, STRING, false, _("Recoloring (light color)"), cb_color_change, NULL);
girara_setting_set(gsession, "recolor-lightcolor", "#000000");
girara_setting_add(gsession, "highlight-color", NULL, STRING, false, "Color for highlighting", cb_color_change, NULL);
girara_setting_add(gsession, "highlight-color", NULL, STRING, false, _("Color for highlighting"), cb_color_change, NULL);
girara_setting_set(gsession, "highlight-color", "#9FBC00");
girara_setting_add(gsession, "highlight-active-color", NULL, STRING, false, "Color for highlighting (active)", cb_color_change, NULL);
girara_setting_add(gsession, "highlight-active-color", NULL, STRING, false, _("Color for highlighting (active)"), cb_color_change, NULL);
girara_setting_set(gsession, "highlight-active-color", "#00BC00");
float_value = 0.5;
girara_setting_add(gsession, "highlight-transparency", &float_value, FLOAT, false, "Transparency for highlighting", NULL, NULL);
girara_setting_add(gsession, "highlight-transparency", &float_value, FLOAT, false, _("Transparency for highlighting"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "render-loading", &bool_value, BOOLEAN, false, "Render 'Loading ...'", NULL, NULL);
girara_setting_add(gsession, "adjust-open", "best-fit", STRING, false, "Adjust to when opening file", NULL, NULL);
girara_setting_add(gsession, "render-loading", &bool_value, BOOLEAN, false, _("Render 'Loading ...'"), NULL, NULL);
girara_setting_add(gsession, "adjust-open", "best-fit", STRING, false, _("Adjust to when opening file"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "show-hidden", &bool_value, BOOLEAN, false, "Show hidden files and directories", NULL, NULL);
girara_setting_add(gsession, "show-hidden", &bool_value, BOOLEAN, false, _("Show hidden files and directories"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "show-directories", &bool_value, BOOLEAN, false, "Show directories", NULL, NULL);
girara_setting_add(gsession, "show-directories", &bool_value, BOOLEAN, false, _("Show directories"), NULL, NULL);
/* define default shortcuts */
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_abort, 0, 0, NULL);
@ -217,17 +218,17 @@ config_load_default(zathura_t* zathura)
girara_mouse_event_add(gsession, GDK_BUTTON2_MASK, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_MOTION_NOTIFY, 0, NULL);
/* define default inputbar commands */
girara_inputbar_command_add(gsession, "bmark", NULL, cmd_bookmark_create, NULL, "Add a bookmark");
girara_inputbar_command_add(gsession, "bdelete", NULL, cmd_bookmark_delete, cc_bookmarks, "Delete a bookmark");
girara_inputbar_command_add(gsession, "blist", NULL, cmd_bookmark_open, cc_bookmarks, "List all bookmarks");
girara_inputbar_command_add(gsession, "close", NULL, cmd_close, NULL, "Close current file");
girara_inputbar_command_add(gsession, "info", NULL, cmd_info, NULL, "Show file information");
girara_inputbar_command_add(gsession, "help", NULL, cmd_help, NULL, "Show help");
girara_inputbar_command_add(gsession, "open", "o", cmd_open, cc_open, "Open document");
girara_inputbar_command_add(gsession, "print", NULL, cmd_print, NULL, "Print document");
girara_inputbar_command_add(gsession, "write", NULL, cmd_save, NULL, "Save document");
girara_inputbar_command_add(gsession, "write!", NULL, cmd_savef, NULL, "Save document (and force overwriting)");
girara_inputbar_command_add(gsession, "export", NULL, cmd_export, cc_export, "Save attachments");
girara_inputbar_command_add(gsession, "bmark", NULL, cmd_bookmark_create, NULL, _("Add a bookmark"));
girara_inputbar_command_add(gsession, "bdelete", NULL, cmd_bookmark_delete, cc_bookmarks, _("Delete a bookmark"));
girara_inputbar_command_add(gsession, "blist", NULL, cmd_bookmark_open, cc_bookmarks, _("List all bookmarks"));
girara_inputbar_command_add(gsession, "close", NULL, cmd_close, NULL, _("Close current file"));
girara_inputbar_command_add(gsession, "info", NULL, cmd_info, NULL, _("Show file information"));
girara_inputbar_command_add(gsession, "help", NULL, cmd_help, NULL, _("Show help"));
girara_inputbar_command_add(gsession, "open", "o", cmd_open, cc_open, _("Open document"));
girara_inputbar_command_add(gsession, "print", NULL, cmd_print, NULL, _("Print document"));
girara_inputbar_command_add(gsession, "write", NULL, cmd_save, NULL, _("Save document"));
girara_inputbar_command_add(gsession, "write!", NULL, cmd_savef, NULL, _("Save document (and force overwriting)"));
girara_inputbar_command_add(gsession, "export", NULL, cmd_export, cc_export, _("Save attachments"));
girara_special_command_add(gsession, '/', cmd_search, true, FORWARD, NULL);
girara_special_command_add(gsession, '?', cmd_search, true, BACKWARD, NULL);

112
po/de.po
View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-05 12:24+0100\n"
"POT-Creation-Date: 2012-03-05 12:39+0100\n"
"PO-Revision-Date: 2012-03-04 17:77+0100\n"
"Last-Translator: Sebastian Ramacher <s.ramacher@gmx.at>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -104,6 +104,116 @@ msgstr ""
msgid "Wrote attachment '%s' to '%s'."
msgstr ""
#. zathura settings
#: ../config.c:68
msgid "Database backend"
msgstr ""
#: ../config.c:70
msgid "Zoom step"
msgstr ""
#: ../config.c:72
msgid "Padding between pages"
msgstr ""
#: ../config.c:74
msgid "Number of pages per row"
msgstr ""
#: ../config.c:76
msgid "Scroll step"
msgstr ""
#: ../config.c:78
msgid "Zoom minimum"
msgstr ""
#: ../config.c:80
msgid "Zoom maximum"
msgstr ""
#: ../config.c:82
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:84
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:86
msgid "Color for highlighting"
msgstr ""
#: ../config.c:88
msgid "Color for highlighting (active)"
msgstr ""
#: ../config.c:92
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:94
msgid "Render 'Loading ...'"
msgstr ""
#: ../config.c:95
msgid "Adjust to when opening file"
msgstr ""
#: ../config.c:97
msgid "Show hidden files and directories"
msgstr ""
#: ../config.c:99
msgid "Show directories"
msgstr ""
#. define default inputbar commands
#: ../config.c:221
msgid "Add a bookmark"
msgstr ""
#: ../config.c:222
msgid "Delete a bookmark"
msgstr ""
#: ../config.c:223
msgid "List all bookmarks"
msgstr ""
#: ../config.c:224
msgid "Close current file"
msgstr ""
#: ../config.c:225
msgid "Show file information"
msgstr ""
#: ../config.c:226
msgid "Show help"
msgstr ""
#: ../config.c:227
msgid "Open document"
msgstr ""
#: ../config.c:228
msgid "Print document"
msgstr ""
#: ../config.c:229
msgid "Save document"
msgstr ""
#: ../config.c:230
msgid "Save document (and force overwriting)"
msgstr ""
#: ../config.c:231
msgid "Save attachments"
msgstr ""
#: ../document.c:383 ../document.c:407 ../document.c:426 ../document.c:448
#: ../document.c:467 ../document.c:489 ../document.c:508 ../document.c:551
#: ../document.c:571 ../document.c:594 ../document.c:623 ../document.c:652

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-05 12:24+0100\n"
"POT-Creation-Date: 2012-03-05 12:39+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -104,6 +104,116 @@ msgstr ""
msgid "Wrote attachment '%s' to '%s'."
msgstr ""
#. zathura settings
#: ../config.c:68
msgid "Database backend"
msgstr ""
#: ../config.c:70
msgid "Zoom step"
msgstr ""
#: ../config.c:72
msgid "Padding between pages"
msgstr ""
#: ../config.c:74
msgid "Number of pages per row"
msgstr ""
#: ../config.c:76
msgid "Scroll step"
msgstr ""
#: ../config.c:78
msgid "Zoom minimum"
msgstr ""
#: ../config.c:80
msgid "Zoom maximum"
msgstr ""
#: ../config.c:82
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:84
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:86
msgid "Color for highlighting"
msgstr ""
#: ../config.c:88
msgid "Color for highlighting (active)"
msgstr ""
#: ../config.c:92
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:94
msgid "Render 'Loading ...'"
msgstr ""
#: ../config.c:95
msgid "Adjust to when opening file"
msgstr ""
#: ../config.c:97
msgid "Show hidden files and directories"
msgstr ""
#: ../config.c:99
msgid "Show directories"
msgstr ""
#. define default inputbar commands
#: ../config.c:221
msgid "Add a bookmark"
msgstr ""
#: ../config.c:222
msgid "Delete a bookmark"
msgstr ""
#: ../config.c:223
msgid "List all bookmarks"
msgstr ""
#: ../config.c:224
msgid "Close current file"
msgstr ""
#: ../config.c:225
msgid "Show file information"
msgstr ""
#: ../config.c:226
msgid "Show help"
msgstr ""
#: ../config.c:227
msgid "Open document"
msgstr ""
#: ../config.c:228
msgid "Print document"
msgstr ""
#: ../config.c:229
msgid "Save document"
msgstr ""
#: ../config.c:230
msgid "Save document (and force overwriting)"
msgstr ""
#: ../config.c:231
msgid "Save attachments"
msgstr ""
#: ../document.c:383 ../document.c:407 ../document.c:426 ../document.c:448
#: ../document.c:467 ../document.c:489 ../document.c:508 ../document.c:551
#: ../document.c:571 ../document.c:594 ../document.c:623 ../document.c:652