Initial translation, also, almost done.
authorJimmy Christensen <dusted@dusted.dk>
Tue, 5 Aug 2014 12:14:54 +0000 (14:14 +0200)
committerJimmy Christensen <dusted@dusted.dk>
Tue, 5 Aug 2014 12:14:54 +0000 (14:14 +0200)
src/fkgui/AccountManager.java [deleted file]
src/fkgui/FkManager.java
src/fkgui/MainWin.java
src/fkgui/Messages.java [new file with mode: 0644]
src/fkgui/NewAccountDialog.java
src/fkgui/PermitCountDownDialog.java
src/fkgui/SerialWorker.java
src/fkgui/TriggerDialog.java
src/fkgui/gfx/lightbulb.png [new file with mode: 0644]
src/fkgui/messages.properties [new file with mode: 0644]
src/fkgui/messages_da.properties [new file with mode: 0644]

diff --git a/src/fkgui/AccountManager.java b/src/fkgui/AccountManager.java
deleted file mode 100644 (file)
index 456a341..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-package fkgui;
-
-public class AccountManager {
-
-}
index e33cef5..320aa32 100644 (file)
@@ -425,7 +425,7 @@ public class FkManager implements ActionListener {
                                seq += '2';
                        }
                        
-                       System.out.println("Seq ["+seq+"]");
+                       //System.out.println("Seq ["+seq+"]");
                        
                        NewAccountTask newTask = new NewAccountTask(seq, delegate, strAccountName);
                        new Thread(newTask).start();                    
@@ -433,7 +433,4 @@ public class FkManager implements ActionListener {
        }
 
 
-
-       
-       
 }
index f0ac6e1..378b420 100644 (file)
@@ -1,6 +1,7 @@
 package fkgui;
 
 
+import java.util.Locale;
 import  java.util.prefs.*;
 import java.awt.*;
 import java.awt.event.ActionEvent;
@@ -16,12 +17,16 @@ import org.eclipse.jface.viewers.ListViewer;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.events.ShellEvent;
 import org.eclipse.swt.events.ShellListener;
 import org.eclipse.swt.widgets.Text;
@@ -40,6 +45,7 @@ import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.List;
 
 
 public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
@@ -68,11 +74,13 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
        
        SerialWorker fkSerial;
        private boolean sysTrayIconVisible;
+       
+       Button btnActivateAccount;
 
        
-       static final String PREF_PORT ="lastUsedPortPref";
-       static final String DEFAULT_DEVICE = "/dev/FinalKey";
-       static final String PREF_AUTOHIDE = "hideMainWinAfterConnect";
+       static final String PREF_PORT ="lastUsedPortPref"; //$NON-NLS-1$
+       static final String DEFAULT_DEVICE = "/dev/FinalKey"; //$NON-NLS-1$
+       static final String PREF_AUTOHIDE = "hideMainWinAfterConnect"; //$NON-NLS-1$
        public Composite cmpConnect;
        private Composite cmpAccounts;
        ListViewer lstAccounts;
@@ -101,6 +109,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
        public void open() {
                Display display = Display.getDefault();
                createContents();
+               addAccountsTab();
                shell.open();
                shell.layout();
                createSysTrayIcon();
@@ -116,7 +125,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
        
        public void log( String str )
        {
-               txtLog.append(str+"\n");
+               txtLog.append(str+"\n"); //$NON-NLS-1$
                if( tabFolder.getSelectionIndex() == 0 )
                {
                        txtLog.redraw();
@@ -134,7 +143,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                sysTrayIconVisible=true;
         //Check the SystemTray is supported
         if (!SystemTray.isSupported()) {
-            log("SystemTray is not supported, app is useless");
+            log("SystemTray is not supported, app is useless"); //$NON-NLS-1$
             return;
         }
         
@@ -146,14 +155,14 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
         popup = new PopupMenu();
         trayIcon =
-                new TrayIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/finalkey.png")));
-        trayIcon.setToolTip("The Final Key - Hardware password manager");
+                new TrayIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/finalkey.png"))); //$NON-NLS-1$
+        trayIcon.setToolTip("The Final Key - Hardware password manager"); //$NON-NLS-1$
         trayIcon.setImageAutoSize(true);
         final SystemTray tray = SystemTray.getSystemTray();
        
         // Create a pop-up menu components
-        showMain = new MenuItem("Show FinalKey");
-        hideMain = new MenuItem("Hide FinalKey");
+        showMain = new MenuItem(Messages.MainWin_7);
+        hideMain = new MenuItem(Messages.MainWin_8);
 
         showMain.addActionListener(new ActionListener() {
                        @Override
@@ -191,7 +200,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
         try {
             tray.add(trayIcon);
         } catch (AWTException e) {
-               log("TrayIcon could not be added.");
+               log("TrayIcon could not be added."); //$NON-NLS-1$
         }      
         
        }
@@ -246,11 +255,14 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
         * Create contents of the window.
         */
        protected void createContents() {
+               
+               
                shell = new Shell();
-               shell.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey.png"));
+               shell.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey.png")); //$NON-NLS-1$
                shell.setSize(711, 655);
-               shell.setText("Final Key (Not connected)");
 
+
+               
                
                prefs = Preferences.userNodeForPackage(this.getClass());
                
@@ -262,7 +274,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                tabFolder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
                
                TabItem tbtmConnection = new TabItem(tabFolder, SWT.NONE);
-               tbtmConnection.setText("Connection");
+               tbtmConnection.setText(Messages.MainWin_12);
                
                cmpConnect = new Composite(tabFolder, SWT.BORDER);
                tbtmConnection.setControl(cmpConnect);
@@ -270,7 +282,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                
 
                btnConnect = new Button(cmpConnect, SWT.CENTER);
-               btnConnect.setImage( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightning.png") );
+               btnConnect.setImage( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightning.png") ); //$NON-NLS-1$
                FormData fd_btnConnect = new FormData();
                fd_btnConnect.left = new FormAttachment(100, -125);
                fd_btnConnect.right = new FormAttachment(100, -10);
@@ -285,16 +297,12 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                                        fkSerial.disconnect();
                                } else {
                                        
-                                       prefs.putBoolean(PREF_AUTOHIDE, chkAutoHide.getSelection() );
-
-                                       fkSerial = new SerialWorker(mySelf);
-                                       prefs.put(PREF_PORT, txtDev.getText() );
-                                       fkSerial.connect(txtDev.getText(),txtPsw.getText());
-                                       txtPsw.setText("");
+                                       connect();
                                }
                        }
+
                });
-               btnConnect.setText("Connect");
+               btnConnect.setText(Messages.MainWin_15);
                
                txtPsw = new Text(cmpConnect, SWT.BORDER | SWT.PASSWORD);
                fd_btnConnect.bottom = new FormAttachment(txtPsw, 0, SWT.BOTTOM);
@@ -305,6 +313,22 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_txtPsw.left = new FormAttachment(0, 102);
                txtPsw.setLayoutData(fd_txtPsw);
                txtPsw.setFocus();
+               txtPsw.addKeyListener( new KeyListener() {
+                       
+                       @Override
+                       public void keyReleased(KeyEvent arg0) {
+
+                               
+                       }
+                       
+                       @Override
+                       public void keyPressed(KeyEvent arg0) {
+                               if( arg0.character==(char)13 )
+                               {
+                                       connect();
+                               }
+                       }
+               });
                
                txtLog = new Text(cmpConnect, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
                FormData fd_txtLog = new FormData();
@@ -322,7 +346,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_lblPort.top = new FormAttachment(0);
                fd_lblPort.left = new FormAttachment(0, 10);
                lblPort.setLayoutData(fd_lblPort);
-               lblPort.setText("Port");
+               lblPort.setText("Port"); //$NON-NLS-1$
                
                txtDev = new Text(cmpConnect, SWT.BORDER);
                FormData fd_txtDev = new FormData();
@@ -331,7 +355,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_txtDev.top = new FormAttachment(0);
                fd_txtDev.left = new FormAttachment(0, 102);
                txtDev.setLayoutData(fd_txtDev);
-               txtDev.setFont(SWTResourceManager.getFont("Cantarell", 9, SWT.NORMAL));
+               txtDev.setFont(SWTResourceManager.getFont("Cantarell", 9, SWT.NORMAL)); //$NON-NLS-1$
                txtDev.setText( prefs.get(PREF_PORT, DEFAULT_DEVICE));
                lblPassword = new Label(cmpConnect, SWT.NONE);
                FormData fd_lblPassword = new FormData();
@@ -339,7 +363,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_lblPassword.top = new FormAttachment(0, 29);
                fd_lblPassword.left = new FormAttachment(0, 10);
                lblPassword.setLayoutData(fd_lblPassword);
-               lblPassword.setText("Password");
+               lblPassword.setText(Messages.MainWin_18);
                
                chkAutoHide = new Button(cmpConnect, SWT.CHECK);
                FormData fd_chkAutoHide = new FormData();
@@ -347,7 +371,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_chkAutoHide.top = new FormAttachment(0);
                fd_chkAutoHide.left = new FormAttachment(0, 262);
                chkAutoHide.setLayoutData(fd_chkAutoHide);
-               chkAutoHide.setText("Hide after connection");
+               chkAutoHide.setText(Messages.MainWin_19);
                
                chkAutoHide.setSelection( prefs.getBoolean(PREF_AUTOHIDE, false)) ;
                
@@ -363,14 +387,14 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
                
                animation.setVisible(false);
-               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") );
-               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") ); //$NON-NLS-1$
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") ); //$NON-NLS-1$
                animation.setPlaying(false);
                cmpConnect.setTabList(new Control[]{txtPsw, btnConnect});
                
        
                
-               log("Type your password and press connect.\n----------\n");
+               log(Messages.MainWin_22);
 
 
                shell.addShellListener( new ShellListener() {
@@ -403,6 +427,16 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
        }
 
+       
+       private void connect() {
+               prefs.putBoolean(PREF_AUTOHIDE, chkAutoHide.getSelection() );
+               fkSerial = new SerialWorker(mySelf);
+               prefs.put(PREF_PORT, txtDev.getText() );
+               fkSerial.connect(txtDev.getText(),txtPsw.getText());
+               txtPsw.setText(""); //$NON-NLS-1$
+       }
+       
+       
        @Override
        public void updateAccountList()
        {
@@ -415,31 +449,32 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                        free--;
                        lstAccounts.add( a );
                                                        
-                       Menu menu = new Menu(a.name+" ["+a.num+"]");
-                       MenuItem both = new MenuItem("User + Pass");
-                       MenuItem usr = new MenuItem("User");
-                       MenuItem psw = new MenuItem("Pass");
+                       Menu menu = new Menu(a.name+" ["+a.num+"]"); //$NON-NLS-1$ //$NON-NLS-1$
+                       MenuItem both = new MenuItem(Messages.MainWin_25);
+                       MenuItem usr = new MenuItem(Messages.MainWin_26);
+                       MenuItem psw = new MenuItem(Messages.MainWin_27);
                        menu.add(both);
                        menu.add(usr);
                        menu.add(psw);
 
 
                        both.addActionListener(FkManager.getInstance());
-                       both.setActionCommand( "%"+a.num );
+                       both.setActionCommand( "%"+a.num ); //$NON-NLS-1$
 
 
 
                        psw.addActionListener(FkManager.getInstance()); 
-                       psw.setActionCommand( "p"+a.num);
+                       psw.setActionCommand( "p"+a.num); //$NON-NLS-1$
 
 
                        usr.addActionListener(FkManager.getInstance()); 
-                       usr.setActionCommand( "u"+a.num );
+                       usr.setActionCommand( "u"+a.num ); //$NON-NLS-1$
 
                        popup.add(menu);
                }
                
-               lblNumFree.setText(" "+free+" of 256 free.");
+               lblNumFree.setText(" "+free+Messages.MainWin_32); //$NON-NLS-1$
+               lblNumFree.pack();
                if( free == 0 )
                {
                        btnNewAccoount.setVisible(false);
@@ -454,13 +489,13 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                switch(state)
                {
                case Connected:
-                       shell.setText("Final Key (Connected)");
+                       shell.setText(Messages.MainWin_33);
                        
                        animation.setVisible(false);
                        animation.setPlaying(false);
 
 
-                       btnConnect.setText("Disconnect");
+                       btnConnect.setText(Messages.MainWin_34);
                        btnConnect.setVisible(true);
                        
                        //Should we hide?
@@ -480,15 +515,15 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                        int numAccounts=FkManager.getInstance().getList().size();
                        if( numAccounts>0 )
                        {
-                               trayIcon.displayMessage("FinalKey", numAccounts + " account"+(( numAccounts >1)?"s":"")+" ready.", 
+                               trayIcon.displayMessage("FinalKey", numAccounts + Messages.MainWin_36+(( numAccounts >1)?"s":Messages.MainWin_38)+Messages.MainWin_39,  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                                    TrayIcon.MessageType.INFO);
                        }
 
                        
-                       log("* Connected *");
+                       log(Messages.MainWin_40);
                        break;
                case Connecting:
-                       shell.setText("Final Key (Connecting...)");
+                       shell.setText(Messages.MainWin_41);
                        animation.setVisible(true);
                        animation.setPlaying(true);
 
@@ -508,10 +543,10 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                        
                        tabFolder.setSelection(0);
 
-                       shell.setText("Final Key (Not connected)");
+                       shell.setText(Messages.MainWin_42);
                        txtPsw.setVisible(true);
                        txtDev.setVisible(true);
-                       btnConnect.setText("Connect");
+                       btnConnect.setText(Messages.MainWin_43);
                        btnConnect.setVisible(true);
                        lblPort.setVisible(true);
                        lblPassword.setVisible(true);
@@ -519,7 +554,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                        clearSystray();
                        if(lastState != state)
                        {
-                               log("* Disconnected *");
+                               log(Messages.MainWin_44);
                        }
                        break;
                
@@ -545,14 +580,14 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
        private void addAccountsTab() {
                TabItem tbtmAccounts = new TabItem(tabFolder, SWT.NONE);
-               tbtmAccounts.setText("Accounts");
+               tbtmAccounts.setText(Messages.MainWin_45);
                
                cmpAccounts = new Composite(tabFolder, SWT.BORDER);
                tbtmAccounts.setControl(cmpAccounts);
                cmpAccounts.setLayout(new FormLayout());
                
                btnNewAccoount = new Button(cmpAccounts, SWT.NONE);
-               btnNewAccoount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/new.png"));
+               btnNewAccoount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/new.png")); //$NON-NLS-1$
                btnNewAccoount.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
@@ -569,10 +604,10 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_btnNewAccoount.right = new FormAttachment(100, -10);
                fd_btnNewAccoount.bottom = new FormAttachment(100, -10);
                btnNewAccoount.setLayoutData(fd_btnNewAccoount);
-               btnNewAccoount.setText("New Account");
+               btnNewAccoount.setText(Messages.MainWin_47);
                
                lblNumFree = new Label(cmpAccounts, SWT.NONE);
-               lblNumFree.setText("Hello World!");
+               lblNumFree.setText("Hello World!"); //$NON-NLS-1$
                
                FormData fd_lblNumFree = new FormData();
                fd_lblNumFree.left = new FormAttachment(0,0);
@@ -581,13 +616,25 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                
                
                lstAccounts = new ListViewer(cmpAccounts, SWT.BORDER | SWT.V_SCROLL);
+               List list = lstAccounts.getList();
+               list.setLayoutData(new FormData());
                FormData fd_lstAccounts = new FormData();
                fd_lstAccounts.bottom = new FormAttachment(btnNewAccoount, -6);
+               
+               btnActivateAccount = new Button(cmpAccounts, SWT.NONE);
+               btnActivateAccount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightbulb.png"));
+               FormData fd_btnActivateAccount = new FormData();
+               fd_btnActivateAccount.right = new FormAttachment(btnNewAccoount, -71);
+               fd_btnActivateAccount.left = new FormAttachment(lblNumFree, 78);
+               fd_btnActivateAccount.top = new FormAttachment(btnNewAccoount, 0, SWT.TOP);
+               btnActivateAccount.setLayoutData(fd_btnActivateAccount);
+               btnActivateAccount.setText(Messages.MainWin_btnNewButton_text);
                fd_lstAccounts.top = new FormAttachment(0, 10);
                fd_lstAccounts.left = new FormAttachment(0, 10);
                fd_lstAccounts.right = new FormAttachment(100, -10);
+               btnActivateAccount.setVisible(false);
+               
                
-
                //lstAccounts.setLayoutData(fd_lstAccounts);
                lstAccounts.getControl().setLayoutData(fd_lstAccounts);
                lstAccounts.addDoubleClickListener( new IDoubleClickListener() {
@@ -610,13 +657,59 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                                        
                                        shell.setEnabled(true);
                                } else {
-                                       System.out.println("Selected nothing.");
+                                       System.out.println("Selected nothing."); //$NON-NLS-1$
                                }
                                
                                
                        }
                });
                
+               lstAccounts.addSelectionChangedListener( new ISelectionChangedListener() {
+                       
+                       @Override
+                       public void selectionChanged(SelectionChangedEvent arg0) {
+                               StructuredSelection selection = (StructuredSelection) arg0.getSelection();
+                               if( !selection.isEmpty() )
+                               {
+                                       Account acc = (Account)selection.getFirstElement();
+                                       btnActivateAccount.setVisible(true);
+                                       btnActivateAccount.setText(acc.name);
+                                       
+                                       for( Listener s :btnActivateAccount.getListeners(SWT.Selection) )
+                                       {
+                                               btnActivateAccount.removeListener(SWT.Selection, s);
+
+                                       }
+                                       
+                                       btnActivateAccount.addSelectionListener( new SelectionListener() {
+                                               
+                                               @Override
+                                               public void widgetSelected(SelectionEvent arg0) {
+                                                       
+                                                       StructuredSelection selection = (StructuredSelection) lstAccounts.getSelection();
+                                                       Account acc = (Account)selection.getFirstElement();
+                                                       TriggerDialog diag = new TriggerDialog(shell, shell.getStyle(), acc, mySelf );
+
+                                                       shell.setMinimized(true);
+                                                       shell.setEnabled(false);
+                                                       if( !((Boolean)diag.open()) )
+                                                       {
+                                                               shell.setMinimized(false);
+                                                       }
+                                                       
+                                                       shell.setEnabled(true);
+                                               }
+                                               
+                                               @Override
+                                               public void widgetDefaultSelected(SelectionEvent arg0) {
+                                                       // TODO Auto-generated method stub
+                                                       
+                                               }
+                                       });
+                                       
+                               }
+                       }
+               });
                
                                
        }
@@ -627,20 +720,18 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                switch(event.result)
                {
                case CHECK_FAILED:
-                       System.out.println("Trouble checking for updates.");
+                       System.out.println("Trouble checking for updates."); //$NON-NLS-1$
                        break;
                case NO_UPDATE:
-                       System.out.println("No update avaiable at this time.");
+                       System.out.println("No update avaiable at this time."); //$NON-NLS-1$
                        break;
                case UPDATE_AVAILABLE:
                        MessageBox dialog = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
-                       dialog.setText("FinalKey GUI Version "+event.version+" available.");
-                       dialog.setMessage("There's a new version of FinalKey GUI available.\nGo to http://cyberstalker.dk/finalkey/gui/ to download.\n\nNews:\n"+event.message);
+                       dialog.setText(Messages.MainWin_52+event.version+Messages.MainWin_53);
+                       dialog.setMessage(Messages.MainWin_54+event.message);
                        dialog.open();  
                        break;
                }
                
        }
-
-
 }
diff --git a/src/fkgui/Messages.java b/src/fkgui/Messages.java
new file mode 100644 (file)
index 0000000..3191d63
--- /dev/null
@@ -0,0 +1,146 @@
+package fkgui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+       private static final String BUNDLE_NAME = "fkgui.messages"; //$NON-NLS-1$
+       public static String MainWin_12;
+       public static String MainWin_15;
+       public static String MainWin_18;
+       public static String MainWin_19;
+       public static String MainWin_22;
+       public static String MainWin_25;
+       public static String MainWin_26;
+       public static String MainWin_27;
+       public static String MainWin_32;
+       public static String MainWin_33;
+       public static String MainWin_34;
+       public static String MainWin_36;
+       public static String MainWin_38;
+       public static String MainWin_39;
+       public static String MainWin_40;
+       public static String MainWin_41;
+       public static String MainWin_42;
+       public static String MainWin_43;
+       public static String MainWin_44;
+       public static String MainWin_45;
+       public static String MainWin_47;
+       public static String MainWin_52;
+       public static String MainWin_53;
+       public static String MainWin_54;
+       public static String MainWin_7;
+       public static String MainWin_8;
+       public static String NewAccountDialog_10;
+       public static String NewAccountDialog_11;
+       public static String NewAccountDialog_12;
+       public static String NewAccountDialog_13;
+       public static String NewAccountDialog_14;
+       public static String NewAccountDialog_15;
+       public static String NewAccountDialog_16;
+       public static String NewAccountDialog_17;
+       public static String NewAccountDialog_18;
+       public static String NewAccountDialog_19;
+       public static String NewAccountDialog_20;
+       public static String NewAccountDialog_21;
+       public static String NewAccountDialog_22;
+       public static String NewAccountDialog_23;
+       public static String NewAccountDialog_24;
+       public static String NewAccountDialog_25;
+       public static String NewAccountDialog_26;
+       public static String NewAccountDialog_27;
+       public static String NewAccountDialog_28;
+       public static String NewAccountDialog_29;
+       public static String NewAccountDialog_30;
+       public static String NewAccountDialog_31;
+       public static String NewAccountDialog_32;
+       public static String NewAccountDialog_33;
+       public static String NewAccountDialog_34;
+       public static String NewAccountDialog_35;
+       public static String NewAccountDialog_36;
+       public static String NewAccountDialog_37;
+       public static String NewAccountDialog_38;
+       public static String NewAccountDialog_39;
+       public static String NewAccountDialog_4;
+       public static String NewAccountDialog_40;
+       public static String NewAccountDialog_41;
+       public static String NewAccountDialog_42;
+       public static String NewAccountDialog_43;
+       public static String NewAccountDialog_44;
+       public static String NewAccountDialog_47;
+       public static String NewAccountDialog_48;
+       public static String NewAccountDialog_49;
+       public static String NewAccountDialog_5;
+       public static String NewAccountDialog_50;
+       public static String NewAccountDialog_51;
+       public static String NewAccountDialog_54;
+       public static String NewAccountDialog_55;
+       public static String NewAccountDialog_56;
+       public static String NewAccountDialog_57;
+       public static String NewAccountDialog_58;
+       public static String NewAccountDialog_59;
+       public static String NewAccountDialog_6;
+       public static String NewAccountDialog_60;
+       public static String NewAccountDialog_61;
+       public static String NewAccountDialog_62;
+       public static String NewAccountDialog_63;
+       public static String NewAccountDialog_64;
+       public static String NewAccountDialog_65;
+       public static String NewAccountDialog_7;
+       public static String NewAccountDialog_8;
+       public static String NewAccountDialog_9;
+       public static String PermitCountDownDialog_0;
+       public static String SerialWorker_0;
+       public static String SerialWorker_1;
+       public static String SerialWorker_11;
+       public static String SerialWorker_12;
+       public static String SerialWorker_13;
+       public static String SerialWorker_16;
+       public static String SerialWorker_2;
+       public static String SerialWorker_23;
+       public static String SerialWorker_3;
+       public static String SerialWorker_4;
+       public static String SerialWorker_5;
+       public static String SerialWorker_7;
+       public static String SerialWorker_8;
+       public static String TriggerDialog_0;
+       public static String TriggerDialog_1;
+       public static String TriggerDialog_10;
+       public static String TriggerDialog_11;
+       public static String TriggerDialog_12;
+       public static String TriggerDialog_14;
+       public static String TriggerDialog_15;
+       public static String TriggerDialog_17;
+       public static String TriggerDialog_18;
+       public static String TriggerDialog_19;
+       public static String TriggerDialog_2;
+       public static String TriggerDialog_20;
+       public static String TriggerDialog_21;
+       public static String TriggerDialog_22;
+       public static String TriggerDialog_23;
+       public static String TriggerDialog_24;
+       public static String TriggerDialog_26;
+       public static String TriggerDialog_28;
+       public static String TriggerDialog_29;
+       public static String TriggerDialog_3;
+       public static String TriggerDialog_30;
+       public static String TriggerDialog_31;
+       public static String TriggerDialog_33;
+       public static String TriggerDialog_34;
+       public static String TriggerDialog_35;
+       public static String TriggerDialog_36;
+       public static String TriggerDialog_39;
+       public static String TriggerDialog_4;
+       public static String TriggerDialog_40;
+       public static String TriggerDialog_41;
+       public static String TriggerDialog_6;
+       public static String TriggerDialog_7;
+       public static String TriggerDialog_8;
+       public static String MainWin_btnNewButton_text;
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+
+       private Messages() {
+       }
+}
index 567ef2e..3f7f65f 100644 (file)
@@ -35,10 +35,10 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        
        private enum FkNewAccStep { NAMES, PASSTYPE, PASS_MAN, PASS_AUT, SEPERATOR, REVIEW, CLICKBTN, SAVING };
        
-       private String strAccountName = "";
-       private String strUserName = "";
-       private String strPassword = "";
-       private String autoPassSpecials = "!@#,.-_()";
+       private String strAccountName = ""; //$NON-NLS-1$
+       private String strUserName = ""; //$NON-NLS-1$
+       private String strPassword = ""; //$NON-NLS-1$
+       private String autoPassSpecials = "!@#,.-_()"; //$NON-NLS-1$
        private Boolean autoPassword = true;
        private Boolean autoPassAllSpecials = true;
        private int autoPassLen = 16;
@@ -54,9 +54,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        
        //ManPass
        Label lblTypeThePassword;
-       FormData fd_lblTypeThePassword; 
        Label lblPassword;
-       FormData fd_lblPassword;
        Button chkShowPsw;
        Button btnManPassPageNext;
        
@@ -92,6 +90,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
         */
        public Object open() {
                createContents();
+               
                shlNewAccount.open();
                shlNewAccount.layout();
                Display display = getParent().getDisplay();
@@ -125,15 +124,15 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                Label lblEnterNewName = new Label(composite, SWT.NONE);
                FormData fd_lblEnterNewName = new FormData();
                fd_lblEnterNewName.bottom = new FormAttachment(0, 112);
-               fd_lblEnterNewName.right = new FormAttachment(0, 603);
+               fd_lblEnterNewName.right = new FormAttachment(0, 613);
                fd_lblEnterNewName.top = new FormAttachment(0, 10);
                fd_lblEnterNewName.left = new FormAttachment(0, 10);
                lblEnterNewName.setLayoutData(fd_lblEnterNewName);
-               lblEnterNewName.setText("This creates a new account on your FinalKey.\nTo begin, choose a name for your account, for example the\nname of the website or service you want to login to.\nThis is the name that will be visible in the list of accounts.");
+               lblEnterNewName.setText(Messages.NewAccountDialog_4);
                Label lblUsername = new Label(composite, SWT.NONE);
                FormData fd_lblUsername = new FormData();
                lblUsername.setLayoutData(fd_lblUsername);
-               lblUsername.setText("Account Name:");
+               lblUsername.setText(Messages.NewAccountDialog_5);
                
                txtAccountName = new Text(composite, SWT.BORDER);
                fd_lblUsername.bottom = new FormAttachment(txtAccountName, 0, SWT.BOTTOM);
@@ -143,6 +142,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                fd_txtAccountName.right = new FormAttachment(100, -274);
                fd_txtAccountName.left = new FormAttachment(0, 180);
                txtAccountName.setLayoutData(fd_txtAccountName);
+               txtAccountName.setTextLimit(31);
                txtAccountName.addModifyListener( new ModifyListener() {
                        @Override
                        public void modifyText(ModifyEvent arg0) {
@@ -157,14 +157,14 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                fd_lblNewLabel.right = new FormAttachment(100);
                fd_lblNewLabel.top = new FormAttachment(lblUsername, 20);
                lblNewLabel.setLayoutData(fd_lblNewLabel);
-               lblNewLabel.setText("The username is the name that The Final Key will\ntype into the service when logging in, it is typically an E-Mail address.");
+               lblNewLabel.setText(Messages.NewAccountDialog_6);
                
                Label lblUsername_1 = new Label(composite, SWT.NONE);
                FormData fd_lblUsername_1 = new FormData();
                fd_lblUsername_1.top = new FormAttachment(lblNewLabel, 6);
                fd_lblUsername_1.right = new FormAttachment(lblUsername, 0, SWT.RIGHT);
                lblUsername_1.setLayoutData(fd_lblUsername_1);
-               lblUsername_1.setText("Username:");
+               lblUsername_1.setText(Messages.NewAccountDialog_7);
                
                txtUserName = new Text(composite, SWT.BORDER);
                FormData fd_txtUserName = new FormData();
@@ -188,9 +188,9 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                FormData fd_btnCancel = new FormData();
                fd_btnCancel.bottom = new FormAttachment(100, -10);
-               fd_btnCancel.left = new FormAttachment(0, 10);
+               fd_btnCancel.left = new FormAttachment(lblEnterNewName, 0, SWT.LEFT);
                btnCancel.setLayoutData(fd_btnCancel);
-               btnCancel.setText("Cancel");
+               btnCancel.setText(Messages.NewAccountDialog_8);
                
                btnNext0 = new Button(composite, SWT.NONE);
                btnNext0.addSelectionListener(new SelectionAdapter() {
@@ -201,7 +201,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                                updatePage(FkNewAccStep.PASSTYPE);
                        }
                });
-               btnNext0.setText("Next");
+               btnNext0.setText(Messages.NewAccountDialog_9);
                FormData fd_btnNext0 = new FormData();
                fd_btnNext0.bottom = new FormAttachment(btnCancel, 0, SWT.BOTTOM);
                fd_btnNext0.right = new FormAttachment(lblEnterNewName, 0, SWT.RIGHT);
@@ -228,7 +228,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                fd_lblNextUpSetting.top = new FormAttachment(0, 10);
                fd_lblNextUpSetting.left = new FormAttachment(0, 10);
                lblNextUpSetting.setLayoutData(fd_lblNextUpSetting);
-               lblNextUpSetting.setText("Next up: Setting a safe password!\nYou have two options: Manually enter a password or to\nhave The Final Key generate a strong and random password,\nit is strongly recommended to let The Final Key generate a\nrandom password, select the longest that is allowed by the service.");
+               lblNextUpSetting.setText(Messages.NewAccountDialog_10);
                
                radAutPSW = new Button(composite, SWT.RADIO);
                if( autoPassword )
@@ -239,7 +239,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                fd_radAutPSW.top = new FormAttachment(lblNextUpSetting, 37);
                fd_radAutPSW.left = new FormAttachment(0, 213);
                radAutPSW.setLayoutData(fd_radAutPSW);
-               radAutPSW.setText("Automatic");
+               radAutPSW.setText(Messages.NewAccountDialog_11);
                
                radManPSW = new Button(composite, SWT.RADIO);
                if( !autoPassword )
@@ -250,10 +250,10 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                fd_radManPSW.top = new FormAttachment(radAutPSW, 6);
                fd_radManPSW.left = new FormAttachment(radAutPSW, 0, SWT.LEFT);
                radManPSW.setLayoutData(fd_radManPSW);
-               radManPSW.setText("Manual Entry");
+               radManPSW.setText(Messages.NewAccountDialog_12);
                
                Button btnNext1 = new Button(composite, SWT.NONE);
-               btnNext1.setText("Next");
+               btnNext1.setText(Messages.NewAccountDialog_13);
                FormData fd_btnNext1 = new FormData();
                fd_btnNext1.bottom = new FormAttachment(100, -10);
                fd_btnNext1.right = new FormAttachment(100, -10);
@@ -280,7 +280,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                Button btnBack0 = new Button(composite, SWT.NONE);
-               btnBack0.setText("Back");
+               btnBack0.setText(Messages.NewAccountDialog_14);
                FormData fd_btnBack0 = new FormData();
                fd_btnBack0.bottom = new FormAttachment(btnNext1, 0, SWT.BOTTOM);
                fd_btnBack0.left = new FormAttachment(lblNextUpSetting, 0, SWT.LEFT);
@@ -314,53 +314,87 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        void createPassAutPage()
        {
                composite = new Composite(shlNewAccount, SWT.NONE);
+               composite.setLayout(new FormLayout());
                
                Label lblBeforeCreatingA = new Label(composite, SWT.NONE);
-               lblBeforeCreatingA.setBounds(10, 10, 593, 104);
-               lblBeforeCreatingA.setText("Before creating a password, please select how long it should be.\nA longer password is safer, but the maximum allowed length varies,\ndepending on where you're using it. For example many websites do not\nallow passwords longer than 16 characters.");
+               FormData fd_lblBeforeCreatingA = new FormData();
+               fd_lblBeforeCreatingA.top = new FormAttachment(0, 10);
+               fd_lblBeforeCreatingA.left = new FormAttachment(0, 10);
+               lblBeforeCreatingA.setLayoutData(fd_lblBeforeCreatingA);
+               
+               lblBeforeCreatingA.setText(Messages.NewAccountDialog_15);
                
                Label lblPasswordLength = new Label(composite, SWT.NONE);
-               lblPasswordLength.setBounds(32, 132, 127, 23);
-               lblPasswordLength.setText("Password length:");
+               fd_lblBeforeCreatingA.bottom = new FormAttachment(100, -257);
+               FormData fd_lblPasswordLength = new FormData();
+               lblPasswordLength.setLayoutData(fd_lblPasswordLength);
+               lblPasswordLength.setText(Messages.NewAccountDialog_16);
                
                spnLen = new Spinner(composite, SWT.BORDER);
+               fd_lblPasswordLength.bottom = new FormAttachment(spnLen, 0, SWT.BOTTOM);
+               fd_lblPasswordLength.right = new FormAttachment(spnLen, -9);
+               FormData fd_spnLen = new FormData();
+               fd_spnLen.top = new FormAttachment(0, 119);
+               fd_spnLen.left = new FormAttachment(0, 310);
+               spnLen.setLayoutData(fd_spnLen);
                spnLen.setMaximum(128);
                spnLen.setSelection(autoPassLen);
-               spnLen.setBounds(165, 120, 62, 35);
                
                Label lblASafePassword = new Label(composite, SWT.NONE);
-               lblASafePassword.setBounds(10, 161, 593, 76);
-               lblASafePassword.setText("A strong password contains not only uppercase and lowercase\nletters and numbers, but also other symbols.\nIt differs which symbols are allowed, some allow all ASCII symbols.");
+               FormData fd_lblASafePassword = new FormData();
+               fd_lblASafePassword.right = new FormAttachment(lblBeforeCreatingA, 0, SWT.RIGHT);
+               fd_lblASafePassword.top = new FormAttachment(lblPasswordLength, 47);
+               fd_lblASafePassword.left = new FormAttachment(0, 10);
+               lblASafePassword.setLayoutData(fd_lblASafePassword);
+               lblASafePassword.setText(Messages.NewAccountDialog_17);
                
                radAllSymbols = new Button(composite, SWT.RADIO);
+               fd_lblASafePassword.bottom = new FormAttachment(100, -100);
+               FormData fd_radAllSymbols = new FormData();
+               fd_radAllSymbols.top = new FormAttachment(lblASafePassword, 6);
+               fd_radAllSymbols.left = new FormAttachment(0, 10);
+               radAllSymbols.setLayoutData(fd_radAllSymbols);
                if( autoPassAllSpecials )
                {
                        radAllSymbols.setSelection(true);
                }
-               radAllSymbols.setBounds(10, 251, 120, 27);
-               radAllSymbols.setText("All symbols");
+               radAllSymbols.setText(Messages.NewAccountDialog_18);
+               radAllSymbols.pack();
                
                Button radOnlySelected = new Button(composite, SWT.RADIO);
+               FormData fd_radOnlySelected = new FormData();
+               fd_radOnlySelected.bottom = new FormAttachment(radAllSymbols, 0, SWT.BOTTOM);
+               fd_radOnlySelected.right = new FormAttachment(spnLen, 0, SWT.RIGHT);
+               radOnlySelected.setLayoutData(fd_radOnlySelected);
                if( !autoPassAllSpecials )
                {
                        radOnlySelected.setSelection(true);
                }
-               radOnlySelected.setBounds(165, 251, 120, 27);
-               radOnlySelected.setText("Only these:");
+               radOnlySelected.setText(Messages.NewAccountDialog_19);
                
                txtSpecials = new Text(composite, SWT.BORDER);
+               FormData fd_txtSpecials = new FormData();
+               fd_txtSpecials.top = new FormAttachment(lblASafePassword, 6);
+               fd_txtSpecials.left = new FormAttachment(radOnlySelected, 6);
+               txtSpecials.setLayoutData(fd_txtSpecials);
                txtSpecials.setText(autoPassSpecials);
                txtSpecials.setBounds(291, 243, 312, 35);
                
-               Button button_5 = new Button(composite, SWT.NONE);
-               button_5.setText("Back");
-               button_5.setBounds(10, 288, 48, 35);
-               button_5.addSelectionListener(new SelectionListener() {
+               
+               Button button_6 = new Button(composite, SWT.NONE);
+               fd_lblBeforeCreatingA.right = new FormAttachment(button_6, 0, SWT.RIGHT);
+               button_6.setText(Messages.NewAccountDialog_21);
+               FormData fd_button_6 = new FormData();
+               fd_button_6.bottom = new FormAttachment(100, -10);
+               fd_button_6.right = new FormAttachment(100, -10);
+               button_6.setLayoutData(fd_button_6);
+               
+               button_6.addSelectionListener(new SelectionListener() {
                        
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
                                autoPassPageSaveValues();
-                               updatePage( FkNewAccStep.PASSTYPE );
+                               updatePage( FkNewAccStep.SEPERATOR );
                        }
                        
                        @Override
@@ -368,15 +402,21 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                        }
                });
                
-               Button button_6 = new Button(composite, SWT.NONE);
-               button_6.setText("Next");
-               button_6.setBounds(555, 288, 48, 35);
-               button_6.addSelectionListener(new SelectionListener() {
+
+               Button button_5 = new Button(composite, SWT.NONE);
+               button_5.setText(Messages.NewAccountDialog_20);
+               FormData fd_button_5 = new FormData();
+               fd_button_5.left = new FormAttachment(0, 10);
+
+               fd_button_5.bottom = new FormAttachment(button_6, 0, SWT.BOTTOM);
+               button_5.setLayoutData(fd_button_5);
+               
+               button_5.addSelectionListener(new SelectionListener() {
                        
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
                                autoPassPageSaveValues();
-                               updatePage( FkNewAccStep.SEPERATOR );
+                               updatePage( FkNewAccStep.PASSTYPE );
                        }
                        
                        @Override
@@ -384,6 +424,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                        }
                });
                
+               
         Control[] controls = new Control[] { spnLen, radAllSymbols, radOnlySelected, button_6, button_5 };
         composite.setTabList(controls);                        
                spnLen.setFocus();
@@ -394,11 +435,10 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        void makePswField(Boolean showPsw)
        {
                txtManPSW = new Text(composite, SWT.BORDER | ((showPsw)?0:SWT.PASSWORD) );
-               fd_lblPassword.bottom = new FormAttachment(txtManPSW, 0, SWT.BOTTOM);
                FormData fd_txtManPSW = new FormData();
-               fd_txtManPSW.right = new FormAttachment(100, -10);
-               fd_txtManPSW.left = new FormAttachment(lblPassword, 6);
-               fd_txtManPSW.top = new FormAttachment(lblTypeThePassword, 6);
+               fd_txtManPSW.right = new FormAttachment(0, 613);
+               fd_txtManPSW.top = new FormAttachment(0, 62);
+               fd_txtManPSW.left = new FormAttachment(0, 92);
                txtManPSW.setLayoutData(fd_txtManPSW);
                txtManPSW.setText(strPassword);
                txtManPSW.addModifyListener( new ModifyListener() {
@@ -418,10 +458,11 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                
                chkShowPsw = new Button(composite, SWT.CHECK);
                FormData fd_chkShowPsw = new FormData();
-               fd_chkShowPsw.top = new FormAttachment(txtManPSW, 6);
-               fd_chkShowPsw.left = new FormAttachment(txtManPSW, 0, SWT.LEFT);
+               fd_chkShowPsw.right = new FormAttachment(0, 613);
+               fd_chkShowPsw.top = new FormAttachment(0, 103);
+               fd_chkShowPsw.left = new FormAttachment(0, 92);
                chkShowPsw.setLayoutData(fd_chkShowPsw);
-               chkShowPsw.setText("Show Password");
+               chkShowPsw.setText(Messages.NewAccountDialog_22);
                chkShowPsw.setSelection(showPsw);
                
                chkShowPsw.addSelectionListener( new SelectionListener() {
@@ -461,10 +502,9 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                
                Button BtnBack1 = new Button(composite, SWT.NONE);
                FormData fd_BtnBack1 = new FormData();
-               fd_BtnBack1.top = new FormAttachment(0, 288);
-               fd_BtnBack1.left = new FormAttachment(0, 10);
+               fd_BtnBack1.bottom = new FormAttachment(100, -10);
                BtnBack1.setLayoutData(fd_BtnBack1);
-               BtnBack1.setText("Back");
+               BtnBack1.setText(Messages.NewAccountDialog_23);
                BtnBack1.addSelectionListener( new SelectionListener() {
                        
                        @Override
@@ -479,11 +519,10 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                btnManPassPageNext = new Button(composite, SWT.NONE);
-               FormData fd_button_4 = new FormData();
-               fd_button_4.top = new FormAttachment(0, 288);
-               fd_button_4.left = new FormAttachment(0, 555);
-               btnManPassPageNext.setLayoutData(fd_button_4);
-               btnManPassPageNext.setText("Next");
+               FormData fd_btnManPassPageNext = new FormData();
+               fd_btnManPassPageNext.bottom = new FormAttachment(BtnBack1, 0, SWT.BOTTOM);
+               btnManPassPageNext.setLayoutData(fd_btnManPassPageNext);
+               btnManPassPageNext.setText(Messages.NewAccountDialog_24);
                btnManPassPageNext.setVisible(false);
                btnManPassPageNext.addSelectionListener( new SelectionListener() {
                        
@@ -498,17 +537,21 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                lblTypeThePassword = new Label(composite, SWT.NONE);
-               fd_lblTypeThePassword = new FormData();
+               fd_btnManPassPageNext.right = new FormAttachment(lblTypeThePassword, 0, SWT.RIGHT);
+               fd_BtnBack1.left = new FormAttachment(lblTypeThePassword, 0, SWT.LEFT);
+               FormData fd_lblTypeThePassword = new FormData();
+               fd_lblTypeThePassword.right = new FormAttachment(0, 613);
                fd_lblTypeThePassword.top = new FormAttachment(0, 10);
                fd_lblTypeThePassword.left = new FormAttachment(0, 10);
                lblTypeThePassword.setLayoutData(fd_lblTypeThePassword);
-               lblTypeThePassword.setText("Type the password your wish to use for ACCOUNT\nIn the box below.");
+               lblTypeThePassword.setText(Messages.NewAccountDialog_25);
                
                lblPassword = new Label(composite, SWT.NONE);
-               fd_lblPassword = new FormData();
-               fd_lblPassword.left = new FormAttachment(BtnBack1, 0, SWT.LEFT);
+               FormData fd_lblPassword = new FormData();
+               fd_lblPassword.top = new FormAttachment(0, 74);
+               fd_lblPassword.left = new FormAttachment(0, 10);
                lblPassword.setLayoutData(fd_lblPassword);
-               lblPassword.setText("Password:");
+               lblPassword.setText(Messages.NewAccountDialog_26);
                
                makePswField(false);
                
@@ -527,39 +570,42 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                
                Label lblToMakeFinalkey = new Label(composite, SWT.NONE);
                FormData fd_lblToMakeFinalkey = new FormData();
+               fd_lblToMakeFinalkey.right = new FormAttachment(0, 613);
                fd_lblToMakeFinalkey.top = new FormAttachment(0, 10);
                fd_lblToMakeFinalkey.left = new FormAttachment(0, 10);
                lblToMakeFinalkey.setLayoutData(fd_lblToMakeFinalkey);
-               lblToMakeFinalkey.setText("When you trigger the Final Key to type an account (Username + Password), it\nwill also type a \"seperation\" key, to jump from the Username input to the\nPassword input. On most websites, the \"tab\" key is used for this.\nHowever, in some applications, the \"enter\" key is used.\nHere you can select which key can be used between the username and password\nfor this account.");
+               lblToMakeFinalkey.setText(Messages.NewAccountDialog_27);
                
                radTabSep = new Button(composite, SWT.RADIO);
+               FormData fd_radTabSep = new FormData();
+               fd_radTabSep.right = new FormAttachment(0, 613);
+               fd_radTabSep.top = new FormAttachment(0, 172);
+               fd_radTabSep.left = new FormAttachment(0, 231);
+               radTabSep.setLayoutData(fd_radTabSep);
                if( seperatorTab )
                {
                        radTabSep.setSelection(true);
                }
-               FormData fd_radTabSep = new FormData();
-               fd_radTabSep.top = new FormAttachment(lblToMakeFinalkey, 24);
-               fd_radTabSep.left = new FormAttachment(0, 231);
-               radTabSep.setLayoutData(fd_radTabSep);
-               radTabSep.setText("Tab");
+               radTabSep.setText(Messages.NewAccountDialog_28);
                
                Button radEnterSep = new Button(composite, SWT.RADIO);
+               FormData fd_radEnterSep = new FormData();
+               fd_radEnterSep.right = new FormAttachment(0, 613);
+               fd_radEnterSep.top = new FormAttachment(0, 205);
+               fd_radEnterSep.left = new FormAttachment(0, 231);
+               radEnterSep.setLayoutData(fd_radEnterSep);
                if( !seperatorTab )
                {
                        radEnterSep.setSelection(true);
                }
-               FormData fd_radEnterSep = new FormData();
-               fd_radEnterSep.top = new FormAttachment(radTabSep, 6);
-               fd_radEnterSep.left = new FormAttachment(radTabSep, 0, SWT.LEFT);
-               radEnterSep.setLayoutData(fd_radEnterSep);
-               radEnterSep.setText("Enter");
+               radEnterSep.setText(Messages.NewAccountDialog_29);
                
                Button button_7 = new Button(composite, SWT.NONE);
-               button_7.setText("Back");
                FormData fd_button_7 = new FormData();
-               fd_button_7.bottom = new FormAttachment(100, -10);
+               fd_button_7.top = new FormAttachment(0, 325);
                fd_button_7.left = new FormAttachment(0, 10);
                button_7.setLayoutData(fd_button_7);
+               button_7.setText(Messages.NewAccountDialog_30);
                button_7.addSelectionListener(new SelectionListener() {
                        
                        @Override
@@ -579,11 +625,11 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                Button button_8 = new Button(composite, SWT.NONE);
-               button_8.setText("Next");
                FormData fd_button_8 = new FormData();
-               fd_button_8.bottom = new FormAttachment(button_7, 0, SWT.BOTTOM);
-               fd_button_8.right = new FormAttachment(lblToMakeFinalkey, 0, SWT.RIGHT);
+               fd_button_8.top = new FormAttachment(0, 325);
+               fd_button_8.left = new FormAttachment(0, 565);
                button_8.setLayoutData(fd_button_8);
+               button_8.setText(Messages.NewAccountDialog_31);
                button_8.addSelectionListener(new SelectionListener() {
                        
                        @Override
@@ -612,53 +658,61 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                
                Label lblHeresAnOverview = new Label(composite, SWT.NONE);
                FormData fd_lblHeresAnOverview = new FormData();
-               fd_lblHeresAnOverview.right = new FormAttachment(0, 603);
+               fd_lblHeresAnOverview.right = new FormAttachment(0, 613);
                fd_lblHeresAnOverview.top = new FormAttachment(0, 10);
                fd_lblHeresAnOverview.left = new FormAttachment(0, 10);
                lblHeresAnOverview.setLayoutData(fd_lblHeresAnOverview);
-               lblHeresAnOverview.setText("Here's an overview of the account information");
+               lblHeresAnOverview.setText(Messages.NewAccountDialog_32);
                
                Label lblAccountName = new Label(composite, SWT.NONE);
+               lblAccountName.setAlignment(SWT.RIGHT);
                FormData fd_lblAccountName = new FormData();
-               fd_lblAccountName.left = new FormAttachment(0, 120);
-               fd_lblAccountName.top = new FormAttachment(lblHeresAnOverview, 18);
+               fd_lblAccountName.left = new FormAttachment(0, 10);
+               fd_lblAccountName.top = new FormAttachment(0, 51);
                lblAccountName.setLayoutData(fd_lblAccountName);
-               lblAccountName.setText("Account Name:");
+               lblAccountName.setText(Messages.NewAccountDialog_33);
                
                Label lblPasswordType = new Label(composite, SWT.NONE);
+               lblPasswordType.setAlignment(SWT.RIGHT);
                FormData fd_lblPasswordType = new FormData();
                fd_lblPasswordType.right = new FormAttachment(lblAccountName, 0, SWT.RIGHT);
+               fd_lblPasswordType.left = new FormAttachment(lblHeresAnOverview, 0, SWT.LEFT);
+               fd_lblPasswordType.top = new FormAttachment(0, 109);
                lblPasswordType.setLayoutData(fd_lblPasswordType);
-               lblPasswordType.setText("Password:");
+               lblPasswordType.setText(Messages.NewAccountDialog_34);
                
                Label lblUserName = new Label(composite, SWT.NONE);
-               fd_lblPasswordType.top = new FormAttachment(lblUserName, 6);
+               lblUserName.setAlignment(SWT.RIGHT);
                FormData fd_lblUserName = new FormData();
-               fd_lblUserName.top = new FormAttachment(lblAccountName, 6);
-               fd_lblUserName.right = new FormAttachment(lblAccountName, 0, SWT.RIGHT);
+               fd_lblUserName.right = new FormAttachment(lblHeresAnOverview, 220);
+               fd_lblUserName.left = new FormAttachment(lblHeresAnOverview, 0, SWT.LEFT);
+               fd_lblUserName.top = new FormAttachment(0, 80);
                lblUserName.setLayoutData(fd_lblUserName);
-               lblUserName.setText("User Name:");
+               lblUserName.setText(Messages.NewAccountDialog_35);
                
                Label lblIfEverythingLooks = new Label(composite, SWT.NONE);
                FormData fd_lblIfEverythingLooks = new FormData();
-               fd_lblIfEverythingLooks.top = new FormAttachment(lblPasswordType, 49);
-               fd_lblIfEverythingLooks.left = new FormAttachment(lblHeresAnOverview, 0, SWT.LEFT);
+               fd_lblIfEverythingLooks.bottom = new FormAttachment(0, 287);
+               fd_lblIfEverythingLooks.right = new FormAttachment(lblHeresAnOverview, 0, SWT.RIGHT);
+               fd_lblIfEverythingLooks.top = new FormAttachment(0, 181);
+               fd_lblIfEverythingLooks.left = new FormAttachment(0, 10);
                lblIfEverythingLooks.setLayoutData(fd_lblIfEverythingLooks);
-               lblIfEverythingLooks.setText("If everything looks okay, press save and wait until the Final Key blinks,\nwhen it blinks, press the button to allow the account to be saved.");
+               lblIfEverythingLooks.setText(Messages.NewAccountDialog_36);
                
                Label lblSeperator = new Label(composite, SWT.NONE);
+               lblSeperator.setAlignment(SWT.RIGHT);
                FormData fd_lblSeperator = new FormData();
-               fd_lblSeperator.top = new FormAttachment(lblPasswordType, 6);
-               fd_lblSeperator.right = new FormAttachment(lblAccountName, 0, SWT.RIGHT);
+               fd_lblSeperator.right = new FormAttachment(0, 230);
+               fd_lblSeperator.top = new FormAttachment(0, 138);
+               fd_lblSeperator.left = new FormAttachment(0, 10);
                lblSeperator.setLayoutData(fd_lblSeperator);
-               lblSeperator.setText("Seperator:");
+               lblSeperator.setText(Messages.NewAccountDialog_37);
                
                Button button_9 = new Button(composite, SWT.NONE);
-               button_9.setText("Back");
                FormData fd_button_9 = new FormData();
-               fd_button_9.bottom = new FormAttachment(100, -10);
                fd_button_9.left = new FormAttachment(lblHeresAnOverview, 0, SWT.LEFT);
                button_9.setLayoutData(fd_button_9);
+               button_9.setText(Messages.NewAccountDialog_38);
                button_9.addSelectionListener( new SelectionListener() {
                        
                        @Override
@@ -672,11 +726,12 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                Button btnSave = new Button(composite, SWT.NONE);
+               fd_button_9.bottom = new FormAttachment(btnSave, 0, SWT.BOTTOM);
                FormData fd_btnSave = new FormData();
-               fd_btnSave.bottom = new FormAttachment(button_9, 0, SWT.BOTTOM);
+               fd_btnSave.bottom = new FormAttachment(100, -10);
                fd_btnSave.right = new FormAttachment(lblHeresAnOverview, 0, SWT.RIGHT);
                btnSave.setLayoutData(fd_btnSave);
-               btnSave.setText("Save");
+               btnSave.setText(Messages.NewAccountDialog_39);
                btnSave.setFocus();
                
                btnSave.addSelectionListener( new SelectionListener() {
@@ -684,8 +739,8 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
                                MessageBox dialog = new MessageBox(shlNewAccount, SWT.ICON_INFORMATION | SWT.OK );
-                               dialog.setText("Get ready");
-                               dialog.setMessage("When you press OK, The Final Key will start blinking, you then have 5 seconds to press the button to save the account.");
+                               dialog.setText(Messages.NewAccountDialog_40);
+                               dialog.setMessage(Messages.NewAccountDialog_41);
                                dialog.open();
                                FkManager.getInstance().createAccount( strAccountName, strUserName, autoPassword, autoPassLen, autoPassAllSpecials, autoPassSpecials, strPassword, seperatorTab, mySelf );
                                updatePage(FkNewAccStep.SAVING);
@@ -698,61 +753,62 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                Label lblAccName = new Label(composite, SWT.NONE);
+               fd_lblAccountName.right = new FormAttachment(lblAccName, -6);
                FormData fd_lblAccName = new FormData();
-               fd_lblAccName.right = new FormAttachment(lblHeresAnOverview, 0, SWT.RIGHT);
-               fd_lblAccName.top = new FormAttachment(lblHeresAnOverview, 18);
-               fd_lblAccName.left = new FormAttachment(lblAccountName, 6);
+               fd_lblAccName.right = new FormAttachment(0, 603);
+               fd_lblAccName.top = new FormAttachment(0, 51);
+               fd_lblAccName.left = new FormAttachment(0, 236);
                lblAccName.setLayoutData(fd_lblAccName);
                lblAccName.setText(strAccountName);
                
                Label lblUsrName = new Label(composite, SWT.NONE);
                FormData fd_lblUsrName = new FormData();
-               fd_lblUsrName.top = new FormAttachment(lblAccName, 6);
-               fd_lblUsrName.left = new FormAttachment(lblUserName, 6);
-               fd_lblUsrName.right = new FormAttachment(100, -10);
+               fd_lblUsrName.right = new FormAttachment(0, 613);
+               fd_lblUsrName.top = new FormAttachment(0, 80);
+               fd_lblUsrName.left = new FormAttachment(0, 236);
                lblUsrName.setLayoutData(fd_lblUsrName);
                lblUsrName.setText(strUserName);
                
                Label lblPasswordInfo = new Label(composite, SWT.NONE);
+               FormData fd_lblPasswordInfo = new FormData();
+               fd_lblPasswordInfo.right = new FormAttachment(0, 603);
+               fd_lblPasswordInfo.top = new FormAttachment(0, 109);
+               fd_lblPasswordInfo.left = new FormAttachment(0, 236);
+               lblPasswordInfo.setLayoutData(fd_lblPasswordInfo);
                
                String passInfo;
                if( autoPassword )
                {
-                       passInfo = "Automatic, " + autoPassLen + " long, ";
+                       passInfo = Messages.NewAccountDialog_42 + autoPassLen + Messages.NewAccountDialog_43;
                        if( autoPassAllSpecials )
                        {
-                               passInfo += "all specials";
+                               passInfo += Messages.NewAccountDialog_44;
                        } else {
-                               passInfo += "{"+autoPassSpecials+ "}";
+                               passInfo += "{"+autoPassSpecials+ "}"; //$NON-NLS-1$ //$NON-NLS-2$
                        }
                        
                } else {
-                       passInfo ="Manual, " + strPassword.length() +" long";
+                       passInfo =Messages.NewAccountDialog_47 + strPassword.length() +Messages.NewAccountDialog_48;
                }
                
                lblPasswordInfo.setText(passInfo);
-               FormData fd_lblPasswordInfo = new FormData();
-               fd_lblPasswordInfo.right = new FormAttachment(lblPasswordType, 373, SWT.RIGHT);
-               fd_lblPasswordInfo.top = new FormAttachment(lblUsrName, 6);
-               fd_lblPasswordInfo.left = new FormAttachment(lblPasswordType, 6);
-               lblPasswordInfo.setLayoutData(fd_lblPasswordInfo);
                
                Label lblSeperatorInfo = new Label(composite, SWT.NONE);
+               FormData fd_lblSeperatorInfo = new FormData();
+               fd_lblSeperatorInfo.right = new FormAttachment(0, 603);
+               fd_lblSeperatorInfo.top = new FormAttachment(0, 138);
+               fd_lblSeperatorInfo.left = new FormAttachment(0, 236);
+               lblSeperatorInfo.setLayoutData(fd_lblSeperatorInfo);
                
                String sepInfo;
                if( seperatorTab )
                {
-                       sepInfo = "Tab Key";
+                       sepInfo = Messages.NewAccountDialog_49;
                } else {
-                       sepInfo = "Enter Key";
+                       sepInfo = Messages.NewAccountDialog_50;
                }
                
                lblSeperatorInfo.setText(sepInfo);
-               FormData fd_lblSeperatorInfo = new FormData();
-               fd_lblSeperatorInfo.right = new FormAttachment(lblSeperator, 373, SWT.RIGHT);
-               fd_lblSeperatorInfo.top = new FormAttachment(lblPasswordInfo, 6);
-               fd_lblSeperatorInfo.left = new FormAttachment(lblSeperator, 6);
-               lblSeperatorInfo.setLayoutData(fd_lblSeperatorInfo);
                
         Control[] controls = new Control[] { btnSave, button_9 };
         composite.setTabList(controls);                                
@@ -765,24 +821,26 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                composite.setLayout(new FormLayout());
                
                txtBUSYMSG = new Label(composite, SWT.NONE);
-               FormData fd_lblSaving = new FormData();
-               fd_lblSaving.right = new FormAttachment(0, 603);
-               fd_lblSaving.top = new FormAttachment(0, 10);
-               fd_lblSaving.left = new FormAttachment(0, 10);
-               txtBUSYMSG.setLayoutData(fd_lblSaving);
-               txtBUSYMSG.setText("Working...");
-               
-               animation = new Animation(shlNewAccount, SWT.NONE, 4);
-               animation.setBounds(10, 32, 32, 32);
-               animation.setVisible(true);
-               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") );
-               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") );
-               animation.setPlaying(true);
+               FormData fd_txtBUSYMSG = new FormData();
+               fd_txtBUSYMSG.top = new FormAttachment(0, 10);
+               fd_txtBUSYMSG.right = new FormAttachment(100, -10);
+               fd_txtBUSYMSG.left = new FormAttachment(0, 78);
+               txtBUSYMSG.setLayoutData(fd_txtBUSYMSG);
+               txtBUSYMSG.setText(Messages.NewAccountDialog_51);
                FormData fdAni = new FormData();
                fdAni.top = new FormAttachment(txtBUSYMSG);
                
+               animation = new Animation(composite, SWT.NONE, 4);
+               FormData fd_animation = new FormData();
+               fd_animation.top = new FormAttachment(0, 10);
+               fd_animation.left = new FormAttachment(0, 10);
+               animation.setLayoutData(fd_animation);
+               animation.setBounds(10, 32, 32, 32);
+               animation.setVisible(true);
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") ); //$NON-NLS-1$
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") ); //$NON-NLS-1$
+               animation.setPlaying(true);
 
-               
        }
        
        
@@ -831,7 +889,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        private void createContents() {
                shlNewAccount = new Shell(getParent(), getStyle());
                shlNewAccount.setSize(625, 394);
-               shlNewAccount.setText("Create New Account");
+               shlNewAccount.setText(Messages.NewAccountDialog_54);
                shlNewAccount.setLayout(new FillLayout(SWT.HORIZONTAL));
                
        //      TabFolder tabFolder = new TabFolder(shell, SWT.NONE);
@@ -852,35 +910,35 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                switch(event.type)
                {
                case ACTION_ABORTED:
-                       txtBUSYMSG.setText("Error.");
+                       txtBUSYMSG.setText(Messages.NewAccountDialog_55);
                        dialog = new MessageBox(shlNewAccount, SWT.ICON_WARNING);
-                       dialog.setText("Account not created");
-                       dialog.setMessage("The account was not created.\nMaybe you were not quick enough to press FinalKey button?\nPlease try again.");
+                       dialog.setText(Messages.NewAccountDialog_56);
+                       dialog.setMessage(Messages.NewAccountDialog_57);
                        dialog.open();
                        updatePage(FkNewAccStep.REVIEW);                        
                        break;
                case ACTION_ERROR:
-                       txtBUSYMSG.setText("Error.");
+                       txtBUSYMSG.setText(Messages.NewAccountDialog_58);
 
                        dialog = new MessageBox(shlNewAccount, SWT.ICON_ERROR);
-                       dialog.setText("Error");
-                       dialog.setMessage("There was an error creating the acccount, please reconnect to FinalKey and try again.");
+                       dialog.setText(Messages.NewAccountDialog_59);
+                       dialog.setMessage(Messages.NewAccountDialog_60);
                        dialog.open();
                        closeSelf=true;
                        break;
                case ACTION_OKAY:
-                       txtBUSYMSG.setText("Account saved.");
+                       txtBUSYMSG.setText(Messages.NewAccountDialog_61);
                        dialog = new MessageBox(shlNewAccount, SWT.ICON_INFORMATION);
-                       dialog.setText("Account created");
-                       dialog.setMessage("The account was created.");
+                       dialog.setText(Messages.NewAccountDialog_62);
+                       dialog.setMessage(Messages.NewAccountDialog_63);
                        dialog.open();
                        closeSelf=true;
                        break;
                case ACTION_WAITING:
-                       txtBUSYMSG.setText("Waiting for buttonpress...");
+                       txtBUSYMSG.setText(Messages.NewAccountDialog_64);
                        break;
                case ACTION_WORKING:
-                       txtBUSYMSG.setText("Saving...");
+                       txtBUSYMSG.setText(Messages.NewAccountDialog_65);
                        animation.setVisible(false);
                        break;
                }
index 0f204cf..f9c0728 100644 (file)
@@ -57,14 +57,14 @@ public class PermitCountDownDialog extends Dialog {
                lblMsg.setText(msg);
                
                lblTimeLeft = new Label(shell, SWT.NONE);
-               lblTimeLeft.setText("    ");
+               lblTimeLeft.setText("    "); //$NON-NLS-1$
                lblTimeLeft.setBounds(48, 56, 201, 32);
                
                Animation animation = new Animation(shell, SWT.NONE, 4);
                animation.setBounds(10, 32, 32, 32);
                animation.setVisible(true);
-               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") );
-               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") ); //$NON-NLS-1$
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") ); //$NON-NLS-1$
                animation.setPlaying(true);
                
                
@@ -93,7 +93,7 @@ public class PermitCountDownDialog extends Dialog {
                                if( !shell.isDisposed() )
                                {
 
-                                       lblTimeLeft.setText( Math.round(msLeft/1000) + " seconds left.");
+                                       lblTimeLeft.setText( Math.round(msLeft/1000) + Messages.PermitCountDownDialog_0);
 
                                        display.update();
                                        msLeft -= 1000;
index fc54ef3..7284734 100644 (file)
@@ -98,7 +98,7 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
        
        @Override
        protected Void doInBackground() throws Exception {
-               publish("Trying to connect to "+dev);
+               publish(Messages.SerialWorker_0+dev);
                /**
                 * Connection strategy:
                 * Open the port, wait for "The Final Key" followed by # on next line, (getLoginHeader)
@@ -109,31 +109,31 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                
                int numAccounts=0;
                try {
-                       System.out.println("Port opened: " + serialPort.openPort());
-                       System.out.println("Params setted: " + serialPort.setParams(9600, 8, 1, 0));
+                       System.out.println(Messages.SerialWorker_1 + serialPort.openPort());
+                       System.out.println(Messages.SerialWorker_2 + serialPort.setParams(9600, 8, 1, 0));
 
                        int mask = SerialPort.MASK_BREAK + SerialPort.MASK_ERR + SerialPort.MASK_RLSD;
                        serialPort.setEventsMask(mask);
 
                        serialPort.addEventListener(this);
-                       String test = expectString("The Final Key", 1000);
+                       String test = expectString("The Final Key", 1000); //$NON-NLS-1$
                        if( test != null )
                        {
-                               publish("\n* Press the button on the Final Key *");
+                               publish(Messages.SerialWorker_4);
                        } else {
                                //Try logging out.
                                serialPort.writeByte( (byte)'q');
-                               publish("State error, try again.");
+                               publish(Messages.SerialWorker_5);
                                disconnect();
                                return null;
                        }
                        
-                       if( expectString( "Pass:", 0 ) != null )
+                       if( expectString( "Pass:", 0 ) != null ) //$NON-NLS-1$
                        {
-                               publish("Logging in.");
+                               publish(Messages.SerialWorker_7);
                                postStateChange(SerialState.Working);
                        } else {
-                               publish("Error: Did not get password prompt. Unplug and try again.");
+                               publish(Messages.SerialWorker_8);
                                disconnect();
                                return null;
                        }
@@ -141,7 +141,7 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                        enterString(pass);
 
                        serialPort.writeByte( (byte)13 );
-                       pass = "";
+                       pass = ""; //$NON-NLS-1$
                        
                        /*String str = expectString( "[Keyboard: ", 200 );
                        if( str != null )
@@ -151,18 +151,18 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                                publish("Did not get Keyboard layout.");
                        }*/
                        
-                       if( expectString( "[Granted]", 200 ) != null )
+                       if( expectString( "[Granted]", 200 ) != null ) //$NON-NLS-1$
                        {
-                               publish("\nAccess Granted.");
+                               publish(Messages.SerialWorker_11);
                        } else {
-                               publish("\nError: Access Denied.");
+                               publish(Messages.SerialWorker_12);
                                disconnect();
                                return null;
                        }
 
-                       publish("Getting account list.");
+                       publish(Messages.SerialWorker_13);
                        serialPort.writeByte( (byte)'X'); //Machine commands with uppercase X
-                       expectString("[auto]", 200);
+                       expectString("[auto]", 200); //$NON-NLS-1$
                        serialPort.writeByte( (byte)'l'); //Full list 
 
                        
@@ -176,7 +176,7 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                                {
                                        accounts += serialPort.readString();
                                        String sub = accounts.substring( accounts.length()-3 );
-                                       if( sub.equals("\r\n>") )
+                                       if( sub.equals("\r\n>") ) //$NON-NLS-1$
                                        {
                                                accounts = accounts.substring( 0, accounts.length()-3 );
                                                break;
@@ -186,7 +186,7 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                                        timeOut-=10;
                                        if(timeOut < 1)
                                        {
-                                               publish("Error getting account list.");
+                                               publish(Messages.SerialWorker_16);
                                                disconnect();
                                                return null;
                                        }
@@ -196,14 +196,14 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                        //Trim first 3
                        accounts = accounts.substring(3);
 
-                       String[] lines = accounts.split( "\r\n" );
+                       String[] lines = accounts.split( "\r\n" ); //$NON-NLS-1$
                        numAccounts=lines.length;
                        Boolean kbList=false;
                        for(String l:lines)
                        {
                                if( ! kbList )
                                {
-                                       if( l.compareTo("[KBL]") == 0 )
+                                       if( l.compareTo("[KBL]") == 0 ) //$NON-NLS-1$
                                        {
                                                kbList=true;
                                        } else {
@@ -213,13 +213,13 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                                        }
                                } else {
                                        //Next entries are supported keyboard layouts
-                                       publish("Supported layout:" + l);
+                                       publish(Messages.SerialWorker_3 + l);
                                }
                        }
 
                }
                catch (Exception ex){
-                       publish("Error: Exception: "+ex.getMessage() );
+                       publish("Error: Exception: "+ex.getMessage() ); //$NON-NLS-1$
                        disconnect();
                }
 
@@ -227,12 +227,12 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                {
                        if(numAccounts==1)
                        {
-                               publish(numAccounts+" account.");
+                               publish(numAccounts+" account."); //$NON-NLS-1$
                        } else {
-                               publish(numAccounts+" accounts ready.");
+                               publish(numAccounts+" accounts ready."); //$NON-NLS-1$
                        }
        
-                       publish("\n* Use the FinalKey icon in the systray to access your logins *");
+                       publish(Messages.SerialWorker_23);
 
                        state = SerialState.Connected;
                        postStateChange( state);
@@ -295,14 +295,14 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
        @Override
        public void serialEvent(SerialPortEvent event) {
                
-               System.out.println("Event!" + event.getEventType() );
+               System.out.println("Event!" + event.getEventType() ); //$NON-NLS-1$
 
                if(event.isBREAK())
                {
                        if(state!=SerialState.Disconnected)
                        {
                                disconnect();
-                               System.out.println(">>Break);");
+                               System.out.println(">>Break);"); //$NON-NLS-1$
                        }
                }
                if(event.isERR())
@@ -310,11 +310,11 @@ public class SerialWorker extends javax.swing.SwingWorker<Void, String> implemen
                        if(state!=SerialState.Disconnected)
                        {
                                disconnect();
-                               System.out.println(">>Error");
+                               System.out.println(">>Error"); //$NON-NLS-1$
                        }
                }
                if(serialPort == null)
-                       System.out.println(">>Null");
+                       System.out.println(">>Null"); //$NON-NLS-1$
 
        }
 
index 0d7eba1..80bfc0b 100644 (file)
@@ -44,7 +44,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                super(parent, style);
                account = a;
                delegate = d;
-               setText("Use "+ account.name);
+               setText(Messages.TriggerDialog_0+ account.name);
        }
 
        /**
@@ -74,7 +74,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                display.sleep();
                        }
                }
-               System.out.println("Returning result:" + (Boolean)result);
+               System.out.println(Messages.TriggerDialog_1 + (Boolean)result);
                return result;
        }
 
@@ -95,38 +95,38 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                fd_grpMakeFinalKey.left = new FormAttachment(0, 10);
                fd_grpMakeFinalKey.right = new FormAttachment(100, -10);
                grpMakeFinalKey.setLayoutData(fd_grpMakeFinalKey);
-               grpMakeFinalKey.setText("Use " + account.name);
+               grpMakeFinalKey.setText(Messages.TriggerDialog_2 + account.name);
                
                Button btnUsernamePassword = new Button(grpMakeFinalKey, SWT.NONE);
                btnUsernamePassword.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, '%', mySelf);
-                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Ready with username and password", "Focus username field and press button.\nPress and hold to cancel.", 30000);
+                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_3, Messages.TriggerDialog_4, 30000);
                                shell.setMinimized(true);
                                permitCountdownDialog.open();
                        }
                });
-               btnUsernamePassword.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/both.png"));
+               btnUsernamePassword.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/both.png")); //$NON-NLS-1$
                FormData fd_btnUsernamePassword = new FormData();
                fd_btnUsernamePassword.top = new FormAttachment(0, 10);
                fd_btnUsernamePassword.left = new FormAttachment(0, 10);
                fd_btnUsernamePassword.right = new FormAttachment(0, 224);
                btnUsernamePassword.setLayoutData(fd_btnUsernamePassword);
 
-               btnUsernamePassword.setText("Username + Password");
+               btnUsernamePassword.setText(Messages.TriggerDialog_6);
                
                Button btnUsernameOnly = new Button(grpMakeFinalKey, SWT.NONE);
                btnUsernameOnly.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, 'u', mySelf);
-                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Ready with username", "Focus username field and press button.\nPress and hold to cancel.", 30000);
+                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_7, Messages.TriggerDialog_8, 30000);
                                shell.setMinimized(true);
                                permitCountdownDialog.open();
                        }
                });
-               btnUsernameOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/user.png"));
+               btnUsernameOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/user.png")); //$NON-NLS-1$
                FormData fd_btnUsernameOnly = new FormData();
                fd_btnUsernameOnly.top = new FormAttachment(btnUsernamePassword, -35);
                fd_btnUsernameOnly.bottom = new FormAttachment(btnUsernamePassword, 0, SWT.BOTTOM);
@@ -134,7 +134,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                fd_btnUsernameOnly.right = new FormAttachment(0, 405);
                btnUsernameOnly.setLayoutData(fd_btnUsernameOnly);
 
-               btnUsernameOnly.setText("Username");
+               btnUsernameOnly.setText(Messages.TriggerDialog_10);
                
                Button btnPasswordOnly = new Button(grpMakeFinalKey, SWT.NONE);
                btnPasswordOnly.addSelectionListener(new SelectionAdapter() {
@@ -142,13 +142,13 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, 'p', mySelf);
                                
-                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Ready with password", "Focus username field and press button.\nPress and hold to cancel.", 30000);
+                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_11, Messages.TriggerDialog_12, 30000);
 
                                shell.setMinimized(true);
                                permitCountdownDialog.open();
                        }
                });
-               btnPasswordOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/key-icon.png"));
+               btnPasswordOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/key-icon.png")); //$NON-NLS-1$
                FormData fd_btnPasswordOnly = new FormData();
                fd_btnPasswordOnly.left = new FormAttachment(btnUsernameOnly, 29);
                fd_btnPasswordOnly.top = new FormAttachment(btnUsernamePassword, 0, SWT.TOP);
@@ -156,10 +156,10 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                fd_btnPasswordOnly.bottom = new FormAttachment(0, 45);
                btnPasswordOnly.setLayoutData(fd_btnPasswordOnly);
 
-               btnPasswordOnly.setText("Password");
+               btnPasswordOnly.setText(Messages.TriggerDialog_14);
                                
                                grpChange = new Group(shell, SWT.NONE);
-                               grpChange.setText("Change "+account.name);
+                               grpChange.setText(Messages.TriggerDialog_15+account.name);
                                grpChange.setLayout(new FormLayout());
                                fd_grpChange = new FormData();
                                fd_grpChange.left = new FormAttachment(grpMakeFinalKey, 353, SWT.LEFT);
@@ -168,12 +168,12 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                grpChange.setLayoutData(fd_grpChange);
                                
                                Button btnEdit = new Button(grpChange, SWT.NONE);
-                               btnEdit.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/gtk_edit.png"));
+                               btnEdit.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/gtk_edit.png")); //$NON-NLS-1$
                                FormData fd_btnEdit = new FormData();
                                fd_btnEdit.top = new FormAttachment(0, 10);
                                fd_btnEdit.left = new FormAttachment(0, 10);
                                btnEdit.setLayoutData(fd_btnEdit);
-                               btnEdit.setText("Edit");
+                               btnEdit.setText(Messages.TriggerDialog_17);
                                ///TODO: Inplement edit box..
                                btnEdit.setVisible(false);
                                
@@ -182,11 +182,11 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        @Override
                                        public void widgetSelected(SelectionEvent e) {
                                                MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.YES | SWT.NO );
-                                               dialog.setText("WARNING! Confirm delete "+account.name );
-                                               dialog.setMessage("Are you sure you want to delete account "+account.name+" ?\nAccount id: "+account.num+"\nIf you remove the account, it can not be recovered!");
+                                               dialog.setText(Messages.TriggerDialog_18+account.name );
+                                               dialog.setMessage(Messages.TriggerDialog_19+account.name+Messages.TriggerDialog_20+account.num+Messages.TriggerDialog_21);
                                                if( dialog.open() == SWT.YES )
                                                {
-                                                       permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Confirm deletion", "Press button to show delete "+account.name+".\nPress and hold to cancel.", 5000);
+                                                       permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_22, Messages.TriggerDialog_23+account.name+Messages.TriggerDialog_24, 5000);
                                                        shell.setMinimized(true);
                                                        FkManager.getInstance().trig(account, 'd', mySelf);
                                                        permitCountdownDialog.open();
@@ -196,24 +196,24 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        }
                                });
                                fd_btnEdit.right = new FormAttachment(btnDelete, -6);
-                               btnDelete.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/trashdelete.gif"));
+                               btnDelete.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/trashdelete.gif")); //$NON-NLS-1$
                                FormData fd_btnDelete = new FormData();
                                fd_btnDelete.top = new FormAttachment(0, 10);
                                fd_btnDelete.left = new FormAttachment(0, 166);
                                fd_btnDelete.right = new FormAttachment(100, -11);
                                btnDelete.setLayoutData(fd_btnDelete);
-                               btnDelete.setText("Delete");
+                               btnDelete.setText(Messages.TriggerDialog_26);
 
                                Button btnCancel = new Button(shell, SWT.NONE);
                                fd_grpChange.bottom = new FormAttachment(btnCancel, -6);
-                               btnCancel.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/Delete.png"));
+                               btnCancel.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/Delete.png")); //$NON-NLS-1$
                                FormData fd_btnCancel = new FormData();
                                fd_btnCancel.left = new FormAttachment(grpMakeFinalKey, 0, SWT.LEFT);
                                fd_btnCancel.bottom = new FormAttachment(100, -10);
                                fd_btnCancel.right = new FormAttachment(grpMakeFinalKey, 2, SWT.RIGHT);
                                btnCancel.setLayoutData(fd_btnCancel);
                                
-                               btnCancel.setText("Do nothing");
+                               btnCancel.setText(Messages.TriggerDialog_28);
                                
                                btnCancel.addSelectionListener( new SelectionAdapter() {
                                        public void widgetSelected(SelectionEvent e) {
@@ -221,7 +221,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        }
                                });                             
                                Group grpShow = new Group(shell, SWT.NONE);
-                               grpShow.setText("Show "+account.name);
+                               grpShow.setText(Messages.TriggerDialog_29+account.name);
                                FormData fd_grpShow = new FormData();
                                fd_grpShow.bottom = new FormAttachment(grpChange, 0, SWT.BOTTOM);
                                fd_grpShow.right = new FormAttachment(grpChange, -6);
@@ -234,14 +234,14 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        @Override
                                        public void widgetSelected(SelectionEvent e) {
                                                FkManager.getInstance().trig(account, 's', mySelf);
-                                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Ready for display", "Press button to show username and password.\nPress and hold to cancel.", 30000);
+                                               permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_30, Messages.TriggerDialog_31, 30000);
                                                shell.setMinimized(true);
                                                permitCountdownDialog.open();
                                        }
                                });
-                               btnShowUsername.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/both.png"));
+                               btnShowUsername.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/both.png")); //$NON-NLS-1$
                                btnShowUsername.setBounds(10, 36, 327, 35);
-                               btnShowUsername.setText("Show Username + Password");                            
+                               btnShowUsername.setText(Messages.TriggerDialog_33);                             
                                
 
        }
@@ -260,13 +260,13 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                case ACTION_ABORTED:
                        dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
                        dialog.setText(event.acc.name);
-                       dialog.setMessage("Action aborted or timed out.");
+                       dialog.setMessage(Messages.TriggerDialog_34);
                        dialog.open();
                        break;
                case ACTION_ERROR:
                        dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
-                       dialog.setText(event.acc.name + " error");
-                       dialog.setMessage("An error ocurred.");
+                       dialog.setText(event.acc.name + Messages.TriggerDialog_35);
+                       dialog.setMessage(Messages.TriggerDialog_36);
                        dialog.open();                  
                        break;
                case ACTION_OKAY:
@@ -281,7 +281,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                int end = event.data.lastIndexOf("[done]");
                                String s = event.data.substring( begin,end  );
                                dialog = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
-                               dialog.setText("Account information");
+                               dialog.setText(Messages.TriggerDialog_39);
                                dialog.setMessage(s);
                                dialog.open();
                        }
@@ -290,8 +290,8 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                        {
                                result = (Object)new Boolean(false); //We want the mainwin to get back after deleting an account.
                                dialog = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
-                               dialog.setText("Account deleted");
-                               dialog.setMessage(event.acc.name + " has been erased.");
+                               dialog.setText(Messages.TriggerDialog_40);
+                               dialog.setMessage(event.acc.name + Messages.TriggerDialog_41);
                                dialog.open();
                                Display.getDefault().asyncExec( new Runnable() {
                                        @Override
diff --git a/src/fkgui/gfx/lightbulb.png b/src/fkgui/gfx/lightbulb.png
new file mode 100644 (file)
index 0000000..f62476a
Binary files /dev/null and b/src/fkgui/gfx/lightbulb.png differ
diff --git a/src/fkgui/messages.properties b/src/fkgui/messages.properties
new file mode 100644 (file)
index 0000000..74321a3
--- /dev/null
@@ -0,0 +1,134 @@
+#Eclipse modern messages class
+#Tue Aug 05 13:42:16 CEST 2014
+MainWin_12=Connection
+MainWin_15=Connect
+MainWin_18=Password
+MainWin_19=Hide after connection
+MainWin_22=Type your password and press connect.\n----------\n
+MainWin_25=User + Pass
+MainWin_26=User
+MainWin_27=Pass
+MainWin_32=\ of 256 free.
+MainWin_33=Final Key (Connected)
+MainWin_34=Disconnect
+MainWin_36=\ account
+MainWin_38=
+MainWin_39=\ ready.
+MainWin_40=* Connected *
+MainWin_41=Final Key (Connecting...)
+MainWin_42=Final Key (Not connected)
+MainWin_43=Connect
+MainWin_44=* Disconnected *
+MainWin_45=Accounts
+MainWin_47=New Account
+MainWin_52=FinalKey GUI Version 
+MainWin_53=\ available.
+MainWin_54=There's a new version of FinalKey GUI available.\nGo to http\://cyberstalker.dk/finalkey/gui/ to download.\n\nNews\:\n
+MainWin_7=Show FinalKey
+MainWin_8=Hide FinalKey
+MainWin_btnNewButton_text=New Button
+NewAccountDialog_10=Next up\: Setting a safe password\!\nYou have two options\: Manually enter a password or to\nhave The Final Key generate a strong and random password,\nit is strongly recommended to let The Final Key generate a\nrandom password, select the longest that is allowed by the service.
+NewAccountDialog_11=Automatic
+NewAccountDialog_12=Manual Entry
+NewAccountDialog_13=Next
+NewAccountDialog_14=Back
+NewAccountDialog_15=Before creating a password, please select how long it should be.\nA longer password is safer, but the maximum allowed length varies,\ndepending on where you're using it. For example many websites do not\nallow passwords longer than 16 characters.
+NewAccountDialog_16=Password length\:
+NewAccountDialog_17=A strong password contains not only uppercase and lowercase\nletters and numbers, but also other symbols.\nIt differs which symbols are allowed, some allow all ASCII symbols.
+NewAccountDialog_18=All symbols
+NewAccountDialog_19=Only these\:
+NewAccountDialog_20=Back
+NewAccountDialog_21=Next
+NewAccountDialog_22=Show Password
+NewAccountDialog_23=Back
+NewAccountDialog_24=Next
+NewAccountDialog_25=Type the password your wish to use for this account.\nIn the box below.
+NewAccountDialog_26=Password\:
+NewAccountDialog_27=When you trigger the Final Key to type an account (Username + Password), it\nwill also type a "seperation" key, to jump from the Username input to the\nPassword input. On most websites, the "tab" key is used for this.\nHowever, in some applications, the "enter" key is used.\nHere you can select which key can be used between the username and password\nfor this account.
+NewAccountDialog_28=Tab
+NewAccountDialog_29=Enter
+NewAccountDialog_30=Back
+NewAccountDialog_31=Next
+NewAccountDialog_32=Here's an overview of the account information
+NewAccountDialog_33=Account Name\:
+NewAccountDialog_34=Password\:
+NewAccountDialog_35=User Name\:
+NewAccountDialog_36=If everything looks okay, press save and wait until the Final Key blinks,\nwhen it blinks, press the button to allow the account to be saved.
+NewAccountDialog_37=Seperator\:
+NewAccountDialog_38=Back
+NewAccountDialog_39=Save
+NewAccountDialog_4=This creates a new account on your FinalKey.\nTo begin, choose a name for your account, for example the\nname of the website or service you want to login to.\nThis is the name that will be visible in the list of accounts.
+NewAccountDialog_40=Get ready
+NewAccountDialog_41=When you press OK, The Final Key will start blinking, you then have 5 seconds to press the button to save the account.
+NewAccountDialog_42=Automatic, 
+NewAccountDialog_43=\ long, 
+NewAccountDialog_44=all specials
+NewAccountDialog_47=Manual, 
+NewAccountDialog_48=\ long
+NewAccountDialog_49=Tab Key
+NewAccountDialog_5=Account Name\:
+NewAccountDialog_50=Enter Key
+NewAccountDialog_51=Working...
+NewAccountDialog_54=Create New Account
+NewAccountDialog_55=Error.
+NewAccountDialog_56=Account not created
+NewAccountDialog_57=The account was not created.\nMaybe you were not quick enough to press FinalKey button?\nPlease try again.
+NewAccountDialog_58=Error.
+NewAccountDialog_59=Error
+NewAccountDialog_6=The username is the name that The Final Key will\ntype into the service when logging in, it is typically an E-Mail address.
+NewAccountDialog_60=There was an error creating the acccount, please reconnect to FinalKey and try again.
+NewAccountDialog_61=Account saved.
+NewAccountDialog_62=Account created
+NewAccountDialog_63=The account was created.
+NewAccountDialog_64=Waiting for buttonpress...
+NewAccountDialog_65=Saving...
+NewAccountDialog_7=Username\:
+NewAccountDialog_8=Cancel
+NewAccountDialog_9=Next
+PermitCountDownDialog_0=\ seconds left.
+SerialWorker_0=Trying to connect to 
+SerialWorker_1=Port opened\: 
+SerialWorker_11=\nAccess Granted.
+SerialWorker_12=\nError\: Access Denied.
+SerialWorker_13=Getting account list.
+SerialWorker_16=Error getting account list.
+SerialWorker_2=Params setted\: 
+SerialWorker_23=\n* Use the FinalKey icon in the systray to access your logins *
+SerialWorker_3=Supported layout\:
+SerialWorker_4=\n* Press the button on the Final Key *
+SerialWorker_5=State error, try again.
+SerialWorker_7=Logging in.
+SerialWorker_8=Error\: Did not get password prompt. Unplug and try again.
+TriggerDialog_0=Use 
+TriggerDialog_1=Returning result\:
+TriggerDialog_10=Username
+TriggerDialog_11=\: Ready with password
+TriggerDialog_12=Focus password field and press button.\nPress and hold to cancel.
+TriggerDialog_14=Password
+TriggerDialog_15=Change 
+TriggerDialog_17=Edit
+TriggerDialog_18=WARNING\! Confirm delete 
+TriggerDialog_19=Are you sure you want to delete account 
+TriggerDialog_2=Use 
+TriggerDialog_20=\ ?\nAccount id\: 
+TriggerDialog_21=\nIf you remove the account, it can not be recovered\!
+TriggerDialog_22=\: Confirm deletion
+TriggerDialog_23=Press button to delete 
+TriggerDialog_24=.\nPress and hold to cancel.
+TriggerDialog_26=Delete
+TriggerDialog_28=Do nothing
+TriggerDialog_29=Show 
+TriggerDialog_3=\: Ready with username and password
+TriggerDialog_30=\: Ready for display
+TriggerDialog_31=Press button to show username and password.\nPress and hold to cancel.
+TriggerDialog_33=Show Username + Password
+TriggerDialog_34=Action aborted or timed out.
+TriggerDialog_35=\ error
+TriggerDialog_36=An error ocurred.
+TriggerDialog_39=Account information
+TriggerDialog_4=Focus username field and press button.\nPress and hold to cancel.
+TriggerDialog_40=Account deleted
+TriggerDialog_41=\ has been erased.
+TriggerDialog_6=Username + Password
+TriggerDialog_7=\: Ready with username
+TriggerDialog_8=Focus username field and press button.\nPress and hold to cancel.
diff --git a/src/fkgui/messages_da.properties b/src/fkgui/messages_da.properties
new file mode 100644 (file)
index 0000000..63b7aea
--- /dev/null
@@ -0,0 +1,131 @@
+MainWin_12=Forbindelse
+MainWin_15=Forbind
+MainWin_18=Kode
+MainWin_19=Skjul når forbundet
+MainWin_22=Indtast kode og tryk forbind.\n----------\n
+MainWin_25=Bruger + Kode
+MainWin_26=Bruger
+MainWin_27=Kode
+MainWin_32=\ ledige af 256.
+MainWin_33=Final Key (Forbundet)
+MainWin_34=Afbryd
+MainWin_36=\ konto
+MainWin_38=
+MainWin_39=\ klar.
+MainWin_40=* Forbundet *
+MainWin_41=Final Key (Forbinder...)
+MainWin_42=Final Key (Ikke forbundet)
+MainWin_43=Forbind
+MainWin_44=* Afbrudt *
+MainWin_45=Konti
+MainWin_47=Ny Konto
+MainWin_52=FinalKey GUI Version 
+MainWin_53=\ tilgængelig.
+MainWin_54=En ny version af softwaren kan nu hentes.\nGå til http://cyberstalker.dk/finalkey/gui/ for download.\n\nNyt:\n
+MainWin_7=Vis FinalKey
+MainWin_8=Skjul FinalKey
+NewAccountDialog_10=Næste trin: Lav en sikker kode\!\nDu har to muligheder: Indtast selv en kode\neller lad Final Key lave en sikker kode automatisk,\ndet anbefales at lade Final Key lave tilfældig kode.
+NewAccountDialog_11=Automatisk
+NewAccountDialog_12=Indtast selv
+NewAccountDialog_13=Næste
+NewAccountDialog_14=Forrige
+NewAccountDialog_15=Vælg hvor lang din adgangskode skal være.\nMange hjemmesider tillader ikke koder længere end 16 tegn.
+NewAccountDialog_16=Længde:
+NewAccountDialog_17=En sikker kode indeholder udover store/små bogstaver og tal, også\nspecialtegn som # og !, hvilke tegn må der være i din kode?
+NewAccountDialog_18=Alle symboler
+NewAccountDialog_19=Kun disse:
+NewAccountDialog_20=Forrige
+NewAccountDialog_21=Næste
+NewAccountDialog_22=Vis Kode
+NewAccountDialog_23=Forrige
+NewAccountDialog_24=Næste
+NewAccountDialog_25=Tast koden du vil bruge til kontoen.
+NewAccountDialog_26=Kode:
+NewAccountDialog_27=Når du beder Final Key logge ind på en konto (Bruger+ Kode),\nskal der hoppes mellem Brugernavn og Adgangskode felterne.\nPå hjemmesider bruges \u201DTabulator\u201D tasten ofte.\nMen i nogle programmer trykkes der retur mellem brugernavn og adgangskode.
+NewAccountDialog_28=Tabulator
+NewAccountDialog_29=Retur
+NewAccountDialog_30=Forrige
+NewAccountDialog_31=Næste
+NewAccountDialog_32=Her er en oversigt over den nye konto
+NewAccountDialog_33=Kontonavn:
+NewAccountDialog_34=Kode:
+NewAccountDialog_35=Brugernavn:
+NewAccountDialog_36=Tryk på gem hvis alt ser du som det skal.
+NewAccountDialog_37=Separator:
+NewAccountDialog_38=Forrige
+NewAccountDialog_39=Gem
+NewAccountDialog_4=Opret ny konto.\nStart med at vælge et navn til den nye konto\nfor eksempel navnet på den service der skal logges på.\nKontonavnet bliver vist i listen med konti.
+NewAccountDialog_40=Klar til start
+NewAccountDialog_41=Når du trykker OK begynder Final Key at blinke, du har 5 sekunder til at trykke på knappen for at tillade at kontoen bliver gemt.
+NewAccountDialog_42=Automatisk, 
+NewAccountDialog_43=\ lang, 
+NewAccountDialog_44=alle symboler
+NewAccountDialog_47=Manuel, 
+NewAccountDialog_48=\ lang
+NewAccountDialog_49=Tabulator Tasten
+NewAccountDialog_5=Kontonavn:
+NewAccountDialog_50=Retur Tasten
+NewAccountDialog_51=Arbejder...
+NewAccountDialog_54=Opret Ny Konto
+NewAccountDialog_55=Fejl 01.
+NewAccountDialog_56=Konto blev ikke oprettet
+NewAccountDialog_57=Kontoen blev ikke oprettet.\nMåske nåede du ikke at trykke på knappen på FinalKey?\nPrøv igen.
+NewAccountDialog_58=Fejl 02.
+NewAccountDialog_59=Fejl 03
+NewAccountDialog_6=Brugernavnet som Final Key skal taste ind\nnår der logges på. Typisk en E-Mail adresse.
+NewAccountDialog_60=Der skete en fejl ved oprettelsen, genstart og prøv igen.
+NewAccountDialog_61=Konto Gemt.
+NewAccountDialog_62=Kontoen blev Gemt.
+NewAccountDialog_63=Kontoen blev Gemt.
+NewAccountDialog_64=Tryk på knappen på Final Key
+NewAccountDialog_65=Gemmer...
+NewAccountDialog_7=Brugernavn:
+NewAccountDialog_8=Fortryd
+NewAccountDialog_9=Næste
+PermitCountDownDialog_0=\ sekunder tilbage.
+SerialWorker_0=Forbinder til 
+SerialWorker_1=Forbundet: 
+SerialWorker_11=\nDer er givet adgang.
+SerialWorker_12=\nFejl: Adgang nægtet.
+SerialWorker_13=Henter kontoliste
+SerialWorker_16=Fejl ved hentning af kontoliste
+SerialWorker_2=Parametre sat: 
+SerialWorker_23=\n* Brug FinalKey ikonet i systembakken til at logge ind *
+SerialWorker_3=Understøttet sprog:
+SerialWorker_4=\n* Tryk knappen på Final Key *
+SerialWorker_5=Fejl 04, prøv igen
+SerialWorker_7=Logger ind.
+SerialWorker_8=Fejl: Fjern Final Key fra computere og tilslut den igen, prøv igen.
+TriggerDialog_0=Brug 
+TriggerDialog_1=Resultat:
+TriggerDialog_10=Brugernavn
+TriggerDialog_11=: Klar med kode
+TriggerDialog_12=Sæt cursor i kode feltet og tryk på knappen.\nHold knappen inde for at fortryde.
+TriggerDialog_14=Kode
+TriggerDialog_15=Lav om på 
+TriggerDialog_17=Rediger
+TriggerDialog_18=Advarsel\! Sletning af 
+TriggerDialog_19=Er du sikker på at du vil slette kontoen 
+TriggerDialog_2=Brug 
+TriggerDialog_20=\ ?\nKonto id: 
+TriggerDialog_21=\nHvis du fjerner kontoen kan den ikke genskabes\!
+TriggerDialog_22=: Bekræft sletning
+TriggerDialog_23=Tryk for at slette  
+TriggerDialog_24=.\nHold knappen inde for at fortryde.
+TriggerDialog_26=Slet
+TriggerDialog_28=Fortryd
+TriggerDialog_29=Vis 
+TriggerDialog_3=: Klar med brugernavn og kode
+TriggerDialog_30=: Klar til vise
+TriggerDialog_31=Tryk for at vise brugernavn og kode.\nHold knappen inde for at fortryde.
+TriggerDialog_33=Vis brugernavn og kode
+TriggerDialog_34=Handlingen blev fortrudt eller der blev ikke trykket på knappen.
+TriggerDialog_35=\ fejl
+TriggerDialog_36=Der opstod en fejl.
+TriggerDialog_39=Konto oplysninger
+TriggerDialog_4=Set cursor i brugernavn feltet og tryk\nHold knappen inde for at fortryde.
+TriggerDialog_40=Konto slettet
+TriggerDialog_41=\ er blevet slettet.
+TriggerDialog_6=Brugernavn + Kode
+TriggerDialog_7=: Klar med brugernavn
+TriggerDialog_8=Set cursor i brugernavn feltet og tryk\nHold knappen inde for at fortryde.