mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 21:53:31 -05:00
357e4d94b9
See https://codeberg.org/librewolf/issues/issues/2043 Squashed commit of the following: commit81aac91633
Author: Ricky-Tigg <Ricky-Tigg@users.noreply.translate.codeberg.org> Date: Tue Oct 8 09:34:25 2024 +0000 Translated using Weblate (Finnish) Currently translated at 100.0% (3 of 3 strings) Translation: LibreWolf/browser/translations Translate-URL: https://translate.codeberg.org/projects/librewolf/browsertranslations/fi/ commitc6aee11b4e
Author: Ricky-Tigg <Ricky-Tigg@users.noreply.translate.codeberg.org> Date: Tue Oct 8 09:37:09 2024 +0000 Translated using Weblate (Finnish) Currently translated at 100.0% (7 of 7 strings) Translation: LibreWolf/toolkit/branding/brandings Translate-URL: https://translate.codeberg.org/projects/librewolf/toolkitbrandingbrandings/fi/ commitc18e4cdd0e
Author: Ricky-Tigg <Ricky-Tigg@users.noreply.translate.codeberg.org> Date: Tue Oct 8 09:32:12 2024 +0000 Added translation using Weblate (Finnish) commit20ea70ee26
Author: Ricky-Tigg <Ricky-Tigg@users.noreply.translate.codeberg.org> Date: Tue Oct 8 09:31:49 2024 +0000 Added translation using Weblate (Finnish) commitc98722de01
Author: Benny <Benny@users.noreply.translate.codeberg.org> Date: Sun Oct 6 19:23:30 2024 +0000 Translated using Weblate (German) Currently translated at 14.0% (7 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/de/ commit9ba6e88056
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Oct 6 17:49:12 2024 +0200 Fix l10n paths commitcae2630523
Author: maltejur <maltejur@users.noreply.translate.codeberg.org> Date: Sun Oct 6 14:14:05 2024 +0000 Translated using Weblate (German) Currently translated at 100.0% (7 of 7 strings) Translation: LibreWolf/toolkit/branding/brandings Translate-URL: https://translate.codeberg.org/projects/librewolf/toolkitbrandingbrandings/de/ commit6e91dfdec2
Author: maltejur <maltejur@users.noreply.translate.codeberg.org> Date: Sun Oct 6 14:12:08 2024 +0000 Translated using Weblate (German) Currently translated at 28.5% (2 of 7 strings) Translation: LibreWolf/toolkit/branding/brandings Translate-URL: https://translate.codeberg.org/projects/librewolf/toolkitbrandingbrandings/de/ commit5230f7b9d6
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Oct 6 16:13:13 2024 +0200 Rename Firefox View commit1f74c5cf99
Author: maltejur <maltejur@users.noreply.translate.codeberg.org> Date: Sun Oct 6 14:11:46 2024 +0000 Added translation using Weblate (German) commit65017ab267
Author: diivu <diivu@users.noreply.translate.codeberg.org> Date: Sun Oct 6 07:29:07 2024 +0000 Translated using Weblate (Finnish) Currently translated at 88.0% (44 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/fi/ commitda88f487ac
Author: Benny <Benny@users.noreply.translate.codeberg.org> Date: Sun Oct 6 12:44:06 2024 +0000 Translated using Weblate (German) Currently translated at 12.0% (6 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/de/ commit8cc562f87a
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Oct 6 15:58:48 2024 +0200 Fix l10n folder structure commita287b0ff64
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Oct 6 15:25:49 2024 +0200 Move some patches to brandings.ftl commit66263ed412
Merge:0aaa908
0fb44c4
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Oct 6 14:37:18 2024 +0200 Merge remote-tracking branch 'origin/main' into l10n commit0aaa90890f
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Oct 6 14:37:08 2024 +0200 Fix appstrings.properties commit376b65bbb1
Author: diivu <diivu@users.noreply.translate.codeberg.org> Date: Sun Oct 6 07:24:56 2024 +0000 Added translation using Weblate (Finnish) commit963c276a24
Author: Malte Jürgens <maltejur@dismail.de> Date: Sun Sep 29 14:45:36 2024 +0200 Use wget in l10n script for consistency commitd0e0ef0769
Author: kratos <kratos@users.noreply.translate.codeberg.org> Date: Fri Sep 27 14:01:32 2024 +0000 Translated using Weblate (Hungarian) Currently translated at 100.0% (3 of 3 strings) Translation: LibreWolf/browser/translations Translate-URL: https://translate.codeberg.org/projects/librewolf/browsertranslations/hu/ commitdb529f8ce1
Author: kratos <kratos@users.noreply.translate.codeberg.org> Date: Fri Sep 27 14:01:01 2024 +0000 Added translation using Weblate (Hungarian) commita9fb722578
Author: kratos <kratos@users.noreply.translate.codeberg.org> Date: Fri Sep 27 13:51:48 2024 +0000 Translated using Weblate (Hungarian) Currently translated at 100.0% (50 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/hu/ commita54b7cdb5e
Author: Umeaman <Umeaman@users.noreply.translate.codeberg.org> Date: Wed Sep 25 23:36:20 2024 +0000 Translated using Weblate (Swedish) Currently translated at 10.0% (5 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/sv/ commit555586291d
Author: Umeaman <Umeaman@users.noreply.translate.codeberg.org> Date: Wed Sep 25 23:36:02 2024 +0000 Added translation using Weblate (Swedish) commit65662b49a5
Author: kratos <kratos@users.noreply.translate.codeberg.org> Date: Mon Sep 23 18:23:02 2024 +0000 Translated using Weblate (Hungarian) Currently translated at 16.0% (8 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/hu/ commit1460588363
Author: kratos <kratos@users.noreply.translate.codeberg.org> Date: Mon Sep 23 18:22:00 2024 +0000 Added translation using Weblate (Hungarian) commit78667d9c9c
Author: maltejur <maltejur@users.noreply.translate.codeberg.org> Date: Thu Sep 19 15:54:14 2024 +0000 Translated using Weblate (German) Currently translated at 10.0% (5 of 50 strings) Translation: LibreWolf/browser/preferences/preferences Translate-URL: https://translate.codeberg.org/projects/librewolf/browserpreferencespreferences/de/ commitdc948492ef
Author: Malte Juergens <maltejur@dismail.de> Date: Thu Sep 19 17:50:18 2024 +0200 Remove appstrings.properties override commitb92da6c9b6
Author: Malte Juergens <maltejur@dismail.de> Date: Thu Sep 19 17:49:49 2024 +0200 Use dashes in language codes commitb49b4b1661
Author: Malte Juergens <maltejur@dismail.de> Date: Thu Sep 19 17:42:01 2024 +0200 Fix syntax error in old python version commiteed271897f
Author: Malte Juergens <maltejur@dismail.de> Date: Wed Sep 18 01:44:57 2024 +0200 Make lw translations work commitf8c5b9e264
Author: Allan Nordhøy <epost@anotheragency.no> Date: Mon Sep 16 10:31:25 2024 +0000 Translated using Weblate (Norwegian Bokmål) Currently translated at 100.0% (3 of 3 strings) Translation: LibreWolf/browser/translations.ftl Translate-URL: https://hosted.weblate.org/projects/librewolf/browsertranslationsftl/nb_NO/ commit4accda62a1
Author: Allan Nordhøy <epost@anotheragency.no> Date: Mon Sep 16 10:43:25 2024 +0000 Translated using Weblate (German) Currently translated at 8.0% (4 of 50 strings) Translation: LibreWolf/browser/preferences/preferences.ftl Translate-URL: https://hosted.weblate.org/projects/librewolf/browserpreferencespreferencesftl/de/ commite09583f951
Author: Allan Nordhøy <epost@anotheragency.no> Date: Mon Sep 16 10:43:41 2024 +0000 Translated using Weblate (French) Currently translated at 98.0% (49 of 50 strings) Translation: LibreWolf/browser/preferences/preferences.ftl Translate-URL: https://hosted.weblate.org/projects/librewolf/browserpreferencespreferencesftl/fr/ commit08bebb1a5c
Author: Allan Nordhøy <epost@anotheragency.no> Date: Mon Sep 16 10:43:41 2024 +0000 Translated using Weblate (English (United States)) Currently translated at 100.0% (50 of 50 strings) Translation: LibreWolf/browser/preferences/preferences.ftl Translate-URL: https://hosted.weblate.org/projects/librewolf/browserpreferencespreferencesftl/en_US/ commitb07795c146
Author: Allan Nordhøy <epost@anotheragency.no> Date: Sun Sep 15 11:59:46 2024 +0200 Added translation using Weblate (Norwegian Bokmål) commitc67532071f
Author: Malte Jürgens <maltejur@dismail.de> Date: Fri Sep 13 23:02:08 2024 +0000 Translated using Weblate (French) Currently translated at 66.6% (2 of 3 strings) Translation: LibreWolf/browser/translations.ftl Translate-URL: https://hosted.weblate.org/projects/librewolf/browsertranslationsftl/fr/ commit9b19745b7c
Author: Malte Jürgens <maltejur@dismail.de> Date: Sat Sep 14 01:01:08 2024 +0200 Added translation using Weblate (French) commita51d08cc03
Author: Malte Jürgens <maltejur@dismail.de> Date: Sat Sep 14 00:59:14 2024 +0200 Deleted translation using Weblate (French) commit8f5cdd20b5
Author: Malte Jürgens <maltejur@dismail.de> Date: Sat Sep 14 00:58:35 2024 +0200 Added translation using Weblate (French) commit0a827abfd6
Author: Malte Juergens <maltejur@dismail.de> Date: Sat Sep 14 00:57:29 2024 +0200 Move translations patches/fullpage-translations-customization.patch into own *.ftl file commitdcd910c672
Author: Malte Jürgens <maltejur@dismail.de> Date: Fri Sep 13 22:34:22 2024 +0000 Translated using Weblate (German) Currently translated at 6.0% (3 of 50 strings) Translation: LibreWolf/browser/preferences/preferences.ftl Translate-URL: https://hosted.weblate.org/projects/librewolf/browserpreferencespreferencesftl/de/ commit31851a6026
Author: Malte Jürgens <maltejur@dismail.de> Date: Sat Sep 14 00:33:16 2024 +0200 Added translation using Weblate (German) commitbc3d695711
Author: Malte Juergens <maltejur@dismail.de> Date: Fri Sep 13 23:21:29 2024 +0200 Add French pref-pane Translations provided by @Acideburn Co-authored-by: Acideburn <Acideburn@noreply.codeberg.org> commit3072c26e4f
Author: Malte Juergens <maltejur@dismail.de> Date: Tue Sep 10 16:52:58 2024 +0200 Allow translation of LW strings
164 lines
6.3 KiB
Diff
164 lines
6.3 KiB
Diff
diff --git a/browser/base/content/main-popupset.inc.xhtml b/browser/base/content/main-popupset.inc.xhtml
|
|
index 1fb595272a18..56c2c58e111c 100644
|
|
--- a/browser/base/content/main-popupset.inc.xhtml
|
|
+++ b/browser/base/content/main-popupset.inc.xhtml
|
|
@@ -607,6 +607,8 @@
|
|
checked="false"
|
|
autocheck="false"
|
|
id="translations-panel-settings-never-translate-site"/>
|
|
+ <menuitem data-l10n-id="translations-panel-disable-translations"
|
|
+ id="translations-panel-disable-translations"/>
|
|
<menuseparator/>
|
|
<menuitem class="manage-languages-menuitem"
|
|
data-l10n-id="translations-panel-settings-manage-languages"
|
|
diff --git a/browser/base/content/main-popupset.js b/browser/base/content/main-popupset.js
|
|
index c403c914f27c..6338cbd92621 100644
|
|
--- a/browser/base/content/main-popupset.js
|
|
+++ b/browser/base/content/main-popupset.js
|
|
@@ -251,6 +251,9 @@ document.addEventListener(
|
|
case "translations-panel-settings-never-translate-site":
|
|
FullPageTranslationsPanel.onNeverTranslateSite();
|
|
break;
|
|
+ case "translations-panel-disable-translations":
|
|
+ FullPageTranslationsPanel.openDisableTranslations();
|
|
+ break;
|
|
case "translations-panel-manage-languages":
|
|
FullPageTranslationsPanel.openManageLanguages();
|
|
break;
|
|
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
|
|
index 4c2637db10b7..846a538036d7 100644
|
|
--- a/browser/components/preferences/main.inc.xhtml
|
|
+++ b/browser/components/preferences/main.inc.xhtml
|
|
@@ -389,8 +389,16 @@
|
|
preference="layout.spellcheckDefault"/>
|
|
|
|
<!-- Translations -->
|
|
- <vbox id="translationsGroup" hidden="true" data-subcategory="translations">
|
|
+ <vbox id="translationsGroup" data-subcategory="translations">
|
|
<label><html:h2 data-l10n-id="translations-manage-header"/></label>
|
|
+ <checkbox id="translations-manage-enable"
|
|
+ data-l10n-id="translations-manage-enable"
|
|
+ preference="browser.translations.enable"
|
|
+ data-subcategory="translations-enable" />
|
|
+ <vbox id="innerTranslationsGroup" hidden="true">
|
|
+ <checkbox id="translations-manage-autopopup"
|
|
+ data-l10n-id="translations-manage-autopopup"
|
|
+ preference="browser.translations.automaticallyPopup" />
|
|
<hbox id="translations-manage-description" align="center">
|
|
<description flex="1" data-l10n-id="translations-manage-intro-2"/>
|
|
<button id="translations-manage-settings-button"
|
|
@@ -412,6 +420,7 @@
|
|
<description id="translations-manage-error" hidden="true"></description>
|
|
</vbox>
|
|
</vbox>
|
|
+ </vbox>
|
|
</groupbox>
|
|
|
|
<!-- Files and Applications -->
|
|
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
|
|
index fec5aa685ea7..92082d259903 100644
|
|
--- a/browser/components/preferences/main.js
|
|
+++ b/browser/components/preferences/main.js
|
|
@@ -145,6 +145,10 @@ Preferences.addAll([
|
|
{ id: "dom.ipc.processCount.web", type: "int" },
|
|
{ id: "layers.acceleration.disabled", type: "bool", inverted: true },
|
|
|
|
+ /* Fullpage Translations */
|
|
+ { id: "browser.translations.enable", type: "bool" },
|
|
+ { id: "browser.translations.automaticallyPopup", type: "bool" },
|
|
+
|
|
// Files and Applications
|
|
{ id: "pref.downloads.disable_button.edit_actions", type: "bool" },
|
|
|
|
@@ -326,6 +330,22 @@ var gMainPane = {
|
|
|
|
gMainPane.initTranslations();
|
|
|
|
+ let inPrompt = false;
|
|
+ Preferences.get("browser.translations.enable").on("change", () => {
|
|
+ if(!Preferences.get("browser.translations.enable").value)
|
|
+ if(!inPrompt) {
|
|
+ inPrompt = true;
|
|
+ confirmRestartPrompt(false, 1, true, false).then(buttonIndex => {
|
|
+ inPrompt = false;
|
|
+ if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
|
|
+ Services.startup.quit(
|
|
+ Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart
|
|
+ );
|
|
+ }
|
|
+ });
|
|
+ }
|
|
+ });
|
|
+
|
|
if (
|
|
Services.prefs.getBoolPref(
|
|
"media.videocontrols.picture-in-picture.enabled"
|
|
@@ -793,6 +813,10 @@ var gMainPane = {
|
|
document.getElementById("checkSpelling"),
|
|
() => this.writeCheckSpelling()
|
|
);
|
|
+ Preferences.addSyncFromPrefListener(
|
|
+ document.getElementById("translations-manage-enable"),
|
|
+ () => this.readEnableTranslations()
|
|
+ );
|
|
Preferences.addSyncFromPrefListener(
|
|
document.getElementById("alwaysAsk"),
|
|
() => this.readUseDownloadDir()
|
|
@@ -1023,24 +1047,33 @@ var gMainPane = {
|
|
document.getElementById("zoomBox").hidden = false;
|
|
},
|
|
|
|
+ readEnableTranslations(skipInit = false) {
|
|
+ const translationsEnabled = Preferences.get("browser.translations.enable").value;
|
|
+ document.getElementById("innerTranslationsGroup").hidden = !translationsEnabled;
|
|
+ if (!this._translationsInitialized && !skipInit)
|
|
+ this.initTranslations();
|
|
+ },
|
|
+
|
|
+ _translationsInitialized: false,
|
|
+
|
|
/**
|
|
* Initialize the translations view.
|
|
*/
|
|
async initTranslations() {
|
|
+ this.readEnableTranslations(true);
|
|
+
|
|
if (!Services.prefs.getBoolPref("browser.translations.enable")) {
|
|
return;
|
|
}
|
|
|
|
+ this._translationsInitialized = true;
|
|
+
|
|
/**
|
|
* Which phase a language download is in.
|
|
*
|
|
* @typedef {"downloaded" | "loading" | "uninstalled"} DownloadPhase
|
|
*/
|
|
|
|
- // Immediately show the group so that the async load of the component does
|
|
- // not cause the layout to jump. The group will be empty initially.
|
|
- document.getElementById("translationsGroup").hidden = false;
|
|
-
|
|
class TranslationsState {
|
|
/**
|
|
* The fully initialized state.
|
|
diff --git a/browser/components/translations/content/fullPageTranslationsPanel.js b/browser/components/translations/content/fullPageTranslationsPanel.js
|
|
index 0c8288af9aca..05e49c06ff63 100644
|
|
--- a/browser/components/translations/content/fullPageTranslationsPanel.js
|
|
+++ b/browser/components/translations/content/fullPageTranslationsPanel.js
|
|
@@ -1220,6 +1220,15 @@ var FullPageTranslationsPanel = new (class {
|
|
);
|
|
}
|
|
|
|
+ openDisableTranslations() {
|
|
+ const window =
|
|
+ gBrowser.selectedBrowser.browsingContext.top.embedderElement.ownerGlobal;
|
|
+ window.openTrustedLinkIn(
|
|
+ "about:preferences#general-translations-enable",
|
|
+ "tab"
|
|
+ );
|
|
+ }
|
|
+
|
|
/**
|
|
* Redirect the user to about:preferences
|
|
*/
|