|
From: <mpe...@us...> - 2013-03-27 17:30:40
|
Revision: 16169
http://unicore.svn.sourceforge.net/unicore/?rev=16169&view=rev
Author: mpetrova
Date: 2013-03-27 17:30:29 +0000 (Wed, 27 Mar 2013)
Log Message:
-----------
Localization of the strings in grid.ui package
Modified Paths:
--------------
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/AbstractGridViewer.java
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/U6DataEndpointViewer.java
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/CustomExecutablePanel.java
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/GenericApplicationInputPanel.java
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/InputFileRow.java
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/ParameterRow.java
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/views/GenericApplicationView.java
unicore-portal/trunk/grid.ui/src/main/resources/META-INF/portalPlugin.xml
unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages.properties
unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages_pl.properties
Added Paths:
-----------
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/i18n/
unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/i18n/GridUII18N.java
unicore-portal/trunk/grid.ui/src/main/resources/eu/
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages.properties
unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages_pl.properties
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/AbstractGridViewer.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/AbstractGridViewer.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/AbstractGridViewer.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -13,12 +13,14 @@
import com.vaadin.ui.Component;
import com.vaadin.ui.GridLayout;
+import eu.unicore.portal.core.GlobalState;
import eu.unicore.portal.core.HierarchicalViewer;
import eu.unicore.portal.core.filters.FilterController;
import eu.unicore.portal.core.threads.BackgroundWorker;
import eu.unicore.portal.core.threads.IProgressMonitor;
import eu.unicore.portal.grid.core.nodes.GridNode;
import eu.unicore.portal.grid.core.nodes.Node;
+import eu.unicore.portal.grid.ui.i18n.GridUII18N;
import eu.unicore.portal.ui.PortalApplication;
/**
@@ -61,7 +63,7 @@
if(n == null) return;
if(event.isDoubleClick())
{
- BackgroundWorker worker = new BackgroundWorker("refreshing...") {
+ BackgroundWorker worker = new BackgroundWorker(GlobalState.getMessage(GridUII18N.ID, "AbstractGridViewer.refreshing")) { //$NON-NLS-1$
@Override
protected void work(IProgressMonitor progress)
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/U6DataEndpointViewer.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/U6DataEndpointViewer.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/browser/U6DataEndpointViewer.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -20,6 +20,7 @@
import eu.unicore.portal.grid.core.data.u6.U6DataEndpoint;
import eu.unicore.portal.grid.core.nodes.Node;
import eu.unicore.portal.grid.core.nodes.u6.StorageNode;
+import eu.unicore.portal.grid.ui.i18n.GridUII18N;
import eu.unicore.portal.ui.PortalApplication;
import eu.unicore.portal.ui.i18n.UII18N;
import eu.unicore.portal.ui.viewers.DataEndpointViewer;
@@ -78,7 +79,7 @@
protocolComboBox = new ComboBox();
protocolComboBox.setImmediate(true);
HorizontalLayout layout = new HorizontalLayout();
- layout.addComponent(new Label("File Transfer Protocol: "));
+ layout.addComponent(new Label(GlobalState.getMessage(GridUII18N.ID, "U6DataEndpointViewer.FTP"))); //$NON-NLS-1$
layout.addComponent(protocolComboBox);
return layout;
}
@@ -113,7 +114,7 @@
});
storageType.setImmediate(true);
- chooseStorageButton = new Button("Choose Storage",
+ chooseStorageButton = new Button(GlobalState.getMessage(GridUII18N.ID, "U6DataEndpointViewer.choose"), //$NON-NLS-1$
new Button.ClickListener() {
private static final long serialVersionUID = 1L;
@@ -151,7 +152,7 @@
{
if (storageChooser == null)
{
- storageChooser = new StorageChooser("Available Storages",
+ storageChooser = new StorageChooser(GlobalState.getMessage(GridUII18N.ID, "U6DataEndpointViewer.available"), //$NON-NLS-1$
new StorageChooser.StorageChooserCallback() {
@Override
public void response(Node node, boolean ok) {
@@ -168,7 +169,7 @@
}
else
{
- logger.warn(GlobalState.getMessage(UII18N.ID, "VFSAction.select_resource"));
+ logger.warn(GlobalState.getMessage(UII18N.ID, "VFSAction.select_resource")); //$NON-NLS-1$
}
}
}
@@ -186,7 +187,7 @@
public void showDataEndpoint(final DataEndpoint endpoint)
{
- BackgroundWorker j = new BackgroundWorker("Browsing storage") {
+ BackgroundWorker j = new BackgroundWorker(GlobalState.getMessage(GridUII18N.ID, "U6DataEndpointViewer.browsing")) { //$NON-NLS-1$
@Override
protected void work(IProgressMonitor progress) {
@@ -208,7 +209,7 @@
}
catch(Exception e)
{
- logger.error("Failure browsing storage: "+e.getLocalizedMessage(), e);
+ logger.error("Failure browsing storage: "+e.getLocalizedMessage(), e); //$NON-NLS-1$
}
}
Added: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/i18n/GridUII18N.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/i18n/GridUII18N.java (rev 0)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/i18n/GridUII18N.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2013 ICM Uniwersytet Warszawski All rights reserved.
+ * See LICENCE.txt file for licensing information.
+ */
+package eu.unicore.portal.grid.ui.i18n;
+
+/**
+ * Message provider ID
+ * @author K. Benedyczak
+ */
+public class GridUII18N
+{
+ public static final String ID = "gridUI";
+}
Property changes on: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/i18n/GridUII18N.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/CustomExecutablePanel.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/CustomExecutablePanel.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/CustomExecutablePanel.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -15,6 +15,7 @@
import com.vaadin.ui.OptionGroup;
import com.vaadin.ui.TextField;
+import eu.unicore.portal.core.GlobalState;
import eu.unicore.portal.grid.core.jobs.GenericApplicationParameterModel;
import eu.unicore.portal.grid.core.params.ArgumentValue;
import eu.unicore.portal.grid.core.params.DataStaging;
@@ -23,6 +24,7 @@
import eu.unicore.portal.grid.core.params.ParameterMetaData;
import eu.unicore.portal.grid.core.params.ParameterValueFactory;
import eu.unicore.portal.grid.core.params.StringArgumentMetaData;
+import eu.unicore.portal.grid.ui.i18n.GridUII18N;
public class CustomExecutablePanel extends GridLayout implements PropertyChangeListener {
@@ -30,8 +32,8 @@
private static final long serialVersionUID = 1L;
private String valueName;
- private final String LOCAL = "Local file";
- private final String REMOTE = "Path to executable at target system";
+ private final String LOCAL = GlobalState.getMessage(GridUII18N.ID, "CustomExecutablePanel.local"); //$NON-NLS-1$
+ private final String REMOTE = GlobalState.getMessage(GridUII18N.ID, "CustomExecutablePanel.remote"); //$NON-NLS-1$
private TextField localFileText, remoteFileText;
private Button browse;
@@ -45,7 +47,7 @@
setRows(3);
setSpacing(true);
parent.addComponent(this);
- Label label = new Label("Please specify an executable file");
+ Label label = new Label(GlobalState.getMessage(GridUII18N.ID, "CustomExecutablePanel.inquiry")); //$NON-NLS-1$
addComponent(label, 0, 0, 2, 0);
options = new OptionGroup();
@@ -76,7 +78,7 @@
}
});
- browse = new Button("Browse ...");
+ browse = new Button(GlobalState.getMessage(GridUII18N.ID, "CustomExecutablePanel.browse")); //$NON-NLS-1$
addComponent(browse, 2, 1);
browse.addClickListener(new ClickListener() {
@@ -86,7 +88,7 @@
public void buttonClick(ClickEvent event)
{
String file = askForFile();
- if(file == null) file = "";
+ if(file == null) file = ""; //$NON-NLS-1$
localFileText.setValue(file);
}
});
@@ -138,7 +140,7 @@
File f = new File((String)localFileText.getValue());
FileParameterMetaData meta = new FileParameterMetaData(valueName);
FileParameterValue newValue = ParameterValueFactory.getInstance().createFileParameterValue(meta);
- newValue.setDataStaging(DataStaging.createStageIn("", f.getName()));
+ newValue.setDataStaging(DataStaging.createStageIn("", f.getName())); //$NON-NLS-1$
this.model.set(this,valueName, newValue);
}
}
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/GenericApplicationInputPanel.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/GenericApplicationInputPanel.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/generic/GenericApplicationInputPanel.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -60,6 +60,7 @@
import eu.unicore.portal.grid.core.params.ValidArgumentRange;
import eu.unicore.portal.grid.core.params.ValidChoiceArgumentRange;
import eu.unicore.portal.grid.ui.browser.GridTreeViewer;
+import eu.unicore.portal.grid.ui.i18n.GridUII18N;
import eu.unicore.portal.grid.ui.jobs.params.ApplicationParameterPanel;
import eu.unicore.portal.grid.ui.jobs.params.InputFileSetRow;
import eu.unicore.portal.grid.ui.jobs.params.ParameterRow;
@@ -82,7 +83,7 @@
protected static final Logger logger = Logger
.getLogger(GenericApplicationInputPanel.class);
- static final String EXECUTABLE_NAME_IN_WORKDIR = "executable";
+ static final String EXECUTABLE_NAME_IN_WORKDIR = "executable"; //$NON-NLS-1$
private ComponentContainer parameterPanelContainer;
private Label additionalArgumentsLabel;
@@ -109,7 +110,7 @@
GridLayout selection = new GridLayout(2, 4);
selection.setSpacing(true);
selection.setMargin(true);
- Label l = new Label("Job name:");
+ Label l = new Label(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.job_name")); //$NON-NLS-1$
selection.addComponent(l, 0, 0);
TextField t = new TextField();
@@ -129,7 +130,7 @@
}
});
- l = new Label("Select application:");
+ l = new Label(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.select_app")); //$NON-NLS-1$
selection.addComponent(l, 0, 1);
applicationCombo = new ComboBox();
@@ -161,7 +162,7 @@
}
});
- l = new Label("Select version:");
+ l = new Label(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.select_ver")); //$NON-NLS-1$
selection.addComponent(l, 0, 2);
versionCombo = new ComboBox();
@@ -196,7 +197,7 @@
}
});
- additionalArgumentsLabel = new Label("Command line arguments:");
+ additionalArgumentsLabel = new Label(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.arg")); //$NON-NLS-1$
selection.addComponent(additionalArgumentsLabel, 0, 3);
additionalArgumentsText = new TextField();
@@ -242,7 +243,7 @@
parent.addComponent(tabSheet);
GridLayout applicationTab = new GridLayout(1, 2);
- tabSheet.addTab(applicationTab, "Application", IconUtil.getIconFromTheme(IconRepository.ICON_ID_APPLICATIONS));
+ tabSheet.addTab(applicationTab, GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.application"), IconUtil.getIconFromTheme(IconRepository.ICON_ID_APPLICATIONS)); //$NON-NLS-1$
applicationTab.setWidth(100f, Unit.PERCENTAGE);
applicationTab.setSpacing(true);
applicationTab.setMargin(true);
@@ -266,7 +267,7 @@
} catch (Exception e1) {
logger.warn(
- "Problem while creating generic application GUI: "
+ GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.problem_GUI") //$NON-NLS-1$
+ e1.getLocalizedMessage(), e1);
}
@@ -280,10 +281,10 @@
if(value_set != null && value_set.getDataStagings().length < 1) counter = 1;
String filename = fileset.getDefaultNameInJobDir();
if(filename == null || filename.trim().length() == 0){
- filename= fileset.getName().toLowerCase() + "_" + counter;
+ filename= fileset.getName().toLowerCase() + "_" + counter; //$NON-NLS-1$
counter++;
}
- value_set.addDataStaging(DataStaging.createStageIn("", filename));
+ value_set.addDataStaging(DataStaging.createStageIn("", filename)); //$NON-NLS-1$
fileSetPanel.createRowsViaMetaData(fileset);
}
@@ -345,7 +346,7 @@
if (parameterPanel == null) {
parameterPanel = new ApplicationParameterPanel(getModel(),
- "Input parameters");
+ GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.input")); //$NON-NLS-1$
parameterPanelContainer.addComponent(parameterPanel);
}
@@ -354,18 +355,18 @@
private void createResourcesPanel() {
if (resourcesPanel == null) {
GridLayout resourcesTab = new GridLayout(2, 1);
- tabSheet.addTab(resourcesTab, "Resources", IconUtil.getIconFromTheme(IconRepository.ICON_ID_RESOURCES));
+ tabSheet.addTab(resourcesTab, GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.resources"), IconUtil.getIconFromTheme(IconRepository.ICON_ID_RESOURCES)); //$NON-NLS-1$
resourcesTab.setSizeUndefined();
resourcesTab.setMargin(true);
resourcesTab.setSpacing(true);
resourcesPanel = new ApplicationParameterPanel(getModel(),
- "Resource requirements");
+ GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.requirements")); //$NON-NLS-1$
resourcesTab.addComponent(resourcesPanel);
VerticalLayout viewerContainer = new VerticalLayout();
viewerContainer.setWidth(100f, Unit.PERCENTAGE);
- Label l = new Label("Available execution services");
+ Label l = new Label(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.exec_services")); //$NON-NLS-1$
l.addStyleName(Styles.CAPTION2);
viewerContainer.addComponent(l);
gridTreeViewer = new GridTreeViewer(NodeFactory.getInstance()
@@ -505,7 +506,7 @@
}
} catch (Exception e) {
- logger.warn("Error processing property change.", e);
+ logger.warn(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.error_property"), e); //$NON-NLS-1$
}
}
@@ -683,15 +684,15 @@
additionalArgumentsLabel.setEnabled(additionalArgumentsAllowed);
additionalArgumentsText.setEnabled(additionalArgumentsAllowed);
- String tooltip = additionalArgumentsAllowed ? "Enter additional command line arguments here."
- : "The application does not accept additional arguments.";
+ String tooltip = additionalArgumentsAllowed ? GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.enter_arg") //$NON-NLS-1$
+ : GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.no_add_arg"); //$NON-NLS-1$
additionalArgumentsLabel.setDescription(tooltip);
additionalArgumentsText.setDescription(tooltip);
}
} catch (Exception e) {
- logger.warn("Unable to update application GUI", e);
+ logger.warn(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.GUI_no_update"), e); //$NON-NLS-1$
}
}
@@ -714,7 +715,7 @@
}
} catch (Exception e) {
- logger.warn("Unable to update application GUI", e);
+ logger.warn(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.problem_GUI"), e);
}
}
@@ -764,16 +765,16 @@
container.setWidth(100f, Unit.PERCENTAGE);
container.setMargin(true);
container.setSpacing(true);
- tabSheet.addTab(container, "Input Files", IconUtil.getIconFromTheme(IconRepository.ICON_ID_INPUT_FILES));
+ tabSheet.addTab(container, GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.input_files"), IconUtil.getIconFromTheme(IconRepository.ICON_ID_INPUT_FILES)); //$NON-NLS-1$
fileSetPanel = new ApplicationParameterPanel(getModel(),
- "Input files");
+ GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.input_files")); //$NON-NLS-1$
HorizontalLayout buttons = new HorizontalLayout();
buttons.setSizeUndefined();
buttons.setSpacing(true);
- CheckBox selectAll = new CheckBox("Select all", false);
+ CheckBox selectAll = new CheckBox(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.select_all"), false); //$NON-NLS-1$
buttons.addComponent(selectAll);
selectAll.addValueChangeListener(new ValueChangeListener() {
private static final long serialVersionUID = 1L;
@@ -795,7 +796,7 @@
createAnInputFileSetRow();
}
});
- addFile.setDescription("Add an input file row");
+ addFile.setDescription(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.add_row")); //$NON-NLS-1$
buttons.addComponent(addFile);
Button deleteSelected = new VFSFileButton(VFSAction.ACTION_DELETE_MULTI, new ClickListener() {
@@ -819,8 +820,8 @@
for (ParameterRow row : allRows) {
if (row.isChecked()) {
ConfirmationDialog question = new ConfirmationDialog(
- GlobalState.getMessage(UII18N.ID, "VFSAction.question_del"),
- "The selected files will be deleted from the workspace. Continue?",
+ GlobalState.getMessage(UII18N.ID, "VFSAction.question_del"), //$NON-NLS-1$
+ GlobalState.getMessage(GridUII18N.ID, "GenericApplicationInputPanel.question_delete"), //$NON-NLS-1$
new ConfirmationDialog.ConfirmationDialogCallback() {
public void response(boolean ok) {
if (ok) {
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/InputFileRow.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/InputFileRow.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/InputFileRow.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -34,10 +34,12 @@
import com.vaadin.ui.Upload.FinishedListener;
import com.vaadin.ui.Upload.Receiver;
+import eu.unicore.portal.core.GlobalState;
import eu.unicore.portal.grid.core.jobs.ComputeTaskParameterModel;
import eu.unicore.portal.grid.core.params.FileParameterMetaData;
import eu.unicore.portal.grid.core.params.FileParameterValue;
import eu.unicore.portal.grid.core.params.ParameterMetaData;
+import eu.unicore.portal.grid.ui.i18n.GridUII18N;
import eu.unicore.portal.ui.actions.VFSAction;
import eu.unicore.portal.ui.data.VFSFileButton;
import eu.unicore.portal.ui.data.VFSUtils;
@@ -55,8 +57,8 @@
private Upload upload;
private FileObject inputDir;
- private String filename = "";
- private String sourceUrl = "";
+ private String filename = ""; //$NON-NLS-1$
+ private String sourceUrl = ""; //$NON-NLS-1$
public InputFileRow(GridLayout parent,
ComputeTaskParameterModel model, ParameterMetaData metaData,
@@ -92,7 +94,7 @@
text.setWidth(400, Unit.PIXELS);
text.setEnabled(true);
text.addTextChangeListener(new SourceFileTextListener());
- text.setNullRepresentation("");
+ text.setNullRepresentation(""); //$NON-NLS-1$
text.setImmediate(true);
if(getMetaData().isMandatory()) text.setRequired(true);
@@ -105,11 +107,11 @@
HorizontalLayout createBtns = new HorizontalLayout();
createBtns.setSpacing(true);
- createNew = new PopupView("",createBtns);
- createNew.setDescription("Create new file");
+ createNew = new PopupView("",createBtns); //$NON-NLS-1$
+ createNew.setDescription(GlobalState.getMessage(GridUII18N.ID, "InputFileRow.create")); //$NON-NLS-1$
createNew.setWidth(16f, Unit.PIXELS);
createNew.setHeight(16f, Unit.PIXELS);
- Label l = new Label("Enter file name:");
+ Label l = new Label(GlobalState.getMessage(GridUII18N.ID, "InputFileRow.enter_name")); //$NON-NLS-1$
createBtns.addComponent(l);
final TextField tf = new TextField();
tf.setImmediate(true);
@@ -143,7 +145,7 @@
createNew.setPopupVisible(false);
}
});
- createNew.setStyleName("my-create-popup");
+ createNew.setStyleName("my-create-popup"); //$NON-NLS-1$
buttons.addComponent(createNew);
edit = new VFSFileButton(VFSAction.ACTION_EDIT, new ClickListener() {
@@ -197,7 +199,7 @@
}
fname = removeWhiteSpaces(fname);
// Prevent from recursion without a bottom
- if (fname.equals(filename) || (fname + ".txt").equals(filename)) {
+ if (fname.equals(filename) || (fname + ".txt").equals(filename)) { //$NON-NLS-1$
setSourceValue(filename);
return;
}
@@ -228,7 +230,7 @@
update(newFile);
} catch (Exception e) {
logger.warn(
- "Unable to create or rename file: "
+ "Unable to create or rename file: " //$NON-NLS-1$
+ e.getLocalizedMessage(), e);
}
}
@@ -321,7 +323,7 @@
this.filename = filename;
update(file);
} catch (Exception e) {
- logger.warn("Unable to create file: " + e.getLocalizedMessage(), e);
+ logger.warn("Unable to create file: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
}
}
@@ -342,18 +344,18 @@
updateModel(sourceUrl, false);
} catch (Exception e)
{
- logger.warn("Unable to delete file: "+e.getLocalizedMessage(),e);
+ logger.warn("Unable to delete file: "+e.getLocalizedMessage(),e); //$NON-NLS-1$
}
}
- else logger.warn("Not a file");
+ else logger.warn("Not a file"); //$NON-NLS-1$
}
protected Upload createUploadFilePopup()
{
upload = new Upload();
- upload.setButtonCaption("");
- upload.setStyleName("my-upload-button");
- upload.setDescription("Upload");
+ upload.setButtonCaption(""); //$NON-NLS-1$
+ upload.setStyleName("my-upload-button"); //$NON-NLS-1$
+ upload.setDescription(GlobalState.getMessage(GridUII18N.ID, "InputFileRow.upload")); //$NON-NLS-1$
upload.setImmediate(true);
upload.addFinishedListener(new FinishedListener() {
@@ -366,7 +368,7 @@
filename = removeWhiteSpaces(event.getFilename());
update(file);
} catch (Exception e) {
- logger.warn("Unable to refer to file: " + e.getLocalizedMessage(), e);
+ logger.warn("Unable to refer to file: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
}
}
});
@@ -386,7 +388,7 @@
return file.getContent().getOutputStream();
} catch (Exception e)
{
- logger.warn("Unable to upload file: "+e.getLocalizedMessage(),e);
+ logger.warn("Unable to upload file: "+e.getLocalizedMessage(),e); //$NON-NLS-1$
return null;
}
@@ -403,7 +405,7 @@
updateModel(sourceUrl, true);
edit.setFile(file);
} catch (Exception e) {
- logger.warn("Unable to refer to file: " + e.getLocalizedMessage(), e);
+ logger.warn("Unable to refer to file: " + e.getLocalizedMessage(), e); //$NON-NLS-1$
}
}
@@ -424,17 +426,17 @@
}
private String removeWhiteSpaces(String filename){
- return filename.replaceAll("\\s+", "_");
+ return filename.replaceAll("\\s+", "_"); //$NON-NLS-1$ //$NON-NLS-2$
}
private boolean isValidFilename(String fname){
- String regex = "^[-_.,A-Za-z0-9]*";
+ String regex = "^[-_.,A-Za-z0-9]*"; //$NON-NLS-1$
Pattern pattern = Pattern.compile(regex);//("^[^/./\\:*?\"<>|]+$");
Matcher matcher = pattern.matcher(fname);
boolean result = matcher.matches();
if(result == false){
- logger.warn("The filename contains special symbols. Only letters, number, dash and underscore are allowed.");
+ logger.warn(GlobalState.getMessage(GridUII18N.ID, "InputFileRow.filename_format_error")); //$NON-NLS-1$
}
return result;
}
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/ParameterRow.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/ParameterRow.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/jobs/params/ParameterRow.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -63,9 +63,9 @@
private ComputeTaskParameterModel model;
- public static final String PROPERTY_CHECKED = "checked";
+ public static final String PROPERTY_CHECKED = "checked"; //$NON-NLS-1$
- public static final String PROPERTY_NAME_CHANGED = "nameChanged";
+ public static final String PROPERTY_NAME_CHANGED = "nameChanged"; //$NON-NLS-1$
public ParameterRow(GridLayout parent, ComputeTaskParameterModel model, ParameterMetaData metaData, boolean checkbox) {
this.parent = parent;
@@ -185,7 +185,7 @@
labelIndex = 1;
}
- label = new Label(getName() + ":");
+ label = new Label(getName() + ":"); //$NON-NLS-1$
label.setImmediate(true);
label.setDescription(getDescription());
addWidget(label,labelIndex, 1);
Modified: unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/views/GenericApplicationView.java
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/views/GenericApplicationView.java 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/java/eu/unicore/portal/grid/ui/views/GenericApplicationView.java 2013-03-27 17:30:29 UTC (rev 16169)
@@ -41,6 +41,7 @@
import eu.unicore.portal.grid.core.jobs.JobParameterModel;
import eu.unicore.portal.grid.core.jobs.JobSubmissionEvent;
import eu.unicore.portal.grid.core.nodes.NodeFactory;
+import eu.unicore.portal.grid.ui.i18n.GridUII18N;
import eu.unicore.portal.grid.ui.jobs.generic.GenericApplicationInputPanel;
import eu.unicore.portal.ui.IconUtil;
import eu.unicore.portal.ui.PortalApplication;
@@ -88,7 +89,7 @@
model.set(this,ComputeTaskParameterModel.PROP_INPUT_DIR, inputDir);
} catch (Exception e)
{
- logger.warn("Unable to resolve job input directory "+e.getLocalizedMessage(), e);
+ logger.warn("Unable to resolve job input directory "+e.getLocalizedMessage(), e); //$NON-NLS-1$
}
panel = new GenericApplicationInputPanel(model);
@@ -99,11 +100,11 @@
// Add tabs for applications
setExecutionService(new GridExecutionService());
- addComponent(new Label(" ", ContentMode.HTML));
+ addComponent(new Label(" ", ContentMode.HTML)); //$NON-NLS-1$
// Add submit
submitButton = new Button();
- submitButton.setCaption("Submit");
+ submitButton.setCaption(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.submit")); //$NON-NLS-1$
submitButton.setIcon(IconUtil.getIconFromTheme(IconRepository.ICON_ID_SUBMIT));
submitButton.setSizeUndefined();
addComponent(submitButton);
@@ -154,9 +155,9 @@
}
});
- ll.addComponent(refresh, "bottom:3px; right:60px; z-index:10");
- ll.addComponent(submit, "bottom:3px; right:30px; z-index:10");
- ll.addComponent(toJobView, "bottom:3px; right:0px; z-index:10"); //rightmost
+ ll.addComponent(refresh, "bottom:3px; right:60px; z-index:10"); //$NON-NLS-1$
+ ll.addComponent(submit, "bottom:3px; right:30px; z-index:10"); //$NON-NLS-1$
+ ll.addComponent(toJobView, "bottom:3px; right:0px; z-index:10"); //rightmost //$NON-NLS-1$
addComponent(ll);
@@ -169,7 +170,7 @@
final JobDescription descr = new JobDescription();
model.setupJobDescription(descr);
- String msg = "submitting job..." ;
+ String msg = GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.submitting") ; //$NON-NLS-1$
PortalApplication app = PortalApplication.getCurrent();
String pathToJobsView = app.getViewManager().getPathToView(JobsView.class);
if(pathToJobsView != null)
@@ -177,7 +178,7 @@
try
{
URL linkToJobsView = app.getNavigationLinkTo(pathToJobsView);
- msg += " click <a href=\""+linkToJobsView.toString()+"\">here</a> to see the job list";
+ msg += GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.click_href")+linkToJobsView.toString()+GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.to_submit_href"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e)
{
logger.warn(e.getLocalizedMessage(), e);
@@ -220,7 +221,7 @@
private void startMonitoring(final JobMonitoringService monitorer)
{
- BackgroundWorker worker = new BackgroundWorker("monitoring job execution") {
+ BackgroundWorker worker = new BackgroundWorker(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.monitoring")) { //$NON-NLS-1$
@Override
protected void work(IProgressMonitor progress)
@@ -229,27 +230,27 @@
try
{
state = monitorer.updateExecutionState(null);
- Notification n = new Notification("Job finished",Type.TRAY_NOTIFICATION);
+ Notification n = new Notification(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.finished"),Type.TRAY_NOTIFICATION); //$NON-NLS-1$
n.setHtmlContentAllowed(true);
if(state.getCipher() == ExecutionStateConstants.STATE_SUCCESSFUL)
{
- n.setDescription("Your job has finished successfully.");
+ n.setDescription(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.fin_successfully")); //$NON-NLS-1$
n.show(Page.getCurrent());
}
else if(state.getCipher() == ExecutionStateConstants.STATE_FAILED)
{
- n.setDescription("Your job has failed.");
+ n.setDescription(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.failed")); //$NON-NLS-1$
n.show(Page.getCurrent());
}
else if(state.getCipher() == ExecutionStateConstants.STATE_ABORTED)
{
- n.setDescription("Your job has been aborted.");
+ n.setDescription(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.aborted")); //$NON-NLS-1$
n.show(Page.getCurrent());
}
else schedule(5000);
} catch (Exception e)
{
- logger.warn("Unable to retrieve execution status of job "+monitorer.getName(),e);
+ logger.warn(GlobalState.getMessage(GridUII18N.ID, "GenericApplicationView.unable_get_status")+monitorer.getName(),e); //$NON-NLS-1$
}
}
};
Modified: unicore-portal/trunk/grid.ui/src/main/resources/META-INF/portalPlugin.xml
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/resources/META-INF/portalPlugin.xml 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/grid.ui/src/main/resources/META-INF/portalPlugin.xml 2013-03-27 17:30:29 UTC (rev 16169)
@@ -3,7 +3,11 @@
<extensions>
-
+ <MessageSourceExtension>
+ <id>gridUI</id>
+ <location>eu.unicore.portal.grid.ui.i18n.GridUIMessages</location>
+ </MessageSourceExtension>
+
<commandExtension>
<id>eu.unicore.portal.grid.ui.commands.CreateGenericJobCommand</id>
<commandId>eu.unicore.portal.grid.ui.commands.CreateGenericJobCommand
Added: unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages.properties
===================================================================
--- unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages.properties (rev 0)
+++ unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages.properties 2013-03-27 17:30:29 UTC (rev 16169)
@@ -0,0 +1,51 @@
+AbstractGridViewer.refreshing=refreshing...
+
+#--------------Custom executable------------------
+CustomExecutablePanel.browse=Browse ...
+CustomExecutablePanel.inquiry=Please specify an executable file
+CustomExecutablePanel.local=Local file
+CustomExecutablePanel.remote=Path to executable at target system
+
+#--------------Submit Job Applications-----------------
+GenericApplicationInputPanel.add_row=Add an input file row
+GenericApplicationInputPanel.application=Application
+GenericApplicationInputPanel.arg=Command line arguments:
+GenericApplicationInputPanel.enter_arg=Enter additional command line arguments here.
+GenericApplicationInputPanel.error_property=Error processing property change.
+GenericApplicationInputPanel.exec_services=Available execution services
+GenericApplicationInputPanel.GUI_no_update=Unable to update application GUI
+GenericApplicationInputPanel.input=Input parameters
+GenericApplicationInputPanel.input_files=Input Files
+GenericApplicationInputPanel.job_name=Job name:
+GenericApplicationInputPanel.no_add_arg=The application does not accept additional arguments.
+GenericApplicationInputPanel.problem_GUI=Problem while creating generic application GUI:
+GenericApplicationInputPanel.question_delete=The selected files will be deleted from the workspace. Continue?
+GenericApplicationInputPanel.requirements=Resource requirements
+GenericApplicationInputPanel.resources=Resources
+GenericApplicationInputPanel.select_all=Select all
+GenericApplicationInputPanel.select_app=Select application:
+GenericApplicationInputPanel.select_ver=Select version:
+
+#--------------Submit Job Generic------------------
+GenericApplicationView.aborted=Your job has been aborted.
+GenericApplicationView.click_href=\ click <a href="
+GenericApplicationView.failed=Your job has failed.
+GenericApplicationView.fin_successfully=Your job has finished successfully.
+GenericApplicationView.finished=Job finished
+GenericApplicationView.monitoring=monitoring job execution
+GenericApplicationView.submit=Submit
+GenericApplicationView.submitting=submitting job...
+GenericApplicationView.to_submit_href=">here</a> to see the job list
+GenericApplicationView.unable_get_status=Unable to retrieve execution status of job
+
+#--------------Input File------------------
+InputFileRow.create=Create new file
+InputFileRow.enter_name=Enter file name:
+InputFileRow.filename_format_error=The filename contains special symbols. Only letters, number, dash and underscore are allowed.
+InputFileRow.upload=Upload
+
+#--------------Data Endpoint Viewer------------------
+U6DataEndpointViewer.available=Available Storages
+U6DataEndpointViewer.browsing=Browsing storage
+U6DataEndpointViewer.choose=Choose Storage
+U6DataEndpointViewer.FTP=File Transfer Protocol:
Property changes on: unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Property changes on: unicore-portal/trunk/grid.ui/src/main/resources/eu/unicore/portal/grid/ui/i18n/GridUIMessages_pl.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages.properties
===================================================================
--- unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages.properties 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages.properties 2013-03-27 17:30:29 UTC (rev 16169)
@@ -1,4 +1,4 @@
-#Error messages
+#-----------Error messages-----------
ETDUploadComponent.check_TD=Check for uploaded TD
ETDUploadComponent.invalid_credential=Your credential is incomplete or invalid: {0}
ETDUploadComponent.launch_delegation_uploader=Launch Delegation Uploader
@@ -20,28 +20,28 @@
VaadinEventQueueListener.warning=A warning occurred
-#Logout View
+#-----------Logout View-------------------
LogoutView.logout_msg=You have successfully logged out. <br> You will be automatically redirected to login page.
LogoutView.logging_out=logging out...
-#Main View
+#------------Main View------------------
MainView.welcome=Welcome
MainView.welcome_usr=Welcome, dear {0}
-#User Profile View
+#------------User Profile View----------------
UserProfileView.username=Username
UserProfileView.email=Email address
UserProfileView.organisation=Organisation
UserProfileView.profile=Your profile
UserProfileView.save=Save
-#Dialogs
+#-----------Dialogs---------------------
ConfirmationDialog.yes=Yes
ConfirmationDialog.no=No
InputDialog.cancel=Cancel
InputDialog.ok=Ok
-#
+#--------------------------------------------
PortalApplication.running_tasks=Running tasks
VaadinProgressMonitor.cancel=cancel
VaadinTriggerDownloadProvider.opening_file=opening file
@@ -49,6 +49,7 @@
VFSUtils.file_content=File content
DetailsPanel.details=Details
+#-----------Actions descriptions-------------
VFSAction.upload_file=Upload file
VFSAction.new_folder=New Folder
VFSAction.new_file=New File
@@ -78,7 +79,7 @@
VFSAction.deleting_resources=Deleting {0} remote resources ...
VFSAction.renaming_error=Unable to rename remote resource: {0}
VFSAction.list_dir_error=Could not list directory contents: {0}
-VFSAction.to_jobs=To jobs view
+VFSAction.to_jobs=Go to jobs view
VFSAction.submit=Submit job
VFSAction.refreshing=Refreshing ...
VFSAction.send_file=Send file ->
Modified: unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages_pl.properties
===================================================================
--- unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages_pl.properties 2013-03-27 15:54:03 UTC (rev 16168)
+++ unicore-portal/trunk/ui/src/main/resources/eu/unicore/portal/ui/i18n/UnicoreUIMessages_pl.properties 2013-03-27 17:30:29 UTC (rev 16169)
@@ -70,7 +70,7 @@
#VFSAction.deleting_resource=Deleting remote resource
#VFSAction.renaming_error=Unable to delete remote resource:
#VFSAction.list_dir_error=Could not list directory contents:
-#VFSAction.to_jobs=To jobs view
+#VFSAction.to_jobs=Go to jobs view
#VFSAction.submit=Submit job
#VFSAction.refreshing=Refreshing ...
#VFSAction.send_file=Send file ->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|