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-portlet@119698 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-10-13 15:10:17 +00:00
parent 4b25b8dee5
commit f51e1c2318
7 changed files with 274 additions and 122 deletions

View File

@ -52,6 +52,7 @@ import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
import org.gcube.portlets.user.td.tablewidget.client.validation.ValidationsDelete; import org.gcube.portlets.user.td.tablewidget.client.validation.ValidationsDelete;
import org.gcube.portlets.user.td.taskswidget.client.TdTaskController; import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
import org.gcube.portlets.user.td.unionwizardwidget.client.UnionWizardTD; import org.gcube.portlets.user.td.unionwizardwidget.client.UnionWizardTD;
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.BackgroundRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.BackgroundRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.DataViewActiveEvent; import org.gcube.portlets.user.td.widgetcommonevent.client.event.DataViewActiveEvent;
@ -140,17 +141,22 @@ public class TabularDataController {
* *
*/ */
private TabularDataControllerMessages msgs; private TabularDataControllerMessages msgs;
private CommonMessages msgsCommon;
public TabularDataController() { public TabularDataController() {
eventBus = new SimpleEventBus(); eventBus = new SimpleEventBus();
msgs = GWT.create(TabularDataControllerMessages.class); initMessages();
callHello(); callHello();
checkSession(); checkSession();
pendingTasksRetrieve(); pendingTasksRetrieve();
bindToEvents(); bindToEvents();
} }
private void initMessages() {
msgs = GWT.create(TabularDataControllerMessages.class);
msgsCommon = GWT.create(CommonMessages.class);
}
private void checkSession() { private void checkSession() {
// if you do not need to something when the session expire // if you do not need to something when the session expire
CheckSession.getInstance().startPolling(); CheckSession.getInstance().startPolling();
@ -195,10 +201,12 @@ public class TabularDataController {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Log.info("No valid user found: " + caught.getMessage()); Log.info("No valid user found: " + caught.getMessage());
if (caught instanceof TDGWTSessionExpiredException) { if (caught instanceof TDGWTSessionExpiredException) {
UtilsGXT3.alert("Error", "Expired Session"); UtilsGXT3.alert(msgsCommon.error(),
msgsCommon.expiredSession());
sessionExpiredShowDelayed(); sessionExpiredShowDelayed();
} else { } else {
UtilsGXT3.alert("Error", "No user found"); UtilsGXT3.alert(msgsCommon.error(),
msgsCommon.noUserFound());
} }
} }
@ -221,10 +229,11 @@ public class TabularDataController {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
Log.info("No valid user found: " + caught.getMessage()); Log.info("No valid user found: " + caught.getMessage());
if (caught instanceof TDGWTSessionExpiredException) { if (caught instanceof TDGWTSessionExpiredException) {
UtilsGXT3.alert("Error", "Expired Session"); UtilsGXT3.alert(msgsCommon.error(),
msgsCommon.expiredSession());
sessionExpiredShowDelayed(); sessionExpiredShowDelayed();
} else { } else {
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} }
} }
@ -373,12 +382,12 @@ public class TabularDataController {
LocaleInfo currentLocaleInfo = LocaleInfo.getCurrentLocale(); LocaleInfo currentLocaleInfo = LocaleInfo.getCurrentLocale();
Log.debug("Current Locale:" + currentLocaleInfo.getLocaleName()); Log.debug("Current Locale:" + currentLocaleInfo.getLocaleName());
String localeName=currentLocaleInfo.getLocaleName(); String localeName = currentLocaleInfo.getLocaleName();
InfoLocale infoLocale; InfoLocale infoLocale;
if(localeName==null||localeName.isEmpty()){ if (localeName == null || localeName.isEmpty()) {
infoLocale=new InfoLocale("en"); infoLocale = new InfoLocale("en");
} else { } else {
infoLocale=new InfoLocale(localeName.substring(0, 2)); infoLocale = new InfoLocale(localeName.substring(0, 2));
} }
setInfoLocale(infoLocale); setInfoLocale(infoLocale);
@ -397,16 +406,16 @@ public class TabularDataController {
com.google.gwt.user.client.Window.Location.reload(); com.google.gwt.user.client.Window.Location.reload();
InfoLocale infoLocale; InfoLocale infoLocale;
if(localeName==null||localeName.isEmpty()){ if (localeName == null || localeName.isEmpty()) {
infoLocale=new InfoLocale("en"); infoLocale = new InfoLocale("en");
} else { } else {
infoLocale=new InfoLocale(localeName); infoLocale = new InfoLocale(localeName);
} }
setInfoLocale(infoLocale); setInfoLocale(infoLocale);
} }
protected void setInfoLocale(InfoLocale infoLocale){ protected void setInfoLocale(InfoLocale infoLocale) {
TDGWTServiceAsync.INSTANCE.setLocale(infoLocale, TDGWTServiceAsync.INSTANCE.setLocale(infoLocale,
new AsyncCallback<Void>() { new AsyncCallback<Void>() {
@ -417,10 +426,10 @@ public class TabularDataController {
} else { } else {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Locked", UtilsGXT3.alert(msgsCommon.errorLocked(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} else { } else {
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} }
} }
@ -451,10 +460,10 @@ public class TabularDataController {
} else { } else {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Locked", UtilsGXT3.alert(msgsCommon.errorLocked(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} else { } else {
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} }
} }
@ -603,7 +612,7 @@ public class TabularDataController {
.closeAllTabularResources(new AsyncCallback<Void>() { .closeAllTabularResources(new AsyncCallback<Void>() {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
UtilsGXT3.alert("Error closing all tabular resources", UtilsGXT3.alert(msgs.errorClosingAllTabularResource(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} }
@ -645,10 +654,9 @@ public class TabularDataController {
Log.error("Error in Close and Open TR " Log.error("Error in Close and Open TR "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
caught.printStackTrace(); caught.printStackTrace();
UtilsGXT3 UtilsGXT3.alert(msgsCommon.error(), msgs
.alert("Error", .errorInCloseTR(caught
"Error in close TR: " .getLocalizedMessage()));
+ caught.getLocalizedMessage());
} }
} }
@ -699,13 +707,12 @@ public class TabularDataController {
eventBus.fireEvent(new SessionExpiredEvent( eventBus.fireEvent(new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER)); SessionExpiredType.EXPIREDONSERVER));
} else { } else {
Log.error("Error in set Active TR: " Log.error(msgs.errorInSetActiveTR(caught
+ caught.getLocalizedMessage()); .getLocalizedMessage()));
caught.printStackTrace(); caught.printStackTrace();
UtilsGXT3.alert( UtilsGXT3.alert(msgsCommon.error(), msgs
"Error", .errorInSetActiveTR(caught
"Error in set Active TR: " .getLocalizedMessage()));
+ caught.getLocalizedMessage());
} }
} }
@ -742,8 +749,8 @@ public class TabularDataController {
private void deleteTabularResource() { private void deleteTabularResource() {
final ConfirmMessageBox mb = new ConfirmMessageBox("Confirm", final ConfirmMessageBox mb = new ConfirmMessageBox(msgs.confirm(),
"Are you sure you want to delete the tabular resource?"); msgs.areYouSureYouWantToDeleteTheTabularResource());
mb.addDialogHideHandler(new DialogHideHandler() { mb.addDialogHideHandler(new DialogHideHandler() {
@ -759,7 +766,7 @@ public class TabularDataController {
new AsyncCallback<Void>() { new AsyncCallback<Void>() {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
UtilsGXT3.alert("Error on Delete", UtilsGXT3.alert(msgsCommon.error(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} }
@ -1111,7 +1118,8 @@ public class TabularDataController {
dialog.show(); dialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -1120,8 +1128,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
SDMXImportWizardTD importWizard = new SDMXImportWizardTD( SDMXImportWizardTD importWizard = new SDMXImportWizardTD(msgs
"SDMX Import", eventBus); .sdmxImport(), eventBus);
importWizard.addListener(new WizardListener() { importWizard.addListener(new WizardListener() {
@Override @Override
@ -1164,8 +1172,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
CSVExportWizardTD exportWizard = new CSVExportWizardTD( CSVExportWizardTD exportWizard = new CSVExportWizardTD(msgs
"CSV Export", eventBus); .csvExport(), eventBus);
exportWizard.addListener(new WizardListener() { exportWizard.addListener(new WizardListener() {
@ -1210,8 +1218,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
JSONExportWidgetTD exportWizard = new JSONExportWidgetTD( JSONExportWidgetTD exportWizard = new JSONExportWidgetTD(msgs
"JSON Export", eventBus); .jsonExport(), eventBus);
exportWizard.addListener(new WizardListener() { exportWizard.addListener(new WizardListener() {
@ -1256,8 +1264,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
SDMXExportWizardTD exportWizard = new SDMXExportWizardTD( SDMXExportWizardTD exportWizard = new SDMXExportWizardTD(msgs
"SDMX Export", eventBus); .sdmxExport(), eventBus);
exportWizard.addListener(new WizardListener() { exportWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1298,7 +1306,7 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
ExtractCodelistWizardTD extractCodelistWizard = new ExtractCodelistWizardTD( ExtractCodelistWizardTD extractCodelistWizard = new ExtractCodelistWizardTD(
trId, "Extract Codelist", eventBus); trId, msgs.extractCodelist(), eventBus);
extractCodelistWizard.addListener(new WizardListener() { extractCodelistWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1339,7 +1347,7 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
CodelistMappingImportWizardTD codelistMappingWizard = new CodelistMappingImportWizardTD( CodelistMappingImportWizardTD codelistMappingWizard = new CodelistMappingImportWizardTD(
trId, "Codelist Mapping Import", eventBus); trId, msgs.codelistMappingImport(), eventBus);
codelistMappingWizard.addListener(new WizardListener() { codelistMappingWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1379,8 +1387,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
UnionWizardTD unionWizard = new UnionWizardTD(trId, "Union", UnionWizardTD unionWizard = new UnionWizardTD(trId, msgs
eventBus); .union(), eventBus);
unionWizard.addListener(new WizardListener() { unionWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1430,10 +1438,11 @@ public class TabularDataController {
if (columnname == null || columnname.isEmpty()) { if (columnname == null || columnname.isEmpty()) {
replaceByExternalColWizard = new ReplaceByExternalTD(trId, replaceByExternalColWizard = new ReplaceByExternalTD(trId,
"Replace By External Columns", eventBus); msgs.replaceByExternalColumns(), eventBus);
} else { } else {
replaceByExternalColWizard = new ReplaceByExternalTD(trId, replaceByExternalColWizard = new ReplaceByExternalTD(trId,
columnname, "Replace By External Columns", eventBus); columnname, msgs.replaceByExternalColumns(),
eventBus);
} }
replaceByExternalColWizard.addListener(new WizardListener() { replaceByExternalColWizard.addListener(new WizardListener() {
@ -1475,7 +1484,7 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
ChartsWidgetTD chartWizard = new ChartsWidgetTD(trId, userInfo, ChartsWidgetTD chartWizard = new ChartsWidgetTD(trId, userInfo,
"Charts Creation", eventBus); msgs.chartsCreation(), eventBus);
chartWizard.addListener(new WizardListener() { chartWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1519,8 +1528,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
MapWidgetTD mapWizard = new MapWidgetTD(trId, userInfo, MapWidgetTD mapWizard = new MapWidgetTD(trId, userInfo, msgs
"Map Creation", eventBus); .mapCreation(), eventBus);
mapWizard.addListener(new WizardListener() { mapWizard.addListener(new WizardListener() {
public void failed(String title, String message, public void failed(String title, String message,
@ -1617,8 +1626,8 @@ public class TabularDataController {
public void onSuccess() { public void onSuccess() {
openWizard(); openWizard();
CSVImportWizardTD importWizard = new CSVImportWizardTD( CSVImportWizardTD importWizard = new CSVImportWizardTD(msgs
"CSV Import", eventBus); .csvImport(), eventBus);
importWizard.addListener(new WizardListener() { importWizard.addListener(new WizardListener() {
@ -1742,8 +1751,8 @@ public class TabularDataController {
taDialog.show(); taDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
"No current tabular resource present"); msgs.noCurrentTabularResourcePresent());
} }
} }
@ -1823,8 +1832,8 @@ public class TabularDataController {
raDialog.show(); raDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
"No current tabular resource present"); msgs.noCurrentTabularResourcePresent());
} }
} }
@ -1873,8 +1882,8 @@ public class TabularDataController {
raDialog.show(); raDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
"No current tabular resource present"); msgs.noCurrentTabularResourcePresent());
} }
} }
@ -1969,7 +1978,8 @@ public class TabularDataController {
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -1992,8 +2002,8 @@ public class TabularDataController {
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", UtilsGXT3.alert(msgsCommon.error(),
"No current tabular resource present"); msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2016,7 +2026,8 @@ public class TabularDataController {
RStudio rStudio = new RStudio(trId, eventBus); RStudio rStudio = new RStudio(trId, eventBus);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2045,7 +2056,8 @@ public class TabularDataController {
mcfDialog.show(); mcfDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2066,7 +2078,8 @@ public class TabularDataController {
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2083,7 +2096,8 @@ public class TabularDataController {
rowsDeleteDialog.show(); rowsDeleteDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2100,7 +2114,8 @@ public class TabularDataController {
rceDialog.show(); rceDialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2119,7 +2134,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2137,7 +2153,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2155,7 +2172,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No current tabular resource present"); UtilsGXT3.alert(msgsCommon.error(),
msgs.noCurrentTabularResourcePresent());
} }
} }
@ -2176,7 +2194,8 @@ public class TabularDataController {
dialog.show(); dialog.show();
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
}; };
@ -2193,7 +2212,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2212,7 +2232,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2231,7 +2252,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2250,7 +2272,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2268,7 +2291,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2286,7 +2310,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2305,7 +2330,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2324,7 +2350,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2337,7 +2364,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2350,7 +2378,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2363,6 +2392,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2372,7 +2403,8 @@ public class TabularDataController {
new ValidationsDelete(trId, eventBus); new ValidationsDelete(trId, eventBus);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2385,7 +2417,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2404,7 +2437,8 @@ public class TabularDataController {
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2423,7 +2457,8 @@ public class TabularDataController {
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2437,7 +2472,8 @@ public class TabularDataController {
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2456,7 +2492,8 @@ public class TabularDataController {
eventBus.fireEvent(e); eventBus.fireEvent(e);
} else { } else {
Log.error("TRId is null"); Log.error("TRId is null");
UtilsGXT3.alert("Error", "No tabular resource present"); UtilsGXT3
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
} }
} }
@ -2499,14 +2536,14 @@ public class TabularDataController {
} else { } else {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Locked", UtilsGXT3.alert(msgsCommon.errorLocked(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} else { } else {
Log.error("Error on set TabResource: " Log.error("Error on set TabResource: "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
UtilsGXT3.alert( UtilsGXT3.alert(
"Error", msgsCommon.error(),
"Error on set TabResource: " "Error on set TabResource: "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
} }
@ -2536,16 +2573,15 @@ public class TabularDataController {
} else { } else {
if (caught instanceof TDGWTIsLockedException) { if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage()); Log.error(caught.getLocalizedMessage());
UtilsGXT3.alert("Error Locked", UtilsGXT3.alert(msgsCommon.errorLocked(),
caught.getLocalizedMessage()); caught.getLocalizedMessage());
} else { } else {
Log.error("Error on set TabResource: " Log.error("Error on set TabResource: "
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
UtilsGXT3.alert( UtilsGXT3.alert(msgsCommon.error(), msgs
"Error", .errorOnSetTabularResource(caught
"Error on set TabResource: " .getLocalizedMessage()));
+ caught.getLocalizedMessage());
} }
} }
@ -2579,7 +2615,7 @@ public class TabularDataController {
*/ */
private void onRowsDelete(ArrayList<String> rows) { private void onRowsDelete(ArrayList<String> rows) {
if (rows == null || rows.size() == 0) { if (rows == null || rows.size() == 0) {
UtilsGXT3.alert("No rows selected", "No rows selected"); UtilsGXT3.alert(msgsCommon.error(), msgs.noRowSelected());
} else { } else {
DeleteRows deleteRows = new DeleteRows(trId, rows, eventBus); DeleteRows deleteRows = new DeleteRows(trId, rows, eventBus);
deleteRows.delete(); deleteRows.delete();
@ -2593,7 +2629,7 @@ public class TabularDataController {
*/ */
private void onReplace(CellData cellData) { private void onReplace(CellData cellData) {
if (cellData == null) { if (cellData == null) {
UtilsGXT3.alert("No cell selected", "No cell selected"); UtilsGXT3.alert(msgsCommon.error(),msgs.noCellSelected());
} else { } else {
ReplaceAllDialog replaceDialog = new ReplaceAllDialog(cellData, ReplaceAllDialog replaceDialog = new ReplaceAllDialog(cellData,
trId, eventBus); trId, eventBus);
@ -2608,7 +2644,7 @@ public class TabularDataController {
*/ */
private void onRowEdit(ArrayList<RowRaw> rowsRaw) { private void onRowEdit(ArrayList<RowRaw> rowsRaw) {
if (rowsRaw == null || rowsRaw.isEmpty()) { if (rowsRaw == null || rowsRaw.isEmpty()) {
UtilsGXT3.alert("No rows selected", "No rows selected"); UtilsGXT3.alert(msgsCommon.error(), msgs.noRowSelected());
} else { } else {
EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw, EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw,
eventBus); eventBus);

View File

@ -4,27 +4,80 @@ 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 TabularDataControllerMessages extends Messages { public interface TabularDataControllerMessages extends Messages {
/**
*
* @return
*/
@DefaultMessage("Open Tabular Resource") @DefaultMessage("Open Tabular Resource")
String openTR(); String openTR();
/**
*
* @return
*/
@DefaultMessage("Switches Tabular Resource") @DefaultMessage("Switches Tabular Resource")
String openSwitchesTR(); String openSwitchesTR();
@DefaultMessage("Error closing all tabular resources")
String errorClosingAllTabularResource();
@DefaultMessage("Error in close TR: {0}")
String errorInCloseTR(String localizedMessage);
@DefaultMessage("Error in set Active TR: {0}")
String errorInSetActiveTR(String localizedMessage);
@DefaultMessage("Confirm")
String confirm();
@DefaultMessage("Are you sure you want to delete the tabular resource?")
String areYouSureYouWantToDeleteTheTabularResource();
@DefaultMessage("No tabular resource present")
String noTabularResourcePresent();
@DefaultMessage("No current tabular resource present!")
String noCurrentTabularResourcePresent();
@DefaultMessage("SDMX Import")
String sdmxImport();
@DefaultMessage("CSV Export")
String csvExport();
@DefaultMessage("JSON Export")
String jsonExport();
@DefaultMessage("SDMX Export")
String sdmxExport();
@DefaultMessage("Extract Codelist")
String extractCodelist();
@DefaultMessage("Codelist Mapping Import")
String codelistMappingImport();
@DefaultMessage("Union")
String union();
@DefaultMessage("Replace By External Columns")
String replaceByExternalColumns();
@DefaultMessage("Charts Creation")
String chartsCreation();
@DefaultMessage("Map Creation")
String mapCreation();
@DefaultMessage("CSV Import")
String csvImport();
@DefaultMessage("Error on set Tabular Resource: {0}")
String errorOnSetTabularResource(String localizedMessage);
@DefaultMessage("No row selected!")
String noRowSelected();
@DefaultMessage("No cell selected!")
String noCellSelected();
} }

View File

@ -1,2 +1,23 @@
openTR = Open Tabular Resource openTR = Open Tabular Resource
openSwitchesTR = Switches Tabular Resource openSwitchesTR = Switches Tabular Resource
errorClosingAllTabularResource = Error closing all tabular resources
errorInCloseTR = Error in close TR: {0}
errorInSetActiveTR = Error in set Active TR: {0}
confirm = Confirm
areYouSureYouWantToDeleteTheTabularResource = Are you sure you want to delete the tabular resource?
noTabularResourcePresent = No tabular resource present!
noCurrentTabularResourcePresent = No current tabular resource present!
csvImport = CSV import
sdmxImport = SDMX Import
csvExport = CSV Export
jsonExport = JSON Export
sdmxExport = SDMX Export
extractCodelist = Extract Codelist
codelistMappingImport = Codelist Mapping Import
union = Union
replaceByExternalColumns = Replace By External Columns
chartsCreation = Charts Creation
mapCreation = Map Creation
errorOnSetTabularResource = Error on set Tabular Resource: {0}
noRowSelected = No row selected!
noCellSelected = No cell selected!

View File

@ -1,2 +1,23 @@
openTR = Abrir Tabular Resource openTR = Abrir Tabular Resource
openSwitchesTR = Cambiar Tabular Resource openSwitchesTR = Cambiar Tabular Resource
errorClosingAllTabularResource = Error al cerrar todas las tabular resource
errorInCloseTR = Error al cerrar la TR: {0}
errorInSetActiveTR = Error al set Activa TR: {0}
confirm = Confirmación
areYouSureYouWantToDeleteTheTabularResource = Seguro que quieres eliminar la tabular resource?
noTabularResourcePresent = Ningúna tabular resource present!
noCurrentTabularResourcePresent = Tabular resource actual sin present!
csvImport = Importaciòn CSV
sdmxImport = Importaciòn SDMX
csvExport = Exportaciòn CSV
jsonExport = Exportaciòn JSON
sdmxExport = Exportaciòm SDMX
extractCodelist = Extraer Codelist
codelistMappingImport = Mapa Importaciòn
union = Unión
replaceByExternalColumns = Reemplazar usando Columnas Externas
chartsCreation = Crea gráfico
mapCreation = Crea Mapa
errorOnSetTabularResource = Error en poner la Tabular Resource: {0}
noRowSelected = Ninguna línea seleccionada!
noCellSelected = Ninguna célula selezionata!

View File

@ -1,2 +1,23 @@
openTR = Apri Tabular Resource openTR = Apri Tabular Resource
openSwitchesTR = Cambia Tabular Resource openSwitchesTR = Cambia Tabular Resource
errorClosingAllTabularResource = Errore chiudendo tutte le tabular resource
errorInCloseTR = Errore nella chiusura della TR: {0}
errorInSetActiveTR = Errore nel settare Attiva la TR: {0}
confirm = Conferma
areYouSureYouWantToDeleteTheTabularResource = Sei sicuro che desideri eliminare la tabular resource?
noTabularResourcePresent = Nessuna tabular resource presente!
noCurrentTabularResourcePresent = Tabular resource corrente non presente!
csvImport = Importa CSV
sdmxImport = Importa SDMX
csvExport = Esporta CSV
jsonExport = Esporta JSON
sdmxExport = Esporta SDMX
extractCodelist = Estrai Codelist
codelistMappingImport = Codelist Mapping Importa
union = Unione
replaceByExternalColumns = Rimpiazza usando Colonne Esterne
chartsCreation = Crea Grafico
mapCreation = Crea Mappa
errorOnSetTabularResource = Errore nel settare la Tabular Resource: {0}
noRowSelected = Nessuna riga selezionata!
noCellSelected = Nessuna cella selezionata!

View File

@ -7,5 +7,5 @@ rstudioButtonToolTip = R Studio
statisticalButton = Statistical statisticalButton = Statistical
statisticalButtonToolTip = Statistical statisticalButtonToolTip = Statistical
gisGroupHeadingText = GIS gisGroupHeadingText = GIS
gisButton = Crear Mapa gisButton = Crea Mapa
gisButtonToolTip = Crear un mapa gisButtonToolTip = Crea un mapa