Don't use "(null)" for the image filename if there is no filename in the

url.  Bug 121504, r=doron, sr=blake
This commit is contained in:
bzbarsky%mit.edu 2002-01-31 22:30:50 +00:00
Родитель b5f195f801
Коммит a5af138909
2 изменённых файлов: 7 добавлений и 1 удалений

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

@ -118,7 +118,12 @@ nsContextMenu.prototype = {
var saveImageMenuItem = document.getElementById( 'context-saveimage' );
var imageName = extractFileNameFromUrl(this.imageURL);
var bundle = srGetStrBundle("chrome://communicator/locale/contentAreaCommands.properties");
var caption = bundle.formatStringFromName("saveImageAs",[imageName],1);
var caption;
if (imageName) {
caption = bundle.formatStringFromName("saveImageAs", [imageName], 1);
} else {
caption = bundle.GetStringFromName("saveImageAsNoFilename");
}
saveImageMenuItem.setAttribute( "label", caption );
}

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

@ -1,6 +1,7 @@
# context menu strings
saveImageAs=Save Image (%S)...
saveImageAsNoFilename=Save Image...
searchText=Search %S for "%S"
SavePageTitle=Save Web Page