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-open-widget@119947 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
13418b7b40
commit
7f9e174ab2
|
@ -17,12 +17,6 @@ public interface TDOpenMessages extends Messages {
|
||||||
@DefaultMessage("Select a Tabular Resource")
|
@DefaultMessage("Select a Tabular Resource")
|
||||||
String tabResourcesSelectionCardSelectLabel();
|
String tabResourcesSelectionCardSelectLabel();
|
||||||
|
|
||||||
@DefaultMessage("Search")
|
|
||||||
String buttonSearchLabel();
|
|
||||||
|
|
||||||
@DefaultMessage("Reload")
|
|
||||||
String buttonReloadLabel();
|
|
||||||
|
|
||||||
@DefaultMessage("Name")
|
@DefaultMessage("Name")
|
||||||
String tabResourcesSelectionPanelColumnNameLabel();
|
String tabResourcesSelectionPanelColumnNameLabel();
|
||||||
|
|
||||||
|
@ -50,5 +44,14 @@ public interface TDOpenMessages extends Messages {
|
||||||
@DefaultMessage("Info")
|
@DefaultMessage("Info")
|
||||||
String tabResourcesSelectionPanelContextMenuInfo();
|
String tabResourcesSelectionPanelContextMenuInfo();
|
||||||
|
|
||||||
|
@DefaultMessage("Tabular Resource is locked no info available!")
|
||||||
|
String attentionTabularResourceIsLockedNoInfoAvailable();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String deleteHead();
|
||||||
|
|
||||||
|
@DefaultMessage("Would you like to delete this tabular resource?")
|
||||||
|
String questionWouldYouLikeToDeleteThisTabularResource();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedExcep
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
import org.gcube.portlets.user.td.openwidget.client.resources.ResourceBundleTDOpen;
|
import org.gcube.portlets.user.td.openwidget.client.resources.ResourceBundleTDOpen;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.RibbonEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.RibbonEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.RibbonType;
|
||||||
|
@ -88,7 +89,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TDOpenMessages msgs;
|
||||||
|
|
||||||
private Grid<TabResource> grid;
|
private Grid<TabResource> grid;
|
||||||
private ResourceBundle res;
|
private ResourceBundle res;
|
||||||
|
@ -97,16 +99,18 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
private TabResource removableTR;
|
private TabResource removableTR;
|
||||||
|
|
||||||
private TabResourcesSelectionCard parent;
|
private TabResourcesSelectionCard parent;
|
||||||
private TDOpenMessages msgsTDOpen;
|
|
||||||
|
|
||||||
|
|
||||||
public TabResourcesSelectionPanel(TabResourcesSelectionCard parent,
|
public TabResourcesSelectionPanel(TabResourcesSelectionCard parent,
|
||||||
ResourceBundle res) {
|
ResourceBundle res) {
|
||||||
this.res = res;
|
this.res = res;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.msgsTDOpen = GWT.create(TDOpenMessages.class);
|
|
||||||
|
|
||||||
Log.debug("TabResourcesSelectionPanel");
|
Log.debug("TabResourcesSelectionPanel");
|
||||||
init();
|
|
||||||
|
initMessages();
|
||||||
|
initWindow();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
createContextMenu();
|
createContextMenu();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
@ -122,21 +126,26 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void initMessages(){
|
||||||
|
msgs = GWT.create(TDOpenMessages.class);
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void initWindow() {
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void buildPanel() {
|
protected void buildPanel() {
|
||||||
|
|
||||||
ToolBar toolBar = new ToolBar();
|
ToolBar toolBar = new ToolBar();
|
||||||
toolBar.add(new LabelToolItem(msgsTDOpen.buttonSearchLabel()+": "));
|
toolBar.add(new LabelToolItem(msgsCommon.toolItemSearchLabel()));
|
||||||
final TextField searchField = new TextField();
|
final TextField searchField = new TextField();
|
||||||
toolBar.add(searchField);
|
toolBar.add(searchField);
|
||||||
|
|
||||||
TextButton btnReload = new TextButton();
|
TextButton btnReload = new TextButton();
|
||||||
// btnReload.setText("Reload");
|
// btnReload.setText("Reload");
|
||||||
btnReload.setIcon(res.refresh16());
|
btnReload.setIcon(res.refresh16());
|
||||||
btnReload.setToolTip(msgsTDOpen.buttonReloadLabel());
|
btnReload.setToolTip(msgsCommon.toolItemReloadLabel());
|
||||||
toolBar.add(btnReload);
|
toolBar.add(btnReload);
|
||||||
|
|
||||||
IdentityValueProvider<TabResource> identity = new IdentityValueProvider<TabResource>();
|
IdentityValueProvider<TabResource> identity = new IdentityValueProvider<TabResource>();
|
||||||
|
@ -171,19 +180,19 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
store.setEnableFilters(true);
|
store.setEnableFilters(true);
|
||||||
|
|
||||||
ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.name(), 90, msgsTDOpen.tabResourcesSelectionPanelColumnNameLabel());
|
properties.name(), 90, msgs.tabResourcesSelectionPanelColumnNameLabel());
|
||||||
ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.tabResourceType(), 30, msgsTDOpen.tabResourcesSelectionPanelColumnTypeLabel());
|
properties.tabResourceType(), 30, msgs.tabResourcesSelectionPanelColumnTypeLabel());
|
||||||
ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.tableTypeName(), 30, msgsTDOpen.tabResourcesSelectionPanelColumnTableTypeLabel());
|
properties.tableTypeName(), 30, msgs.tabResourcesSelectionPanelColumnTableTypeLabel());
|
||||||
ColumnConfig<TabResource, Boolean> lockedColumn = new ColumnConfig<TabResource, Boolean>(
|
ColumnConfig<TabResource, Boolean> lockedColumn = new ColumnConfig<TabResource, Boolean>(
|
||||||
properties.locked(), 20, msgsTDOpen.tabResourcesSelectionPanelColumnLockLabel());
|
properties.locked(), 20, msgs.tabResourcesSelectionPanelColumnLockLabel());
|
||||||
ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.agency(), 60, msgsTDOpen.tabResourcesSelectionPanelColumnAgencyLabel());
|
properties.agency(), 60, msgs.tabResourcesSelectionPanelColumnAgencyLabel());
|
||||||
ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.ownerLogin(), 70, msgsTDOpen.tabResourcesSelectionPanelColumnOwnerLabel());
|
properties.ownerLogin(), 70, msgs.tabResourcesSelectionPanelColumnOwnerLabel());
|
||||||
ColumnConfig<TabResource, Date> dateColumn = new ColumnConfig<TabResource, Date>(
|
ColumnConfig<TabResource, Date> dateColumn = new ColumnConfig<TabResource, Date>(
|
||||||
properties.date(), 50, msgsTDOpen.tabResourcesSelectionPanelColumnCreationDateLabel());
|
properties.date(), 50, msgs.tabResourcesSelectionPanelColumnCreationDateLabel());
|
||||||
|
|
||||||
dateColumn.setCell(new DateCell(sdf));
|
dateColumn.setCell(new DateCell(sdf));
|
||||||
|
|
||||||
|
@ -299,7 +308,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
|
|
||||||
protected void createContextMenu() {
|
protected void createContextMenu() {
|
||||||
contextMenu = new Menu();
|
contextMenu = new Menu();
|
||||||
MenuItem deleteTRItem = new MenuItem(msgsTDOpen.tabResourcesSelectionPanelContextMenuDelete());
|
MenuItem deleteTRItem = new MenuItem(msgs.tabResourcesSelectionPanelContextMenuDelete());
|
||||||
deleteTRItem.setId("DeleteTR");
|
deleteTRItem.setId("DeleteTR");
|
||||||
deleteTRItem.setIcon(ResourceBundleTDOpen.INSTANCE.delete());
|
deleteTRItem.setIcon(ResourceBundleTDOpen.INSTANCE.delete());
|
||||||
deleteTRItem.addSelectionHandler(new SelectionHandler<Item>() {
|
deleteTRItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
@ -316,7 +325,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
contextMenu.add(deleteTRItem);
|
contextMenu.add(deleteTRItem);
|
||||||
|
|
||||||
MenuItem infoItem = new MenuItem();
|
MenuItem infoItem = new MenuItem();
|
||||||
infoItem.setText(msgsTDOpen.tabResourcesSelectionPanelContextMenuInfo());
|
infoItem.setText(msgs.tabResourcesSelectionPanelContextMenuInfo());
|
||||||
infoItem.setIcon(ResourceBundleTDOpen.INSTANCE.information());
|
infoItem.setIcon(ResourceBundleTDOpen.INSTANCE.information());
|
||||||
infoItem.addSelectionHandler(new SelectionHandler<Item>() {
|
infoItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@ -342,8 +351,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
|
|
||||||
protected void requestInfo(TabResource tabResource) {
|
protected void requestInfo(TabResource tabResource) {
|
||||||
if (tabResource.isLocked()) {
|
if (tabResource.isLocked()) {
|
||||||
UtilsGXT3.alert("Attention",
|
UtilsGXT3.alert(msgsCommon.attention(),
|
||||||
"Tabular Resource is locked no info available!");
|
msgs.attentionTabularResourceIsLockedNoInfoAvailable());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,14 +374,14 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error("Tabular Resource is Locked: "
|
Log.error("Tabular Resource is Locked: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
parent.showErrorAndHide("Error",
|
parent.showErrorAndHide(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage(), "",
|
caught.getLocalizedMessage(), "",
|
||||||
caught);
|
caught);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.error("Error: "
|
Log.error("Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
parent.showErrorAndHide("Error",
|
parent.showErrorAndHide(msgsCommon.error(),
|
||||||
caught.getLocalizedMessage(), "",
|
caught.getLocalizedMessage(), "",
|
||||||
caught);
|
caught);
|
||||||
|
|
||||||
|
@ -418,7 +427,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
} else {
|
} else {
|
||||||
Log.error("Error retrieving tabular resource: "
|
Log.error("Error retrieving tabular resource: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
parent.showErrorAndHide("Error",
|
parent.showErrorAndHide(msgsCommon.error(),
|
||||||
caught.getLocalizedMessage(), "", caught);
|
caught.getLocalizedMessage(), "", caught);
|
||||||
}
|
}
|
||||||
callback.onFailure(caught);
|
callback.onFailure(caught);
|
||||||
|
@ -471,8 +480,8 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
|
|
||||||
protected void deleteTR(TabResource tabResource) {
|
protected void deleteTR(TabResource tabResource) {
|
||||||
removableTR = tabResource;
|
removableTR = tabResource;
|
||||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
final ConfirmMessageBox mb = new ConfirmMessageBox(msgs.deleteHead(),
|
||||||
"Would you like to delete this tabular resource?");
|
msgs.questionWouldYouLikeToDeleteThisTabularResource());
|
||||||
// Next in GXT 3.1.1
|
// Next in GXT 3.1.1
|
||||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||||
|
|
||||||
|
@ -519,13 +528,13 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
} 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 delete TabResource: "
|
Log.error("Error on delete TabResource: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,9 @@ tabResourcesSelectionPanelColumnTableTypeLabel = Table Type
|
||||||
tabResourcesSelectionPanelColumnLockLabel = Lock
|
tabResourcesSelectionPanelColumnLockLabel = Lock
|
||||||
tabResourcesSelectionPanelColumnAgencyLabel = Agency
|
tabResourcesSelectionPanelColumnAgencyLabel = Agency
|
||||||
tabResourcesSelectionPanelColumnOwnerLabel = Owner
|
tabResourcesSelectionPanelColumnOwnerLabel = Owner
|
||||||
|
tabResourcesSelectionPanelColumnCreationDateLabel = Creation Date
|
||||||
tabResourcesSelectionPanelContextMenuDelete = Delete
|
tabResourcesSelectionPanelContextMenuDelete = Delete
|
||||||
tabResourcesSelectionPanelContextMenuInfo = Info
|
tabResourcesSelectionPanelContextMenuInfo = Info
|
||||||
|
attentionTabularResourceIsLockedNoInfoAvailable = Tabular Resource is locked no info available!
|
||||||
|
deleteHead = Delete
|
||||||
|
questionWouldYouLikeToDeleteThisTabularResource = Would you like to delete this tabular resource?
|
||||||
|
|
|
@ -8,5 +8,9 @@ tabResourcesSelectionPanelColumnTableTypeLabel = Tipo Tabla
|
||||||
tabResourcesSelectionPanelColumnLockLabel = Lock
|
tabResourcesSelectionPanelColumnLockLabel = Lock
|
||||||
tabResourcesSelectionPanelColumnAgencyLabel = Agencia
|
tabResourcesSelectionPanelColumnAgencyLabel = Agencia
|
||||||
tabResourcesSelectionPanelColumnOwnerLabel = Propietario
|
tabResourcesSelectionPanelColumnOwnerLabel = Propietario
|
||||||
|
tabResourcesSelectionPanelColumnCreationDateLabel = Fecha Creacion
|
||||||
tabResourcesSelectionPanelContextMenuDelete = Borrar
|
tabResourcesSelectionPanelContextMenuDelete = Borrar
|
||||||
tabResourcesSelectionPanelContextMenuInfo = Información
|
tabResourcesSelectionPanelContextMenuInfo = Información
|
||||||
|
attentionTabularResourceIsLockedNoInfoAvailable = La Tabular Resource es locked no hay información disponible!
|
||||||
|
deleteHead = Borrar
|
||||||
|
questionWouldYouLikeToDeleteThisTabularResource = Seguro que quieres eliminar esta Tabular Resource?
|
||||||
|
|
|
@ -7,6 +7,10 @@ tabResourcesSelectionPanelColumnTypeLabel = Tipo
|
||||||
tabResourcesSelectionPanelColumnTableTypeLabel = Tipo Tabella
|
tabResourcesSelectionPanelColumnTableTypeLabel = Tipo Tabella
|
||||||
tabResourcesSelectionPanelColumnLockLabel = Lock
|
tabResourcesSelectionPanelColumnLockLabel = Lock
|
||||||
tabResourcesSelectionPanelColumnAgencyLabel = Agenzia
|
tabResourcesSelectionPanelColumnAgencyLabel = Agenzia
|
||||||
tabResourcesSelectionPanelColumnOwnerLabel = Propietario
|
tabResourcesSelectionPanelColumnOwnerLabel = Proprietario
|
||||||
|
tabResourcesSelectionPanelColumnCreationDateLabel = Data Creazione
|
||||||
tabResourcesSelectionPanelContextMenuDelete = Elimina
|
tabResourcesSelectionPanelContextMenuDelete = Elimina
|
||||||
tabResourcesSelectionPanelContextMenuInfo = Informazioni
|
tabResourcesSelectionPanelContextMenuInfo = Informazioni
|
||||||
|
attentionTabularResourceIsLockedNoInfoAvailable = La Tabular Resource è locked nessuna informazione disponibile!
|
||||||
|
deleteHead = Elimina
|
||||||
|
questionWouldYouLikeToDeleteThisTabularResource = Sei sicuro di voler eliminare questa Tabular Resource?
|
||||||
|
|
|
@ -17,7 +17,7 @@ rightLabel = Rights
|
||||||
rightLabelToolTip = Rights
|
rightLabelToolTip = Rights
|
||||||
validFromLabel = Valid From
|
validFromLabel = Valid From
|
||||||
validFromLabelToolTip = Valid From
|
validFromLabelToolTip = Valid From
|
||||||
validUntilToLabel = valid Until To
|
validUntilToLabel = Valid Until To
|
||||||
validUntilToLabelToolTip = Valid Until To
|
validUntilToLabelToolTip = Valid Until To
|
||||||
licencesLabel = Licence
|
licencesLabel = Licence
|
||||||
licencesLabelToolTip = Licence
|
licencesLabelToolTip = Licence
|
||||||
|
|
|
@ -17,8 +17,8 @@ rightLabel = Derechos
|
||||||
rightLabelToolTip = Derechos
|
rightLabelToolTip = Derechos
|
||||||
validFromLabel = Válida Desde
|
validFromLabel = Válida Desde
|
||||||
validFromLabelToolTip = Válida Desde
|
validFromLabelToolTip = Válida Desde
|
||||||
validUntilToLabel = Válido Hasta
|
validUntilToLabel = Válida Hasta
|
||||||
validUntilToLabelToolTip = Válido Hasta
|
validUntilToLabelToolTip = Válida Hasta
|
||||||
licencesLabel = Licencia
|
licencesLabel = Licencia
|
||||||
licencesLabelToolTip = Licencia
|
licencesLabelToolTip = Licencia
|
||||||
ownerLabel = Propietario
|
ownerLabel = Propietario
|
||||||
|
|
Loading…
Reference in New Issue