Bug 1928738: Change the localized name of the default profile. r=niklas,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D227759
This commit is contained in:
@@ -858,10 +858,14 @@ class SelectableProfileServiceClass {
|
||||
* @returns {SelectableProfile} The newly created profile object.
|
||||
*/
|
||||
async #createProfile(existingProfilePath) {
|
||||
let nextProfileNumber =
|
||||
1 + Math.max(0, ...(await this.getAllProfiles()).map(p => p.id));
|
||||
let [defaultName] = lazy.profilesLocalization.formatMessagesSync([
|
||||
let nextProfileNumber = Math.max(
|
||||
0,
|
||||
...(await this.getAllProfiles()).map(p => p.id)
|
||||
);
|
||||
let [defaultName, originalName] =
|
||||
lazy.profilesLocalization.formatMessagesSync([
|
||||
{ id: "default-profile-name", args: { number: nextProfileNumber } },
|
||||
{ id: "original-profile-name" },
|
||||
]);
|
||||
|
||||
let window = Services.wm.getMostRecentBrowserWindow();
|
||||
@@ -869,7 +873,9 @@ class SelectableProfileServiceClass {
|
||||
|
||||
let randomIndex = Math.floor(Math.random() * this.#defaultAvatars.length);
|
||||
let profileData = {
|
||||
name: defaultName.value,
|
||||
// The original toolkit profile is added first and is assigned a
|
||||
// different name.
|
||||
name: nextProfileNumber == 0 ? originalName.value : defaultName.value,
|
||||
avatar: this.#defaultAvatars[randomIndex],
|
||||
themeId: "default-theme@mozilla.org",
|
||||
themeFg: isDark ? "rgb(255,255,255)" : "rgb(21,20,26)",
|
||||
|
||||
@@ -14,6 +14,9 @@ profile-window-create-profile = Create a profile
|
||||
# $number (number) - The number of the profile
|
||||
default-profile-name = Profile { $number }
|
||||
|
||||
# The word 'original' is used in the sense that it is the initial or starting profile when you install Firefox.
|
||||
original-profile-name = Original profile
|
||||
|
||||
edit-profile-page-title = Edit profile
|
||||
edit-profile-page-header = Edit your profile
|
||||
edit-profile-page-profile-name-label = Profile name
|
||||
|
||||
Reference in New Issue
Block a user