Skip to content

Commit

Permalink
[WFX-378] Simplify Waterfox l10n.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamp01 authored and MrAlex94 committed May 3, 2022
1 parent d389a45 commit ddbc790
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 130 deletions.
1 change: 1 addition & 0 deletions browser/components/preferences/preferences.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<link rel="localization" href="browser/branding/sync-brand.ftl"/>
<link rel="localization" href="browser/browser.ftl"/>
<link rel="localization" href="browser/preferences/preferences.ftl"/>
<link rel="localization" href="browser/extensibles.ftl"/>
<!-- Used by fontbuilder.js -->
<link rel="localization" href="browser/preferences/fonts.ftl"/>
<link rel="localization" href="toolkit/featuregates/features.ftl"/>
Expand Down
27 changes: 14 additions & 13 deletions browser/extensions/extensibles/content/TabFeatures.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,21 @@ const TabFeatures = {
return urlArr;
},

restartBrowser() {
async restartBrowser() {
try {
if (Services.prefs.getBoolPref(this.PREF_REQUIRECONFIRM)) {
let brand = this.brandBundle.GetStringFromName("brandShortName");
let title = this.browserBundle.formatStringFromName(
"restartPromptTitle",
[brand],
1
);
let question = this.browserBundle.formatStringFromName(
"restartPromptQuestion",
[brand],
1
);
// Need brand in here to be able to expand { -brand-short-name }
let l10n = new Localization([
"branding/brand.ftl",
"browser/extensibles.ftl",
]);
let [title, question] = (
await l10n.formatMessages([
{ id: "restart-prompt-title" },
{ id: "restart-prompt-question" },
])
).map(({ value }) => value);

if (Services.prompt.confirm(null, title, question)) {
// only restart if confirmation given
this._attemptRestart();
Expand All @@ -170,7 +171,7 @@ const TabFeatures = {
this._attemptRestart();
}
} catch (e) {
throw new Error(
Cu.reportError(
"We're sorry but something has gone wrong with 'restartBrowser' " + e
);
}
Expand Down
103 changes: 101 additions & 2 deletions browser/extensions/extensibles/locales/en-US/extensibles.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# In browser/locales/jar.mn
# Localised versions MUST be located in browser/locales/l10n/{locale}/browser/browser/extensibles.ftl

## Restart Prompt
restart-prompt-title = Restart { -brand-short-name }
restart-prompt-question = Are you sure that you want to restart { -brand-short-name }?
## App Menu
appmenuitem-restart-browser =
.label = Restart
## Tab Context Menu
copy-url =
.label = Copy Tab Link
copy-all-urls =
.label = Copy All Tab Links
unload-tab =
.label = Unload Tab
## Private Tab
open-all-private =
.label = Open All in Private Tabs
Expand All @@ -22,8 +43,86 @@ private-tab =
*[false] Make Private Tab
}
## Status Bar
status-bar =
.label = Status Bar
unload-tab =
.label = Unload Tab
## about:preferences
### Main
tab-position-header = Tab Bar Position
tab-bar-top-above =
.label = Top above address bar
tab-bar-top-below =
.label = Top below address bar
tab-bar-bottom-above =
.label = Bottom above status bar
tab-bar-bottom-below =
.label = Bottom below status bar
tab-additional-header = Additional Tab Preferences
pinned-icon-only =
.label = Shrink pinned tabs to display only the site icon
insert-after-current =
.label = Insert new tab after current tab
insert-related-after-current =
.label = Insert related new tab after current tab
dynamic-theme-header = Dynamic Themes
dynamic-theme-dark =
.label = Force Dark Mode
dynamic-theme-light =
.label = Force Light Mode
dynamic-theme-auto =
.label = Dynamically Set Light/Dark Mode
restart-header = Restart Menu Item
restart-show-button =
.label = Show restart button in PanelUI
restart-purge-cache =
.label = Clear fast restart cache on browser restart
restart-require-confirmation =
.label = Require restart confirmation
tab-feature-header = Tab Context Menu
show-duplicate-tab =
.label = Show duplicate tab menu item
show-copy-url =
.label = Show copy tab url menu item
enable-copy-active-tab =
.label = Copy URL only from active tab
show-copy-all-urls =
.label = Show copy all tab urls menu item
show-unload-tab =
.label = Show unload tab menu item
statusbar-header = Status Bar
statusbar-enabled =
.label = Show Status Bar
statusbar-show-links =
.label = Show links
statusbar-contrast-text =
.label = Contrast status bar text colour
bookmarks-bar-position-header = Bookmarks Toolbar Position
bookmarks-position-top =
.label = Top
bookmarks-position-bottom =
.label = Bottom
geolocation-api-header = Geolocation API
geolocation-description = Some websites require your location to function. If a website isn't functioning as a result of not being able to find your location, please enable this preference and try again.
geolocation-api-enabled =
.label = Enable
geolocation-api-disabled =
.label = Disable
### Privacy
send-referrer-header-0 =
.label = Never send the referrer header
send-referrer-header-1 =
.label = Send the referrer header only when clicking on links and similar elements
send-referrer-header-2 =
.label = Send the referrer header on all requests (Default)
enable-webrtc-p2p =
.label = Enable WebRTC peer connection
load-images =
.label = Load images automatically
enable-javascript =
.label = Enable JavaScript
webrtc-header = WebRTC peer connection
ref-header = HTTP Referrer Header

This file was deleted.

8 changes: 0 additions & 8 deletions browser/extensions/extensibles/locales/jar.mn

This file was deleted.

7 changes: 0 additions & 7 deletions browser/extensions/extensibles/locales/moz.build

This file was deleted.

2 changes: 0 additions & 2 deletions browser/extensions/extensibles/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DIRS += ['locales']

XPCSHELL_TESTS_MANIFESTS += [
'test/unit/xpcshell.ini',
]
Expand Down
3 changes: 0 additions & 3 deletions browser/locales/en-US/browser/appmenu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ appmenu-fxa-show-more-tabs = Show More Tabs
appmenuitem-save-page =
.label = Save page as…
appmenuitem-restart-browser =
.label = Restart
## What's New panel in App menu.

whatsnew-panel-header = What’s New
Expand Down
77 changes: 0 additions & 77 deletions browser/locales/en-US/browser/preferences/preferences.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -1350,80 +1350,3 @@ choose-download-folder-title = Choose Download Folder:
# $service-name (String) - Name of a cloud storage provider like Dropbox, Google Drive, etc...
save-files-to-cloud-storage =
.label = Save files to { $service-name }
# Waterfox - main
tab-position-header = Tab Bar Position
tab-bar-top-above =
.label = Top above address bar
tab-bar-top-below =
.label = Top below address bar
tab-bar-bottom-above =
.label = Bottom above status bar
tab-bar-bottom-below =
.label = Bottom below status bar
tab-additional-header = Additional Tab Preferences
pinned-icon-only =
.label = Shrink pinned tabs to display only the site icon
insert-after-current =
.label = Insert new tab after current tab
insert-related-after-current =
.label = Insert related new tab after current tab
dynamic-theme-header = Dynamic Themes
dynamic-theme-dark =
.label = Force Dark Mode
dynamic-theme-light =
.label = Force Light Mode
dynamic-theme-auto =
.label = Dynamically Set Light/Dark Mode
restart-header = Restart Menu Item
restart-show-button =
.label = Show restart button in PanelUI
restart-purge-cache =
.label = Clear fast restart cache on browser restart
restart-require-confirmation =
.label = Require restart confirmation
tab-feature-header = Tab Context Menu
show-duplicate-tab =
.label = Show duplicate tab menu item
show-copy-url =
.label = Show copy tab url menu item
enable-copy-active-tab =
.label = Copy URL only from active tab
show-copy-all-urls =
.label = Show copy all tab urls menu item
show-unload-tab =
.label = Show unload tab menu item
statusbar-header = Status Bar
statusbar-enabled =
.label = Show Status Bar
statusbar-show-links =
.label = Show links
statusbar-contrast-text =
.label = Contrast status bar text colour
bookmarks-bar-position-header = Bookmarks Toolbar Position
bookmarks-position-top =
.label = Top
bookmarks-position-bottom =
.label = Bottom
geolocation-api-header = Geolocation API
geolocation-description = Some websites require your location to function. If a website isn't functioning as a result of not being able to find your location, please enable this preference and try again.
geolocation-api-enabled =
.label = Enable
geolocation-api-disabled =
.label = Disable
# Waterfox - privacy
send-referrer-header-0 =
.label = Never send the referrer header
send-referrer-header-1 =
.label = Send the referrer header only when clicking on links and similar elements
send-referrer-header-2 =
.label = Send the referrer header on all requests (Default)
enable-webrtc-p2p =
.label = Enable WebRTC peer connection
load-images =
.label = Load images automatically
enable-javascript =
.label = Enable JavaScript
webrtc-header = WebRTC peer connection
ref-header = HTTP Referrer Header
4 changes: 0 additions & 4 deletions browser/locales/en-US/browser/tabContextMenu.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ tab-context-share-url =
.accesskey = h
tab-context-share-more =
.label = More…
copy-url =
.label = Copy Tab Link
copy-all-urls =
.label = Copy All Tab Links
## Variables:
## $tabCount (Number): the number of tabs that are affected by the action.
Expand Down

0 comments on commit ddbc790

Please sign in to comment.