Skip to content
Snippets Groups Projects
Commit e7299a8b authored by Nicole Merkle's avatar Nicole Merkle
Browse files

Internationalization completed

parent a3183847
No related branches found
No related tags found
No related merge requests found
Showing
with 72 additions and 18 deletions
package org.universAAL.ucc.windows;
import java.util.ResourceBundle;
import com.vaadin.ui.Button;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.HorizontalLayout;
......@@ -16,9 +18,13 @@ public class AccountWindow extends Window {
private Button save;
private Button reset;
private CheckBox check;
private String base;
private ResourceBundle bundle;
public AccountWindow() {
super("Create new Account");
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
setCaption(bundle.getString("create.new.account"));
setWidth("375px");
setHeight("300px");
center();
......@@ -26,18 +32,18 @@ public class AccountWindow extends Window {
VerticalLayout vl = new VerticalLayout();
vl.setSizeFull();
vl.setMargin(true);
user = new TextField("Username:");
pwd = new PasswordField("Password:");
confirm = new PasswordField("Confirm Password:");
check = new CheckBox("Save");
user = new TextField(bundle.getString("user.name"));
pwd = new PasswordField(bundle.getString("pwd.label"));
confirm = new PasswordField(bundle.getString("confirm.pwd"));
check = new CheckBox(bundle.getString("save.button"));
vl.addComponent(user);
vl.addComponent(pwd);
vl.addComponent(confirm);
HorizontalLayout hl = new HorizontalLayout();
hl.setMargin(true);
hl.setSpacing(true);
save = new Button("Save");
reset = new Button("Reset");
save = new Button(bundle.getString("save.button"));
reset = new Button(bundle.getString("reset.button"));
hl.addComponent(save);
hl.addComponent(reset);
vl.addComponent(check);
......
......@@ -2,6 +2,7 @@ package org.universAAL.ucc.windows;
import java.io.IOException;
import java.text.ParseException;
import java.util.ResourceBundle;
import javax.xml.bind.JAXBException;
......@@ -17,9 +18,13 @@ public class AddNewHardwareWindow extends Window {
private VerticalLayout layout;
private HardwareWindow hWindow;
private String flatId;
private String base;
private ResourceBundle bundle;
public AddNewHardwareWindow(HardwareWindow win, RoomsWindow rWin, UccUI app) throws JAXBException, IOException, ParseException {
super("Add new Hardware");
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
setCaption(bundle.getString("add.new.hw"));
this.app = app;
this.hWindow = win;
center();
......
......@@ -2,6 +2,7 @@ package org.universAAL.ucc.windows;
import java.io.IOException;
import java.text.ParseException;
import java.util.ResourceBundle;
import javax.xml.bind.JAXBException;
......@@ -17,9 +18,13 @@ public class AddNewPersonWindow extends Window {
private VerticalLayout layout;
private HumansWindow hWindow;
private String flatId;
private String base;
private ResourceBundle bundle;
public AddNewPersonWindow(HumansWindow win, UccUI app) throws JAXBException, IOException, ParseException {
super("Add new Person");
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
setCaption(bundle.getString("add.new.person"));
this.app = app;
this.hWindow = win;
center();
......
......@@ -3,6 +3,7 @@ package org.universAAL.ucc.windows;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.text.ParseException;
import java.util.ResourceBundle;
import javax.xml.bind.JAXBException;
......@@ -24,10 +25,14 @@ public class HardwareWindow extends Window implements Window.CloseListener{
private UccUI app;
private String flatId;
private HardwareWindowController hwc;
private String base;
private ResourceBundle bundle;
public HardwareWindow(UccUI app) throws JAXBException, IOException, ParseException {
//super("Hardware of "+flat);
// this.flatId = flat;
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
this.app = app;
StringBuffer breadcrump = new StringBuffer();
center();
......@@ -37,7 +42,7 @@ public class HardwareWindow extends Window implements Window.CloseListener{
if(counter == app.getMainWindow().getChildWindows().size())
breadcrump.append(w.getCaption()+" > ");
}
breadcrump.append("Hardware");
breadcrump.append(bundle.getString("hardware.title"));
setCaption(breadcrump.toString());
setWidth(500, Sizeable.UNITS_PIXELS);
setHeight(365, Sizeable.UNITS_PIXELS);
......
......@@ -2,6 +2,7 @@ package org.universAAL.ucc.windows;
import java.io.IOException;
import java.text.ParseException;
import java.util.ResourceBundle;
import javax.xml.bind.JAXBException;
......@@ -18,8 +19,12 @@ public class HumansWindow extends Window {
private HorizontalSplitPanel split;
private UccUI app;
private String flatId;
private ResourceBundle bundle;
private String base;
public HumansWindow(UccUI app) throws JAXBException, IOException, ParseException {
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
StringBuffer breadcrump = new StringBuffer();
int counter = 0;
for(Window w : app.getMainWindow().getChildWindows()) {
......@@ -27,7 +32,7 @@ public class HumansWindow extends Window {
if(counter == app.getMainWindow().getChildWindows().size())
breadcrump.append(w.getCaption()+" > ");
}
breadcrump.append("Persons");
breadcrump.append(bundle.getString("persons.title"));
setCaption(breadcrump.toString());
// this.flatId = flat;
this.app = app;
......
......@@ -2,6 +2,7 @@ package org.universAAL.ucc.windows;
import java.io.IOException;
import java.text.ParseException;
import java.util.ResourceBundle;
import javax.xml.bind.JAXBException;
......@@ -26,9 +27,13 @@ public class RoomsWindow extends Window {
private UccUI app;
private String flatId;
private RoomsWindowController rwc;
private ResourceBundle bundle;
private String base;
public RoomsWindow(/*String flat,*/ UccUI app) throws JAXBException, IOException, ParseException {
//super("Rooms of "+flat);
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
StringBuffer breadcrump = new StringBuffer();
int counter = 0;
for(Window w : app.getMainWindow().getChildWindows()) {
......@@ -37,7 +42,7 @@ public class RoomsWindow extends Window {
breadcrump.append(w.getCaption()+" > ");
}
breadcrump.append("Rooms of with Hardware");
breadcrump.append(bundle.getString("rooms.view"));
setCaption(breadcrump.toString());
// this.flatId = flat;
center();
......
......@@ -2,6 +2,7 @@ package org.universAAL.ucc.windows;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.ResourceBundle;
import com.vaadin.ui.Button;
import com.vaadin.ui.Form;
......@@ -16,8 +17,12 @@ public class TabForm extends Form{
private Button deleteButton;
private String header;
private String id;
private ResourceBundle bundle;
private String base;
public TabForm() {
base = "resources.ucc";
bundle = ResourceBundle.getBundle(base);
setSizeFull();
setImmediate(true);
setWriteThrough(false);
......@@ -28,12 +33,12 @@ public class TabForm extends Form{
HorizontalLayout hl = new HorizontalLayout();
hl.setSpacing(true);
hl.setMargin(true);
saveButton = new Button("Save", this, "commit");
saveButton = new Button(bundle.getString("save.button"), this, "commit");
saveButton.setVisible(false);
resetButton = new Button("Reset", this, "discard");
resetButton = new Button(bundle.getString("reset.button"), this, "discard");
resetButton.setVisible(false);
editButton = new Button("Edit");
deleteButton = new Button("Delete");
editButton = new Button(bundle.getString("edit.button"));
deleteButton = new Button(bundle.getString("delete.button"));
hl.addComponent(editButton);
hl.addComponent(saveButton);
//hl.addComponent(resetButton);
......
......@@ -92,4 +92,13 @@ srv.already.exists=Der AAL Service ist bereits installiert
uninstall.usrv=Deinstallieren
uninstall.button=Deinstalliert einen AAL Service
result.installation=Ergebnis der Installation
config.usrv=Konfig uSrv
\ No newline at end of file
config.usrv=Konfig uSrv
rooms.view=Rume mit Hardware
delete.button=Lschen
persons.title=Personen
hardware.title=Hardware
add.new.person=Neue Person hinzufgen
add.new.hw=Neue Hardware hinzufgen
create.new.account=Neues Konto anlegen
user.name=Benutzername:
confirm.pwd=Passwort besttigen:
\ No newline at end of file
......@@ -92,4 +92,13 @@ srv.already.exists=The AAL service is already installed
uninstall.usrv=Uninstall
uninstall.button=Uninstalls a installed AAL service
result.installation=Result of the installation
config.usrv=Config uSrv
\ No newline at end of file
config.usrv=Config uSrv
rooms.view=Rooms with Hardware
delete.button=Delete
persons.title=Persons
hardware.title=Hardware
add.new.person=Add new person
add.new.hw=Add new hardware
create.new.account=Create new account
user.name=Username:
confirm.pwd=Confirm password:
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment