public class ContentSelectionPage extends WizardPage {
/** Key for preference setting that contains sub-mementos for each content URI. */
- public static final String KEY_FORMAT_SELECTIONS = "org.simantics.modeling.ui.export.wizard.formatSelections";
+ public static final String KEY_FORMAT_SELECTIONS = "org.simantics.modeling.ui.export.wizard.formatSelections"; //$NON-NLS-1$
// UI stuff
LocalResourceManager resourceManager;
List<Content> contentSelection = new ArrayList<Content>();
public ContentSelectionPage(ExportContext ctx) throws ExportException {
- super("Select Content", "Select the PDF Pages and the attachments", null);
+ super(Messages.ContentSelectionPage_SelectContent, Messages.ContentSelectionPage_SelectContentDescription, null);
this.ctx = ctx;
init();
void init() throws ExportException {
try {
- System.out.println("Found Content Types:");
+ System.out.println("Found Content Types:"); //$NON-NLS-1$
for ( ContentType ct : ctx.eep.contentTypes() ) {
- System.out.println(" "+ct);
+ System.out.println(" "+ct); //$NON-NLS-1$
}
System.out.println();
- System.out.println("Exporters:");
+ System.out.println("Exporters:"); //$NON-NLS-1$
for ( Exporter ex : ctx.eep.exporters() ) {
- System.out.println(" "+ex);
+ System.out.println(" "+ex); //$NON-NLS-1$
}
System.out.println();
- System.out.println("Formats:");
+ System.out.println("Formats:"); //$NON-NLS-1$
for ( Format format : ctx.eep.formats() ) {
- System.out.println(" "+format);
+ System.out.println(" "+format); //$NON-NLS-1$
}
System.out.println();
- System.out.println("Discoverers:");
+ System.out.println("Discoverers:"); //$NON-NLS-1$
for ( Discoverer discoverer : ctx.eep.discoverers() ) {
- System.out.println(" "+discoverer);
+ System.out.println(" "+discoverer); //$NON-NLS-1$
}
System.out.println();
- System.out.println("Publishers:");
+ System.out.println("Publishers:"); //$NON-NLS-1$
for ( Publisher publisher : ctx.eep.publishers() ) {
- System.out.println(" "+publisher.id());
+ System.out.println(" "+publisher.id()); //$NON-NLS-1$
}
System.out.println();
// Organize formats by content types - Filter out ContentTypes that don't have exporter and format.
- System.out.println("Mapped ContentTypes to Exporters:");
+ System.out.println("Mapped ContentTypes to Exporters:"); //$NON-NLS-1$
typeToFormatMap = MapList.use( new TreeMap<ContentType, List<Format>>(toStringComparator) );
for ( ContentType ct : ctx.eep.contentTypes() ) {
for ( Exporter exp : ctx.eep.getExportersForContentType( ct.id() ) ) {
Format format = ctx.eep.getFormat( exp.formatId() );
if ( format==null ) continue;
- System.out.println(" "+ct.id()+" -> "+format.fileext());
+ System.out.println(" "+ct.id()+" -> "+format.fileext()); //$NON-NLS-1$ //$NON-NLS-2$
if (!typeToFormatMap.contains(ct, format)) typeToFormatMap.add(ct, format);
}
}
for ( String content : ctx.selection ) {
initialContentHash = 13*initialContentHash + content.hashCode();
}
- initialSelectionKey = "InitialSelection-"+initialContentHash;
+ initialSelectionKey = "InitialSelection-"+initialContentHash; //$NON-NLS-1$
String sel = ctx.store.get(initialSelectionKey, null);
if ( sel != null ) {
initialSelection = ExportWizardResult.parse(sel);
// First time wizard was called with this selection.
// Check in
for ( String contentUri : ctx.selection ) {
- initialSelection.add( new Content(contentUri, null, "all", null, null, null) );
+ initialSelection.add( new Content(contentUri, null, "all", null, null, null) ); //$NON-NLS-1$
}
}
StringBuilder modelsStr = new StringBuilder();
for ( String content : ctx.selection ) {
for ( String model : allModels ) {
- if ( content.equals(model) || content.startsWith(model + "/") ) {
+ if ( content.equals(model) || content.startsWith(model + "/") ) { //$NON-NLS-1$
if ( !selectedModels.contains( model ) ) {
selectedModels.add( model );
- if ( modelsStr.length()>0 ) modelsStr.append(", ");
+ if ( modelsStr.length()>0 ) modelsStr.append(", "); //$NON-NLS-1$
modelsStr.append( model );
}
}
if ( selectedModels.isEmpty() ) selectedModels.addAll( allModels );
// UI labels
labels = new HashMap<String, Map<String, String>>();
- labels.put( "model", ctx.session.syncRequest( ExportQueries.labels( selectedModels ) ) ); // Should Model CT be used for labeling?
+ labels.put( "model", ctx.session.syncRequest( ExportQueries.labels( selectedModels ) ) ); // Should Model CT be used for labeling? //$NON-NLS-1$
// Discover contents
- System.out.println("Discovering content: "+modelsStr);
+ System.out.println("Discovering content: "+modelsStr); //$NON-NLS-1$
content = MapList.use( new TreeMap<ContentType, List<String>>(toStringComparator) );
contentToTypeMap = MapList.use( new TreeMap<String, List<ContentType>>(toStringComparator) );
modelContent = MapList.use( new TreeMap<String, List<String>>() );
for ( ContentType ct : typeToFormatMap.getKeys() ) {
- System.out.println(" "+ct.label());
+ System.out.println(" "+ct.label()); //$NON-NLS-1$
for ( Discoverer discoverer : ctx.eep.getDiscoverers( ct.id() )) {
- System.out.println(" "+discoverer.toString());
+ System.out.println(" "+discoverer.toString()); //$NON-NLS-1$
// Get content Uris
Collection<String> contents = discoverer.discoverContent(ctx, selectedModels);
content.add( ct, contentId );
contentToTypeMap.add(contentId, ct);
//modelContent.add(key)
- System.out.println(" "+contentId);
+ System.out.println(" "+contentId); //$NON-NLS-1$
}
}
Color contentTypeColor = resourceManager.createColor( new RGB(245, 245, 252) );
GridColumn column = new GridColumn(grid,SWT.NONE);
column.setTree(true);
- column.setText("Name");
+ column.setText(Messages.ContentSelectionPage_Name);
column.setWidth(200);
// "Pagees"
assertColumnIndex(1);
- Format pdfFormat = ctx.eep.getFormat("pdf");
+ Format pdfFormat = ctx.eep.getFormat("pdf"); //$NON-NLS-1$
ImageDescriptor folderID = null;
try {
- URL folderUrl = new URL("platform:/plugin/com.famfamfam.silk/icons/folder.png");
+ URL folderUrl = new URL("platform:/plugin/com.famfamfam.silk/icons/folder.png"); //$NON-NLS-1$
folderID = ImageDescriptor.createFromURL( folderUrl );
} catch (MalformedURLException e) {
e.printStackTrace();
if (modelContentType==null) continue;
// Create Model Node
- String modelLabel = labels.get("model").get(modelUri);
+ String modelLabel = labels.get("model").get(modelUri); //$NON-NLS-1$
GridItem modelNode = newLine(grid, modelLabel, modelUri, modelContentType.id());
setIcon(modelNode, 0, modelContentType.icon(modelUri));
modelNode.setToolTipText(0, modelUri);
columnNumber++;
assertColumnIndex( columnNumber );
- contentNode.setText(columnNumber, " "+pdfFormat.fileext());
+ contentNode.setText(columnNumber, " "+pdfFormat.fileext()); //$NON-NLS-1$
contentNode.setGrayed(columnNumber, false);
contentNode.setCheckable(columnNumber, true);
contentNode.setChecked(columnNumber, hasInitialSelection(contentUri, pdfFormat.id()) );
if ( !contentTypesFormats.contains(format) ) contentTypesFormats.add(format);
columnNumber++;
assertColumnIndex( columnNumber );
- contentNode.setText(columnNumber, " "+format.fileext());
+ contentNode.setText(columnNumber, " "+format.fileext()); //$NON-NLS-1$
contentNode.setGrayed(columnNumber, false);
contentNode.setCheckable(columnNumber, true);
contentNode.setChecked(columnNumber, hasInitialSelection(contentUri, format.id()) );
int cc = grid.getColumnCount();
GridColumn column = new GridColumn(grid, SWT.CHECK);
- column.setText( cc==1?"Pages":"Attachments");
+ column.setText( cc==1?Messages.ContentSelectionPage_Pages:Messages.ContentSelectionPage_Attachments);
column.setWidth( cc==1?150:200 );
for (GridItem gi : grid.getItems()) {
boolean hasInitialSelection(String uri, String formatId) {
for (Content c : initialSelection) {
if ( !c.url.equals( uri ) ) continue;
- if ( c.formatId.equals("all") || c.formatId.equals(formatId) ) return true;
+ if ( c.formatId.equals("all") || c.formatId.equals(formatId) ) return true; //$NON-NLS-1$
}
return false;
}
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IExportWizard;
import org.eclipse.ui.IWorkbench;
import org.osgi.service.prefs.BackingStoreException;
OptionsPage optionsPage;
public ExportCoreWizard() {
- setWindowTitle("Export PDF files");
+ setWindowTitle(Messages.ExportCoreWizard_ExportPDFFiles);
setNeedsProgressMonitor(true);
}
if ( !exportProblems.isEmpty() ) {
CollectionUtils.unique(exportProblems);
WizardPage cp = (WizardPage) getContainer().getCurrentPage();
- String str = CollectionUtils.toString(exportProblems, "\n");
+ String str = CollectionUtils.toString(exportProblems, "\n"); //$NON-NLS-1$
cp.setErrorMessage( str );
return false;
}
try {
ctx.store.flush();
} catch (BackingStoreException e) {
- ErrorLogger.defaultLogError("Failed to persist wizard preferences.", e);
+ ErrorLogger.defaultLogError(Messages.ExportCoreWizard_FailedToSavePreferences, e);
ExceptionUtils.logError(e);
}
} catch (InvocationTargetException e) {
}
if (canceled[0]) {
- cp.setErrorMessage("Export canceled.");
+ cp.setErrorMessage(Messages.ExportCoreWizard_FailedToPersistWizardPrefs);
} else if (t instanceof IOException) {
- ErrorLogger.defaultLogError("An I/O problem occurred while exporting the model. See exception for details.", t);
- cp.setErrorMessage("An I/O problem occurred while exporting the model.\nMessage: " + t.getMessage());
+ ErrorLogger.defaultLogError("An I/O problem occurred while exporting the model. See exception for details.", t); //$NON-NLS-1$
+ cp.setErrorMessage(NLS.bind(Messages.ExportCoreWizard_IOProblem, t.getMessage()));
} else {
- ErrorLogger.defaultLogError("Unexpected exception while exporting the model. See exception for details.", t);
- cp.setErrorMessage("Unexpected exception while exporting the model. See error log for details.\nMessage: " + t.getMessage());
+ ErrorLogger.defaultLogError("Unexpected exception while exporting the model. See exception for details.", t); //$NON-NLS-1$
+ cp.setErrorMessage(NLS.bind(Messages.ExportCoreWizard_UnexpectedException, t.getMessage()));
}
return false;
} catch (InterruptedException e) {
--- /dev/null
+package org.simantics.export.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.simantics.export.ui.messages"; //$NON-NLS-1$
+ public static String ContentSelectionPage_Attachments;
+ public static String ContentSelectionPage_Name;
+ public static String ContentSelectionPage_Pages;
+ public static String ContentSelectionPage_SelectContent;
+ public static String ContentSelectionPage_SelectContentDescription;
+ public static String ExportCoreWizard_FailedToSavePreferences;
+ public static String ExportCoreWizard_ExportPDFFiles;
+ public static String ExportCoreWizard_FailedToPersistWizardPrefs;
+ public static String ExportCoreWizard_IOProblem;
+ public static String ExportCoreWizard_UnexpectedException;
+ public static String OptionsPage_ExportAttachmentOf;
+ public static String OptionsPage_IncludeAttachmentTo;
+ public static String OptionsPage_Merge;
+ public static String OptionsPage_OptionsPage;
+ public static String OptionsPage_OutputOptions;
+ public static String OptionsPage_PublishTo;
+ public static String OptionsPage_SelectExportOptions;
+ public static String OptionsPage_UnExpectedError;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
import java.util.regex.Pattern;
import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.layout.GridData;
*/
public class OptionsPage extends WizardPage {
- public static String S_OUTPUT_OPTIONS = "Output Options";
+ public static String S_OUTPUT_OPTIONS = Messages.OptionsPage_OutputOptions;
public static LabelReference P_OUTPUT_OPTIONS = new LabelReference( S_OUTPUT_OPTIONS );
/** A reference to combo box selection */
- public static String S_PUBLISH = "Publish to";
+ public static String S_PUBLISH = Messages.OptionsPage_PublishTo;
public static ChildReference P_PUBLISH = ChildReference.compile(P_OUTPUT_OPTIONS, new LabelReference(S_PUBLISH));
ExportContext ctx;
String selectedPublisherId;
public OptionsPage(ExportContext ctx) throws ExportException {
- super("Options page", "Select export options", null);
+ super(Messages.OptionsPage_OptionsPage, Messages.OptionsPage_SelectExportOptions, null);
this.ctx = ctx;
}
public void handleEvent(Event event) {
updatingForm = true;
try {
- Preferences contentScopePrefs = ctx.store.node( "Selection-"+selectionHash );
+ Preferences contentScopePrefs = ctx.store.node( "Selection-"+selectionHash ); //$NON-NLS-1$
Preferences workspaceScopePrefs = ctx.store;
Composite outputOptions = (Composite) form.getControl(composite, P_OUTPUT_OPTIONS);
updatingForm = false;
validate();
} catch ( BindingException e ) {
- setErrorMessage( e.getClass().getName()+": "+ e.getMessage() );
+ setErrorMessage( e.getClass().getName()+": "+ e.getMessage() ); //$NON-NLS-1$
ExceptionUtils.logError(e);
} catch (AccessorConstructionException e) {
- setErrorMessage( e.getClass().getName()+": "+ e.getMessage() );
+ setErrorMessage( e.getClass().getName()+": "+ e.getMessage() ); //$NON-NLS-1$
ExceptionUtils.logError(e);
} catch (AccessorException e) {
- setErrorMessage( e.getClass().getName()+": "+ e.getMessage() );
+ setErrorMessage( e.getClass().getName()+": "+ e.getMessage() ); //$NON-NLS-1$
ExceptionUtils.logError(e);
} catch (ExportException e) {
- setErrorMessage( e.getClass().getName()+": "+ e.getMessage() );
+ setErrorMessage( e.getClass().getName()+": "+ e.getMessage() ); //$NON-NLS-1$
ExceptionUtils.logError(e);
} finally {
updatingForm = false;
for ( Format format : formats ) {
if ( format.isGroupFormat() && contentByFormat.getValues(format).size()>1 ) {
- outputOptions.addComponent("Merge "+format.fileext()+" content into one file", Datatypes.BOOLEAN);
+ outputOptions.addComponent(NLS.bind(Messages.OptionsPage_Merge, format.fileext()), Datatypes.BOOLEAN); //$NON-NLS-2$
}
if ( format.isContainerFormat() ) {
}
if ( attachmentCount > 0 ) {
- outputOptions.addComponent("Include attachments to "+format.fileext(), Datatypes.BOOLEAN);
- outputOptions.addComponent("Export attachments of "+format.fileext()+" to separate files", Datatypes.BOOLEAN);
+ outputOptions.addComponent(NLS.bind(Messages.OptionsPage_IncludeAttachmentTo, format.fileext()), Datatypes.BOOLEAN);
+ outputOptions.addComponent(NLS.bind(Messages.OptionsPage_ExportAttachmentOf, format.fileext()), Datatypes.BOOLEAN);
}
}
}
{
selection = contents;
Preferences workspaceScopePrefs = ctx.store;
- Preferences contentScopePrefs = ctx.store.node( "Selection-"+selectionHash );
- selectedPublisherId = ctx.store.get("publisherId", "");
+ Preferences contentScopePrefs = ctx.store.node( "Selection-"+selectionHash ); //$NON-NLS-1$
+ selectedPublisherId = ctx.store.get("publisherId", ""); //$NON-NLS-1$ //$NON-NLS-2$
Publisher publisher = ctx.eep.getPublisher(selectedPublisherId);
if ( publisher != null ) {
} catch (BindingException e) {
ExceptionUtils.logError(e);
- ShowMessage.showError("Unexpected error", e.getClass().getName()+" "+e.getMessage());
+ ShowMessage.showError(Messages.OptionsPage_UnExpectedError, e.getClass().getName()+" "+e.getMessage()); //$NON-NLS-2$
throw new RuntimeBindingException(e);
} catch (ExportException e) {
ExceptionUtils.logError(e);
- ShowMessage.showError("Unexpected error", e.getClass().getName()+" "+e.getMessage());
+ ShowMessage.showError(Messages.OptionsPage_UnExpectedError, e.getClass().getName()+" "+e.getMessage()); //$NON-NLS-2$
} catch (DatatypeConstructionException e) {
ExceptionUtils.logError(e);
- ShowMessage.showError("Unexpected error", e.getClass().getName()+" "+e.getMessage());
+ ShowMessage.showError(Messages.OptionsPage_UnExpectedError, e.getClass().getName()+" "+e.getMessage()); //$NON-NLS-2$
} catch (AccessorConstructionException e) {
ExceptionUtils.logError(e);
- ShowMessage.showError("Unexpected error", e.getClass().getName()+" "+e.getMessage());
+ ShowMessage.showError(Messages.OptionsPage_UnExpectedError, e.getClass().getName()+" "+e.getMessage()); //$NON-NLS-2$
} catch (AccessorException e) {
ExceptionUtils.logError(e);
// TODO Auto-generated catch block
result.accessor = Accessors.getAccessor(result.options);
result.contents = selection;
result.type = (RecordType) options.type();
- result.publisherId = "file";
+ result.publisherId = "file"; //$NON-NLS-1$
List<ExportAction> actions = new ArrayList<ExportAction>();
List<Content> manifest = new ArrayList<Content>();
String publisherLabel = ExporterUtils.getUnionValue(result.accessor, P_PUBLISH);
Publisher publisher = ctx.eep.getPublisherByLabel(publisherLabel);
- result.publisherId = publisher==null?"":publisher.id();
+ result.publisherId = publisher==null?"":publisher.id(); //$NON-NLS-1$
} catch (BindingException e) {
throw new ExportException(e);
}
- setErrorMessage( errs.isEmpty() ? null : CollectionUtils.toString(errs, ", ") );
+ setErrorMessage( errs.isEmpty() ? null : CollectionUtils.toString(errs, ", ") ); //$NON-NLS-1$
setPageComplete( errs.isEmpty() );
}
RecordAccessor ra = Accessors.getAccessor(options);
String publisherId = ExporterUtils.getUnionValue(ra, P_PUBLISH);
Publisher publisher = ctx.eep.getPublisherByLabel(publisherId);
- if ( publisher!=null ) workspaceScopePrefs.put("publisherId", publisher.id());
+ if ( publisher!=null ) workspaceScopePrefs.put("publisherId", publisher.id()); //$NON-NLS-1$
if ( ra.type().hasComponent(P_OUTPUT_OPTIONS.label) ) {
RecordAccessor rao = ra.getComponent( P_OUTPUT_OPTIONS );
- Pattern merge_pattern = Pattern.compile("Merge ([^\\s]*) content into one file");
- Pattern include_pattern = Pattern.compile("Include attachments to ([^\\s]*)");
- Pattern export_pattern = Pattern.compile("Export attachments of ([^\\s]*) to separate files");
+ Pattern merge_pattern = Pattern.compile("Merge ([^\\s]*) content into one file"); //$NON-NLS-1$
+ Pattern include_pattern = Pattern.compile("Include attachments to ([^\\s]*)"); //$NON-NLS-1$
+ Pattern export_pattern = Pattern.compile("Export attachments of ([^\\s]*) to separate files"); //$NON-NLS-1$
for (int i=0; i<rao.count(); i++) {
String name = rao.type().getComponent(i).name;
String fileExt = m.group(1);
Format format = ctx.eep.getFormatByExt(fileExt);
Boolean value = (Boolean) rao.getFieldValue(i, Bindings.BOOLEAN);
- String key = format.id()+"_merge";
+ String key = format.id()+"_merge"; //$NON-NLS-1$
contentScopePrefs.putBoolean(key, value);
workspaceScopePrefs.putBoolean(key, value);
}
String fileExt = m.group(1);
Format format = ctx.eep.getFormatByExt(fileExt);
Boolean value = (Boolean) rao.getFieldValue(i, Bindings.BOOLEAN);
- String key = format.id()+"_include_attachments";
+ String key = format.id()+"_include_attachments"; //$NON-NLS-1$
contentScopePrefs.putBoolean(key, value);
workspaceScopePrefs.putBoolean(key, value);
}
String fileExt = m.group(1);
Format format = ctx.eep.getFormatByExt(fileExt);
Boolean value = (Boolean) rao.getFieldValue(i, Bindings.BOOLEAN);
- String key = format.id()+"_export_attachments";
+ String key = format.id()+"_export_attachments"; //$NON-NLS-1$
contentScopePrefs.putBoolean(key, value);
workspaceScopePrefs.putBoolean(key, value);
}
//Preferences workspaceScopePrefs = ctx.store;
try {
RecordAccessor ra = Accessors.getAccessor(options);
- String publisherId = workspaceScopePrefs.get("publisherId", "");
+ String publisherId = workspaceScopePrefs.get("publisherId", ""); //$NON-NLS-1$ //$NON-NLS-2$
Publisher publisher = ctx.eep.getPublisher(publisherId);
if ( publisher != null ) ExporterUtils.setUnionValue(ra, P_PUBLISH, publisher.label());
for (Format format : ctx.eep.formats()) {
if ( format.isGroupFormat() ) {
- String key = format.id()+"_merge";
+ String key = format.id()+"_merge"; //$NON-NLS-1$
Boolean value = null;
if ( containsKey(contentScopePrefs, key) ) {
value = contentScopePrefs.getBoolean(key, false);
}
if ( value != null ) {
- String key2 = "Merge "+format.fileext()+" content into one file";
+ String key2 = "Merge "+format.fileext()+" content into one file"; //$NON-NLS-1$ //$NON-NLS-2$
int index = rao.type().getComponentIndex2(key2);
if ( index>=0 ) {
rao.setFieldValue(index, Bindings.BOOLEAN, value);
}
if ( format.isContainerFormat() ) {
- String key = format.id()+"_include_attachments";
+ String key = format.id()+"_include_attachments"; //$NON-NLS-1$
Boolean value = null;
if ( containsKey(contentScopePrefs, key) ) {
value = contentScopePrefs.getBoolean(key, false);
}
if ( value != null ) {
- String key2 = "Include attachments to "+format.fileext();
+ String key2 = "Include attachments to "+format.fileext(); //$NON-NLS-1$
int index = rao.type().getComponentIndex2(key2);
if ( index>=0 ) {
rao.setFieldValue(index, Bindings.BOOLEAN, value);
}
if ( format.isContainerFormat() ) {
- String key = format.id()+"_export_attachments";
+ String key = format.id()+"_export_attachments"; //$NON-NLS-1$
Boolean value = null;
if ( containsKey(contentScopePrefs, key) ) {
value = contentScopePrefs.getBoolean(key, false);
}
if ( value != null ) {
- String key2 = "Export attachments of "+format.fileext()+" to separate files";
+ String key2 = "Export attachments of"+format.fileext()+" to separate files"; //$NON-NLS-2$
int index = rao.type().getComponentIndex2(key2);
if ( index>=0 ) {
rao.setFieldValue(index, Bindings.BOOLEAN, value);
public void savePrefs() throws ExportException {
try {
int oldSelectionHash = selectionHash;
- Preferences contentScopePrefs = ctx.store.node( "Selection-"+oldSelectionHash );
+ Preferences contentScopePrefs = ctx.store.node( "Selection-"+oldSelectionHash ); //$NON-NLS-1$
Preferences workspaceScopePrefs = ctx.store;
RecordBinding binding = ctx.databoard.getMutableBinding( form.type() );
for (Format format : ctx.eep.formats()) {
if ( format.isContainerFormat() ) {
- String key = "Include attachments to "+format.fileext();
+ String key = "Include attachments to "+format.fileext(); //$NON-NLS-1$
int index = rao.type().getComponentIndex2(key);
if ( index>=0 ) rao.setFieldValue(index, Bindings.BOOLEAN, true);
- key = "Export attachments of "+format.fileext()+" to separate files";;
+ key = "Export attachments of "+format.fileext()+" to separate files";; //$NON-NLS-1$ //$NON-NLS-2$
index = rao.type().getComponentIndex2(key);
if ( index>=0 ) rao.setFieldValue(index, Bindings.BOOLEAN, true);
}
--- /dev/null
+ContentSelectionPage_Attachments=Attachments
+ContentSelectionPage_Name=Name
+ContentSelectionPage_Pages=Pages
+ContentSelectionPage_SelectContent=Select Content
+ContentSelectionPage_SelectContentDescription=Select the PDF Pages and the attachments
+ExportCoreWizard_FailedToSavePreferences=Failed to persist wizard preferences.
+ExportCoreWizard_ExportPDFFiles=Export PDF files
+ExportCoreWizard_FailedToPersistWizardPrefs=Export canceled.
+ExportCoreWizard_IOProblem=An I/O problem occurred while exporting the model.\nMessage: {0}
+ExportCoreWizard_UnexpectedException=Unexpected exception while exporting the model. See error log for details.\nMessage: {0}
+OptionsPage_ExportAttachmentOf=Export attachments of {0} to separate files
+OptionsPage_IncludeAttachmentTo=Include attachments to {0}
+OptionsPage_Merge=Merge {0} content into one file
+OptionsPage_OptionsPage=Options page
+OptionsPage_OutputOptions=Output Options
+OptionsPage_PublishTo=Publish to
+OptionsPage_SelectExportOptions=Select export options
+OptionsPage_UnExpectedError=Unexpected error
* [x] org.simantics.desktop.ui
* [x] org.simantics.document.linking.ui
* [x] org.simantics.document.ui
+* [x] org.simantics.document.ui.ontology
+* [x] org.simantics.export.ui
* ...
## TODO ##
* /org.simantics.browsing.ui.swt (Nothing to Exeternalize or all can be ignored)
* /org.simantics.debug.browser.ui (Nothing to Exeternalize or all can be ignored)
* /org.simantics.desktop.ui.ontology (No strings to externalize)
-* /org.simantics.document.ui
-* /org.simantics.document.ui.ontology
-* /org.simantics.export.ui
+
* /org.simantics.fileimport.ui
* /org.simantics.graphviz.ui
* /org.simantics.help.ui