зеркало из https://github.com/mozilla/pjs.git
Bug 219191 - "My Downloads" and helper app handler removal confirm message text are not localizable. Patch by Steffen Wilberg <steffen.wilberg@web.de>
This commit is contained in:
Родитель
729f8f72f1
Коммит
ba1a831097
|
@ -200,13 +200,15 @@ function updateSaveToFolder()
|
||||||
// user chooses to have all files auto-download to a specific folder.
|
// user chooses to have all files auto-download to a specific folder.
|
||||||
if (data.askOnSave.value == "true") {
|
if (data.askOnSave.value == "true") {
|
||||||
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
|
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
|
||||||
|
var bundle = document.getElementById("strings");
|
||||||
|
var description = bundle.getString("myDownloads");
|
||||||
var targetFolder = null;
|
var targetFolder = null;
|
||||||
|
|
||||||
switch (parseInt(data.downloadFolderList.value)) {
|
switch (parseInt(data.downloadFolderList.value)) {
|
||||||
case 1:
|
case 1:
|
||||||
targetFolder = fileLocator.get(parent.hPrefWindow.getSpecialFolderKey("Documents"),
|
targetFolder = fileLocator.get(parent.hPrefWindow.getSpecialFolderKey("Documents"),
|
||||||
Components.interfaces.nsIFile);
|
Components.interfaces.nsIFile);
|
||||||
targetFolder.append("My Downloads"); // XXXben localize
|
targetFolder.append(description);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
targetFolder = prefs.getComplexValue(downloadDirPref,
|
targetFolder = prefs.getComplexValue(downloadDirPref,
|
||||||
|
@ -300,8 +302,10 @@ function getDownloadsFolder(aFolder)
|
||||||
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
|
var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);
|
||||||
|
|
||||||
var dir = fileLocator.get(getSpecialFolderKey(aFolder), Components.interfaces.nsILocalFile);
|
var dir = fileLocator.get(getSpecialFolderKey(aFolder), Components.interfaces.nsILocalFile);
|
||||||
|
var bundle = document.getElementById("strings");
|
||||||
|
var description = bundle.getString("myDownloads");
|
||||||
if (aFolder != "Desktop")
|
if (aFolder != "Desktop")
|
||||||
dir.append("My Downloads"); // XXXben localize
|
dir.append(description);
|
||||||
|
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
@ -342,9 +346,10 @@ function removeFileHandler()
|
||||||
const nsIPS = Components.interfaces.nsIPromptService;
|
const nsIPS = Components.interfaces.nsIPromptService;
|
||||||
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(nsIPS);
|
var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(nsIPS);
|
||||||
|
|
||||||
// XXXben LOCALIZE!
|
var bundle = document.getElementById("strings");
|
||||||
var title = "Remove Actions";
|
var title = bundle.getString("removeActions");
|
||||||
var msg = "The selected Actions will no longer be performed when files of the affected types are downloaded. Are you sure you want to remove these Actions?";
|
var msg = bundle.getString("removeActionsMsg");
|
||||||
|
|
||||||
var buttons = (nsIPS.BUTTON_TITLE_YES * nsIPS.BUTTON_POS_0) + (nsIPS.BUTTON_TITLE_NO * nsIPS.BUTTON_POS_1);
|
var buttons = (nsIPS.BUTTON_TITLE_YES * nsIPS.BUTTON_POS_0) + (nsIPS.BUTTON_TITLE_NO * nsIPS.BUTTON_POS_1);
|
||||||
|
|
||||||
if (ps.confirmEx(window, title, msg, buttons, "", "", "", "", { }) == 1)
|
if (ps.confirmEx(window, title, msg, buttons, "", "", "", "", { }) == 1)
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
||||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
#
|
|
||||||
# The contents of this file are subject to the Mozilla Public License Version
|
|
||||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
||||||
# the License. You may obtain a copy of the License at
|
|
||||||
# http://www.mozilla.org/MPL/
|
|
||||||
#
|
|
||||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
||||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
||||||
# for the specific language governing rights and limitations under the
|
|
||||||
# License.
|
|
||||||
#
|
|
||||||
# The Original Code is Mozilla.org Code.
|
|
||||||
#
|
|
||||||
# The Initial Developer of the Original Code is
|
|
||||||
# Doron Rosenberg.
|
|
||||||
# Portions created by the Initial Developer are Copyright (C) 2001
|
|
||||||
# the Initial Developer. All Rights Reserved.
|
|
||||||
#
|
|
||||||
# Contributor(s):
|
|
||||||
# Ben Goodger <ben@bengoodger.com>
|
|
||||||
#
|
|
||||||
# Alternatively, the contents of this file may be used under the terms of
|
|
||||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
||||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
# of those above. If you wish to allow use of your version of this file only
|
|
||||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
# use your version of this file under the terms of the MPL, indicate your
|
|
||||||
# decision by deleting the provisions above and replace them with the notice
|
|
||||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
# the provisions above, a recipient may use your version of this file under
|
|
||||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
#
|
|
||||||
# ***** END LICENSE BLOCK *****
|
|
||||||
|
|
||||||
title=Opening %S
|
|
||||||
saveDialogTitle=Enter name of file to save to...
|
|
||||||
defaultApp=%S (default)
|
|
||||||
chooseAppFilePickerTitle=Choose Helper Application
|
|
||||||
badApp=The application you chose ("%S") could not be found. Check the file name or choose another application.
|
|
||||||
badApp.title=Application not found
|
|
||||||
selectDownloadDir=Select Download Folder
|
|
||||||
fileEnding=%S file
|
|
||||||
saveToDisk=Save to Disk
|
|
||||||
openWith=Open with %S
|
|
Загрузка…
Ссылка в новой задаче