Bug 849633: change entity names for messages changed in bug 847181. r=tchevalier,ehsan

This commit is contained in:
Zack Weinberg 2013-03-26 10:21:34 -04:00
parent 3c34a55c47
commit d847514f63
2 changed files with 48 additions and 41 deletions

View File

@ -26,31 +26,36 @@ fileConfirm.exists=%S already exists.\nDo you want to replace it?
print_error_dialog_title=Printer Error
printpreview_error_dialog_title=Print Preview Error
# Print error codes.
#LOCALIZATION NOTE: Some of these are generic error codes which you may have
# already translated a generic error message for. Please do not reuse that
# error message in this context; we want to be more specific when we know
# the error has to do with printing.
# Printing error messages.
#LOCALIZATION NOTE: Some of these messages come in pairs, one
# for printing and one for print previewing. You can remove that
# distinction in your language by removing the entity with the _PP
# suffix; then the entity without a suffix will be used for both.
# You can also add that distinction to any of the messages that don't
# already have it by adding a new entity with a _PP suffix.
#
# Any of these messages can be made print-preview-specific by adding a
# _PP suffix to the label.
NS_ERROR_FAILURE=An error occurred while printing.
# For instance, if you delete PERR_GFX_PRINTER_DOC_IS_BUSY_PP, then
# the PERR_GFX_PRINTER_DOC_IS_BUSY message will be used for that error
# condition when print previewing as well as when printing. If you
# add PERR_FAILURE_PP, then PERR_FAILURE will only be used when
# printing, and PERR_FAILURE_PP will be used under the same conditions
# when print previewing.
#
PERR_FAILURE=An error occurred while printing.
NS_ERROR_ABORT=The print job was aborted, or canceled.
NS_ERROR_NOT_AVAILABLE=Some printing functionality is not currently available.
NS_ERROR_NOT_IMPLEMENTED=Some printing functionality is not implemented yet.
NS_ERROR_OUT_OF_MEMORY=There is not enough free memory to print.
NS_ERROR_UNEXPECTED=There was an unexpected problem while printing.
PERR_ABORT=The print job was aborted, or canceled.
PERR_NOT_AVAILABLE=Some printing functionality is not currently available.
PERR_NOT_IMPLEMENTED=Some printing functionality is not implemented yet.
PERR_OUT_OF_MEMORY=There is not enough free memory to print.
PERR_UNEXPECTED=There was an unexpected problem while printing.
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE=No printers available.
NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE_PP=No printers available, cannot show print preview.
NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND=The selected printer could not be found.
NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE=Failed to open output file for print to file.
NS_ERROR_GFX_PRINTER_STARTDOC=Printing failed while starting the print job.
NS_ERROR_GFX_PRINTER_ENDDOC=Printing failed while completing the print job.
NS_ERROR_GFX_PRINTER_STARTPAGE=Printing failed while starting a new page.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY=Cannot print this document yet, it is still being loaded.
NS_ERROR_GFX_PRINTER_DOC_IS_BUSY_PP=Cannot print-preview this document yet, it is still being loaded.
NS_ERROR_GFX_PRINTER_NO_XUL=Printing XUL documents is not supported.
# EOF.
PERR_GFX_PRINTER_NO_PRINTER_AVAILABLE=No printers available.
PERR_GFX_PRINTER_NO_PRINTER_AVAILABLE_PP=No printers available, cannot show print preview.
PERR_GFX_PRINTER_NAME_NOT_FOUND=The selected printer could not be found.
PERR_GFX_PRINTER_COULD_NOT_OPEN_FILE=Failed to open output file for print to file.
PERR_GFX_PRINTER_STARTDOC=Printing failed while starting the print job.
PERR_GFX_PRINTER_ENDDOC=Printing failed while completing the print job.
PERR_GFX_PRINTER_STARTPAGE=Printing failed while starting a new page.
PERR_GFX_PRINTER_DOC_IS_BUSY=Cannot print this document yet, it is still being loaded.
PERR_GFX_PRINTER_DOC_IS_BUSY_PP=Cannot print-preview this document yet, it is still being loaded.
PERR_GFX_PRINTER_NO_XUL=Printing XUL documents is not supported.

View File

@ -1584,26 +1584,28 @@ nsPrintEngine::ShowPrintErrorDialog(nsresult aPrintError, bool aIsPrinting)
switch(aPrintError)
{
#define NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(nserr) case nserr: stringName.AssignLiteral(#nserr); break;
#define ENTITY_FOR_ERROR(label) \
case NS_ERROR_##label: stringName.AssignLiteral("PERR_" #label); break
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_PRINTER_AVAILABLE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NAME_NOT_FOUND)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_STARTDOC)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_ENDDOC)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_STARTPAGE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_GFX_PRINTER_NO_XUL) // bug 136185 / bug 240490
ENTITY_FOR_ERROR(GFX_PRINTER_NO_PRINTER_AVAILABLE);
ENTITY_FOR_ERROR(GFX_PRINTER_NAME_NOT_FOUND);
ENTITY_FOR_ERROR(GFX_PRINTER_COULD_NOT_OPEN_FILE);
ENTITY_FOR_ERROR(GFX_PRINTER_STARTDOC);
ENTITY_FOR_ERROR(GFX_PRINTER_ENDDOC);
ENTITY_FOR_ERROR(GFX_PRINTER_STARTPAGE);
ENTITY_FOR_ERROR(GFX_PRINTER_DOC_IS_BUSY);
ENTITY_FOR_ERROR(GFX_PRINTER_NO_XUL); // bug 136185 / bug 240490
ENTITY_FOR_ERROR(ABORT);
ENTITY_FOR_ERROR(NOT_AVAILABLE);
ENTITY_FOR_ERROR(NOT_IMPLEMENTED);
ENTITY_FOR_ERROR(OUT_OF_MEMORY);
ENTITY_FOR_ERROR(UNEXPECTED);
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_ABORT)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_NOT_AVAILABLE)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_NOT_IMPLEMENTED)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_OUT_OF_MEMORY)
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_UNEXPECTED)
default:
NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG(NS_ERROR_FAILURE)
ENTITY_FOR_ERROR(FAILURE);
#undef NS_ERROR_TO_LOCALIZED_PRINT_ERROR_MSG
#undef ENTITY_FOR_ERROR
}
if (!aIsPrinting) {