diff --git a/browser/components/profiles/SelectableProfileService.sys.mjs b/browser/components/profiles/SelectableProfileService.sys.mjs index 0125725bd192..f3ff35bcaa6a 100644 --- a/browser/components/profiles/SelectableProfileService.sys.mjs +++ b/browser/components/profiles/SelectableProfileService.sys.mjs @@ -858,18 +858,24 @@ 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([ - { id: "default-profile-name", args: { number: nextProfileNumber } }, - ]); + 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(); let isDark = window?.matchMedia("(-moz-system-dark-theme)").matches; 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)", diff --git a/browser/locales/en-US/browser/profiles.ftl b/browser/locales/en-US/browser/profiles.ftl index a9f6b646b1be..c1072e123b2a 100644 --- a/browser/locales/en-US/browser/profiles.ftl +++ b/browser/locales/en-US/browser/profiles.ftl @@ -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