fix localization

This commit is contained in:
Peter Hormanns 2017-06-22 17:27:54 +02:00
parent 3b0e29d5ae
commit eccfa84055
19 changed files with 65 additions and 50 deletions

View File

@ -33,14 +33,14 @@ public class CustomerPanel extends CustomComponent implements IHSPanel, Selected
tabsheet.setSizeFull(); tabsheet.setSizeFull();
tabsheet.addSelectedTabChangeListener(this); tabsheet.addSelectedTabChangeListener(this);
tabsheet.addSelectedTabChangeListener(this); tabsheet.addSelectedTabChangeListener(this);
tabsheet.addTab(new GenericForm("customer", session, itemId, "name"), I18N.getText("customer")); tabsheet.addTab(new GenericForm("customer", session, itemId, "name"), I18N.getText("customer", getLocale()));
final HSTab usersTab = new HSTab("contact", session, "customer", itemId, "email"); final HSTab usersTab = new HSTab("contact", session, "customer", itemId, "email");
usersTab.fillTable(); usersTab.fillTable();
tabsheet.addTab(usersTab, I18N.getText("contact")); tabsheet.addTab(usersTab, I18N.getText("contact", getLocale()));
HSTab aliasTab = new HSTab("mandat", session, "customer", itemId, "mandatRef"); HSTab aliasTab = new HSTab("mandat", session, "customer", itemId, "mandatRef");
tabsheet.addTab(aliasTab, I18N.getText("mandat")); tabsheet.addTab(aliasTab, I18N.getText("mandat", getLocale()));
HSTab pacTab = new HSTab("pac", session, "customer", itemId, "name"); HSTab pacTab = new HSTab("pac", session, "customer", itemId, "name");
tabsheet.addTab(pacTab, I18N.getText("pac")); tabsheet.addTab(pacTab, I18N.getText("pac", getLocale()));
return tabsheet; return tabsheet;
} }

View File

@ -27,14 +27,14 @@ public class DomainOptionsEditor extends CustomComponent implements IHSEditor {
public DomainOptionsEditor(final PropertyInfo propertyInfo, final HSAdminSession session, final Map<String, String> whereContext) { public DomainOptionsEditor(final PropertyInfo propertyInfo, final HSAdminSession session, final Map<String, String> whereContext) {
this.checkboxes = new HashMap<>(); this.checkboxes = new HashMap<>();
this.propertyInfo = propertyInfo; this.propertyInfo = propertyInfo;
this.setCaption(I18N.getText(propertyInfo.getName())); this.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
layout = new VerticalLayout(); layout = new VerticalLayout();
for (String opt : OPTIONS) { for (String opt : OPTIONS) {
final CheckBox checkBox = new CheckBox(I18N.getText("domainoption." + opt)); final CheckBox checkBox = new CheckBox(I18N.getText("domainoption." + opt, getLocale()));
checkboxes.put(opt, checkBox); checkboxes.put(opt, checkBox);
layout.addComponent(checkBox); layout.addComponent(checkBox);
} }
layout.setCaption(I18N.getText(propertyInfo.getName())); layout.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
setCompositionRoot(layout); setCompositionRoot(layout);
} }

View File

@ -30,10 +30,10 @@ public class DomainPanel extends CustomComponent implements IHSPanel, SelectedTa
public TabSheet createTabs(Object itemId) throws RpcException public TabSheet createTabs(Object itemId) throws RpcException
{ {
final TabSheet tabsheet = new TabSheet(); final TabSheet tabsheet = new TabSheet();
tabsheet.addTab(new GenericForm("domain", session, itemId, "name"), I18N.getText("domain")); tabsheet.addTab(new GenericForm("domain", session, itemId, "name"), I18N.getText("domain", getLocale()));
HSTab emailTab = new HSTab("emailaddress", session, "domain", itemId, "id"); HSTab emailTab = new HSTab("emailaddress", session, "domain", itemId, "id");
emailTab.fillTable(); emailTab.fillTable();
tabsheet.addTab(emailTab, I18N.getText("emailaddress")); tabsheet.addTab(emailTab, I18N.getText("emailaddress", getLocale()));
return tabsheet; return tabsheet;
} }

View File

@ -44,12 +44,12 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
this.isEditAble = PanelToolbar.ACTION_EDIT.equals(action) || PanelToolbar.ACTION_NEW.equals(action); this.isEditAble = PanelToolbar.ACTION_EDIT.equals(action) || PanelToolbar.ACTION_NEW.equals(action);
this.propertyInfo = propertyInfo; this.propertyInfo = propertyInfo;
this.validators = new ArrayList<>(); this.validators = new ArrayList<>();
this.setCaption(I18N.getText(propertyInfo.getName())); this.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
this.aliases = targetsSelect("emailalias", session, whereContext); this.aliases = targetsSelect("emailalias", session, whereContext);
this.postboxes = targetsSelect("user", session, whereContext); this.postboxes = targetsSelect("user", session, whereContext);
postboxes.removeAll(aliases); postboxes.removeAll(aliases);
layout = new VerticalLayout(); layout = new VerticalLayout();
layout.setCaption(I18N.getText(propertyInfo.getName())); layout.setCaption(I18N.getText(propertyInfo.getName(), getLocale()));
setCompositionRoot(layout); setCompositionRoot(layout);
} }
@ -175,7 +175,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
targetTypeSelect.setMultiSelect(false); targetTypeSelect.setMultiSelect(false);
targetTypeSelect.setNullSelectionAllowed(true); targetTypeSelect.setNullSelectionAllowed(true);
targetTypeSelect.setNullSelectionItemId(" "); targetTypeSelect.setNullSelectionItemId(" ");
targetTypeSelect.addItems(new Object[] { " ", I18N.getText("emailtarget.email"), I18N.getText("emailtarget.postbox"), I18N.getText("emailtarget.alias") }); targetTypeSelect.addItems(new Object[] { " ", I18N.getText("emailtarget.email", getLocale()), I18N.getText("emailtarget.postbox", getLocale()), I18N.getText("emailtarget.alias", getLocale()) });
targetTypeSelect.setValue(" "); targetTypeSelect.setValue(" ");
targetTypeSelect.setWidth("6.0em"); targetTypeSelect.setWidth("6.0em");
addComponent(targetTypeSelect); addComponent(targetTypeSelect);
@ -184,7 +184,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
AbstractComponent targetField = null; AbstractComponent targetField = null;
NativeSelect sel = null; NativeSelect sel = null;
if (aliases.contains(target)) { if (aliases.contains(target)) {
targetTypeSelect.setValue(I18N.getText("emailtarget.alias")); targetTypeSelect.setValue(I18N.getText("emailtarget.alias", getLocale()));
sel = new NativeSelect(); sel = new NativeSelect();
sel.addItems(aliases); sel.addItems(aliases);
sel.setValue(target); sel.setValue(target);
@ -193,7 +193,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
targetField = sel; targetField = sel;
} else { } else {
if (postboxes.contains(target)) { if (postboxes.contains(target)) {
targetTypeSelect.setValue(I18N.getText("emailtarget.postbox")); targetTypeSelect.setValue(I18N.getText("emailtarget.postbox", getLocale()));
sel = new NativeSelect(); sel = new NativeSelect();
sel.addItems(postboxes); sel.addItems(postboxes);
sel.setValue(target); sel.setValue(target);
@ -201,7 +201,7 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
sel.setEnabled(isEditAble); sel.setEnabled(isEditAble);
targetField = sel; targetField = sel;
} else { } else {
targetTypeSelect.setValue(I18N.getText("emailtarget.email")); targetTypeSelect.setValue(I18N.getText("emailtarget.email", getLocale()));
targetField = new TextField(); targetField = new TextField();
targetField.setEnabled(isEditAble); targetField.setEnabled(isEditAble);
((TextField) targetField).setValue(target); ((TextField) targetField).setValue(target);
@ -229,16 +229,16 @@ public class EMailTargetEditor extends CustomComponent implements IHSEditor, Val
final String newValue = newValueObject.toString(); final String newValue = newValueObject.toString();
if (targetRow.getComponentCount() == 1) { if (targetRow.getComponentCount() == 1) {
AbstractComponent comp = null; AbstractComponent comp = null;
if (I18N.getText("emailtarget.email").equals(newValue)) { if (I18N.getText("emailtarget.email", getLocale()).equals(newValue)) {
final TextField textField = new TextField(); final TextField textField = new TextField();
textField.addValueChangeListener(editor); textField.addValueChangeListener(editor);
textField.setImmediate(true); textField.setImmediate(true);
textField.setEnabled(isEditAble); textField.setEnabled(isEditAble);
comp = textField; comp = textField;
} else { } else {
if (I18N.getText("emailtarget.alias").equals(newValue) || I18N.getText("emailtarget.postbox").equals(newValue)) { if (I18N.getText("emailtarget.alias", getLocale()).equals(newValue) || I18N.getText("emailtarget.postbox", getLocale()).equals(newValue)) {
final NativeSelect select = new NativeSelect(); final NativeSelect select = new NativeSelect();
if (I18N.getText("emailtarget.alias").equals(newValue)) { if (I18N.getText("emailtarget.alias", getLocale()).equals(newValue)) {
select.addItems(aliases); select.addItems(aliases);
} else { } else {
select.addItems(postboxes); select.addItems(postboxes);

View File

@ -45,7 +45,7 @@ public class EntryPointsSelector extends CustomComponent implements ItemClickLis
final AbstractEntryPointsFactory entryPointsFactory = FactoryProducer.getEntryPointsFactory(mainWindow, "default"); final AbstractEntryPointsFactory entryPointsFactory = FactoryProducer.getEntryPointsFactory(mainWindow, "default");
int tabCount = 0; int tabCount = 0;
for(String tabName : entryPointsFactory.getEntryPointNames(role)) { for(String tabName : entryPointsFactory.getEntryPointNames(role)) {
accordion.addTab(new EntryPoint(this, tabName), I18N.getText(tabName)); accordion.addTab(new EntryPoint(this, tabName), I18N.getText(tabName, getLocale()));
tabCount++; tabCount++;
} }
if (tabCount > 0) { if (tabCount > 0) {

View File

@ -2,6 +2,7 @@ package de.hsadmin.web;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -24,7 +25,9 @@ public class GenericFormWindow extends Window implements IHSWindow {
public GenericFormWindow(final HSTab parent, final String module, final String action, final HSAdminSession session, final Map<String, String> whereContext) public GenericFormWindow(final HSTab parent, final String module, final String action, final HSAdminSession session, final Map<String, String> whereContext)
{ {
super(I18N.getText(action) + " " + I18N.getText(module)); super();
final Locale locale = getLocale();
setCaption(I18N.getText(action, locale) + " " + I18N.getText(module, locale));
this.parent = parent; this.parent = parent;
center(); center();
setModal(true); setModal(true);

View File

@ -85,7 +85,7 @@ public class HSConfirmBox extends HorizontalLayout {
} }
} }
}); });
cancelButton = new Button(I18N.getText("cancel")); cancelButton = new Button(I18N.getText("cancel", getLocale()));
cancelButton.setClickShortcut(KeyCode.ESCAPE); cancelButton.setClickShortcut(KeyCode.ESCAPE);
cancelButton.addClickListener(new ClickListener() cancelButton.addClickListener(new ClickListener()
{ {

View File

@ -9,7 +9,8 @@ public class HSPasswordField extends PasswordField implements IHSEditor {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public HSPasswordField(final String name, final boolean passwordRequired) { public HSPasswordField(final String name, final boolean passwordRequired) {
super(I18N.getText(name)); super();
setCaption(I18N.getText(name, getLocale()));
addValidator(new PasswordValidator(passwordRequired)); addValidator(new PasswordValidator(passwordRequired));
} }

View File

@ -16,7 +16,8 @@ public class HSSelect extends NativeSelect implements IHSEditor {
} }
public HSSelect(final String label, final int defaultIndex, final List<String> values) { public HSSelect(final String label, final int defaultIndex, final List<String> values) {
super(I18N.getText(label)); super();
setCaption(I18N.getText(label, getLocale()));
this.propertyName = label; this.propertyName = label;
super.addItems(values); super.addItems(values);
if (values != null && values.size() > defaultIndex) { if (values != null && values.size() > defaultIndex) {

View File

@ -149,7 +149,7 @@ public class HSTab extends CustomComponent {
while (properties.hasNext()) { while (properties.hasNext()) {
final PropertyInfo propertyInfo = properties.next(); final PropertyInfo propertyInfo = properties.next();
if (showColumnInTable(propertyInfo)) { if (showColumnInTable(propertyInfo)) {
grid.addContainerProperty(I18N.getText(propertyInfo.getModule() + "." + propertyInfo.getName()), String.class, ""); grid.addContainerProperty(I18N.getText(propertyInfo.getModule() + "." + propertyInfo.getName(), getLocale()), String.class, "");
} }
} }
grid.setSelectable(true); grid.setSelectable(true);

View File

@ -11,7 +11,8 @@ public class HSTextField extends TextField implements IHSEditor {
private final String propertyName; private final String propertyName;
public HSTextField(final String name) { public HSTextField(final String name) {
super(I18N.getText(name)); super();
setCaption(I18N.getText(name, getLocale()));
this.propertyName = name; this.propertyName = name;
} }

View File

@ -25,7 +25,7 @@ public class HelpWindow extends Window {
final VerticalLayout subContent = new VerticalLayout(); final VerticalLayout subContent = new VerticalLayout();
subContent.setMargin(true); subContent.setMargin(true);
subContent.setSizeFull(); subContent.setSizeFull();
final String helpBaseURL = I18N.getText("help.baseurl"); final String helpBaseURL = I18N.getText("help.baseurl", getLocale());
final Component helpContent = new BrowserFrame("Help Window", new ExternalResource(helpBaseURL + helpTopic)); final Component helpContent = new BrowserFrame("Help Window", new ExternalResource(helpBaseURL + helpTopic));
helpContent.setSizeFull(); helpContent.setSizeFull();
subContent.addComponent(helpContent); subContent.addComponent(helpContent);

View File

@ -1,16 +1,21 @@
package de.hsadmin.web; package de.hsadmin.web;
import java.util.Locale;
import java.util.MissingResourceException; import java.util.MissingResourceException;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class I18N { public class I18N {
private static final ResourceBundle TEXTS = ResourceBundle.getBundle("de.hsadmin.web.main"); private static final ResourceBundle TEXTS_DE = ResourceBundle.getBundle("de.hsadmin.web.main", Locale.GERMAN);
private static final ResourceBundle TEXTS_EN = ResourceBundle.getBundle("de.hsadmin.web.main", Locale.ENGLISH);
public static String getText(final String textProperty) { public static String getText(final String textProperty, final Locale loc) {
String textValue; String textValue;
try{ try{
textValue = I18N.TEXTS.getString(textProperty); textValue = I18N.TEXTS_EN.getString(textProperty);
if (loc.getLanguage().equals(Locale.GERMAN.getLanguage())) {
textValue = I18N.TEXTS_DE.getString(textProperty);
}
}catch(MissingResourceException e){ }catch(MissingResourceException e){
textValue = "./. " + textProperty; textValue = "./. " + textProperty;
} }

View File

@ -27,7 +27,8 @@ public class LoginWindow extends Window {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public LoginWindow(final HSAdminUI parent, final TicketService ticketService) { public LoginWindow(final HSAdminUI parent, final TicketService ticketService) {
super(I18N.getText("login.title")); super();
setCaption(I18N.getText("login.title", getLocale()));
center(); center();
setModal(true); setModal(true);
setWidth("480px"); setWidth("480px");
@ -35,11 +36,11 @@ public class LoginWindow extends Window {
final FormLayout subContent = new FormLayout(); final FormLayout subContent = new FormLayout();
subContent.setMargin(true); subContent.setMargin(true);
final TextField login = new TextField(I18N.getText("user.name")); final TextField login = new TextField(I18N.getText("user.name", getLocale()));
login.setWidth("100%"); login.setWidth("100%");
subContent.addComponent(login); subContent.addComponent(login);
login.focus(); login.focus();
final PasswordField password = new PasswordField(I18N.getText("password")); final PasswordField password = new PasswordField(I18N.getText("password", getLocale()));
password.setWidth("100%"); password.setWidth("100%");
subContent.addComponent(password); subContent.addComponent(password);
final Label feedback = new Label(""); final Label feedback = new Label("");
@ -48,7 +49,7 @@ public class LoginWindow extends Window {
subContent.addComponent(feedback); subContent.addComponent(feedback);
feedback.setStyleName(ValoTheme.LABEL_FAILURE); feedback.setStyleName(ValoTheme.LABEL_FAILURE);
final Button okButton = new Button(I18N.getText("login.button")); final Button okButton = new Button(I18N.getText("login.button", getLocale()));
okButton.setStyleName(ValoTheme.BUTTON_PRIMARY); okButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
okButton.setClickShortcut(KeyCode.ENTER); okButton.setClickShortcut(KeyCode.ENTER);
okButton.addClickListener(new ClickListener() okButton.addClickListener(new ClickListener()
@ -74,9 +75,9 @@ public class LoginWindow extends Window {
} }
} }
try { try {
final String user = credentials.get(I18N.getText("user.name")); final String user = credentials.get(I18N.getText("user.name", getLocale()));
final String loginUser = user.length() == 3 ? "hsh00-" + user : user; final String loginUser = user.length() == 3 ? "hsh00-" + user : user;
final String password = credentials.get(I18N.getText("password")); final String password = credentials.get(I18N.getText("password", getLocale()));
final String grantingTicket = ticketService.getGrantingTicket(loginUser, password); final String grantingTicket = ticketService.getGrantingTicket(loginUser, password);
if (grantingTicket != null && !grantingTicket.isEmpty()) { if (grantingTicket != null && !grantingTicket.isEmpty()) {
feedback.setValue("successful login"); feedback.setValue("successful login");
@ -99,7 +100,7 @@ public class LoginWindow extends Window {
} }
}); });
subContent.addComponent(okButton); subContent.addComponent(okButton);
final Link linkToOld = new Link(I18N.getText("main.panel.link_to_old"), new ExternalResource("https://admin.hostsharing.net/hsarweb")); final Link linkToOld = new Link(I18N.getText("main.panel.link_to_old", getLocale()), new ExternalResource("https://admin.hostsharing.net/hsarweb"));
subContent.addComponent(linkToOld); subContent.addComponent(linkToOld);
setContent(subContent); setContent(subContent);

View File

@ -10,8 +10,8 @@ public class MainPanel extends CustomComponent{
private static final long serialVersionUID = -1085100738394404620L; private static final long serialVersionUID = -1085100738394404620L;
public MainPanel() { public MainPanel() {
final String helpBaseURL = I18N.getText("help.baseurl"); final String helpBaseURL = I18N.getText("help.baseurl", getLocale());
final Component helpContent = new BrowserFrame(I18N.getText("main.panel.title"), new ExternalResource(helpBaseURL + "hsadmin")); final Component helpContent = new BrowserFrame(I18N.getText("main.panel.title", getLocale()), new ExternalResource(helpBaseURL + "hsadmin"));
helpContent.setSizeFull(); helpContent.setSizeFull();
setCompositionRoot(helpContent); setCompositionRoot(helpContent);
setSizeFull(); setSizeFull();

View File

@ -52,7 +52,7 @@ public class MainToolbar extends CustomComponent implements ClickListener {
final Button btn = new Button(); final Button btn = new Button();
btn.setId(name + "-btn"); btn.setId(name + "-btn");
btn.setIcon(new ThemeResource("../icons/" + icon + "-icon.png")); btn.setIcon(new ThemeResource("../icons/" + icon + "-icon.png"));
btn.setDescription(I18N.getText(name + ".tooltip")); btn.setDescription(I18N.getText(name + ".tooltip", getLocale()));
btn.setStyleName("borderless"); btn.setStyleName("borderless");
btn.addClickListener(this); btn.addClickListener(this);
return btn; return btn;

View File

@ -31,23 +31,23 @@ public class PackagePanel extends CustomComponent implements IHSPanel, SelectedT
{ {
final TabSheet tabsheet = new TabSheet(); final TabSheet tabsheet = new TabSheet();
tabsheet.addSelectedTabChangeListener(this); tabsheet.addSelectedTabChangeListener(this);
tabsheet.addTab(new GenericForm("pac", session, itemId, "name"), I18N.getText("pac")); tabsheet.addTab(new GenericForm("pac", session, itemId, "name"), I18N.getText("pac", getLocale()));
final HSTab usersTab = new HSTab("user", session, "pac", itemId, "name"); final HSTab usersTab = new HSTab("user", session, "pac", itemId, "name");
usersTab.fillTable(); usersTab.fillTable();
tabsheet.addTab(usersTab, I18N.getText("user")); tabsheet.addTab(usersTab, I18N.getText("user", getLocale()));
final HSTab aliasTab = new HSTab("emailalias", session, "pac", itemId, "name"); final HSTab aliasTab = new HSTab("emailalias", session, "pac", itemId, "name");
tabsheet.addTab(aliasTab, I18N.getText("emailalias")); tabsheet.addTab(aliasTab, I18N.getText("emailalias", getLocale()));
final HSTab domainTab = new HSTab("domain", session, "pac", itemId, "name"); final HSTab domainTab = new HSTab("domain", session, "pac", itemId, "name");
tabsheet.addTab(domainTab, I18N.getText("domain")); tabsheet.addTab(domainTab, I18N.getText("domain", getLocale()));
final HSTab mysqluserTab = new HSTab("mysqluser", session, "pac", itemId, "name"); final HSTab mysqluserTab = new HSTab("mysqluser", session, "pac", itemId, "name");
tabsheet.addTab(mysqluserTab, I18N.getText("mysqluser")); tabsheet.addTab(mysqluserTab, I18N.getText("mysqluser", getLocale()));
final HSTab mysqldbTab = new HSTab("mysqldb", session, "pac", itemId, "name"); final HSTab mysqldbTab = new HSTab("mysqldb", session, "pac", itemId, "name");
tabsheet.addTab(mysqldbTab, I18N.getText("mysqldb")); tabsheet.addTab(mysqldbTab, I18N.getText("mysqldb", getLocale()));
final HSTab postgresqluserTab = new HSTab("postgresqluser", session, "pac", itemId, "name"); final HSTab postgresqluserTab = new HSTab("postgresqluser", session, "pac", itemId, "name");
tabsheet.addTab(postgresqluserTab, I18N.getText("postgresqluser")); tabsheet.addTab(postgresqluserTab, I18N.getText("postgresqluser", getLocale()));
final HSTab postgresqldbTab = new HSTab("postgresqldb", session, "pac", itemId, "name"); final HSTab postgresqldbTab = new HSTab("postgresqldb", session, "pac", itemId, "name");
tabsheet.addTab(postgresqldbTab, I18N.getText("postgresqldb")); tabsheet.addTab(postgresqldbTab, I18N.getText("postgresqldb", getLocale()));
return tabsheet; return tabsheet;
} }

View File

@ -60,7 +60,7 @@ public class PanelToolbar extends HorizontalLayout implements ClickListener {
if (image != null) { if (image != null) {
btn.setIcon(new ThemeResource("../icons/" + image + "-icon.png")); btn.setIcon(new ThemeResource("../icons/" + image + "-icon.png"));
} }
btn.setDescription(I18N.getText(tooltip)); btn.setDescription(I18N.getText(tooltip, getLocale()));
btn.setStyleName("borderless"); btn.setStyleName("borderless");
btn.addClickListener(this); btn.addClickListener(this);
return btn; return btn;
@ -88,7 +88,7 @@ public class PanelToolbar extends HorizontalLayout implements ClickListener {
final Object value = parent.getSelection(); final Object value = parent.getSelection();
if (value == null) { if (value == null) {
if (ACTION_EDIT.equals(action) || ACTION_DELETE.equals(action)) { if (ACTION_EDIT.equals(action) || ACTION_DELETE.equals(action)) {
UI.getCurrent().addWindow(new InfoWindow(I18N.getText("emptySelectionMessage") + " " + action)); UI.getCurrent().addWindow(new InfoWindow(I18N.getText("emptySelectionMessage", getLocale()) + " " + action));
return; return;
} }
} }

View File

@ -5,6 +5,7 @@ import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -28,7 +29,9 @@ public class UserProfileWindow extends Window implements IHSWindow {
public UserProfileWindow(final HSAdminSession session, final Map<String, String> whereContext) public UserProfileWindow(final HSAdminSession session, final Map<String, String> whereContext)
{ {
super(I18N.getText("edit") + " " + I18N.getText("user")); super();
final Locale locale = getLocale();
setCaption(I18N.getText("edit", locale) + " " + I18N.getText("user", locale));
center(); center();
setModal(true); setModal(true);
setWidth("640px"); setWidth("640px");