Updated i18n support

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113894 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-04-08 10:12:54 +00:00
parent 79f98caf03
commit 60b5f8f6b0
5 changed files with 225 additions and 30 deletions

View File

@ -11,6 +11,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NodeList;
import com.google.gwt.user.client.ui.FlexTable;
@ -67,6 +68,8 @@ public class CurationToolBar {
}
protected void build() {
CurationToolBarMessages msgs = GWT.create(CurationToolBarMessages.class);
toolBar = new ToolBar();
toolBar.setSpacing(1);
toolBar.setEnableOverflow(false);
@ -75,7 +78,7 @@ public class CurationToolBar {
ButtonGroup validationGroup = new ButtonGroup();
validationGroup.setId("Validation");
validationGroup.setStyleName("ribbon");
validationGroup.setHeadingText("Validation");
validationGroup.setHeadingText(msgs.validationGroupHeadingText());
validationGroup.enable();
toolBar.add(validationGroup);
@ -83,13 +86,13 @@ public class CurationToolBar {
validationGroup.add(validationLayout);
duplicateDetectionButton = new TextButton("Duplicate Detection",
duplicateDetectionButton = new TextButton(msgs.duplicateDetectionButton(),
TabularDataResources.INSTANCE.tableDuplicateRows32());
duplicateDetectionButton.disable();
duplicateDetectionButton.setScale(ButtonScale.LARGE);
duplicateDetectionButton.setIconAlign(IconAlign.TOP);
duplicateDetectionButton
.setToolTip("Detects duplicate lines in the table");
.setToolTip(msgs.duplicateDetectionButtonToolTip());
duplicateDetectionButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
duplicateDetectionButton.addSelectHandler(new SelectHandler() {
@ -110,19 +113,19 @@ public class CurationToolBar {
ButtonGroup structureGroup = new ButtonGroup();
structureGroup.setId("Structure");
structureGroup.setStyleName("ribbon");
structureGroup.setHeadingText("Structure");
structureGroup.setHeadingText(msgs.structureGroupHeadingText());
structureGroup.enable();
toolBar.add(structureGroup);
FlexTable structureLayout = new FlexTable();
structureGroup.add(structureLayout);
tableTypeButton = new TextButton("Table Type",
tableTypeButton = new TextButton(msgs.tableTypeButton(),
TabularDataResources.INSTANCE.tableType32());
tableTypeButton.setScale(ButtonScale.LARGE);
tableTypeButton.disable();
tableTypeButton.setIconAlign(IconAlign.TOP);
tableTypeButton.setToolTip("Change table type");
tableTypeButton.setToolTip(msgs.tableTypeButtonToolTip());
tableTypeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
tableTypeButton.addSelectHandler(new SelectHandler() {
@ -135,12 +138,12 @@ public class CurationToolBar {
structureLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
changePositionColumnButton = new TextButton("Position Column",
changePositionColumnButton = new TextButton(msgs.changePositionColumnButton(),
TabularDataResources.INSTANCE.columnReorder32());
changePositionColumnButton.disable();
changePositionColumnButton.setScale(ButtonScale.LARGE);
changePositionColumnButton.setIconAlign(IconAlign.TOP);
changePositionColumnButton.setToolTip("Change position column");
changePositionColumnButton.setToolTip(msgs.changePositionColumnButtonToolTip());
changePositionColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
changePositionColumnButton.addSelectHandler(new SelectHandler() {
@ -153,12 +156,12 @@ public class CurationToolBar {
structureLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
changeColumnLabelButton = new TextButton("Labels",
changeColumnLabelButton = new TextButton(msgs.changeColumnLabelButton(),
TabularDataResources.INSTANCE.columnLabel32());
changeColumnLabelButton.disable();
changeColumnLabelButton.setScale(ButtonScale.LARGE);
changeColumnLabelButton.setIconAlign(IconAlign.TOP);
changeColumnLabelButton.setToolTip("Change column labels");
changeColumnLabelButton.setToolTip(msgs.changeColumnLabelButtonToolTip());
changeColumnLabelButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
changeColumnLabelButton.addSelectHandler(new SelectHandler() {
@ -170,12 +173,12 @@ public class CurationToolBar {
structureLayout.setWidget(0, 2, changeColumnLabelButton);
structureLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
columnTypeButton = new TextButton("Column Type",
columnTypeButton = new TextButton(msgs.columnTypeButton(),
TabularDataResources.INSTANCE.columnType32());
columnTypeButton.disable();
columnTypeButton.setScale(ButtonScale.LARGE);
columnTypeButton.setIconAlign(IconAlign.TOP);
columnTypeButton.setToolTip("Change column type");
columnTypeButton.setToolTip(msgs.columnTypeButtonToolTip());
columnTypeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
columnTypeButton.addSelectHandler(new SelectHandler() {
@ -187,12 +190,12 @@ public class CurationToolBar {
structureLayout.setWidget(0, 3, columnTypeButton);
structureLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
addColumnButton = new TextButton("Add Column",
addColumnButton = new TextButton(msgs.addColumnButton(),
TabularDataResources.INSTANCE.columnAdd32());
addColumnButton.disable();
addColumnButton.setScale(ButtonScale.LARGE);
addColumnButton.setIconAlign(IconAlign.TOP);
addColumnButton.setToolTip("Add column");
addColumnButton.setToolTip(msgs.addColumnButtonToolTip());
addColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
addColumnButton.addSelectHandler(new SelectHandler() {
@ -204,12 +207,12 @@ public class CurationToolBar {
structureLayout.setWidget(0, 4, addColumnButton);
structureLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
deleteColumnButton = new TextButton("Delete Column",
deleteColumnButton = new TextButton(msgs.deleteColumnButton(),
TabularDataResources.INSTANCE.columnDelete32());
deleteColumnButton.disable();
deleteColumnButton.setScale(ButtonScale.LARGE);
deleteColumnButton.setIconAlign(IconAlign.TOP);
deleteColumnButton.setToolTip("Delete column");
deleteColumnButton.setToolTip(msgs.deleteColumnButtonToolTip());
deleteColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
deleteColumnButton.addSelectHandler(new SelectHandler() {
@ -222,12 +225,12 @@ public class CurationToolBar {
structureLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
//
splitColumnButton = new TextButton("Split Column",
splitColumnButton = new TextButton(msgs.splitColumnButton(),
TabularDataResources.INSTANCE.columnSplit32());
splitColumnButton.disable();
splitColumnButton.setScale(ButtonScale.LARGE);
splitColumnButton.setIconAlign(IconAlign.TOP);
splitColumnButton.setToolTip("Split Column");
splitColumnButton.setToolTip(msgs.splitColumnButtonToolTip());
splitColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
splitColumnButton.addSelectHandler(new SelectHandler() {
@ -239,12 +242,12 @@ public class CurationToolBar {
structureLayout.setWidget(0, 6, splitColumnButton);
structureLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
mergeColumnButton = new TextButton("Merge Column",
mergeColumnButton = new TextButton(msgs.mergeColumnButton(),
TabularDataResources.INSTANCE.columnMerge32());
mergeColumnButton.disable();
mergeColumnButton.setScale(ButtonScale.LARGE);
mergeColumnButton.setIconAlign(IconAlign.TOP);
mergeColumnButton.setToolTip("Merge Column");
mergeColumnButton.setToolTip(msgs.mergeColumnButtonToolTip());
mergeColumnButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
mergeColumnButton.addSelectHandler(new SelectHandler() {
@ -257,12 +260,12 @@ public class CurationToolBar {
structureLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
//
denormalizeButton = new TextButton("Denormalize",
denormalizeButton = new TextButton(msgs.denormalizeButton(),
TabularDataResources.INSTANCE.tableDenormalize32());
denormalizeButton.disable();
denormalizeButton.setScale(ButtonScale.LARGE);
denormalizeButton.setIconAlign(IconAlign.TOP);
denormalizeButton.setToolTip("Denormalize table");
denormalizeButton.setToolTip(msgs.denormalizeButtonToolTip());
denormalizeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
denormalizeButton.addSelectHandler(new SelectHandler() {
@ -274,12 +277,12 @@ public class CurationToolBar {
structureLayout.setWidget(0, 8, denormalizeButton);
structureLayout.getFlexCellFormatter().setRowSpan(0, 8, 2);
normalizeButton = new TextButton("Normalize",
normalizeButton = new TextButton(msgs.normalizeButton(),
TabularDataResources.INSTANCE.tableNormalize32());
normalizeButton.disable();
normalizeButton.setScale(ButtonScale.LARGE);
normalizeButton.setIconAlign(IconAlign.TOP);
normalizeButton.setToolTip("Normalize");
normalizeButton.setToolTip(msgs.normalizeButtonToolTip());
normalizeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
normalizeButton.addSelectHandler(new SelectHandler() {
@ -297,19 +300,21 @@ public class CurationToolBar {
ButtonGroup helperGroup = new ButtonGroup();
helperGroup.setId("Helper");
helperGroup.setStyleName("ribbon");
helperGroup.setHeadingText("Helper");
helperGroup.setHeadingText(msgs.helperGroupHeadingText());
helperGroup.enable();
toolBar.add(helperGroup);
FlexTable helperLayout = new FlexTable();
helperGroup.add(helperLayout);
extractCodelistButton = new TextButton("Extract Codelist",
extractCodelistButton = new TextButton(msgs.extractCodelistButton(),
TabularDataResources.INSTANCE.codelist32());
extractCodelistButton.disable();
extractCodelistButton.setScale(ButtonScale.LARGE);
extractCodelistButton.setIconAlign(IconAlign.TOP);
extractCodelistButton.setToolTip("Extract Codelist");
extractCodelistButton.setToolTip(msgs.extractCodelistButtonToolTip());
extractCodelistButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
extractCodelistButton.addSelectHandler(new SelectHandler() {
@ -321,12 +326,13 @@ public class CurationToolBar {
helperLayout.setWidget(0, 0, extractCodelistButton);
helperLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
codelistMappingButton = new TextButton("Map Import",
codelistMappingButton = new TextButton(msgs.codelistMappingButton(),
TabularDataResources.INSTANCE.codelistMapping32());
codelistMappingButton.disable();
codelistMappingButton.setScale(ButtonScale.LARGE);
codelistMappingButton.setIconAlign(IconAlign.TOP);
codelistMappingButton.setToolTip("Codelist Map Import");
codelistMappingButton.setToolTip(msgs.codelistMappingButtonToolTip());
codelistMappingButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
codelistMappingButton.addSelectHandler(new SelectHandler() {

View File

@ -0,0 +1,102 @@
package org.gcube.portlets.user.td.client.ribbon;
import com.google.gwt.i18n.client.Messages;
/**
*
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public interface CurationToolBarMessages extends Messages {
@DefaultMessage("Validation")
String validationGroupHeadingText();
@DefaultMessage("Duplicate Detection")
String duplicateDetectionButton();
@DefaultMessage("Detects duplicate lines in the table")
String duplicateDetectionButtonToolTip();
@DefaultMessage("Structure")
String structureGroupHeadingText();
@DefaultMessage("Table Type")
String tableTypeButton();
@DefaultMessage("Change table type")
String tableTypeButtonToolTip();
@DefaultMessage("Position Column")
String changePositionColumnButton();
@DefaultMessage("Change position column")
String changePositionColumnButtonToolTip();
@DefaultMessage("Labels")
String changeColumnLabelButton();
@DefaultMessage("Change column labels")
String changeColumnLabelButtonToolTip();
@DefaultMessage("Column Type")
String columnTypeButton();
@DefaultMessage("Change column type")
String columnTypeButtonToolTip();
@DefaultMessage("Add Column")
String addColumnButton();
@DefaultMessage("Add Column")
String addColumnButtonToolTip();
@DefaultMessage("Delete column")
String deleteColumnButton();
@DefaultMessage("Delete column")
String deleteColumnButtonToolTip();
@DefaultMessage("Split Column")
String splitColumnButton();
@DefaultMessage("Split Column")
String splitColumnButtonToolTip();
@DefaultMessage("Merge Column")
String mergeColumnButton();
@DefaultMessage("Merge Column")
String mergeColumnButtonToolTip();
@DefaultMessage("Denormalize")
String denormalizeButton();
@DefaultMessage("Denormalize")
String denormalizeButtonToolTip();
@DefaultMessage("Normalize")
String normalizeButton();
@DefaultMessage("Normalize")
String normalizeButtonToolTip();
@DefaultMessage("Helper")
String helperGroupHeadingText();
@DefaultMessage("Extract Codelist")
String extractCodelistButton();
@DefaultMessage("Extract Codelist")
String extractCodelistButtonToolTip();
@DefaultMessage("Map Import")
String codelistMappingButton();
@DefaultMessage("Codelist Map Import")
String codelistMappingButtonToolTip();
}

View File

@ -0,0 +1,29 @@
validationGroupHeadingText = Validation
duplicateDetectionButton = Duplicate Detection
duplicateDetectionButtonToolTip = Duplicate Detection
structureGroupHeadingText = Structure
tableTypeButton = Table Type
tableTypeButtonToolTip = Change table type
changePositionColumnButton = Position Column
changePositionColumnButtonToolTip = Change position column
changeColumnLabelButton = Labels
changeColumnLabelButtonToolTip = Change column labels
columnTypeButton = Column Type
columnTypeButtonToolTip = Change column type
addColumnButton = Add Column
addColumnButtonToolTip = Add Column
deleteColumnButton = Delete Column
deleteColumnButtonToolTip = Delete Column
splitColumnButton = Split Column
splitColumnButtonToolTip = Split Column
mergeColumnButton = Merge Column
mergeColumnButtonToolTip = Merge Column
denormalizeButton = Denormalize
denormalizeButtonToolTip = Denormalize
normalizeButton = Normalize
normalizeButtonToolTip = Normalize
helperGroupHeadingText = Helper
extractCodelistButton = Extract Codelist
extractCodelistButtonToolTip = Extract Codelist
codelistMappingButton = Map Import
codelistMappingButtonToolTip = Codelist Map Import

View File

@ -0,0 +1,29 @@
validationGroupHeadingText = Validación
duplicateDetectionButton = Detección Duplicados
duplicateDetectionButtonToolTip = Detección de duplicados
structureGroupHeadingText = Estructura
tableTypeButton = Tipo Tabla
tableTypeButtonToolTip = Cambio tipo de tabla
changePositionColumnButton = Posición Columna
changePositionColumnButtonToolTip = Cambio posición columna
changeColumnLabelButton = Etiquetas
changeColumnLabelButtonToolTip = Cambio etiquetas
columnTypeButton = Tipo Columna
columnTypeButtonToolTip = Cambio tipo de columna
addColumnButton = Añadir Columna
addColumnButtonToolTip = Añadir la columna
deleteColumnButton = Eliminar Columna
deleteColumnButtonToolTip = Eliminar columna
splitColumnButton = Columna Dividida
splitColumnButtonToolTip = Columna Dividida
mergeColumnButton = Fusionar Columna
mergeColumnButtonToolTip = Fusionar la columna
denormalizeButton = Desnormalizar
denormalizeButtonToolTip = Desnormalizar
normalizeButton = Normalizar
normalizeButtonToolTip = Normalizar
helperGroupHeadingText = Asistente
extractCodelistButton = Extracto Codelist
extractCodelistButtonToolTip = Extracto Codelist
codelistMappingButton = Mapa Importación
codelistMappingButtonToolTip = Codelist mapa importación

View File

@ -0,0 +1,29 @@
validationGroupHeadingText = Validazioni
duplicateDetectionButton = Rilevazione Duplicati
duplicateDetectionButtonToolTip = Rilevazioni Duplicati
structureGroupHeadingText = Struttura
tableTypeButton = Tipo Tabella
tableTypeButtonToolTip = Cambia il tipo di tabella
changePositionColumnButton = Posizione Colonna
changePositionColumnButtonToolTip = Cambia posizione alle colonne
changeColumnLabelButton = Etichette
changeColumnLabelButtonToolTip = Cambia etichette alle colonne
columnTypeButton = Tipo Colonna
columnTypeButtonToolTip = Cambia il tipo di colonna
addColumnButton = Inserisci Colonna
addColumnButtonToolTip = Inserisce colonna
deleteColumnButton = Elimina colonna
deleteColumnButtonToolTip = Elimina colonna
splitColumnButton = Dividi Colonna
splitColumnButtonToolTip = Dividi colonna
mergeColumnButton = Unisci colonne
mergeColumnButtonToolTip = Unisci colonne
denormalizeButton = Denormalizza
denormalizeButtonToolTip = Denormalizza
normalizeButton = Normalizza
normalizeButtonToolTip = Normalizza
helperGroupHeadingText = Assistente
extractCodelistButton = Estrai Codelist
extractCodelistButtonToolTip = Estrai Codelist
codelistMappingButton = Importa Mappa
codelistMappingButtonToolTip = Inporta una mappa per Codelist