summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-20 12:31:44 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-20 12:31:44 (EST)
commit395a8ea0f1fdbfa04ee52a280d5570a7ba540ba7 (patch)
treee802454ec1320f1b891a0a0b172ddc10e7f4c5ab /src
parent7920b495fd80ecb69318735cb30297d2585d8e68 (diff)
downloadmarquee-395a8ea0f1fdbfa04ee52a280d5570a7ba540ba7.zip
marquee-395a8ea0f1fdbfa04ee52a280d5570a7ba540ba7.tar.gz
marquee-395a8ea0f1fdbfa04ee52a280d5570a7ba540ba7.tar.bz2
about:preferences: Internationalize
Diffstat (limited to 'src')
-rw-r--r--src/schemes/about/preferences.c173
1 files changed, 88 insertions, 85 deletions
diff --git a/src/schemes/about/preferences.c b/src/schemes/about/preferences.c
index 77e6f23..1637ee4 100644
--- a/src/schemes/about/preferences.c
+++ b/src/schemes/about/preferences.c
@@ -26,6 +26,7 @@
#include "../../application.h"
#include "../../config/config.h"
+#include "../../i18n.h"
#include "../../utils/html.h"
#include "../about.h"
@@ -54,46 +55,47 @@ static gchar *
gen_page_general(MqConfig *config)
{
return mq_html_container("div", NULL,
- mq_html_h3("Web Browsing"),
+ mq_html_h3(_("Web Browsing")),
GEN_SLCT("tabs.new",
- "New tab page",
- "home", "Home page",
- "blank", "Blank page"),
+ _("New tab page"),
+ "home", _("Home page"),
+ "blank", _("Blank page")),
GEN_STR ("tabs.home",
- "Home page"),
+ _("Home page")),
GEN_BOOL("tabs.background",
- "Open new tabs in the background"),
+ _("Open new tabs in the background")),
GEN_BOOL("tabs.warn-on-close",
- "Warn when closing multiple tabs or windows"),
+ _("Warn when closing multiple tabs or windows")),
- mq_html_h3("Navigation and Accessibility"),
+ mq_html_h3(_("Navigation and Accessibility")),
GEN_BOOL("navigation.smooth-scrolling",
- "Enable smooth scrolling"),
+ _("Enable smooth scrolling")),
GEN_BOOL("navigation.tabbing",
- "Enable tabbing navigation (cycling focus by tab key)"),
+ _("Enable tabbing navigation (cycling focus by tab "
+ "key)")),
GEN_BOOL("navigation.caret",
- "Enable caret (text cursor) navigation"),
+ _("Enable caret (text cursor) navigation")),
GEN_BOOL("navigation.spatial",
- "Enable spatial navigation between elements by arrow "
- "keys"),
+ _("Enable spatial navigation between elements by arrow "
+ "keys")),
- mq_html_h3("Spell Checking"),
+ mq_html_h3(_("Spell Checking")),
GEN_BOOL("spell.enable",
- "Enable spell checking"),
+ _("Enable spell checking")),
GEN_STRL("spell.langs",
- "Spell checking languages"),
+ _("Spell checking languages")),
- mq_html_h3("Miscellaneous"),
+ mq_html_h3(_("Miscellaneous")),
GEN_BOOL("display.textarea.resize.enable",
- "Enable resizable text areas"),
+ _("Enable resizable text areas")),
GEN_BOOL("devtools.enable",
- "Enable developer tools"),
+ _("Enable developer tools")),
- mq_html_h3("Compatibility"),
+ mq_html_h3(_("Compatibility")),
GEN_STR ("compatibility.user-agent",
- "User agent identity"),
+ _("User agent identity")),
GEN_BOOL("compatibility.quirks",
- "Enable site-specific quirks"),
+ _("Enable site-specific quirks")),
NULL);
}
@@ -101,39 +103,39 @@ static gchar *
gen_page_display(MqConfig *config)
{
return mq_html_container("div", NULL,
- mq_html_h3("Fonts"),
+ mq_html_h3(_("Fonts")),
GEN_STR ("font.family.default",
- "Default font family"),
+ _("Default font family")),
GEN_STR ("font.family.monospace",
- "Default monospace font family"),
+ _("Default monospace font family")),
GEN_STR ("font.family.serif",
- "Default serif font family"),
+ _("Default serif font family")),
GEN_STR ("font.family.sans-serif",
- "Default sans-serif font family"),
+ _("Default sans-serif font family")),
GEN_STR ("font.family.cursive",
- "Cursive font family"),
+ _("Cursive font family")),
GEN_STR ("font.family.fantasy",
- "Fantasy font family"),
+ _("Fantasy font family")),
GEN_STR ("font.family.pictograph",
- "Pictograph font family"),
+ _("Pictograph font family")),
GEN_INT ("font.size.default",
- "Default font size", 5, 1, 72),
+ _("Default font size"), 5, 1, 72),
GEN_INT ("font.size.monospace-default",
- "Default monospace font size", 5, 1, 72),
+ _("Default monospace font size"), 5, 1, 72),
GEN_INT ("font.size.minimum",
- "Minimum font size", 0, 1, 72),
+ _("Minimum font size"), 0, 1, 72),
- mq_html_h3("Languages"),
+ mq_html_h3(_("Languages")),
GEN_STRL("intl.accept-languages",
- "Preferred Web site languages"),
+ _("Preferred Web site languages")),
GEN_STR ("intl.default-charset",
- "Default character set"),
+ _("Default character set")),
- mq_html_h3("Zoom"),
+ mq_html_h3(_("Zoom")),
GEN_DBL ("zoom.default",
- "Default zoom level", 0.00, 0.10, 10.00),
+ _("Default zoom level"), 0.00, 0.10, 10.00),
GEN_BOOL("zoom.text-only",
- "Zoom text only"),
+ _("Zoom text only")),
NULL);
}
@@ -141,52 +143,53 @@ static gchar *
gen_page_permissions(MqConfig *config)
{
return mq_html_container("div", NULL,
- mq_html_h3("General"),
+ mq_html_h3(_("General")),
GEN_BOOL("permissions.images.auto-load",
- "Automatically load images"),
+ _("Automatically load images")),
GEN_BOOL("permissions.images.favicons.override",
- "Always load icons irrespective of automatic image "
- "loading"),
+ _("Always load icons irrespective of automatic image "
+ "loading")),
GEN_BOOL("permissions.java.enable",
- "Enable Java"),
+ _("Enable Java")),
GEN_BOOL("permissions.javascript.enable",
- "Enable JavaScript"),
+ _("Enable JavaScript")),
GEN_BOOL("permissions.plugins.enable",
- "Enable plugins"),
+ _("Enable plugins")),
- mq_html_h3("JavaScript"),
+ mq_html_h3(_("JavaScript")),
GEN_BOOL("permissions.javascript.open-windows",
- "Allow JavaScript to open windows"),
+ _("Allow JavaScript to open windows")),
GEN_BOOL("permissions.javascript.fullscreen",
- "Allow JavaScript to display elements fullscreen"),
+ _("Allow JavaScript to display elements fullscreen")),
GEN_BOOL("permissions.javascript.modal-dialogs",
- "Allow JavaScript to show modal dialogs"),
+ _("Allow JavaScript to show modal dialogs")),
GEN_BOOL("permissions.javascript.clipboard",
- "Allow JavaScript to access the clipboard"),
+ _("Allow JavaScript to access the clipboard")),
- mq_html_h3("Data Storage"),
+ mq_html_h3(_("Data Storage")),
GEN_BOOL("permissions.javascript.database",
- "Enable Web database"),
+ _("Enable Web database")),
GEN_BOOL("permissions.javascript.storage",
- "Enable Web storage"),
+ _("Enable Web storage")),
GEN_BOOL("permissions.appcache",
- "Enable application cache"),
+ _("Enable application cache")),
- mq_html_h3("Graphics and Multimedia"),
+ mq_html_h3(_("Graphics and Multimedia")),
GEN_BOOL("canvas.acceleration.enable",
- "Enable hardware-accelerated 2-D canvas drawing"),
+ _("Enable hardware-accelerated 2-D canvas drawing")),
GEN_BOOL("permissions.javascript.webgl",
- "Enable JavaScript WebGL 3-D graphics rendering"),
+ _("Enable JavaScript WebGL 3-D graphics rendering")),
GEN_BOOL("permissions.javascript.audio",
- "Allow JavaScript to process and synthesize audio"),
+ _("Allow JavaScript to process and synthesize audio")),
GEN_BOOL("media.autoplay",
- "Enable automatic media playback and loading"),
+ _("Enable automatic media playback and loading")),
GEN_BOOL("media.force-fullscreen",
- "Force media to play fullscreen"),
+ _("Force media to play fullscreen")),
GEN_BOOL("permissions.javascript.mediastream.enable",
- "Allow JavaScript to access audio and video devices"),
+ _("Allow JavaScript to access audio and video devices")
+ ),
GEN_BOOL("permissions.javascript.mediasource.enable",
- "Allow JavaScript to generate media streams"),
+ _("Allow JavaScript to generate media streams")),
NULL);
}
@@ -194,31 +197,31 @@ static gchar *
gen_page_sec_and_priv(MqConfig *config)
{
return mq_html_container("div", NULL,
- mq_html_h3("History"),
+ mq_html_h3(_("History")),
GEN_BOOL("privacy.private-browsing.enabled",
- "Enable private prowsing (disables history, cache, and "
- "form auto-filling)"),
+ _("Enable private prowsing (disables history, cache, "
+ "and form auto-filling)")),
GEN_BOOL("privacy.remember.history",
- "Remember browsing history"),
+ _("Remember browsing history")),
GEN_BOOL("privacy.remember.downloads",
- "Remember download history"),
+ _("Remember download history")),
- mq_html_h3("Cookies"),
+ mq_html_h3(_("Cookies")),
GEN_SLCT("cookies.accept",
- "Accept cookies",
- "always", "Always",
- "never", "Never",
- "no-third-party", "No third-party"),
+ _("Accept cookies"),
+ "always", _("Always"),
+ "never", _("Never"),
+ "no-third-party", _("No third-party")),
- mq_html_h3("Security"),
+ mq_html_h3(_("Security")),
GEN_BOOL("security.xss-auditor.enable",
- "Attempt to detect and block cross-site scripting "
- "attacks"),
+ _("Attempt to detect and block cross-site scripting "
+ "attacks")),
- mq_html_h3("Network"),
+ mq_html_h3(_("Network")),
GEN_BOOL("dns.prefetch.enable",
- "Prefetch domain name resolutions for better "
- "performance"),
+ _("Prefetch domain name resolutions for better "
+ "performance")),
NULL);
}
@@ -242,17 +245,17 @@ mq_about_preferences_response(MqApplication *application, GHashTable *query,
mq_config_save(config);
mq_about_redirect(request, "mq-about:preferences");
} else {
- document = mq_html_document("Preferences", NULL, NULL,
- mq_html_form(NULL, "Save", NULL, "Cancel",
+ document = mq_html_document(_("Preferences"), NULL, NULL,
+ mq_html_form(NULL, _("Save"), NULL, _("Cancel"),
mq_html_notebook(FALSE, "notebook1", 0,
gen_page_general(config),
- "General",
+ _("General"),
gen_page_display(config),
- "Display",
+ _("Display"),
gen_page_permissions(config),
- "Permissions",
+ _("Permissions"),
gen_page_sec_and_priv(config),
- "Security and Privacy",
+ _("Security and Privacy"),
NULL),
NULL),
NULL);