fix for 42869, making the profile manager a bit more localisable + allowing vendor customisation.

This commit is contained in:
ben%netscape.com 2000-07-30 05:29:59 +00:00
Родитель 452a9138ad
Коммит 233c04f3b7
3 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -25,6 +25,7 @@
var commonDialogService = nsJSComponentManager.getService("component://netscape/appshell/commonDialogs",
"nsICommonDialogs");
var bundle = srGetStrBundle("chrome://communicator/locale/profile/profileManager.properties");
var brandBundle = srGetStrBundle("chrome://global/locale/brand.properties");
var profileManagerMode = "selection";
var set = null;
@ -57,6 +58,7 @@ function RenameProfile()
// migrate if the user wants to
var lString = bundle.GetStringFromName("migratebeforerename");
lString = lString.replace(/\s*<html:br\/>/g,"\n");
lString = lString.replace(/%brandShortName%/, brandBundle.GetStringFromName("brandShortName"));
var title = bundle.GetStringFromName("migratetitle");
if (commonDialogService.Confirm(window, title, lString))
profile.migrateProfile( profilename, true );
@ -67,7 +69,8 @@ function RenameProfile()
var oldName = selected.getAttribute("rowName");
var result = { };
var dialogTitle = bundle.GetStringFromName("renameprofiletitle");
var msg = bundle.GetStringFromName("renameprofilepromptA") + oldName + bundle.GetStringFromName("renameprofilepromptB");
var msg = bundle.GetStringFromName("renameProfilePrompt");
msg = msg.replace(/%oldProfileName%/gi, oldName);
while (1) {
var rv = commonDialogService.Prompt(window, dialogTitle, msg, oldName, result);
if (rv) {
@ -122,6 +125,7 @@ function ConfirmDelete()
// auto migrate if the user wants to. THIS IS REALLY REALLY DUMB PLEASE FIX THE BACK END.
var lString = bundle.GetStringFromName("migratebeforedelete");
lString = lString.replace(/\s*<html:br\/>/g,"\n");
lString = lString.replace(/%brandShortName%/, brandBundle.GetStringFromName("brandShortName"));
var title = bundle.GetStringFromName("deletetitle");
if (commonDialogService.Confirm(window, title, lString)) {
profile.deleteProfile( name, false );

Просмотреть файл

@ -158,7 +158,9 @@ function onStart()
if( selected.firstChild.firstChild.getAttribute("rowMigrate") == "no" ) {
var lString = bundle.GetStringFromName("migratebeforestart");
lString = lString.replace(/\s*<html:br\/>/g,"\n");
lString = lString.replace(/%brandShortName%/gi, brandBundle.GetStringFromName("brandShortName"));
var title = bundle.GetStringFromName("migratetitle");
if (commonDialogService.Confirm(window, title, lString))
profile.migrateProfile( profilename, true );
else
@ -262,6 +264,7 @@ function SetUpOKCancelButtons()
try {
okButtonString = bundle.GetStringFromName("startButton");
okButtonString = okButtonString.replace(/%brandShortName%/, brandBundle.GetStringFromName("brandShortName"));
cancelButtonString = bundle.GetStringFromName("exitButton");
} catch (e) {
okButtonString = "Start Yah";

Просмотреть файл

@ -1,11 +1,10 @@
migratebeforerename=The profile you selected was created with a previous version of Communicator and must be copied and converted to a Mozilla profile before it can be renamed. <html:br/><html:br/> Do you want to convert this profile now?<html:br/><html:br/>
migratebeforedelete=The profile you selected was created with a previous version of Communicator. Mozilla can remove this profile from the list of profiles that it maintains but you must remove it from your system using the version of Communicator that created it, or by hand.<html:br/><html:br/> Do you want to remove this profile from the list of profiles?<html:br/><html:br/>
migratebeforestart=The profile you selected was created with a previous version of Communicator and must be copied and converted before you can use it with Mozilla.<html:br/><html:br/>Your original 4.x profile will not be altered.<html:br/><html:br/>Choose OK to copy and convert the profile.
migratebeforerename=The profile you selected was created with a previous version of Communicator and must be copied and converted to a %brandShortName% profile before it can be renamed. <html:br/><html:br/> Do you want to convert this profile now?<html:br/><html:br/>
migratebeforedelete=The profile you selected was created with a previous version of Communicator. %brandShortName% can remove this profile from the list of profiles that it maintains but you must remove it from your system using the version of Communicator that created it, or by hand.<html:br/><html:br/> Do you want to remove this profile from the list of profiles?<html:br/><html:br/>
migratebeforestart=The profile you selected was created with a previous version of Communicator and must be copied and converted before you can use it with %brandShortName%.<html:br/><html:br/>Your original 4.x profile will not be altered.<html:br/><html:br/>Choose OK to copy and convert the profile.
migratetitle=Migrate Profile
migrateallprofilestitle=Migrate All Profiles
renameprofilepromptA=Rename the profile "
renameprofilepromptB=" to:
renameProfilePrompt=Rename the profile "%oldProfileName%" to:
renameprofiletitle=Rename Profile
deletetitle=Delete Profile
@ -16,7 +15,7 @@ ps_title=Select User Profile
pm_button=Back...
ps_button=Manage Profiles...
startButton=Start Mozilla
startButton=Start %brandShortName%
exitButton=Exit
deleteFiles=Delete Files