Closed Bug 220210 Opened 22 years ago Closed 22 years ago

Bookmarks root is always English "Bookmarks" if using one profile named "default"

Categories

(SeaMonkey :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pkwarren, Assigned: p_ch)

References

()

Details

Attachments

(1 file, 1 obsolete file)

This is a l10n regression from the checkin for Bug 36339. Here is the code that is causing the problem: 1778 // Gets the default name for NC:BookmarksRoot 1779 // if the user has more than one profile: always include the profile name 1780 // otherwise, include the profile name only if it is not named 'default' 1781 // the profile "default" is not localizable and arises when there is no ns4.x install 1782 nsresult useProfile; 1783 nsCOMPtr<nsIProfile> profileService(do_GetService(NS_PROFILE_CONTRACTID,&useProfile)); 1784 if (NS_SUCCEEDED(useProfile)) 1785 { 1786 nsXPIDLString currentProfileName; 1787 1788 useProfile = profileService->GetCurrentProfile(getter_Copies(currentProfileName)); 1789 if (NS_SUCCEEDED(useProfile)) 1790 { 1791 const PRUnichar *param[1] = {currentProfileName.get()}; 1792 useProfile = mBundle->FormatStringFromName(NS_LITERAL_STRING("bookmarks_root").get(), 1793 param, 1, getter_Copies(mBookmarksRootName)); 1794 if (NS_SUCCEEDED(useProfile)) 1795 { 1796 PRInt32 profileCount; 1797 useProfile = profileService->GetProfileCount(&profileCount); 1798 if (NS_SUCCEEDED(useProfile) && profileCount == 1) 1799 { 1800 ToLowerCase(currentProfileName); 1801 if (currentProfileName.Equals(NS_LITERAL_STRING("default"))) 1802 useProfile = NS_ERROR_FAILURE; 1803 } 1804 } 1805 } 1806 } 1807 1808 if (NS_FAILED(useProfile)) { 1809 mBookmarksRootName.Assign(NS_LITERAL_STRING("Bookmarks")); So basically, if there is only one profile, and that profile's name is 'default', then we fall back to the literal string "Bookmarks" for the bookmark root. This is displayed in the "File Bookmark" dialog. We should probably be going out to the string bundle and looking up a good replacement string, or using a string from another bundle which already has the word "Bookmarks" in it.
Attached patch Patch v1 (obsolete) — Splinter Review
Potential fix for this problem.
Attached patch Patch v1Splinter Review
Potential fix for this problem.
Attachment #132102 - Attachment is obsolete: true
Attachment #132103 - Flags: superreview?(jag)
Attachment #132103 - Flags: review?(pierre_tmp)
Comment on attachment 132103 [details] [diff] [review] Patch v1 looks good r=varga
Comment on attachment 132103 [details] [diff] [review] Patch v1 r=me it would be nice also to localize the "default" profile.
Attachment #132103 - Flags: review?(pierre_tmp) → review+
Comment on attachment 132103 [details] [diff] [review] Patch v1 sr=jag
Attachment #132103 - Flags: superreview?(jag) → superreview+
Fixed. Checking in resources/locale/en-US/bookmarks.properties; /cvsroot/mozilla/xpfe/components/bookmarks/resources/locale/en-US/bookmarks.properties,v <-- bookmarks.properties new revision: 1.5; previous revision: 1.4 done Checking in src/nsBookmarksService.cpp; /cvsroot/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp,v <-- nsBookmarksService.cpp new revision: 1.299; previous revision: 1.298 done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: