Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add internationalization support with chrome.i18n + English language #363

Merged
merged 16 commits into from
Aug 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 196 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
{
// manifest.json
"ext_extension_name": { "message": "The Great Suspender" },
"ext_extension_description": { "message": "Automatically suspends unused tabs to free up system resources" },
"ext_default_title": { "message": "The Great Suspender" },
"ext_cmd_suspend_tab_description": { "message": "Suspend active tab" },
"ext_cmd_unsuspend_tab_description": { "message": "Unsuspend active tab" },
"ext_cmd_suspend_active_window_description": { "message": "Suspend all tabs in active window" },
"ext_cmd_unsuspend_active_window_description": { "message": "Unsuspend all tabs in active window" },
"ext_cmd_suspend_all_windows_description": { "message": "Suspend all tabs in all windows" },
"ext_cmd_unsuspend_all_windows_description": { "message": "Unsuspend all tabs in all windows" },

// About page
"html_about_title": { "message": "Support" },
"html_about_email_feedback_to": { "message": "Email your feedback to" },
"html_about_report_issues_to": { "message": "Please report issues to" },
"html_about_the_github_project": { "message": "the github project" },
"html_about_html2canvas_prefix": { "message": "This extension uses the" },
"html_about_html2canvas_suffix": { "message": "library written by Niklas von Hertzen." },
"html_about_indexedDb_prefix": { "message": "It also uses the indexedDb wrapper" },
"html_about_indexedDb_suffix": { "message": "written by Aaron Powell." },
"html_about_browserstack_prefix": { "message": "Thank you also to" },
"html_about_browserstack_suffix": { "message": "for providing free chrome testing tools." },
"html_about_feeling_generous": { "message": "If you like The Great Suspender & you're feeling generous..." },
"html_about_already_donated": { "message": "Already donated?" },
"html_about_thanks_for_your_donation": { "message": "Thanks a lot for your donation. You've made thank you cat happy." },
"html_about_want_to_donate_again": { "message": "Want to donate again?" },

// Session management page
"html_history_title": { "message": "Session management" },
"html_history_current_session": { "message": "Current session" },
"html_history_recent_sessions": { "message": "Recent sessions" },
"html_history_saved_sessions": { "message": "Saved sessions" },
"html_history_clear_tab_history": { "message": "Clear tab history" },
"html_history_enter_name_for_session": { "message": "Enter a name for this session" },
"html_history_cancel": { "message": "Cancel" },
"html_history_ok": { "message": "OK" },

// Important notice page
"html_notice_title": { "message": "Notice" },
"html_notice_important_notice": { "message": "Important notice from The Great Suspender" },

// General settings page
"html_options_title": { "message": "Settings" },
"html_options_suspend_title": { "message": "Suspend tab settings" },
"html_options_suspend_automatically_after": { "message": "Automatically suspend tabs after" },
"html_options_suspend_never": { "message": "Never" },
"html_options_suspend_seconds": { "message": "seconds" },
"html_options_suspend_minute": { "message": "min" },
"html_options_suspend_minutes": { "message": "mins" },
"html_options_suspend_hour": { "message": "hour" },
"html_options_suspend_hours": { "message": "hours" },
"html_options_suspend_day": { "message": "day" },
"html_options_suspend_days": { "message": "days" },
"html_options_suspend_no_pinned": { "message": "Do not suspend pinned tabs" },
"html_options_suspend_no_forms": { "message": "Do not suspend tabs that contain unsaved form inputs" },
"html_options_suspend_no_audio": { "message": "Do not suspend tabs that are playing audio" },
"html_options_suspend_only_connected": { "message": "Only auto-suspend if connected to the internet" },
"html_options_suspend_only_on_battery": { "message": "Only auto-suspend if running on battery" },
"html_options_suspend_automatically_unsuspend": { "message": "Automatically unsuspend tab when it is viewed" },
"html_options_suspend_enable_context_menu": { "message": "Add The Great Suspender to right-click context menu" },
"html_options_suspend_theme": { "message": "Theme" },
"html_options_suspend_theme_light": { "message": "Light" },
"html_options_suspend_theme_dark": { "message": "Dark" },
"html_options_suspend_screen_capturing": { "message": "Screen capturing" },
"html_options_suspend_screen_capturing_disabled": { "message": "Disabled" },
"html_options_suspend_screen_capturing_screen_only": { "message": "Capture visible screen only" },
"html_options_suspend_screen_capturing_entire_page": { "message": "Capture entire page" },
"html_options_suspend_preview_note_line1": { "message": "The screen capturing feature is experimental and can cause significant CPU usage." },
"html_options_suspend_preview_note_line2": { "message": "If you notice strange behaviour such as tabs taking a long time to suspend, or chrome crashing unexpectedly, try turning this feature off." },
"html_options_whitelist_title": { "message": "Whitelist" },
"html_options_whitelist_helptext1": { "message": "Add the URL of each page you want to whitelist on a new line. For example:" },
"html_options_whitelist_helptext2": { "message": "You can specify part of the url instead to whitelist multiple sites in one go" },
"html_options_whitelist_helptext3": { "message": "You can also specify regular expressions by enclosing the text in forward slashes" },
"html_options_cancel": { "message": "Cancel" },
"html_options_save_settings": { "message": "Save settings" },

// Dropdown menu from button in the address bar
"html_popup_normal": { "message": "Tab will be suspended" },
"html_popup_suspend_tab": { "message": "Suspend this tab" },
"html_popup_dont_suspend_now": { "message": "Don't suspend for now" },
"html_popup_never_suspend_site": { "message": "Never suspend this site" },
"html_popup_suspend_other_tabs": { "message": "Suspend other tabs" },
"html_popup_unsuspend_all_tabs": { "message": "Unsuspend all tabs" },
"html_popup_suspend_selected_tabs": { "message": "Suspend selected tabs" },
"html_popup_unsuspend_selected_tabs": { "message": "Unsuspend selected tabs" },
"html_popup_settings": { "message": "Settings" },

// Profiler page
"html_profiler_title": { "message": "Profiler" },
"html_profiler_reload": { "message": "reload" },
"html_profiler_table_title": { "message": "Title" },
"html_profiler_table_time_to_suspend": { "message": "Time to suspend" },
"html_profiler_table_status": { "message": "Status" },

// Recovery page (to recover from a crashed session)
"html_recovery_title": { "message": "Recovery" },
"html_recovery_ruh_roh": { "message": "Ruh roh!" },
"html_recovery_description_line1": { "message": "Looks like you're recovering from an extension crash." },
"html_recovery_description_line2": { "message": "Your suspended tabs may have crashed or disappeared." },
"html_recovery_restore_tabs_automatically": { "message": "Restore tabs automatically" },
"html_recovery_go_to_session_manager": { "message": "Go to session manager" },
"html_recovery_important": { "message": "Important!" },
"html_recovery_important_message": { "message": "You currently have screen capturing turned on. If this extension is repeatedly crashing it is recommended you disable this option." },
"html_recovery_disable_screen_capturing": { "message": "Turn off screen capturing" },
"html_recovery_tabs_to_restore": { "message": "Tabs to restore" },

// Keyboard shortcuts page
"html_shortcuts_title": { "message": "Keyboard shortcuts" },
"html_shortcuts_keyboard_shortcuts": { "message": "Keyboard shortcuts" },
"html_shortcuts_remap_keys": { "message": "Remap keys" },

// Sidebar from the configuration section (common to all settings)
"html_sidebar_general_settings": { "message": "General settings" },
"html_sidebar_session_management": { "message": "Session management" },
"html_sidebar_shortcuts": { "message": "Keyboard shortcuts" },
"html_sidebar_support": { "message": "Support" },

// Success page (after recovering from a crashed session)
"html_success_title": { "message": "Recovery" },
"html_success_great_success": { "message": "Great success!" },
"html_success_all_tabs_restored": { "message": "All your tabs have been restored." },
"html_success_goto_advanced_prefix": { "message": "For advanced session management, visit the" },
"html_success_goto_advanced_link_name": { "message": "session management" },
"html_success_goto_advanced_suffix": { "message": "page" },

// Suspended page
"html_suspended_title": { "message": "Suspended Tab" },
"html_suspended_tab_suspended": { "message": "Tab suspended" },
"html_suspended_click_to_reload": { "message": "Click to reload" },
"html_suspended_donation_question": { "message": "Does this extension make you happy?" },

// Updated page
"html_update_title": { "message": "Update" },
"html_update_great_suspender_updated": { "message": "The Great Suspender has been updated" },
"html_update_bugs_squashed_title": { "message": "Bugs squashed" },
"html_update_bugs_squashed_line1": { "message": "This new version fixes the bug caused by the new chrome release that caused tabs to change the the wrong url when they were suspended. Sorry for such a terrible bug and that the fix was a long time coming." },
"html_update_bugs_squashed_line2": { "message": "The 'suspend other tabs' option will now NOT suspend the currently active tab." },
"html_update_bugs_squashed_line3": { "message": "Browsing in incognito mode will no longer bring up the welcome tab every time." },
"html_update_whats_new_title": { "message": "What's new?" },
"html_update_whats_new_line1": { "message": "This version includes light and dark themes. Try switching to the dark theme when using chrome at night to go easy on your eyes." },
"html_update_whats_new_line2": { "message": "The extension now supports actions on multiple selected tabs. If you select multiple tabs in chrome, you will have some new options appear in the pop-up menu to allow you to suspend / unsuspend all selected tabs" },
"html_update_whats_new_line3": { "message": "The new improved whitelist now supports regular expressions. For the programming-minded only!" },
"html_update_whats_new_line4_prefix": { "message": "You can check it all out in the" },
"html_update_whats_new_line4_linkname": { "message": "settings" },
"html_update_whats_new_line4_suffix": { "message": "page." },
"html_update_problems_title": { "message": "Problems with the update?" },
"html_update_problems_line1": { "message": "If you are experiencing a loss of tabs due to this update, try going to the <a href='/history.html' target='_blank'>session management</a> page. You will find a list of all your recently suspended tabs and should be able to recover them from here." },
"html_update_problems_line2": { "message": "If losing your tabs has made you extremely upset and you want to uninstall this extension: fair enough - but before you do, please go through the session recovery process first and make sure all your tabs are recovered and unsuspended before you uninstall." },
"html_update_problems_line3": { "message": "Thanks for using" },

// Welcome page
"html_welcome_title": { "message": "Welcome" },
"html_welcome_text_line1": { "message": "Thanks for trying" },
"html_welcome_text_line2": { "message": "Hopefully it will make you a happier and more productive human." },
"html_welcome_get_started_prefix": { "message": "Get started by checking out the" },
"html_welcome_get_started_linkname": { "message": "settings" },
"html_welcome_get_started_suffix": { "message": "page." },

// Contextual menu (Javascript code)
"js_background_open_link_in_suspended_tab": { "message": "Open link in new suspended tab" },
"js_background_suspend_tab": { "message": "Suspend Tab" },
"js_background_dont_suspend_now": { "message": "Don't suspend for now" },
"js_background_never_suspend_site": { "message": "Never suspend this site" },
"js_background_suspend_all_tabs": { "message": "Suspend All Tabs" },
"js_background_unsuspend_all_tabs": { "message": "Unsuspend All Tabs" },
"js_background_settings": { "message": "Settings" },

// Dropdown menu from button in the address bar (Javascript code)
"js_popup_normal": { "message": "Tab will be suspended automatically." },
"js_popup_special": { "message": "Tab cannot be suspended." },
"js_popup_suspended": { "message": "Tab suspended." },
"js_popup_suspended_unsuspended": { "message": "Unsuspend" },
"js_popup_whitelisted": { "message": "Site whitelisted." },
"js_popup_whitelisted_remove": { "message": "Remove from whitelist" },
"js_popup_audible": { "message": "Tab is playing audio." },
"js_popup_form_input": { "message": "Tab is receiving form input." },
"js_popup_form_input_unpause": { "message": "Unpause" },
"js_popup_pinned": { "message": "Tab has been pinned." },
"js_popup_temp_whitelist": { "message": "Tab suspension paused.Unpause" },
"js_popup_temp_whitelist_unpause": { "message": "Unpause" },
"js_popup_never": { "message": "Automatic tab suspension disabled." },
"js_popup_no_connectivity": { "message": "No network connection." },
"js_popup_charging": { "message": "Connected to power source." },

// Session management page (Javascript code)
"js_sessionUtils_delete": { "message": "resuspend" },
"js_sessionUtils_export": { "message": "export" },
"js_sessionUtils_reload": { "message": "reload" },
"js_sessionUtils_resuspend": { "message": "resuspend" },
"js_sessionUtils_save": { "message": "save" },

// Suspended page (Javascript code)
"js_suspended_add_URL_to": { "message": "Add $url$ to whitelist", "placeholders": { "url": { "content": "$1" } }
}
}
33 changes: 17 additions & 16 deletions src/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,57 @@
<head>
<link type="text/css" href="css/style.css" rel="stylesheet">
<script type="text/javascript" src="js/about.js"></script>
<title>The Great Suspender - Support</title>
<title>__MSG_ext_extension_name__ - __MSG_html_about_title__</title>
</head>


<body id="body">

<div class="mainContent">

<h1 class="pageHeader"><img src="img/icon64_hidden.png" class="headerIcon" />The Great Suspender</h1>
<h1 class="pageHeader"><img src="img/icon64_hidden.png" class="headerIcon" />__MSG_ext_extension_name__</h1>

<div class="contentNav">
<ul>
<li><a href='options.html'>General settings</a></li>
<li><a href="history.html">Session management</a></li>
<li><a href='shortcuts.html'>Keyboard shortcuts</a></li>
<li><a class="active">Support</a></li>
<li><a href='options.html'>__MSG_html_sidebar_general_settings__</a></li>
<li><a href="history.html">__MSG_html_sidebar_session_management__</a></li>
<li><a href='shortcuts.html'>__MSG_html_sidebar_shortcuts__</a></li>
<li><a class="active">__MSG_html_sidebar_support__</a></li>
</ul>
</div>

<div class="content">

<h2 id="aboutVersion">The Great Suspender</h2>
<h2 id="aboutVersion">__MSG_ext_extension_name__</h2>

<p>Email your feedback to <a href="mailto:greatsuspender@gmail.com">greatsuspender@gmail.com</a>.<br />
Please report issues to <a href="https://github.com/deanoemcke/thegreatsuspender" target="_blank">the github project</a>.</p>
<p>__MSG_html_about_email_feedback_to__ <a href="mailto:greatsuspender@gmail.com">greatsuspender@gmail.com</a>.<br />
__MSG_html_about_report_issues_to__ <a href="https://github.com/deanoemcke/thegreatsuspender" target="_blank"> __MSG_html_about_the_github_project__</a>.</p>


<hr />
<div id='thankyous'>
<p>This extension uses the <a href="https://github.com/niklasvh/html2canvas" target="_blank">html2canvas</a> library written by Niklas von Hertzen.<br />
It also uses the indexedDb wrapper <a href="https://github.com/aaronpowell/db.js" target="_blank">db.js</a> written by Aaron Powell.<br />
Thank you also to <a href="https://www.browserstack.com" target="_blank">browserstack</a> for providing free chrome testing tools.</p>
<p>__MSG_html_about_html2canvas_prefix__ <a href="https://github.com/niklasvh/html2canvas" target="_blank">html2canvas</a> __MSG_html_about_html2canvas_suffix__<br />
__MSG_html_about_indexedDb_prefix__ <a href="https://github.com/aaronpowell/db.js" target="_blank">db.js</a> __MSG_html_about_indexedDb_suffix__<br />
__MSG_html_about_browserstack_prefix__ <a href="https://www.browserstack.com" target="_blank">browserstack</a> __MSG_html_about_browserstack_suffix__</p>
</div>
<hr />


<div id='donateSection'>
<p>If you like The Great Suspender &amp; you're feeling generous...</p>
<p>__MSG_html_about_feeling_generous__</p>
<div id='donateButtons'></div>
<a id='alreadyDonatedToggle' href='#' style="clear: left; float: left; margin-top: 15px;">Already donated?</a>
<a id='alreadyDonatedToggle' href='#' style="clear: left; float: left; margin-top: 15px;">__MSG_html_about_already_donated__</a>
</div>
<div id='donatedSection' style='display:none;'>
<p>Thanks a lot for your donation. You've made thank you cat happy.</p>
<p>__MSG_html_about_thanks_for_your_donation__</p>
<br />
<pre>
|\ _,,,--,,_
/,`.-'`' ._ \-;;,_
|,4- ) )_ .;.( `'-'
'---''(_/._)-'(_\_)
</pre>
<a id='donateAgainToggle' href='#'>Want to donate again?</a>
<a id='donateAgainToggle' href='#'>__MSG_html_about_want_to_donate_again__</a>

</div>

Expand All @@ -61,4 +61,5 @@ <h2 id="aboutVersion">The Great Suspender</h2>
</div>

</body>
<script src="js/chrome-i18n.js"></script>
</html>
Loading