Skip to content

Commit

Permalink
126.0b9
Browse files Browse the repository at this point in the history
  • Loading branch information
bot committed May 9, 2024
1 parent c9ae8b0 commit 91fbcb4
Show file tree
Hide file tree
Showing 52 changed files with 623 additions and 144 deletions.
2 changes: 1 addition & 1 deletion firefox-src-part/browser/base/content/aboutDialog.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
</description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&#38;utm_medium=referral&#38;utm_campaign=firefox_about&#38;utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
<label is="text-link" href="https://foundation.mozilla.org/?form=firefox-about" data-l10n-name="helpus-donateLink"/>
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
</description>
</vbox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,16 @@ export class WelcomeScreen extends React.PureComponent {
: this.props.initialTheme || action.theme;
this.props.setActiveTheme(themeToUse);
if (props.content.tiles?.category?.type === "wallpaper") {
let actionWallPaper = props.content.tiles?.category?.action;
actionWallPaper.data.pref.value = themeToUse;
await AboutWelcomeUtils.handleUserAction(actionWallPaper);
const theme = themeToUse.split("-")?.[1];
let actionWallpaper = { ...props.content.tiles.category.action };
actionWallpaper.data.actions.forEach(async wpAction => {
if (wpAction.data.pref.name?.includes("dark")) {
wpAction.data.pref.value = `dark-${theme}`;
} else {
wpAction.data.pref.value = `light-${theme}`;
}
await AboutWelcomeUtils.handleUserAction(actionWallpaper);
});
} else {
window.AWSelectTheme(themeToUse);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,18 @@ class WelcomeScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCo
let themeToUse = action.theme === "<event>" ? event.currentTarget.value : this.props.initialTheme || action.theme;
this.props.setActiveTheme(themeToUse);
if (props.content.tiles?.category?.type === "wallpaper") {
let actionWallPaper = props.content.tiles?.category?.action;
actionWallPaper.data.pref.value = themeToUse;
await _lib_aboutwelcome_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.AboutWelcomeUtils.handleUserAction(actionWallPaper);
const theme = themeToUse.split("-")?.[1];
let actionWallpaper = {
...props.content.tiles.category.action
};
actionWallpaper.data.actions.forEach(async wpAction => {
if (wpAction.data.pref.name?.includes("dark")) {
wpAction.data.pref.value = `dark-${theme}`;
} else {
wpAction.data.pref.value = `light-${theme}`;
}
await _lib_aboutwelcome_utils_mjs__WEBPACK_IMPORTED_MODULE_2__.AboutWelcomeUtils.handleUserAction(actionWallpaper);
});
} else {
window.AWSelectTheme(themeToUse);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var SessionFileInternal = {
"session_file",
null,
{
can_load: !corrupted.toString(),
can_load: (!corrupted).toString(),
path_key: key,
loadfail_reason: "N/A",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,33 @@ ChromeUtils.defineESModuleGetters(lazy, {
/**
* A class containing static functionality that is shared by both
* the FullPageTranslationsPanel and SelectTranslationsPanel classes.
*
* It is recommended to read the documentation above the TranslationsParent class
* definition to understand the scope of the Translations architecture throughout
* Firefox.
*
* @see TranslationsParent
*
* The static instance of this class is a singleton in the parent process, and is
* available throughout all windows and tabs, just like the static instance of
* the TranslationsParent class.
*
* Unlike the TranslationsParent, this class is never instantiated as an actor
* outside of the static-context functionality defined below.
*/
export class TranslationsPanelShared {
/**
* @type {Map<string, string>}
* A map from Translations Panel instances to their initialized states.
* There is one instance of each panel per top ChromeWindow in Firefox.
*
* See the documentation above the TranslationsParent class for a detailed
* explanation of the translations architecture throughout Firefox.
*
* @see TranslationsParent
*
* @type {Map<FullPageTranslationsPanel | SelectTranslationsPanel, string>}
*/
static #langListsInitState = new Map();
static #langListsInitState = new WeakMap();

/**
* True if the next language-list initialization to fail for testing.
Expand All @@ -35,7 +56,7 @@ export class TranslationsPanelShared {
* starts from a clean slate.
*/
static clearCache() {
this.#langListsInitState = new Map();
this.#langListsInitState = new WeakMap();
}

/**
Expand Down Expand Up @@ -85,11 +106,9 @@ export class TranslationsPanelShared {
*
* @param {FullPageTranslationsPanel | SelectTranslationsPanel} panel
* - The panel for which to look up the state.
* @param {number} innerWindowId - The id of the current window.
*/
static getLangListsInitState(panel, innerWindowId) {
const key = `${panel.id}-${innerWindowId}`;
return TranslationsPanelShared.#langListsInitState.get(key);
static getLangListsInitState(panel) {
return TranslationsPanelShared.#langListsInitState.get(panel);
}

/**
Expand All @@ -100,19 +119,18 @@ export class TranslationsPanelShared {
* @param {Document} document - The document object.
* @param {FullPageTranslationsPanel | SelectTranslationsPanel} panel
* - The panel for which to ensure language lists are built.
* @param {number} innerWindowId - The id of the current window.
*/
static async ensureLangListsBuilt(document, panel, innerWindowId) {
const key = `${panel.id}-${innerWindowId}`;
switch (TranslationsPanelShared.#langListsInitState.get(key)) {
static async ensureLangListsBuilt(document, panel) {
const { panel: panelElement } = panel.elements;
switch (TranslationsPanelShared.#langListsInitState.get(panel)) {
case "initialized":
// This has already been initialized.
return;
case "error":
case undefined:
// Set the error state in case there is an early exit at any point.
// This will be set to "initialized" if everything succeeds.
TranslationsPanelShared.#langListsInitState.set(key, "error");
TranslationsPanelShared.#langListsInitState.set(panel, "error");
break;
default:
throw new Error(
Expand All @@ -131,10 +149,10 @@ export class TranslationsPanelShared {
throw new Error("No translation languages were retrieved.");
}

const fromPopups = panel.querySelectorAll(
const fromPopups = panelElement.querySelectorAll(
".translations-panel-language-menupopup-from"
);
const toPopups = panel.querySelectorAll(
const toPopups = panelElement.querySelectorAll(
".translations-panel-language-menupopup-to"
);

Expand Down Expand Up @@ -168,6 +186,6 @@ export class TranslationsPanelShared {
}
}

TranslationsPanelShared.#langListsInitState.set(key, "initialized");
TranslationsPanelShared.#langListsInitState.set(panel, "initialized");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,19 @@ class CheckboxPageAction {
}

/**
* This singleton class controls the Translations popup panel.
* This singleton class controls the FullPageTranslations panel.
*
* This component is a `/browser` component, and the actor is a `/toolkit` actor, so care
* must be taken to keep the presentation (this component) from the state management
* (the Translations actor). This class reacts to state changes coming from the
* Translations actor.
*
* A global instance of this class is created once per top ChromeWindow and is initialized
* when the new window is created.
*
* See the comment above TranslationsParent for more details.
*
* @see TranslationsParent
*/
var FullPageTranslationsPanel = new (class {
/** @type {Console?} */
Expand Down Expand Up @@ -407,11 +414,7 @@ var FullPageTranslationsPanel = new (class {
*/
async #ensureLangListsBuilt() {
try {
await TranslationsPanelShared.ensureLangListsBuilt(
document,
this.elements.panel,
gBrowser.selectedBrowser.innerWindowID
);
await TranslationsPanelShared.ensureLangListsBuilt(document, this);
} catch (error) {
this.console?.error(error);
}
Expand Down Expand Up @@ -541,12 +544,7 @@ var FullPageTranslationsPanel = new (class {
// Unconditionally hide the intro text in case the panel is re-shown.
intro.hidden = true;

if (
TranslationsPanelShared.getLangListsInitState(
panel,
gBrowser.selectedBrowser.innerWindowID
) === "error"
) {
if (TranslationsPanelShared.getLangListsInitState(this) === "error") {
// There was an error, display it in the view rather than the language
// dropdowns.
const { cancelButton, errorHintAction } = this.elements;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ ChromeUtils.defineESModuleGetters(this, {
});

/**
* This singleton class controls the Translations popup panel.
* This singleton class controls the SelectTranslations panel.
*
* A global instance of this class is created once per top ChromeWindow and is initialized
* when the context menu is opened in that window.
*
* See the comment above TranslationsParent for more details.
*
* @see TranslationsParent
*/
var SelectTranslationsPanel = new (class {
/** @type {Console?} */
Expand Down Expand Up @@ -46,6 +53,8 @@ var SelectTranslationsPanel = new (class {

/**
* The textarea height for shorter text.
*
* @type {string}
*/
#shortTextHeight = "8em";

Expand All @@ -60,6 +69,8 @@ var SelectTranslationsPanel = new (class {

/**
* The textarea height for shorter text.
*
* @type {string}
*/
#longTextHeight = "16em";

Expand All @@ -75,6 +86,8 @@ var SelectTranslationsPanel = new (class {
/**
* The threshold used to determine when the panel should
* use the short text-height vs. the long-text height.
*
* @type {number}
*/
#textLengthThreshold = 800;

Expand Down Expand Up @@ -250,15 +263,7 @@ var SelectTranslationsPanel = new (class {
* dropdowns have already been initialized.
*/
async #ensureLangListsBuilt() {
try {
await TranslationsPanelShared.ensureLangListsBuilt(
document,
this.elements.panel,
gBrowser.selectedBrowser.innerWindowID
);
} catch (error) {
this.console?.error(error);
}
await TranslationsPanelShared.ensureLangListsBuilt(document, this);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions firefox-src-part/layout/style/res/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ fieldset {

label {
cursor: default;
/* If you add declarations here, consider whether the select > label and file
* input label need them as well. */
}

/* Default inputs, text inputs, and selects */
Expand Down Expand Up @@ -281,6 +283,7 @@ select > button {
select > label {
display: inline-block;
overflow: clip;
cursor: unset;
}

option[label]::before {
Expand Down Expand Up @@ -627,6 +630,7 @@ input[type=file] > label {
min-inline-size: 12em;
text-align: match-parent;

cursor: unset;
color: unset;
font-size: unset;
letter-spacing: unset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<!-- The document title and heading of the error page shown when a website sends back unusual and incorrect credentials for an SSL certificate. -->
<string name="mozac_browser_errorpages_security_ssl_title">گوونلی باغلانتی اوغورسوز اولدو</string>

<!-- The document title and heading of the error page shown when a website sends has an invalid or expired SSL certificate. -->
<string name="mozac_browser_errorpages_security_bad_cert_title">گوونلی باغلانتی اوغورسوز اولدو</string>

<!-- The text shown inside the advanced button used to expand the advanced options. It's only shown when a website has an invalid SSL certificate. -->
<string name="mozac_browser_errorpages_security_bad_cert_advanced">قاباغجیل</string>
<!-- The text shown inside the advanced options button used to go back. It's only shown if the user has expanded the advanced options. -->
Expand Down Expand Up @@ -40,6 +43,9 @@
<!-- The document title and heading of the error page shown when a website responds in an unexpected way and the browser cannot continue. -->
<string name="mozac_browser_errorpages_unknown_socket_type_title">سروردن گودولمه‌ین جواب گلدی</string>

<!-- The document title and heading of the error page shown when the browser gets stuck in an infinite loop when loading a website. -->
<string name="mozac_browser_errorpages_redirect_loop_title">صفحه دوزگون یؤنلندیریلمیر</string>

<!-- The document title and heading of the error page shown when a website cannot be loaded because the browser is in offline mode. -->
<string name="mozac_browser_errorpages_offline_title">آفلاین حالت</string>

Expand All @@ -49,7 +55,31 @@
<!-- The document title and heading of the error page shown when the browser refuses to load a type of file that is considered unsafe. -->
<string name="mozac_browser_errorpages_unsafe_content_type_title">گوونسیز سند تیپی</string>

<!-- The document title and heading of the error page shown when a file cannot be loaded because of a detected data corruption. -->
<string name="mozac_browser_errorpages_corrupted_content_title">کورلانمیش ایچریک خطاسی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_content_crashed_title">ایچریک سیندی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_invalid_content_encoding_title">ایچریک کدلاما خطاسی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_unknown_host_title">آدرس تاپیلمادی</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_no_internet_title">اینترنت باغلانتی‌سی یوخدور</string>
<!-- The main body text of this error page. It will be shown beneath the title -->
<string name="mozac_browser_errorpages_no_internet_message">شبکه باغلانتیزی یوخلایین و یا آز سونرا صفحه‌نی یئنیله‌مه‌یی دئنه‌یین.</string>
<!-- Text that will show up on the button at the bottom of the error page -->
<string name="mozac_browser_errorpages_no_internet_refresh_button">یئنیله</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_malformed_uri_title">گئچرسیز آدرس</string>
<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_malformed_uri_title_alternative">آدرس گئچرلی دئییل</string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_unknown_protocol_title">تانینمایان پروتکل</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
<!-- Content description (not visible, for screen readers etc.): Indicates the overflow menu has a highlight -->
<string name="mozac_browser_menu_highlighted">E theksuar</string>
<!-- Label for add-ons submenu section -->
<string name="mozac_browser_menu_addons">Shtesa</string>
<string name="mozac_browser_menu_addons" moz:removedIn="126" tools:ignore="UnusedResources">Shtesa</string>
<!-- Label for extensions submenu section -->
<string name="mozac_browser_menu_extensions">Zgjerime</string>
<!-- Label for add-ons sub menu item for add-ons manager -->
<string name="mozac_browser_menu_addons_manager">Përgjegjës Shtesash</string>
<string name="mozac_browser_menu_addons_manager" moz:removedIn="126" tools:ignore="UnusedResources">Përgjegjës Shtesash</string>
<!-- Label for extensions sub menu item for extensions manager -->
<string name="mozac_browser_menu_extensions_manager">Përgjegjës Zgjerimesh</string>
<!-- Content description for the action bar "up" button -->
<string name="action_bar_up_description">Lëvizni për sipër</string>
<!-- Content description for the action bar "up" button of the add-ons sub menu item -->
<string name="mozac_browser_menu_addons_description">Shtesa, shkoni sipër</string>
</resources>
<string name="mozac_browser_menu_addons_description" moz:removedIn="126" tools:ignore="UnusedResources">Shtesa, shkoni sipër</string>
<!-- Content description for the action bar "up" button of the extensions sub menu item -->
<string name="mozac_browser_menu_extensions_content_description">Zgjerime, shkoni sipër</string>
</resources>
Loading

0 comments on commit 91fbcb4

Please sign in to comment.