915: TDM - Support the Spanish language

Task-Url: https://support.d4science.org/issues/915

Updated Spanish Support

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-import-widget@119854 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-10-19 09:02:13 +00:00
parent 82e71a03c4
commit 34b1288053
5 changed files with 90 additions and 75 deletions

10
pom.xml
View File

@ -176,7 +176,15 @@
<build> <build>
<!-- Generate compiled stuff in the folder used for developing mode --> <!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory> <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -4,198 +4,196 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo * @author giancarlo email: <a
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> * href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public interface CSVImportWizardTDMessages extends Messages { public interface CSVImportWizardTDMessages extends Messages {
@DefaultMessage("CSV source selection") @DefaultMessage("CSV source selection")
String csvSourceSelection(); String csvSourceSelection();
@DefaultMessage("CSV Import File Upload") @DefaultMessage("CSV Import File Upload")
String csvImportFileUpload(); String csvImportFileUpload();
@DefaultMessage("CSV Import From Workspace") @DefaultMessage("CSV Import From Workspace")
String csvImportFromWorkspace(); String csvImportFromWorkspace();
@DefaultMessage("Workspace Selection") @DefaultMessage("Workspace Selection")
String workspaceSelection(); String workspaceSelection();
@DefaultMessage("CSV Configuration") @DefaultMessage("CSV Configuration")
String csvConfiguration(); String csvConfiguration();
@DefaultMessage("Error retrieving the file from the workspace!") @DefaultMessage("Error retrieving the file from the workspace!")
String errorRetrievingTheFileFromWorkspace(); String errorRetrievingTheFileFromWorkspace();
@DefaultMessage("The CSV file encoding") @DefaultMessage("The CSV file encoding")
String comboEncodingsToolTip(); String comboEncodingsToolTip();
@DefaultMessage("File encoding") @DefaultMessage("File encoding")
String comboEncodingsLabel(); String comboEncodingsLabel();
@DefaultMessage("The CSV file header") @DefaultMessage("The CSV file header")
String comboHeaderToolTip(); String comboHeaderToolTip();
@DefaultMessage("Header") @DefaultMessage("Header")
String comboHeaderLabel(); String comboHeaderLabel();
@DefaultMessage("Comma") @DefaultMessage("Comma")
String radioCommaDelimiterLabel(); String radioCommaDelimiterLabel();
@DefaultMessage("Space") @DefaultMessage("Space")
String radioSpaceDelimiterLabel(); String radioSpaceDelimiterLabel();
@DefaultMessage("Tab") @DefaultMessage("Tab")
String radioTabDelimiterLabel(); String radioTabDelimiterLabel();
@DefaultMessage("Semicolon") @DefaultMessage("Semicolon")
String radioSemicolonDelimiterLabel(); String radioSemicolonDelimiterLabel();
@DefaultMessage("Other delimiter") @DefaultMessage("Other delimiter")
String radioOtherDelimiterLabel(); String radioOtherDelimiterLabel();
@DefaultMessage("Insert a valid delimiter else comma is used!") @DefaultMessage("Insert a valid delimiter else comma is used!")
String insertAvalidDelimiterElseCommaIsUsed(); String insertAvalidDelimiterElseCommaIsUsed();
@DefaultMessage("The delimiter use to delimit the CSV fields") @DefaultMessage("The delimiter use to delimit the CSV fields")
String delimitersPanelToolTip(); String delimitersPanelToolTip();
@DefaultMessage("Delimiter") @DefaultMessage("Delimiter")
String delimitersPanelLabel(); String delimitersPanelLabel();
@DefaultMessage("The character used as comment line prefix") @DefaultMessage("The character used as comment line prefix")
String commentFieldToolTip(); String commentFieldToolTip();
@DefaultMessage("Comment") @DefaultMessage("Comment")
String commentFieldLabel(); String commentFieldLabel();
@DefaultMessage("An error occured checking the file") @DefaultMessage("An error occured checking the file")
String anErrorOccuredCheckingTheFileHead(); String anErrorOccuredCheckingTheFileHead();
@DefaultMessage("Please retry, if the error perstists change the CSV configuration!") @DefaultMessage("Please retry, if the error perstists change the CSV configuration!")
String anErrorOccuredCheckingTheFile(); String anErrorOccuredCheckingTheFile();
@DefaultMessage("Updating...") @DefaultMessage("Updating...")
String gridCSVSampleMask(); String gridCSVSampleMask();
@DefaultMessage("Error loading charset list") @DefaultMessage("Error loading charset list")
String errorLoadingCharsetListHead(); String errorLoadingCharsetListHead();
@DefaultMessage("Error loading charset list!") @DefaultMessage("Error loading charset list!")
String errorLoadingCharsetList(); String errorLoadingCharsetList();
@DefaultMessage("Tabular Resource Detail") @DefaultMessage("Tabular Resource Detail")
String tabularResourceDetail(); String tabularResourceDetail();
@DefaultMessage("Details") @DefaultMessage("Details")
String csvTableDetailCardFormHeader(); String csvTableDetailCardFormHeader();
@DefaultMessage("Information") @DefaultMessage("Information")
String fieldSetInformationHead(); String fieldSetInformationHead();
@DefaultMessage("Enter a name...") @DefaultMessage("Enter a name...")
String fieldNameEmptyText(); String fieldNameEmptyText();
@DefaultMessage("Name") @DefaultMessage("Name")
String fieldNameLabel(); String fieldNameLabel();
@DefaultMessage("Enter a description...") @DefaultMessage("Enter a description...")
String txtAreaDescriptionEmptyText(); String txtAreaDescriptionEmptyText();
@DefaultMessage("Description") @DefaultMessage("Description")
String txtAreaDescriptionLabel(); String txtAreaDescriptionLabel();
@DefaultMessage("Enter rights...") @DefaultMessage("Enter rights...")
String txtAreaRightsEmptyText(); String txtAreaRightsEmptyText();
@DefaultMessage("Rights") @DefaultMessage("Rights")
String txtAreaRightsLabel(); String txtAreaRightsLabel();
@DefaultMessage("Valid From") @DefaultMessage("Valid From")
String fieldValidFromLabel(); String fieldValidFromLabel();
@DefaultMessage("Valid Until To") @DefaultMessage("Valid Until To")
String fieldValidUntilToLabel(); String fieldValidUntilToLabel();
@DefaultMessage("Licence") @DefaultMessage("Licence")
String comboLicencesLabel(); String comboLicencesLabel();
@DefaultMessage("Error retrieving licences!") @DefaultMessage("Error retrieving licences!")
String errorRetrievingLicences(); String errorRetrievingLicences();
@DefaultMessage("Fill in name field!") @DefaultMessage("Fill in name field!")
String fillInNameField(); String fillInNameField();
@DefaultMessage("Fill in description field!") @DefaultMessage("Fill in description field!")
String fillInDescriptionField(); String fillInDescriptionField();
@DefaultMessage("Fill in rights field!") @DefaultMessage("Fill in rights field!")
String fillInRightsField(); String fillInRightsField();
@DefaultMessage("Valid From field is higher than Valid Until To field!") @DefaultMessage("Valid From field is higher than Valid Until To field!")
String validFromFieldIsHigherThanValidUntilToField(); String validFromFieldIsHigherThanValidUntilToField();
@DefaultMessage("Check configuration") @DefaultMessage("Check configuration")
String btnCheckConfigurationText(); String btnCheckConfigurationText();
@DefaultMessage("Skip invalid lines") @DefaultMessage("Skip invalid lines")
String chBoxSkipInvalidLabel(); String chBoxSkipInvalidLabel();
@DefaultMessage("Failed (more than {0} errors)") @DefaultMessage("Failed (more than {0} errors)")
String failedMoreThanNumberErrors(int errorlimit); String failedMoreThanNumberErrors(int errorlimit);
@DefaultMessage("Failed ({0} errors)") @DefaultMessage("Failed ({0} errors)")
String failedErrors(int size); String failedErrors(int size);
@DefaultMessage("Check the configuration before submit it") @DefaultMessage("Check the configuration before submit it")
String checkTheConfigurationBeforeSubmit(); String checkTheConfigurationBeforeSubmit();
@DefaultMessage("Checking the configuration...") @DefaultMessage("Checking the configuration...")
String checkingTheConfiguration(); String checkingTheConfiguration();
@DefaultMessage("Click to obtain more information") @DefaultMessage("Click to obtain more information")
String clickToObtainMoreInformation(); String clickToObtainMoreInformation();
@DefaultMessage("Failed") @DefaultMessage("Failed")
String failed(); String failed();
@DefaultMessage("Correct.") @DefaultMessage("Correct.")
String correct(); String correct();
@DefaultMessage("Close") @DefaultMessage("Close")
String btnCloseText(); String btnCloseText();
@DefaultMessage("CSV error details") @DefaultMessage("CSV error details")
String csvErrorWindowHead(); String csvErrorWindowHead();
@DefaultMessage("# line") @DefaultMessage("# line")
String gridErrorColumnNLine(); String gridErrorColumnNLine();
@DefaultMessage("Line") @DefaultMessage("Line")
String gridErrorCololumnLine(); String gridErrorCololumnLine();
@DefaultMessage("Error") @DefaultMessage("Error")
String gridErrorCololumnError(); String gridErrorCololumnError();
@DefaultMessage("Select the csv file to import") @DefaultMessage("Select the csv file to import")
String fUpFieldLabel(); String fUpFieldLabel();
@DefaultMessage("Upload") @DefaultMessage("Upload")
String btnUploadText(); String btnUploadText();
@DefaultMessage("Cancel") @DefaultMessage("Cancel")
String btnCancelText(); String btnCancelText();
@DefaultMessage("CSV file missing") @DefaultMessage("CSV file missing")
String csvFileMissingHead(); String csvFileMissingHead();
@DefaultMessage("Please specify a CSV file") @DefaultMessage("Please specify a CSV file")
String csvFileMissing(); String csvFileMissing();
@DefaultMessage("Error uploading the csv file") @DefaultMessage("Error uploading the csv file")
String errorUploadingCSVFileHead(); String errorUploadingCSVFileHead();
} }

View File

@ -54,8 +54,9 @@ public class FileUploadPanel extends FormPanel {
public FileUploadPanel(ResourceBundle res, final CSVUploadFileCard card, public FileUploadPanel(ResourceBundle res, final CSVUploadFileCard card,
final CSVImportSession importSession) { final CSVImportSession importSession) {
initMessages();
setId("LocalUploadPanel"); setId("LocalUploadPanel");
setLabelAlign(LabelAlign.TOP); setLabelAlign(LabelAlign.TOP);
getElement().setPadding(new Padding(5)); getElement().setPadding(new Padding(5));
@ -81,9 +82,10 @@ public class FileUploadPanel extends FormPanel {
fUpField.setName("uploadFormElement"); fUpField.setName("uploadFormElement");
fUpField.setWidth("100%"); fUpField.setWidth("100%");
content.add(new FieldLabel(fUpField, FieldLabel fUpFieldLabel = new FieldLabel(fUpField,
msgs.fUpFieldLabel()), msgs.fUpFieldLabel());
new VerticalLayoutData(-2, -1));
content.add(fUpFieldLabel, new VerticalLayoutData(-2, -1));
btnUpload = new TextButton(msgs.btnUploadText()); btnUpload = new TextButton(msgs.btnUploadText());
content.add(btnUpload, new VerticalLayoutData(-1, -1)); content.add(btnUpload, new VerticalLayoutData(-1, -1));

View File

@ -3,6 +3,7 @@
*/ */
package org.gcube.portlets.user.td.csvimportwidget.client; package org.gcube.portlets.user.td.csvimportwidget.client;
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard; import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession; import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVImportSession;
import org.gcube.portlets.user.td.gwtservice.shared.source.FileSource; import org.gcube.portlets.user.td.gwtservice.shared.source.FileSource;
@ -33,12 +34,14 @@ public class SourceSelectionCard extends WizardCard {
private final WorkspaceSource workspaceSource = WorkspaceSource.INSTANCE; private final WorkspaceSource workspaceSource = WorkspaceSource.INSTANCE;
private final CSVImportSession importSession; private final CSVImportSession importSession;
private CommonMessages msgsCommon;
public SourceSelectionCard(final CSVImportSession importSession) { public SourceSelectionCard(final CSVImportSession importSession) {
super(msgs.csvSourceSelection(), ""); super(msgs.csvSourceSelection(), "");
initMessages();
this.importSession = importSession; this.importSession = importSession;
// Default // Default
importSession.setSource(fileSource); importSession.setSource(fileSource);
@ -49,8 +52,8 @@ public class SourceSelectionCard extends WizardCard {
Radio radioFileSource = new Radio(); Radio radioFileSource = new Radio();
radioFileSource.setBoxLabel("<p style='display:inline-table;'><b>" radioFileSource.setBoxLabel("<p style='display:inline-table;'><b>"
+ fileSource.getName() + "</b><br>" + msgsCommon.fileSourceName() + "</b><br>"
+ fileSource.getDescription() + "</p>"); + msgsCommon.fileSourceDescription() + "</p>");
radioFileSource.setName(fileSource.getName()); radioFileSource.setName(fileSource.getName());
radioFileSource.setStylePrimaryName(res.wizardCSS() radioFileSource.setStylePrimaryName(res.wizardCSS()
.getImportSelectionSource()); .getImportSelectionSource());
@ -58,8 +61,8 @@ public class SourceSelectionCard extends WizardCard {
Radio radioWorkspaceSource = new Radio(); Radio radioWorkspaceSource = new Radio();
radioWorkspaceSource.setBoxLabel("<p style='display:inline-table;'><b>" radioWorkspaceSource.setBoxLabel("<p style='display:inline-table;'><b>"
+ workspaceSource.getName() + "</b><br>" + msgsCommon.workspaceSourceName() + "</b><br>"
+ workspaceSource.getDescription() + "</p>"); + msgsCommon.workspaceSourceDescription() + "</p>");
radioWorkspaceSource.setName(workspaceSource.getName()); radioWorkspaceSource.setName(workspaceSource.getName());
radioWorkspaceSource.setStylePrimaryName(res.wizardCSS() radioWorkspaceSource.setStylePrimaryName(res.wizardCSS()
.getImportSelectionSource()); .getImportSelectionSource());
@ -103,6 +106,10 @@ public class SourceSelectionCard extends WizardCard {
setCenterWidget(sourceSelectionPanel, new MarginData(0)); setCenterWidget(sourceSelectionPanel, new MarginData(0));
} }
protected void initMessages(){
msgsCommon = GWT.create(CommonMessages.class);
}
@Override @Override
public void setup() { public void setup() {

View File

@ -30,7 +30,7 @@ fieldNameEmptyText = Introducir nombre...
fieldNameLabel = Nombre fieldNameLabel = Nombre
txtAreaDescriptionEmptyText = Introducir descripción... txtAreaDescriptionEmptyText = Introducir descripción...
txtAreaDescriptionLabel = Descripción txtAreaDescriptionLabel = Descripción
txtAreaRightsEmptyText = Introducir licencia... txtAreaRightsEmptyText = Introducir derèchos...
txtAreaRightsLabel = Derèchos txtAreaRightsLabel = Derèchos
fieldValidFromLabel = Válida Desde fieldValidFromLabel = Válida Desde
fieldValidUntilToLabel = Válida Hasta fieldValidUntilToLabel = Válida Hasta