Added i18n support for internationalization

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@113877 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-04-01 19:03:35 +00:00
parent 181981a669
commit e626af275c
22 changed files with 558 additions and 97 deletions

View File

@ -11,6 +11,7 @@ import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.i18n.client.LocaleInfo;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.core.client.util.Margins;
@ -73,6 +74,15 @@ public class TabularDataPortlet implements EntryPoint {
}
protected void loadMainPanel() {
String[] locales=LocaleInfo.getAvailableLocaleNames();
for(String locale:locales){
Log.debug("Locale avaible:"+locale);
}
LocaleInfo currentLocale = LocaleInfo.getCurrentLocale();
Log.debug("Current Locale:"+currentLocale.getLocaleName());
TabularDataController controller = new TabularDataController();
EventBus eventBus = controller.getEventBus();

View File

@ -0,0 +1,17 @@
package org.gcube.portlets.user.td.client.i18n;
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 TDMMessages extends Messages {
@Key("newRuleTitle")
@DefaultMessage("New Rule")
String newRuleTitle();
}

View File

@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
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;
@ -26,8 +27,8 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
/**
*
* @author giancarlo
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* @author giancarlo email: <a
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
*
*/
public class AnalyseToolBar {
@ -35,13 +36,11 @@ public class AnalyseToolBar {
private EventBus eventBus;
private ToolBar toolBar;
private TextButton chartCreateButton;
private TextButton statisticalButton;
private TextButton rstudioButton;
private TextButton gisButton;
//private TextButton spreadButton;
public AnalyseToolBar(EventBus eventBus) {
@ -54,6 +53,8 @@ public class AnalyseToolBar {
}
protected void build() {
AnalyseToolBarMessages msgs = GWT.create(AnalyseToolBarMessages.class);
toolBar = new ToolBar();
toolBar.setSpacing(1);
toolBar.setEnableOverflow(false);
@ -62,52 +63,49 @@ public class AnalyseToolBar {
ButtonGroup chartsGroup = new ButtonGroup();
chartsGroup.setId("Charts");
chartsGroup.setStyleName("ribbon");
chartsGroup.setHeadingText("Charts");
chartsGroup.setHeadingText(msgs.chartGroupHeadingText());
chartsGroup.enable();
toolBar.add(chartsGroup);
FlexTable basicLayout = new FlexTable();
chartsGroup.add(basicLayout);
chartCreateButton = new TextButton("Create Chart",
chartCreateButton = new TextButton(msgs.chartCreateButton(),
TabularDataResources.INSTANCE.chartBar32());
chartCreateButton.disable();
chartCreateButton.setScale(ButtonScale.LARGE);
chartCreateButton.setIconAlign(IconAlign.TOP);
chartCreateButton.setToolTip("Create chart");
chartCreateButton.setToolTip(msgs.chartCreateButtonToolTip());
chartCreateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
chartCreateButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
eventBus.fireEvent(new
RibbonEvent(RibbonType.CHART_CREATE));
eventBus.fireEvent(new RibbonEvent(RibbonType.CHART_CREATE));
}
});
basicLayout.setWidget(0, 0, chartCreateButton);
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
cleanCells(basicLayout.getElement());
// Process
ButtonGroup processGroup = new ButtonGroup();
processGroup.setId("Process");
processGroup.setStyleName("ribbon");
processGroup.setHeadingText("Process");
processGroup.setHeadingText(msgs.processGroupHeadingText());
processGroup.enable();
toolBar.add(processGroup);
FlexTable processLayout = new FlexTable();
processGroup.add(processLayout);
rstudioButton = new TextButton("R Studio",
rstudioButton = new TextButton(msgs.rstudioButton(),
TabularDataResources.INSTANCE.rstudio32());
rstudioButton.disable();
rstudioButton.setScale(ButtonScale.LARGE);
rstudioButton.setIconAlign(IconAlign.TOP);
rstudioButton.setToolTip("R Studio");
rstudioButton.setToolTip(msgs.rstudioButtonToolTip());
rstudioButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
rstudioButton.addSelectHandler(new SelectHandler() {
@ -119,18 +117,17 @@ public class AnalyseToolBar {
processLayout.setWidget(0, 0, rstudioButton);
processLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
statisticalButton = new TextButton("Statistical",
statisticalButton = new TextButton(msgs.statisticalButton(),
TabularDataResources.INSTANCE.statistical32());
statisticalButton.disable();
statisticalButton.setScale(ButtonScale.LARGE);
statisticalButton.setIconAlign(IconAlign.TOP);
statisticalButton.setToolTip("Statistical");
statisticalButton.setToolTip(msgs.statisticalButtonToolTip());
statisticalButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
statisticalButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
eventBus.fireEvent(new
RibbonEvent(RibbonType.STATISTICAL));
eventBus.fireEvent(new RibbonEvent(RibbonType.STATISTICAL));
}
});
@ -138,23 +135,19 @@ public class AnalyseToolBar {
processLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
/*
spreadButton = new TextButton("SPREAD",
TabularDataResources.INSTANCE.cog32());
spreadButton.disable();
spreadButton.setScale(ButtonScale.LARGE);
spreadButton.setIconAlign(IconAlign.TOP);
spreadButton.setToolTip("SPREAD");
spreadButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
spreadButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
// eventBus.fireEvent(new
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
}
});
processLayout.setWidget(0, 2, spreadButton);
processLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
* spreadButton = new TextButton("SPREAD",
* TabularDataResources.INSTANCE.cog32()); spreadButton.disable();
* spreadButton.setScale(ButtonScale.LARGE);
* spreadButton.setIconAlign(IconAlign.TOP);
* spreadButton.setToolTip("SPREAD");
* spreadButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
* spreadButton.addSelectHandler(new SelectHandler() {
*
* public void onSelect(SelectEvent event) { // eventBus.fireEvent(new
* // RibbonEvent(RibbonType.TABLEAGGREAGETE)); } });
*
* processLayout.setWidget(0, 2, spreadButton);
* processLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
*/
cleanCells(processLayout.getElement());
@ -163,17 +156,17 @@ public class AnalyseToolBar {
ButtonGroup gisGroup = new ButtonGroup();
gisGroup.setId("GIS");
gisGroup.setStyleName("ribbon");
gisGroup.setHeadingText("GIS");
gisGroup.setHeadingText(msgs.gisGroupHeadingText());
toolBar.add(gisGroup);
FlexTable gisLayout = new FlexTable();
gisGroup.add(gisLayout);
gisButton = new TextButton("Create Map",
gisButton = new TextButton(msgs.gisButton(),
TabularDataResources.INSTANCE.gis32());
gisButton.setScale(ButtonScale.LARGE);
gisButton.setIconAlign(IconAlign.TOP);
gisButton.setToolTip("Create Map");
gisButton.setToolTip(msgs.gisButtonToolTip());
gisButton.disable();
gisButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
gisButton.addSelectHandler(new SelectHandler() {
@ -194,8 +187,7 @@ public class AnalyseToolBar {
setUI(event);
}
}
);
});
}

View File

@ -0,0 +1,49 @@
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 AnalyseToolBarMessages extends Messages {
//
@DefaultMessage("Charts")
String chartGroupHeadingText();
@DefaultMessage("Create Charts")
String chartCreateButton();
@DefaultMessage("Create Charts")
String chartCreateButtonToolTip();
//
@DefaultMessage("Process")
String processGroupHeadingText();
@DefaultMessage("R Studio")
String rstudioButton();
@DefaultMessage("R Studio")
String rstudioButtonToolTip();
@DefaultMessage("Statistical")
String statisticalButton();
@DefaultMessage("Statistical")
String statisticalButtonToolTip();
//
@DefaultMessage("GIS")
String gisGroupHeadingText();
@DefaultMessage("Create Map")
String gisButton();
@DefaultMessage("Create Map")
String gisButtonToolTip();
}

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;
@ -39,6 +40,7 @@ public class FileToolBar {
private TextButton openButton;
private TextButton cloneButton;
private TextButton closeButton;
private TextButton shareButton;
private TextButton deleteButton;
private TextButton propertiesButton;
@ -51,8 +53,6 @@ public class FileToolBar {
private TextButton exportCSVButton;
private TextButton exportJSONButton;
//Share
private TextButton shareButton;
private TextButton timelineButton;
private TextButton backgroundButton;
@ -75,6 +75,8 @@ public class FileToolBar {
}
protected void build() {
FileToolBarMessages msgs = GWT.create(FileToolBarMessages.class);
toolBar = new ToolBar();
toolBar.setSpacing(1);
toolBar.setEnableOverflow(false);
@ -83,20 +85,20 @@ public class FileToolBar {
ButtonGroup fileGroup = new ButtonGroup();
fileGroup.setId("Tabular Resource");
fileGroup.setStyleName("ribbon");
fileGroup.setHeadingText("Tabular Resource");
fileGroup.setHeadingText(msgs.fileGroupHeadingText());
toolBar.add(fileGroup);
FlexTable fileLayout = new FlexTable();
fileLayout.setStyleName("ribbon");
fileGroup.add(fileLayout);
openButton = new TextButton("Open",
openButton = new TextButton(msgs.openButton(),
TabularDataResources.INSTANCE.open32());
openButton.setId("openButton");
openButton.setScale(ButtonScale.LARGE);
openButton.setIconAlign(IconAlign.TOP);
openButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
openButton.setToolTip("Open Tabular Resource");
openButton.setToolTip(msgs.openButtonToolTip());
openButton.addSelectHandler(new SelectHandler() {
@ -111,14 +113,14 @@ public class FileToolBar {
closeButton = new TextButton("Close All",
closeButton = new TextButton(msgs.closeButton(),
TabularDataResources.INSTANCE.close32());
closeButton.disable();
closeButton.setId("closeButton");
closeButton.setScale(ButtonScale.LARGE);
closeButton.setIconAlign(IconAlign.TOP);
closeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
closeButton.setToolTip("Close All Tabular Resources");
closeButton.setToolTip(msgs.closeButtonToolTip());
closeButton.addSelectHandler(new SelectHandler() {
@ -131,14 +133,14 @@ public class FileToolBar {
fileLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
cloneButton = new TextButton("Clone",
cloneButton = new TextButton(msgs.cloneButton(),
TabularDataResources.INSTANCE.clone32());
cloneButton.disable();
cloneButton.setId("cloneButton");
cloneButton.setScale(ButtonScale.LARGE);
cloneButton.setIconAlign(IconAlign.TOP);
cloneButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
cloneButton.setToolTip("Clone Tabular Resource");
cloneButton.setToolTip(msgs.cloneButtonToolTip());
cloneButton.addSelectHandler(new SelectHandler() {
@ -151,14 +153,14 @@ public class FileToolBar {
fileLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
shareButton = new TextButton("Share",
shareButton = new TextButton(msgs.shareButton(),
TabularDataResources.INSTANCE.share32());
shareButton.disable();
shareButton.setId("shareButton");
shareButton.setScale(ButtonScale.LARGE);
shareButton.setIconAlign(IconAlign.TOP);
shareButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
shareButton.setToolTip("Share Tabular Resource");
shareButton.setToolTip(msgs.shareButtonToolTip());
shareButton.addSelectHandler(new SelectHandler() {
@ -171,11 +173,11 @@ public class FileToolBar {
fileLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
deleteButton = new TextButton("Delete",
deleteButton = new TextButton(msgs.deleteButton(),
TabularDataResources.INSTANCE.delete());
deleteButton.disable();
deleteButton.setId("closeButton");
deleteButton.setToolTip("Delete Tabular Resource");
deleteButton.setToolTip(msgs.deleteButtonToolTip());
fileLayout.setWidget(0, 4, deleteButton);
deleteButton.addSelectHandler(new SelectHandler() {
@ -185,11 +187,11 @@ public class FileToolBar {
}
});
propertiesButton = new TextButton("Properties",
propertiesButton = new TextButton(msgs.propertiesButton(),
TabularDataResources.INSTANCE.properties());
propertiesButton.disable();
propertiesButton.setId("propertiesButton");
propertiesButton.setToolTip("Show properties");
propertiesButton.setToolTip(msgs.propertiesButtonToolTip());
fileLayout.setWidget(1, 4, propertiesButton);
propertiesButton.addSelectHandler(new SelectHandler() {
@ -205,17 +207,17 @@ public class FileToolBar {
ButtonGroup importGroup = new ButtonGroup();
importGroup.setId("Import");
importGroup.setStyleName("ribbon");
importGroup.setHeadingText("Import");
importGroup.setHeadingText(msgs.importGroupHeadingText());
toolBar.add(importGroup);
FlexTable importLayout = new FlexTable();
importGroup.add(importLayout);
importSDMXButton = new TextButton("SDMX",
importSDMXButton = new TextButton(msgs.importSDMXButton(),
TabularDataResources.INSTANCE.sdmx32());
importSDMXButton.setScale(ButtonScale.LARGE);
importSDMXButton.setIconAlign(IconAlign.TOP);
importSDMXButton.setToolTip("Import table from SDMX source");
importSDMXButton.setToolTip(msgs.importSDMXButtonToolTip());
importSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
importSDMXButton.addSelectHandler(new SelectHandler() {
@ -227,11 +229,11 @@ public class FileToolBar {
importLayout.setWidget(0, 0, importSDMXButton);
importLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
importCSVButton = new TextButton("CSV",
importCSVButton = new TextButton(msgs.importCSVButton(),
TabularDataResources.INSTANCE.csv32());
importCSVButton.setScale(ButtonScale.LARGE);
importCSVButton.setIconAlign(IconAlign.TOP);
importCSVButton.setToolTip("Import table from CSV source");
importCSVButton.setToolTip(msgs.importCSVButtonToolTip());
importCSVButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
importCSVButton.addSelectHandler(new SelectHandler() {
@ -262,17 +264,17 @@ public class FileToolBar {
ButtonGroup exportGroup = new ButtonGroup();
exportGroup.setId("Export");
exportGroup.setStyleName("ribbon");
exportGroup.setHeadingText("Export");
exportGroup.setHeadingText(msgs.exportGroupHeadingText());
// exportGroup.disable();
toolBar.add(exportGroup);
FlexTable exportLayout = new FlexTable();
exportGroup.add(exportLayout);
exportSDMXButton = new TextButton("SDMX",
exportSDMXButton = new TextButton(msgs.exportSDMXButton(),
TabularDataResources.INSTANCE.sdmx32());
exportSDMXButton.disable();
exportSDMXButton.setToolTip("Export SDMX document");
exportSDMXButton.setToolTip(msgs.exportSDMXButtonToolTip());
exportSDMXButton.setScale(ButtonScale.LARGE);
exportSDMXButton.setIconAlign(IconAlign.TOP);
exportSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
@ -286,10 +288,10 @@ public class FileToolBar {
exportLayout.setWidget(0, 0, exportSDMXButton);
exportLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
exportCSVButton = new TextButton("CSV",
exportCSVButton = new TextButton(msgs.exportCSVButton(),
TabularDataResources.INSTANCE.csv());
exportCSVButton.disable();
exportCSVButton.setToolTip("Export CSV document");
exportCSVButton.setToolTip(msgs.exportCSVButtonToolTip());
exportCSVButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -298,10 +300,10 @@ public class FileToolBar {
});
exportLayout.setWidget(0, 2, exportCSVButton);
exportJSONButton = new TextButton("JSON",
exportJSONButton = new TextButton(msgs.exportJSONButton(),
TabularDataResources.INSTANCE.json());
exportJSONButton.disable();
exportJSONButton.setToolTip("Export JSON document");
exportJSONButton.setToolTip(msgs.exportJSONButtonToolTip());
exportJSONButton.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) {
@ -316,16 +318,16 @@ public class FileToolBar {
ButtonGroup taskGroup = new ButtonGroup();
taskGroup.setId("TasksStatus");
taskGroup.setStyleName("ribbon");
taskGroup.setHeadingText("Tasks");
taskGroup.setHeadingText(msgs.taskGroupHeadingText());
toolBar.add(taskGroup);
FlexTable taskLayout = new FlexTable();
taskGroup.add(taskLayout);
timelineButton = new TextButton("Timeline",
timelineButton = new TextButton(msgs.timelineButton(),
TabularDataResources.INSTANCE.timeline32());
timelineButton.disable();
timelineButton.setToolTip("Timeline");
timelineButton.setToolTip(msgs.timelineButtonToolTip());
timelineButton.setScale(ButtonScale.LARGE);
timelineButton.setIconAlign(IconAlign.TOP);
timelineButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
@ -339,10 +341,10 @@ public class FileToolBar {
taskLayout.setWidget(0, 0, timelineButton);
taskLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
backgroundButton = new TextButton("Background",
backgroundButton = new TextButton(msgs.backgroundButton(),
TabularDataResources.INSTANCE.basketBackground32());
backgroundButton.enable();
backgroundButton.setToolTip("Tasks in background");
backgroundButton.setToolTip(msgs.backgroundButtonToolTip());
backgroundButton.setScale(ButtonScale.LARGE);
backgroundButton.setIconAlign(IconAlign.TOP);
backgroundButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
@ -362,19 +364,19 @@ public class FileToolBar {
ButtonGroup historyGroup = new ButtonGroup();
historyGroup.setId("History");
historyGroup.setStyleName("ribbon");
historyGroup.setHeadingText("History");
historyGroup.setHeadingText(msgs.historyGroupHeadingText());
historyGroup.enable();
toolBar.add(historyGroup);
FlexTable historyLayout = new FlexTable();
historyGroup.add(historyLayout);
historyButton = new TextButton("History",
historyButton = new TextButton(msgs.historyButton(),
TabularDataResources.INSTANCE.history32());
historyButton.disable();
historyButton.setScale(ButtonScale.LARGE);
historyButton.setIconAlign(IconAlign.TOP);
historyButton.setToolTip("Show history");
historyButton.setToolTip(msgs.historyButtonToolTip());
historyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
historyButton.addSelectHandler(new SelectHandler() {
@ -386,12 +388,12 @@ public class FileToolBar {
historyLayout.setWidget(0, 0, historyButton);
historyLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
undoButton = new TextButton("Undo",
undoButton = new TextButton(msgs.undoButton(),
TabularDataResources.INSTANCE.discard32());
undoButton.disable();
undoButton.setScale(ButtonScale.LARGE);
undoButton.setIconAlign(IconAlign.TOP);
undoButton.setToolTip("Discard last operation");
undoButton.setToolTip(msgs.undoButtonToolTip());
undoButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
undoButton.addSelectHandler(new SelectHandler() {
@ -408,16 +410,16 @@ public class FileToolBar {
ButtonGroup helpGroup = new ButtonGroup();
helpGroup.setId("Help");
helpGroup.setStyleName("ribbon");
helpGroup.setHeadingText("Help");
helpGroup.setHeadingText(msgs.helpGroupHeadingText());
toolBar.add(helpGroup);
FlexTable helpLayout = new FlexTable();
helpGroup.add(helpLayout);
helpButton = new TextButton("Help",
helpButton = new TextButton(msgs.helpButton(),
TabularDataResources.INSTANCE.help32());
helpButton.enable();
helpButton.setToolTip("Help");
helpButton.setToolTip(msgs.helpButtonToolTip());
helpButton.setScale(ButtonScale.LARGE);
helpButton.setIconAlign(IconAlign.TOP);
helpButton.setArrowAlign(ButtonArrowAlign.BOTTOM);

View File

@ -0,0 +1,145 @@
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 FileToolBarMessages extends Messages {
//
@DefaultMessage("Tabular Resource")
String fileGroupHeadingText();
@DefaultMessage("Open")
String openButton();
@DefaultMessage("Open Tabular Resource")
String openButtonToolTip();
@DefaultMessage("Close All")
String closeButton();
@DefaultMessage("Close All Tabular Resources")
String closeButtonToolTip();
@DefaultMessage("Clone")
String cloneButton();
@DefaultMessage("Clone Tabular Resource")
String cloneButtonToolTip();
@DefaultMessage("Share")
String shareButton();
@DefaultMessage("Share Tabular Resource")
String shareButtonToolTip();
@DefaultMessage("Delete")
String deleteButton();
@DefaultMessage("Delete Tabular Resource")
String deleteButtonToolTip();
@DefaultMessage("Properties")
String propertiesButton();
@DefaultMessage("Show properties")
String propertiesButtonToolTip();
//
@DefaultMessage("Import")
String importGroupHeadingText();
@DefaultMessage("SDMX")
String importSDMXButton();
@DefaultMessage("Import table from SDMX source")
String importSDMXButtonToolTip();
@DefaultMessage("CSV")
String importCSVButton();
@DefaultMessage("Import table from CSV source")
String importCSVButtonToolTip();
@DefaultMessage("JSON")
String importJSONButton();
@DefaultMessage("Import table from JSON source")
String importJSONButtonToolTip();
//
@DefaultMessage("Export")
String exportGroupHeadingText();
@DefaultMessage("SDMX")
String exportSDMXButton();
@DefaultMessage("Export SDMX document")
String exportSDMXButtonToolTip();
@DefaultMessage("CSV")
String exportCSVButton();
@DefaultMessage("Export CSV document")
String exportCSVButtonToolTip();
@DefaultMessage("JSON")
String exportJSONButton();
@DefaultMessage("Export JSON document")
String exportJSONButtonToolTip();
//
@DefaultMessage("Tasks")
String taskGroupHeadingText();
@DefaultMessage("Timeline")
String timelineButton();
@DefaultMessage("Timeline")
String timelineButtonToolTip();
@DefaultMessage("Background")
String backgroundButton();
@DefaultMessage("Tasks in background")
String backgroundButtonToolTip();
//
@DefaultMessage("History")
String historyGroupHeadingText();
@DefaultMessage("History")
String historyButton();
@DefaultMessage("Show history")
String historyButtonToolTip();
@DefaultMessage("Undo")
String undoButton();
@DefaultMessage("Discard last operation")
String undoButtonToolTip();
//
@DefaultMessage("Help")
String helpGroupHeadingText();
@DefaultMessage("Help")
String helpButton();
@DefaultMessage("Help")
String helpButtonToolTip();
}

View File

@ -4,6 +4,7 @@
package org.gcube.portlets.user.td.client.ribbon;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.widget.core.client.TabPanel;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
@ -33,6 +34,8 @@ public class TabularDataRibbon {
public TabularDataRibbon(EventBus eventBus) {
try {
TabularDataRibbonMessages msgs = GWT.create(TabularDataRibbonMessages.class);
ribbon = new TabPanel();
ribbon.setId("Ribbon");
ribbon.setHeight(RIBBON_HEIGHT);
@ -42,33 +45,33 @@ public class TabularDataRibbon {
fileToolBar = new FileToolBar(eventBus);
VerticalLayoutContainer con = new VerticalLayoutContainer();
con.add(fileToolBar.getToolBar(), vldata);
ribbon.add(con, "Home");
ribbon.add(con, msgs.home());
curationToolBar = new CurationToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(curationToolBar.getToolBar(), vldata);
ribbon.add(con, "Curation");
ribbon.add(con, msgs.curation());
modifyToolBar = new ModifyToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(modifyToolBar.getToolBar(), vldata);
ribbon.add(con, "Modify");
ribbon.add(con, msgs.modify());
ruleToolBar = new RuleToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(ruleToolBar.getToolBar(), vldata);
ribbon.add(con, "Rule");
ribbon.add(con, msgs.rule());
templateToolBar = new TemplateToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(templateToolBar.getToolBar(), vldata);
ribbon.add(con, "Template");
ribbon.add(con, msgs.template());
analyseToolBar = new AnalyseToolBar(eventBus);
con = new VerticalLayoutContainer();
con.add(analyseToolBar.getToolBar(), vldata);
ribbon.add(con, "Analyse");
ribbon.add(con, msgs.analyse());
} catch (Exception e) {
e.printStackTrace();

View File

@ -0,0 +1,30 @@
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 TabularDataRibbonMessages extends Messages {
@DefaultMessage("Home")
String home();
@DefaultMessage("Curation")
String curation();
@DefaultMessage("Modify")
String modify();
@DefaultMessage("Rule")
String rule();
@DefaultMessage("Template")
String template();
@DefaultMessage("Analyse")
String analyse();
}

View File

@ -3,7 +3,7 @@
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.http.HTTP"/>
<!-- Other module inherits -->
<inherits name="com.google.gwt.i18n.I18N" />
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
<inherits name='com.sencha.gxt.ui.GXT' />
@ -69,6 +69,25 @@
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
<set-configuration-property name="locale.cookie"
value="lang" />
<set-configuration-property name="locale.queryparam"
value="lang" />
<set-configuration-property name="locale.usemeta"
value="Y" />
<set-configuration-property name="locale.useragent"
value="Y" />
<set-configuration-property name="locale.searchorder"
value="cookie,queryparam,meta,useragent" />
<extend-property name="locale" values="en" />
<extend-property name="locale" values="it" />
<extend-property name="locale" values="es" />
<set-property name="locale" value="en, it, es" />
<set-property-fallback name="locale" value="en" />
<!-- <set-property name="log_DivLogger" value="ENABLED" /> <set-property
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
<set-property name="log_SystemLogger" value="ENABLED" /> -->

View File

@ -0,0 +1 @@
newRuleTitle = New Rule

View File

@ -0,0 +1 @@
newRuleTitle = Nuova Regola

View File

@ -0,0 +1 @@
newRuleTitle = Nuova Regola

View File

@ -0,0 +1,11 @@
chartGroupHeadingText = Charts
chartCreateButton = Create Charts
chartCreateButtonToolTip = Create Charts
processGroupHeadingText = Process
rstudioButton = R Studio
rstudioButtonToolTip = R Studio
statisticalButton = Statistical
statisticalButtonToolTip = Statistical
gisGroupHeadingText = GIS
gisButton = Create Map
gisButtonToolTip = Create Map

View File

@ -0,0 +1,11 @@
chartGroupHeadingText = Grficos
chartCreateButton = Crea Gráfico
chartCreateButtonToolTip = Crea Gráficos
processGroupHeadingText = Tratamiento
rstudioButton = R Studio
rstudioButtonToolTip = R Studio
statisticalButton = Statistical
statisticalButtonToolTip = Statistical
gisGroupHeadingText = GIS
gisButton = Crear un mapa
gisButtonToolTip = Crear un mapa

View File

@ -0,0 +1,11 @@
chartGroupHeadingText = Grafici
chartCreateButton = Crea Grafici
chartCreateButtonToolTip = Crea Grafici
processGroupHeadingText = Elaborazioni
rstudioButton = R Studio
rstudioButtonToolTip = R Studio
statisticalButton = Statistical
statisticalButtonToolTip = Statistical
gisGroupHeadingText = GIS
gisButton = Crea Mappa
gisButtonToolTip = Crea Mappa

View File

@ -0,0 +1,40 @@
fileGroupHeadingText = Tabular Resource
openButton = Open
openButtonToolTip = Open Tabular Resource
closeButton = Close All
closeButtonToolTip = Close All Tabular Resources
cloneButton = Clone
cloneButtonToolTip = Clone Tabular Resource
shareButton = Share
shareButtonToolTip = Share Tabular Resource
deleteButton = Delete
deleteButtonToolTip = Delete Tabular Resource
propertiesButton = Properties
propertiesButtonToolTip = Show Properties
importGroupHeadingText = Import
importSDMXButton = SDMX
importSDMXButtonToolTip = Import table from SDMX source
importCSVButton = CSV
importCSVButtonToolTip = Import table from CSV source
importJSONButton = JSON
importJSONButtonToolTip = Import table from JSON source
exportGroupHeadingText = Export
exportSDMXButton = SDMX
exportSDMXButtonToolTip = Export SDMX document
exportCSVButton = CSV
exportCSVButtonToolTip = Export CSV document
exportJSONButton = JSON
exportJSONButtonToolTip = Export JSON document
taskGroupHeadingText = Tasks
timelineButton = Timeline
timelineButtonToolTip = Timeline
backgroundButton = Background
backgroundButtonToolTip = Tasks in background
historyGroupHeadingText = History
historyButton = History
historyButtonToolTip = Show history
undoButton = Undo
undoButtonToolTip = Discard last operation
helpGroupHeadingText = Help
helpButton = Help
helpButtonToolTip = Help

View File

@ -0,0 +1,40 @@
fileGroupHeadingText = Tabular Resource
openButton = Abierto
openButtonToolTip = Abierto Tabular Resource
closeButton = Cerca de todo
closeButtonToolTip = Cerrar todas las Tabular Resources
cloneButton = Clon
cloneButtonToolTip = Clon Tabular Resource
shareButton = Cuota
shareButtonToolTip = Cuota la Tabular Resource
deleteButton = Borrar
deleteButtonToolTip = Eliminar la Tabular Resource
propertiesButton = Propiedades
propertiesButtonToolTip = Muestra las propiedades
importGroupHeadingText = Importaciòn
importSDMXButton = SDMX
importSDMXButtonToolTip = Importar una tabla de una fuente SDMX
importCSVButton = CSV
importCSVButtonToolTip = Importar una tabla de una fuente CSV
importJSONButton = JSON
importJSONButtonToolTip = Importar una tabla de una fuente JSON
exportGroupHeadingText = Exportaciòn
exportSDMXButton = SDMX
exportSDMXButtonToolTip = Documento de exportaciòn como SDMX
exportCSVButton = CSV
exportCSVButtonToolTip = Documento de exportaciòn como CSV
exportJSONButton = JSON
exportJSONButtonToolTip = Documento de exportaciòn como JSON
taskGroupHeadingText = Tareas
timelineButton = Timeline
timelineButtonToolTip = Timeline
backgroundButton = Background
backgroundButtonToolTip = Tareas en segundo plano
historyGroupHeadingText = Historia
historyButton = Historia
historyButtonToolTip = Mostrar historial
undoButton = Deshacer
undoButtonToolTip = Olvidese de la ùltima operaciòn
helpGroupHeadingText = Ayuda
helpButton = Ayuda
helpButtonToolTip = Ayuda

View File

@ -0,0 +1,40 @@
fileGroupHeadingText = Tabular Resource
openButton = Apri
openButtonToolTip = Apri Tabular Resource
closeButton = Chiudi tutto
closeButtonToolTip = Chiudi tutte le Tabular Resources
cloneButton = Clona
cloneButtonToolTip = Clona Tabular Resource
shareButton = Condividi
shareButtonToolTip = Condividi Tabular Resource
deleteButton = Elimina
deleteButtonToolTip = Elimina la Tabular Resource
propertiesButton = Propietà
propertiesButtonToolTip = Mostra Propietà
importGroupHeadingText = Importa
importSDMXButton = SDMX
importSDMXButtonToolTip = Importa una tabella da una sorgente SDMX
importCSVButton = CSV
importCSVButtonToolTip = Importa una tabella da una sorgente CSV
importJSONButton = JSON
importJSONButtonToolTip = Importa una tabella da una sorgente JSON
exportGroupHeadingText = Esporta
exportSDMXButton = SDMX
exportSDMXButtonToolTip = Esporta come documento SDMX
exportCSVButton = CSV
exportCSVButtonToolTip = Esporta come documento CSV
exportJSONButton = JSON
exportJSONButtonToolTip = Esporta come documento JSON
taskGroupHeadingText = Tasks
timelineButton = Timeline
timelineButtonToolTip = Timeline
backgroundButton = Background
backgroundButtonToolTip = Tasks in background
historyGroupHeadingText = History
historyButton = History
historyButtonToolTip = Mostra history
undoButton = Indietro
undoButtonToolTip = Dimentica l''ultima operazione
helpGroupHeadingText = Aiuto
helpButton = Aiuto
helpButtonToolTip = Aiuto

View File

@ -0,0 +1,6 @@
home = Home
curation = Curation
modify = Modify
rule = Rule
template = Template
analyse = Analyse

View File

@ -0,0 +1,6 @@
home = Home
curation = Curación
modify = Modificar
rule = Regla
template = Plantilla
analyse = Analizar

View File

@ -0,0 +1,6 @@
home = Home
curation = Curation
modify = Modifica
rule = Regole
template = Template
analyse = Analisi

View File

@ -3,7 +3,8 @@
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.http.HTTP"/>
<!-- Other module inherits -->
<inherits name="com.google.gwt.i18n.I18N" />
<!-- <inherits name='com.extjs.gxt.ui.GXT' /> -->
<inherits name='com.sencha.gxt.ui.GXT' />
@ -76,6 +77,25 @@
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
<set-configuration-property name="locale.cookie"
value="lang" />
<set-configuration-property name="locale.queryparam"
value="lang" />
<set-configuration-property name="locale.usemeta"
value="Y" />
<set-configuration-property name="locale.useragent"
value="Y" />
<set-configuration-property name="locale.searchorder"
value="cookie,queryparam,meta,useragent" />
<extend-property name="locale" values="en" />
<extend-property name="locale" values="it" />
<extend-property name="locale" values="es" />
<set-property name="locale" value="en, it, es" />
<set-property-fallback name="locale" value="en" />
<!--
<set-property name="log_ConsoleLogger" value="ENABLED" />
<set-property name="log_DivLogger" value="ENABLED" />