Merge pull request #7099 from gdicristofaro/noDataMetadata

No data message in metadata
This commit is contained in:
Richard Cordovano 2021-07-06 14:16:31 -04:00 committed by GitHub
commit 47dee14a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 725 additions and 654 deletions

View File

@ -70,6 +70,7 @@ MediaViewVideoPanel.progressLabel.text=00:00
MediaViewVideoPanel.infoLabel.text=info
MediaViewImagePanel.imgFileTooLarge.msg=Could not load image file (too large): {0}
Metadata.headerTitle=Metadata
Metadata.nodeText.loading=Metadata loading...
Metadata.nodeText.none=None
Metadata.nodeText.truncated=(results truncated)
@ -106,6 +107,7 @@ MessageArtifactViewer.textbodyScrollPane.TabConstraints.tabTitle=Text
JPEGViewerDummy.jLabel1.text=You are looking at a JPEG file:
JPEGViewerDummy.jTextField1.text=jTextField1
Metadata_dataArtifactTitle=Source File Metadata
MetadataWorker.doInBackground.noDataMsg=No Data
PDFViewer.encryptedDialog=This document is password protected.
PDFViewer.errorDialog=An error occurred while opening this PDF document. Check the logs for more information. You may continue to use this feature on other PDF documents.
PListNode.KeyCol=Key
@ -403,29 +405,44 @@ viewer.menu.help.about.label=About ICEpdf viewer...
## General error dialog
viewer.dialog.error.exception.title = ICEsoft ICEpdf - Exception
viewer.dialog.error.exception.msg=There was an error executing your command do to the following exception\n{0}.
viewer.dialog.error.exception.msg = \
There was an error executing your command do to the following exception\n\
{0}.
## Open File Dialog
viewer.dialog.openFile.title = Open File
viewer.dialog.openFile.error.title = ICEsoft ICEpdf - Open File Error
viewer.dialog.openFile.error.msg=ICEpdf could not open the specified file at {0}\nThe file may be corrupt or not a supported file type.
viewer.dialog.openFile.error.msg = \
ICEpdf could not open the specified file at {0}\n\
The file may be corrupt or not a supported file type.
viewer.dialog.openDocument.pdfException.title = ICEsoft ICEpdf - PDF Exception
viewer.dialog.openDocument.pdfException.msg=ICEpdf could not open the specified file {0} \nThe file may be corrupt or not a supported file type.
viewer.dialog.openDocument.pdfException.msg = \
ICEpdf could not open the specified file {0} \n\
The file may be corrupt or not a supported file type.
viewer.dialog.openDocument.pdfSecurityException.title = ICEsoft ICEpdf - PDF Security Exception
viewer.dialog.openDocument.pdfSecurityException.msg=ICEpdf could not open the encrypted file at {0}\nThis may be the result of an invalid password or a missing JCE Security Provider.\n\nPlease refer to ICEpdf Developer's Guide for more information.
viewer.dialog.openDocument.pdfSecurityException.msg = \
ICEpdf could not open the encrypted file at {0}\n\
This may be the result of an invalid password or a missing JCE Security Provider.\n\n\
Please refer to ICEpdf Developer's Guide for more information.
viewer.dialog.openDocument.exception.title = ICEsoft ICEpdf - Exception
viewer.dialog.openDocument.exception.msg=ICEpdf could not open the specified file at {0}\nThe file may be corrupt or not a supported file type.
viewer.dialog.openDocument.exception.msg = \
ICEpdf could not open the specified file at {0}\n\
The file may be corrupt or not a supported file type.
viewer.dialog.openURL.exception.title = ICEsoft ICEpdf - URL Exception
viewer.dialog.openURL.exception.msg=ICEpdf could not open the specified file. {0} \nat URL: {1}
viewer.dialog.openURL.exception.msg = \
ICEpdf could not open the specified file. {0} \n\
at URL: {1}
viewer.dialog.openURL.downloading.msg = Downloading {0}
## General error dialog
viewer.dialog.information.copyAll.title = ICEsoft ICEpdf - Information
viewer.dialog.information.copyAll.msg=The document has more than {0} pages, please use\n"Export text..." to extract document text.
viewer.dialog.information.copyAll.msg = \
The document has more than {0} pages, please use\n\
"Export text..." to extract document text.
## Open URL Dialog
viewer.dialog.security.title = Document Security
@ -443,11 +460,13 @@ viewer.dialog.openURL.title=Open URL
### Save a Copy Dialog
viewer.dialog.saveAs.title = Save As
viewer.dialog.saveAs.extensionError.title = ICEsoft ICEpdf - Save Error
viewer.dialog.saveAs.extensionError.msg=ICEpdf could not save to {0} because it is not a supported file type.
viewer.dialog.saveAs.extensionError.msg = \
ICEpdf could not save to {0} because it is not a supported file type.
viewer.dialog.saveAs.noExtensionError.title = ICEsoft ICEpdf - Save Error
viewer.dialog.saveAs.noExtensionError.msg = Please specify a file extension.
viewer.dialog.saveAs.noneUniqueName.title = ICEsoft ICEpdf - Save Error
viewer.dialog.saveAs.noneUniqueName.msg=The file named {0} already exists. Please specify a unique name.
viewer.dialog.saveAs.noneUniqueName.msg = \
The file named {0} already exists. Please specify a unique name.
viewer.dialog.saveAs.noPermission.title = ICEpdf Viewer RI - Save Error
viewer.dialog.saveAs.noPermission.msg = You do not have permission or the credentials to save this document.
viewer.dialog.saveAs.noUpdates.title = ICEpdf Viewer RI
@ -464,19 +483,25 @@ viewer.dialog.exportText.noExtensionError.msg=Please specify a file extension.
viewer.exportText.fileStamp.msg = ICEsoft ICEpdf Viewer, (c) ICEsoft Technologies, Inc.
viewer.exportText.pageStamp.msg = <!----- Page {0} Text ---->
# Completed x out of y page(s).
viewer.exportText.fileStamp.progress.msg=Completed {0} out of {1}.
viewer.exportText.fileStamp.progress.msg = \
Completed {0} out of {1}.
viewer.exportText.fileStamp.progress.oneFile.msg = {2} page
viewer.exportText.fileStamp.progress.moreFile.msg = {2} pages
## Export SVG Dialog
viewer.dialog.exportSVG.title = Export to SVG
viewer.dialog.exportSVG.status.exporting.msg = Exporting page {0} to SVG file {1} ...
viewer.dialog.exportSVG.status.error.msg=Problem exporting page {0} to SVG file {1} : {2}
viewer.dialog.exportSVG.status.finished.msg=Finished exporting page {0} to SVG file {1}
viewer.dialog.exportSVG.status.error.msg = \
Problem exporting page {0} to SVG file {1} : {2}
viewer.dialog.exportSVG.status.finished.msg = \
Finished exporting page {0} to SVG file {1}
viewer.dialog.exportSVG.noExtensionError.title = ICEsoft ICEpdf - SVG Error
viewer.dialog.exportSVG.noExtensionError.msg = Please specify a file extension.
viewer.dialog.exportSVG.exportError.title = ICEsoft ICEpdf - SVG Error
viewer.dialog.exportSVG.exportError.msg=ICEpdf could not export to {0} \nbecuase it is either not a supported file type or \nbecause the file has been corrupted.
viewer.dialog.exportSVG.exportError.msg = \
ICEpdf could not export to {0} \n\
becuase it is either not a supported file type or \n\
because the file has been corrupted.
# Printing Progress bar
viewer.dialog.printing.status.progress.msg = Page {0} of {1}
@ -525,7 +550,10 @@ viewer.dialog.goToPage.description.label=Page Number
## About Dialog
viewer.dialog.about.title = About ICEpdf Viewer
viewer.dialog.about.pageNumber.label=\n\nCheck the ICEpdf web site for the latest news:\nhttp://www.icepdf.org/ \n\n
viewer.dialog.about.pageNumber.label = \n\
\n\
Check the ICEpdf web site for the latest news:\n\
http://www.icepdf.org/ \n\n
## Font Properties Dialog
viewer.dialog.fonts.title = Document Font Properties
@ -550,7 +578,8 @@ viewer.utilityPane.attachments.column.size.title=Size
viewer.utilityPane.attachments.column.compressedSize.title = Compressed size
viewer.utilityPane.attachments.menu.saveAs.label = Save As...
viewer.utilityPane.attachments.saveAs.replace.title = ICEsoft ICEpdf - Save Error
viewer.utilityPane.attachments.saveAs.replace.msg=The file named {0} already exists. Do you want to replace It?
viewer.utilityPane.attachments.saveAs.replace.msg = \
The file named {0} already exists. Do you want to replace It?
## Utility Pane Thumbnails
viewer.utilityPane.thumbs.tab.title = Thumbnails
@ -560,20 +589,25 @@ viewer.utilityPane.layers.tab.title=Layers
## Signature Pane
viewer.utilityPane.signatures.tab.title = Signatures
viewer.utilityPane.signatures.tab.certTree.error.label=Unsigned Signature Fields Signer certificate could not be validated {0} {1}
viewer.utilityPane.signatures.tab.certTree.error.label = \
Unsigned Signature Fields Signer certificate could not be validated {0} {1}
viewer.utilityPane.signatures.tab.certTree.rootSigned.label = Signed by {0} {1}
viewer.utilityPane.signatures.tab.certTree.rootValidating.label = Validating signature {0} {1}
viewer.utilityPane.signatures.tab.certTree.cert.invalid.label = Signature is invalid:
viewer.utilityPane.signatures.tab.certTree.cert.unknown.label = Signature is valid:
viewer.utilityPane.signatures.tab.certTree.cert.valid.label = Signature validity is unknown:
viewer.utilityPane.signatures.tab.certTree.doc.modified.label=This version of the document is unaltered but subsequent changes have been made
viewer.utilityPane.signatures.tab.certTree.doc.modified.label = \
This version of the document is unaltered but subsequent changes have been made
viewer.utilityPane.signatures.tab.certTree.doc.unmodified.label = Document has not been modified since it was signed
viewer.utilityPane.signatures.tab.certTree.doc.major.label = Document has been altered or corrupted since it was signed
viewer.utilityPane.signatures.tab.certTree.signature.identity.unknown.label=Signer's identity is unknown because it could not be found in your keystore
viewer.utilityPane.signatures.tab.certTree.signature.identity.unchecked.label=Signature is valid, but revocation of the signer's identity could not be checked
viewer.utilityPane.signatures.tab.certTree.signature.identity.unknown.label = \
Signer's identity is unknown because it could not be found in your keystore
viewer.utilityPane.signatures.tab.certTree.signature.identity.unchecked.label = \
Signature is valid, but revocation of the signer's identity could not be checked
viewer.utilityPane.signatures.tab.certTree.signature.identity.valid.label = Signer's identity is valid
viewer.utilityPane.signatures.tab.certTree.signature.time.local.label = Signing time is from the clock on this signer's computer
viewer.utilityPane.signatures.tab.certTree.signature.time.embedded.label=Signature included an embedded timestamp but it could not be validated
viewer.utilityPane.signatures.tab.certTree.signature.time.embedded.label = \
Signature included an embedded timestamp but it could not be validated
viewer.utilityPane.signatures.tab.certTree.signature.details.label = Signature Details
viewer.utilityPane.signatures.tab.certTree.signature.details.reason.label = Reason: {0}
viewer.utilityPane.signatures.tab.certTree.signature.details.location.label = Location: {0}
@ -598,11 +632,13 @@ viewer.utilityPane.signatures.cert.dialog.info.serialNumber.value={0}
viewer.utilityPane.signatures.cert.dialog.info.signatureAlgorithm.label = Signature Algorithm
viewer.utilityPane.signatures.cert.dialog.info.signatureAlgorithm.value = {0}
viewer.utilityPane.signatures.cert.dialog.info.issuer.label = Issuer
viewer.utilityPane.signatures.cert.dialog.info.issuer.value=Organization: {0} \nOrganization Unit: {1} \nCommon Name: {2} \nLocal: {3} \nState: {4} \nCountry: {5} \nEmail: {6}
viewer.utilityPane.signatures.cert.dialog.info.issuer.value = \
Organization: {0} \nOrganization Unit: {1} \nCommon Name: {2} \nLocal: {3} \nState: {4} \nCountry: {5} \nEmail: {6}
viewer.utilityPane.signatures.cert.dialog.info.validity.label = Validity
viewer.utilityPane.signatures.cert.dialog.info.validity.value = From: {0}\n To: {1}
viewer.utilityPane.signatures.cert.dialog.info.subject.label = Subject
viewer.utilityPane.signatures.cert.dialog.info.subject.value=Organization: {0} \nOrganization Unit: {1} \nCommon Name: {2} \nLocal: {3} \nState: {4} \nCountry: {5} \nEmail: {6}
viewer.utilityPane.signatures.cert.dialog.info.subject.value = \
Organization: {0} \nOrganization Unit: {1} \nCommon Name: {2} \nLocal: {3} \nState: {4} \nCountry: {5} \nEmail: {6}
viewer.utilityPane.signatures.cert.dialog.info.signature.label = Signature
viewer.utilityPane.signatures.cert.dialog.info.md5.label = MD5 Fingerprint
viewer.utilityPane.signatures.cert.dialog.info.md5.value = {0}
@ -814,7 +850,8 @@ viewer.utilityPane.search.showPagesCheckbox.label=Show Pages
viewer.utilityPane.search.stopButton.label = Stop
viewer.utilityPane.search.searching.msg = Search...
# Searching x out of y page(s)
viewer.utilityPane.search.searching1.msg=Searching {0} out of {1}
viewer.utilityPane.search.searching1.msg = \
Searching {0} out of {1}
viewer.utilityPane.search.searching1.oneFile.msg = {2} page
viewer.utilityPane.search.searching1.moreFile.msg = {2} pages
# Page x (y result(s))
@ -822,7 +859,8 @@ viewer.utilityPane.search.result.msg=Page {0} ({1})
viewer.utilityPane.search.result.oneFile.msg = {2} result
viewer.utilityPane.search.result.moreFile.msg = {2} results
# Searched x page(s) (y matches)
viewer.utilityPane.search.progress.msg=Searched {0} {1} ({2})
viewer.utilityPane.search.progress.msg = \
Searched {0} {1} ({2})
viewer.utilityPane.search.progress.onePage.msg = page
viewer.utilityPane.search.progress.morePage.msg = pages
viewer.utilityPane.search.progress.oneMatch.msg = {2} match
@ -866,14 +904,18 @@ viewer.annotation.signature.validation.common.invalid.label=Signature is invalid
viewer.annotation.signature.validation.common.unknown.label = Signature is valid:
viewer.annotation.signature.validation.common.valid.label = Signature validity is unknown:
viewer.annotation.signature.validation.common.signedBy.label = - Signed by {0} {1}
viewer.annotation.signature.validation.common.doc.modified.label=- This version of the document is unaltered but subsequent changes have been made
viewer.annotation.signature.validation.common.doc.modified.label = \
- This version of the document is unaltered but subsequent changes have been made
viewer.annotation.signature.validation.common.doc.unmodified.label = - Document has not been modified since it was signed
viewer.annotation.signature.validation.common.doc.major.label = - Document has been altered or corrupted since it was signed
viewer.annotation.signature.validation.common.identity.unknown.label=- Signer's identity is unknown because it could not be found in your keystore
viewer.annotation.signature.validation.common.identity.unchecked.label=- Signature is valid, but revocation of the signer's identity could not be checked
viewer.annotation.signature.validation.common.identity.unknown.label = \
- Signer's identity is unknown because it could not be found in your keystore
viewer.annotation.signature.validation.common.identity.unchecked.label = \
- Signature is valid, but revocation of the signer's identity could not be checked
viewer.annotation.signature.validation.common.identity.valid.label = - Signer's identity is valid
viewer.annotation.signature.validation.common.time.local.label = - Signing time is from the clock on this signer's computer
viewer.annotation.signature.validation.common.time.embedded.label=- Signature included an embedded timestamp but it could not be validated
viewer.annotation.signature.validation.common.time.embedded.label = \
- Signature included an embedded timestamp but it could not be validated
viewer.annotation.signature.validation.common.notAvailable.label = N/A
## Signatures properties Dialog.
@ -906,14 +948,16 @@ pilot.title=ICEbrowser - ICEpdf Pilot Errror
pilot.loading.msg =Opening document {0} ...
pilot.display.msg = Displaying {0}
pilot.loading.error.msg = PDF Pilot: Failed to load {0}.
pilot.error.classLoading=Required class {0} not found. Required library 'icepdf.jar' may not be on the classpath - PDF Pilot disabled.";
pilot.error.classLoading = Required class {0} not found. Required library \
'icepdf.jar' may not be on the classpath - PDF Pilot disabled.";
###
# General Error Messages
# Command Line Errors
viewer.commandLin.error=Usage: java org.icepdf.ri.viewer.Main [-loadfile <value>] [-loadurl <value>]
viewer.commandLin.error = \
Usage: java org.icepdf.ri.viewer.Main [-loadfile <value>] [-loadurl <value>]
# Launcher errors
viewer.launcher.URLError.dialog.title =ICEsoft ICEpdf
viewer.launcher.URLError.dialog.message = ICEpdf could not open the specified file. {0} at URL: {1}.
@ -934,21 +978,40 @@ parse.laf=Warning : look-and-feel {0} is not supported.
manager.properties.title = ICEpdf Properties Manager
fontManager.properties.title = ICEpdf Font Manager
manager.properties.createNewDirectory=To create the directory {0},\nwhere the ICEpdf Viewer will store changes to its setup, click Yes.\n\nIf you click "No", all changes you make to the ICEpdf Viewer setup\nwill be lost when you quit the application. \n\n
manager.properties.createNewDirectory = \
To create the directory {0},\n\
where the ICEpdf Viewer will store changes to its setup, click Yes.\n\n\
If you click "No", all changes you make to the ICEpdf Viewer setup\n\
will be lost when you quit the application. \n\n
manager.properties.failedCreation=ICEpdf Viewer directory to store user data can not be created:\n{0}\nICEpdf Viewer will not save changes to its default setup.
manager.properties.failedCreation = \
ICEpdf Viewer directory to store user data can not be created:\n\
{0}\n\
ICEpdf Viewer will not save changes to its default setup.
manager.properties.session.nolock=Error creating the lock file :\n{0}\n
manager.properties.session.nolock = \
Error creating the lock file :\n\
{0}\n
manager.properties.session.readError=Error loading properties file: \n{0}
manager.properties.session.readError = \
Error loading properties file: \n\
{0}
manager.properties.deleted=Property file has been deleted\n({0})\nRecreate it ?
manager.properties.deleted = Property file has been deleted\n\
({0})\n\
Recreate it ?
manager.properties.modified=Property file has been modified since last update\n({0,date,long})\nWould you like to merge changes in the file with the current properties?
manager.properties.modified = Property file has been modified since last update\n\
({0,date,long})\n\
Would you like to merge changes in the file with the current properties?
manager.properties.saveError=Impossible to save property file.\nEncountered the folowing error :\n{0}
manager.properties.saveError = Impossible to save property file.\n\
Encountered the folowing error :\n\
{0}
manager.properties.lafError=Look&Feel {0} given in the default properties is unsupported.\nUsing system default.
manager.properties.lafError =\
Look&Feel {0} given in the default properties is unsupported.\n\
Using system default.
manager.properties.brokenProperty = Broken default property {0} value: {1}

View File

@ -324,6 +324,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
this.node = node;
}
@Messages("MetadataWorker.doInBackground.noDataMsg=No Data")
@Override
protected String doInBackground() throws Exception {
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
@ -397,7 +398,6 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
FsContent fsFile = (FsContent) file;
addHeader(sb, NbBundle.getMessage(this.getClass(), "Metadata.nodeText.text"), true);
startTable(sb);
List<String> istatStrings = Collections.emptyList();
try {
@ -406,6 +406,14 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
istatStrings = Arrays.asList(NbBundle.getMessage(this.getClass(), "Metadata.nodeText.exceptionNotice.text") + ex.getLocalizedMessage());
}
if (istatStrings.isEmpty() || (istatStrings.size() == 1 && StringUtils.isEmpty(istatStrings.get(0)))) {
sb.append(MessageFormat.format("<div class=\"{0}\"><p class=\"{1}\">{2}</p><div>",
ContentViewerHtmlStyles.getIndentedClassName(),
ContentViewerHtmlStyles.getTextClassName(),
Bundle.MetadataWorker_doInBackground_noDataMsg()));
} else {
startTable(sb);
for (String str : istatStrings) {
addMonospacedRow(sb, str);
@ -421,6 +429,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
endTable(sb);
}
}
} else {
try {
@ -461,7 +470,6 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
// Add all the data source paths to the "Local Path" value cell.
String[] imagePaths = image.getPaths();
if (imagePaths.length > 0) {
addRowWithMultipleValues(sb,
NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.localPath"),