Changed Src Language to English

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@52 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tariq
2006-03-11 22:55:52 +00:00
parent 09ab186b9d
commit 60d342201d
44 changed files with 5972 additions and 6424 deletions

View File

@@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2005 by Tarek Saidi *
* tarek@linux *
* Copyright (C) 2005-2006 by Tarek Saidi *
* tarek.saidi@arcor.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -19,7 +19,6 @@
***************************************************************************/
#include <qmessagebox.h>
#include <q3scrollview.h>
#include <qlabel.h>
#include <qdialog.h>
#include <qfile.h>
@@ -31,22 +30,13 @@ CAboutDialog::CAboutDialog(QWidget* parent, const char* name, bool modal, Qt::WF
: QDialog(parent,name, modal,fl)
{
setupUi(this);
createBanner(Banner,Icon_Key32x32,trUtf8("Keepass für Linux"));
Link_Homepage=new LinkLabel(this,"Link_Homepage",trUtf8("http://keepass.de.vu"),80,143);
Link_EMail=new LinkLabel(this,"Link_EMail",trUtf8("tarek.saidi@arcor.de"),80,163);
Link_License=new LinkLabel(this,"Link_License",trUtf8("Lizenz"),80,183);
connect(Link_License,SIGNAL(clicked()),this,SLOT(OnLicenseClicked()));
connect(Link_EMail,SIGNAL(clicked()),this,SLOT(OnEMailClicked()));
connect(Link_Homepage,SIGNAL(clicked()),this,SLOT(OnHomepageClicked()));
Label0->setText(Label0->text().arg(KEEPASS_VERSION));
createBanner(Banner,Icon_Key32x32,tr("KeePassX %1").arg(KEEPASS_VERSION));
loadLicFromFile();
}
CAboutDialog::~CAboutDialog()
{
delete Link_Homepage;
delete Link_EMail;
delete Link_License;
}
void CAboutDialog::OnClose()
@@ -54,38 +44,28 @@ void CAboutDialog::OnClose()
close();
}
void CAboutDialog::OnLicenseClicked(){
void CAboutDialog::loadLicFromFile(){
QDialog dlg(this,NULL,true);
Q3ScrollView scroll(&dlg);
QLabel label(&scroll,"License-Scroll");
scroll.addChild(&label);
QFile gpl(AppDir+"/../share/keepass/license.txt");
QFile gpl(AppDir+"/../share/keepass/license.html");
if(!gpl.exists()){
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Die Datei '%1' konnte nicht gefunden werden.")
.arg("'license.txt'")+"\n"+trUtf8("Die Anwendung wurde möglicherweiße nicht korrekt installiert.")
,trUtf8("OK"),0,0,2,1);
QMessageBox::critical(this,tr("Error"),tr("File '%1' could not be found.")
.arg("'license.html'")+"\n"+tr("Make sure that the program is installed correctly.")
,tr("OK"),0,0,2,1);
return;
}
if(!gpl.open(QIODevice::ReadOnly)){
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Die Datei '%1' konnte nicht geöffnet werden.")
.arg("'license.txt'")+trUtf8("Es trat folgender Fehler auf:\n%1").arg(gpl.errorString())
,trUtf8("OK"),0,0,2,1);
QMessageBox::critical(this,tr("Fehler"),tr("Could not open file '%1'")
.arg("'license.txt'")+tr("The following error occured:\n%1").arg(gpl.errorString())
,tr("OK"),0,0,2,1);
return;
}
char* buffer=new char[gpl.size()];
long l=gpl.readBlock(buffer,gpl.size());
gpl.close();
label.setText(QString::fromUtf8(buffer,l));
label.setGeometry(0,0,500,800);
dlg.setFixedWidth(500);
dlg.setFixedHeight(400);
dlg.setCaption(trUtf8("Lizenz"));
scroll.setGeometry(0,0,500,400);
dlg.exec();
Edit_License->setText(QString::fromUtf8(buffer,l));
delete buffer;
}
void CAboutDialog::OnHomepageClicked(){

View File

@@ -28,28 +28,16 @@
class CAboutDialog : public QDialog, public Ui_AboutDlg
{
Q_OBJECT
LinkLabel *Link_Homepage,*Link_EMail,*Link_License;
public:
CAboutDialog(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
~CAboutDialog();
/*$PUBLIC_FUNCTIONS$*/
public slots:
/*$PUBLIC_SLOTS$*/
protected:
/*$PROTECTED_FUNCTIONS$*/
protected slots:
/*$PROTECTED_SLOTS$*/
public slots:
virtual void OnClose();
void OnHomepageClicked();
void OnEMailClicked();
void OnLicenseClicked();
private:
inline void loadLicFromFile();
};
#endif

View File

@@ -46,7 +46,7 @@ connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBoxChang
connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) );
db=_db;
createBanner(Banner,Icon_Key32x32,trUtf8("Hauptschlüssel ändern"));
createBanner(Banner,Icon_Key32x32,tr("Change Master Key"));
if(!config.ShowPasswords)ChangeEchoMode();
///@PlatformSpecific
QDir media("/media");
@@ -73,17 +73,17 @@ CChangeKeyDlg::~CChangeKeyDlg()
void CChangeKeyDlg::OnOK()
{
if(CheckBox_Both->isChecked()){
if(password==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Bitte geben Sie ein Passwort ein.")
,trUtf8("OK"),"","",0,0);
if(password==""){QMessageBox::warning(this,tr("Error"),tr("Please enter a password.")
,tr("OK"),"","",0,0);
return;}
if(keyfile==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Bitte wählen Sie eine Schlüsseldatei.")
,trUtf8("OK"),"","",0,0);
if(keyfile==""){QMessageBox::warning(this,tr("Error"),tr("Please choose a key file.")
,tr("OK"),"","",0,0);
return;}
}
else
{
if(password=="" && keyfile==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Geben Sie bitte ein Passwort ein oder wählen Sie eine Schlüsseldatei.")
,trUtf8("OK"),"","",0,0);
if(password=="" && keyfile==""){QMessageBox::warning(this,tr("Error"),tr("Please select a key file or enter a password.")
,tr("OK"),"","",0,0);
return;}
}
@@ -93,16 +93,16 @@ Q_UINT8 pw_key[32]={0};
if(keyfile!=""){
QFile file(keyfile);
if(file.exists()){
int r=QMessageBox::warning(this,trUtf8("Vorhandene Datei überschreiben?"),trUtf8("Unter dem gewählten Dateinamen existiert bereits eine Datei.\nSoll sie überschrieben werden?"),"Ja","Nein",NULL,1,1);
int r=QMessageBox::warning(this,tr("Overwrite?"),tr("A file with this name already exists.\nDo you want to replace it?"),"Yes","No",NULL,1,1);
if(r==1)return;}
getRandomBytes(file_key,1,32,true);
if(file.open(QIODevice::WriteOnly | QIODevice::Truncate)==false){
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Schlüsseldatei konnte nicht geöffnet werden."),"OK",0,0,2,1);
QMessageBox::critical(this,tr("Error"),tr("Could not open key file for writing."),"OK",0,0,2,1);
return;
}
if(file.writeBlock((char*)file_key,32)!=32){
file.close();
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Das Schreiben der Schlüsseldatei ist fehlgeschlagen."),"OK",0,0,2,1);
QMessageBox::critical(this,tr("Error"),tr("Key file could not be written."),"OK",0,0,2,1);
return;
}
file.close();
@@ -110,7 +110,7 @@ file.close();
if(CheckBox_Both->isChecked() || keyfile==""){
if(password!=Edit_Password_2->text()){
QMessageBox::critical(this,trUtf8("Fehler"),trUtf8("Passwort und Passwortwiederholung stimmen nicht überein.\nBitte prüfen Sie Ihre Eingabe."),"OK",0,0,2,1);
QMessageBox::critical(this,tr("Error"),tr("Password and password repetition are not equal.\nPlease check your input."));
return;}}
if(CheckBox_Both->isChecked())db->CalcMasterKeyByFileAndPw(keyfile, password);
@@ -123,7 +123,7 @@ done(1);
void CChangeKeyDlg::OnSelect()
{
if(Button_Browse->isEnabled()){
keyfile=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",this,trUtf8("Schlüsseldatei öffnen"));
keyfile=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",this,tr("Open key file"));
if(keyfile=="")return;
Combo_Dirs->insertItem(keyfile);
Combo_Dirs->setCurrentItem(Combo_Dirs->count()-1);
@@ -140,7 +140,7 @@ IsFile.append(true);
void CChangeKeyDlg::OnBrowse()
{
QString dir=Q3FileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,trUtf8("Verzeichnis wählen"));
QString dir=Q3FileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,tr("Choose Directory"));
if(dir=="")return;
keyfile=dir+"/pwsafe.key";
Combo_Dirs->insertItem(dir);

View File

@@ -41,9 +41,9 @@ CDbSettingsDlg::~CDbSettingsDlg()
void CDbSettingsDlg::showEvent(QShowEvent *event){
if(event->spontaneous()==false){
createBanner(Banner,Icon_Settings32x32,"Einstellungen");
ComboAlgo->insertItem(trUtf8("AES(Rijndael): 256 Bit (Standard)"),0);
ComboAlgo->insertItem(trUtf8("Twofish: 256 Bit"),1);
createBanner(Banner,Icon_Settings32x32,"Settings");
ComboAlgo->insertItem(tr("AES(Rijndael): 256 Bit (default)"),0);
ComboAlgo->insertItem(tr("Twofish: 256 Bit"),1);
ComboAlgo->setCurrentItem(database->CryptoAlgorithmus); //Achtung: AlgoID muss gleich dem ComboBox Index sein!
EditRounds->setText(QString::number(database->KeyEncRounds));
@@ -59,17 +59,17 @@ done(0);
void CDbSettingsDlg::OnOK()
{
if(EditRounds->text()==""){
QMessageBox::warning(NULL,trUtf8("Fehler"),trUtf8("Geben Sie bitte die Anzahl der Verschlüsselungsrunden an."),trUtf8("OK"));
QMessageBox::warning(NULL,tr("Warning"),tr("Please determine the number of encryption rounds."),tr("OK"));
return;
}
bool valid;
int rounds=EditRounds->text().toUInt(&valid,10);
if(valid==false){
QMessageBox::warning(NULL,trUtf8("Fehler"),EditRounds->text()+trUtf8(" ist kein gültiger Zahlenwert"),trUtf8("OK"));
QMessageBox::warning(NULL,tr("Error"),tr("'%1' is not valid integer value.").arg(EditRounds->text()),tr("OK"));
return;
}
if(rounds==0){
QMessageBox::warning(NULL,trUtf8("Fehler"),trUtf8("Die Anzahl an Verschlüsselungsrunden muss mindestens 1 betragen."),trUtf8("OK"));
QMessageBox::warning(NULL,tr("Error"),tr("The number of encryption rounds have to be greater than 0."),tr("OK"));
return;
}
database->KeyEncRounds=rounds;

View File

@@ -51,7 +51,7 @@ Q_ASSERT(_entry);
entry=_entry;
db=_db;
setupUi(this);
createBanner(Banner,Icon_Key32x32,trUtf8("Eintrag bearbeiten"));
createBanner(Banner,Icon_Key32x32,tr("Eintrag bearbeiten"));
ModFlag=false;
connect(Edit_Password_w, SIGNAL(editingFinished()), this, SLOT(OnPasswordwLostFocus()));
connect(Edit_Password_w, SIGNAL(textChanged(const QString&)), this, SLOT( OnPasswordwTextChanged(const QString&)));
@@ -155,7 +155,7 @@ Combo_Group->setCurrentItem(db->getGroupIndex(entry->GroupID));
void CEditEntryDlg::OnButtonOK()
{
if(QString::compare(Edit_Password->text(),Edit_Password_w->text())!=0){
QMessageBox::warning(NULL,"Stopp",QString::fromUtf8("Passwort und Passwortwiederholung stimmen\nnicht überein."),"OK");
QMessageBox::warning(NULL,tr("Warning"),tr("Password and password repetition are not equal.\nPlease check your input."),tr("OK"));
return;
}
@@ -257,7 +257,7 @@ if(filename=="")return;
QFile file(filename);
if(file.open(QIODevice::ReadOnly)==false){
file.close();
QMessageBox::warning(NULL,trUtf8("Fehler"),trUtf8("Datei konnte nicht geöffnet werden."),"OK");
QMessageBox::warning(NULL,tr("Fehler"),tr("Datei konnte nicht geöffnet werden."),"OK");
return;
}
ModFlag=true;
@@ -286,30 +286,30 @@ saveAttachment(entry,this);
void CEditEntryDlg::saveAttachment(CEntry* pEntry, QWidget* ParentWidget)
{
QString filename=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",ParentWidget,trUtf8("Anhang speichern..."));
QString filename=Q3FileDialog::getSaveFileName(QDir::homeDirPath(),"",ParentWidget,tr("Save Attachment..."));
if(filename=="")return;
QFile file(filename);
if(file.exists()){
int r=QMessageBox::warning(ParentWidget,QString::fromUtf8("Vorhandene Datei überschreiben?"),QString::fromUtf8("Unter dem gewählten Dateinamen existiert bereits eine Datei.\nSoll sie überschrieben werden?"),"Ja","Nein",NULL,1,1);
int r=QMessageBox::warning(ParentWidget,tr("Overwrite?"),tr("A file with this name already exists.\nDo you want to replace it?"),tr("Yes"),tr("No"),NULL,1,1);
if(r==1)return;
if(file.remove()==false){
QMessageBox::critical(NULL,"Fehler",QString::fromUtf8("Datei konnte nicht überschrieben werden."),"OK");
QMessageBox::critical(NULL,tr("Error"),tr("Could not remove old file."),tr("OK"));
return;}
}
if(file.open(QIODevice::WriteOnly)==false){
QMessageBox::critical(NULL,"Fehler",QString::fromUtf8("Datei konnte nicht erstellt werden."),"OK");
QMessageBox::critical(NULL,tr("Error"),tr("Could not create new file."),tr("OK"));
return;
}
int r=file.write(pEntry->BinaryData);
if(r==-1){
file.close();
QMessageBox::critical(NULL,"Fehler",QString::fromUtf8("Beim schreiben in der Datei ist ein Fehler aufgetreten."),"OK");
QMessageBox::critical(NULL,tr("Error"),tr("Error while writing the file."),"OK");
return;
}
if(r!=pEntry->BinaryData.length()){
file.close();
QMessageBox::critical(NULL,"Fehler",QString::fromUtf8("Die Datei konnte nicht vollständig geschrieben werden."),"OK");
QMessageBox::critical(NULL,tr("Error"),tr("Error while writing the file."),tr("OK"));
return;
}
file.close();
@@ -317,7 +317,7 @@ file.close();
void CEditEntryDlg::OnDeleteAttachment()
{
int r=QMessageBox::warning(this,trUtf8("Anhang löschen?"),trUtf8("Sie sind dabei den Anhang zu löschen.\nSind Sie sicher, dass Sie dies tun wollen?"),trUtf8("Ja"),trUtf8("Nein"),NULL,1,1);
int r=QMessageBox::warning(this,tr("Delete Attachment?"),tr("You are about to delete the attachment of this entry.\nAre you sure?"),tr("Yes"),tr("No, Cancel"),NULL,1,1);
if(r==0){
ModFlag=true;
entry->BinaryData.clear();

View File

@@ -1,153 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 by Tarek Saidi *
* mail@tarek-saidi.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "main.h"
#include "LanguageDlg.h"
#include <qtranslator.h>
#include <qdir.h>
#include <qstringlist.h>
#include <q3listview.h>
#include <qmessagebox.h>
//Added by qt3to4:
#include <QShowEvent>
#include <iostream>
using namespace std;
const char* infostrings[]={
QT_TRANSLATE_NOOP("_INFO","$TRANSL_AUTHOR"),
QT_TRANSLATE_NOOP("_INFO","$TRANSL_AUTHOR_CONTACT"),
QT_TRANSLATE_NOOP("_INFO","$TRANSL_LANGUAGE"),
QT_TRANSLATE_NOOP("_INFO","$TRANSL_VERSION")};
const char* msg[]={QT_TRANSLATE_NOOP("_MSG","Die Änderung der Sprache wird erst nach einem Neustart von Keepass wirksam."),
QT_TRANSLATE_NOOP("_MSG","OK"),
QT_TRANSLATE_NOOP("_MSG","Hinweis")};
CLanguageDlg::CLanguageDlg(QWidget* parent, const char* name, Qt::WFlags fl)
: QDialog(parent,name,fl)
{
setupUi(this);
createBanner(Banner,Icon_I18n32x32,trUtf8("Spracheinstellungen"));
Q3ListViewItem* item;
QString& config_lang=config.Language;
QStringList files;
QString langdir=AppDir+"/../share/keepass/i18n/";
QDir dir(langdir);
if(dir.exists()){
files=dir.entryList("*.qm",QDir::Files);
}
List->insertItem(item=new Q3ListViewItem(List,"","Deutsch","-","-"));
if(config_lang=="_DEUTSCH_")item->setPixmap(0,*Icon_Ok16x16);
pItems.push_back(item);
filenames.push_back("_DEUTSCH_");
for(int i=0;i<files.count();i++){
QTranslator translator;
if(!translator.load(langdir+files[i])){
QMessageBox::warning(this,tr("Warnung"),tr("Die Datei '%1' konnte nicht geladen werden.").arg(files[i]),tr("OK"),0,0,2,1);
continue;}
List->insertItem(item=new Q3ListViewItem(List,"",translator.translate("_INFO","$TRANSL_LANGUAGE")
,translator.translate("_INFO","$TRANSL_VERSION")
,translator.translate("_INFO","$TRANSL_AUTHOR")));
if(config_lang==files[i])item->setPixmap(0,*Icon_Ok16x16);
pItems.push_back(item);
filenames.push_back(files[i]);
}
}
CLanguageDlg::~CLanguageDlg()
{
}
void CLanguageDlg::showEvent(QShowEvent *event){
if(event->spontaneous()==false){
List->setColumnWidth(0,20);
int width=(List->width()-4-20)/3;
List->setColumnWidth(1,width);
List->setColumnWidth(2,width);
List->setColumnWidth(3,width);
}
}
void CLanguageDlg::OnItemRightClick(Q3ListViewItem* item)
{
//CTX-MENU
}
void CLanguageDlg::OnItemDoubleClicked(Q3ListViewItem* item) // == Slot für Button "wählen"
{
int i;
QString langdir=AppDir+"/../share/keepass/i18n/";
for(i=0;i<pItems.size();i++){
if(item==pItems[i])break;
if(i==pItems.size()-1){
qWarning(QString("unexpected error in %1, line %2").arg(__FILE__).arg(__LINE__)+"\n");
exit(-1);}
}
if(filenames[i]!="_DEUTSCH_"){
QTranslator translator;
if(!translator.load(langdir+filenames[i])){
QMessageBox::warning(this,tr("Warnung"),tr("Die Datei '%1' konnte nicht geladen werden.").arg(filenames[i]),tr("OK"),0,0,2,1);
return;
}
QMessageBox::information(this,translator.translate("_MSG",msg[2])
,translator.translate("_MSG",msg[0])
,translator.translate("_MSG",msg[1])
,0,0,0);
}
else QMessageBox::information(this,QString::fromUtf8(msg[2]),QString::fromUtf8(msg[0]),QString::fromUtf8(msg[1]),0,0,2,1);
config.Language=filenames[i];
for(int j=0;j<pItems.size();j++){
if(j==i)pItems[j]->setPixmap(0,*Icon_Ok16x16);
else pItems[j]->setPixmap(0,0);}
List->setColumnWidth(0,20);
int width=(List->width()-4-20)/3;
List->setColumnWidth(1,width);
List->setColumnWidth(2,width);
List->setColumnWidth(3,width);
}
void CLanguageDlg::OnApplyButtonClicked()
{
Q3ListViewItem* item=List->selectedItem();
if(item)OnItemDoubleClicked(item);
else QMessageBox::information(this,tr("Hinweis"),trUtf8("Es ist keine Übersetzung aufsgewählt."),tr("OK"),0,0,2,1);
}
void CLanguageDlg::OnButtonCloseClicked()
{
done(0);
}
/*$SPECIALIZATION$*/

View File

@@ -1,60 +0,0 @@
/***************************************************************************
* Copyright (C) 2005 by Tarek Saidi *
* mail@tarek-saidi.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "main.h"
#ifndef _LANGUAGEDLG_H_
#define _LANGUAGEDLG_H_
#include "ui_LanguageDlg.h"
#include <qpixmap.h>
//Added by qt3to4:
#include <QShowEvent>
class CLanguageDlg : public QDialog, public Ui_LanguageDlg
{
Q_OBJECT
public:
CLanguageDlg(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
~CLanguageDlg();
vector<QString> filenames;
vector<Q3ListViewItem*> pItems;
/*$PUBLIC_FUNCTIONS$*/
public slots:
/*$PUBLIC_SLOTS$*/
protected:
/*$PROTECTED_FUNCTIONS$*/
protected slots:
/*$PROTECTED_SLOTS$*/
virtual void showEvent(QShowEvent *e);
virtual void OnItemDoubleClicked(Q3ListViewItem* item);
virtual void OnItemRightClick(Q3ListViewItem* item);
virtual void OnButtonCloseClicked();
virtual void OnApplyButtonClicked();
};
#endif

View File

@@ -37,8 +37,8 @@ CPasswordDialog::CPasswordDialog(QWidget* parent, const char* name, bool modal,
: QDialog(parent,name, modal,fl)
{
setupUi(this);
createBanner(Banner,Icon_Key32x32,trUtf8("Datenbank öffnen"));
Label_select=new LinkLabel((QWidget*)groupframe,"Select",trUtf8("Datei manuell wählen..."),410,100);
createBanner(Banner,Icon_Key32x32,tr("Datenbank öffnen"));
Label_select=new LinkLabel((QWidget*)groupframe,"Select",tr("Datei manuell wählen..."),410,100);
connect( Combo_Dirs, SIGNAL( activated(int) ), this, SLOT( OnComboSelectionChanged(int) ) );
connect( ButtonBrowse, SIGNAL( clicked() ), this, SLOT( OnButtonBrowse() ) );
connect( ButtonOK, SIGNAL( clicked() ), this, SLOT( OnOK() ) );
@@ -48,7 +48,7 @@ connect( CheckBox_Both, SIGNAL( stateChanged(int) ), this, SLOT( OnCheckBox_Both
connect( ButtonChangeEchoMode, SIGNAL( clicked() ), this, SLOT( ChangeEchoMode() ) );
connect( Edit_Password, SIGNAL( returnPressed() ), this, SLOT( OnOK() ) );
///@PlatformSpecific
QDir media("/media");
if(media.exists()){
Paths=media.entryList("*",QDir::Dirs);
@@ -58,7 +58,7 @@ Paths.erase(Paths.begin()); // delete ".."
for(int i=0;i<Paths.count();i++){
Paths[i]="/media/"+Paths[i];
}
Paths.prepend(trUtf8("< keiner >"));
Paths.prepend(tr("< keiner >"));
}
for(int i=0;i<Paths.count();i++){
Combo_Dirs->insertItem(0,Paths[i]);
@@ -92,20 +92,21 @@ Edit_Password->setText("");
Edit_Password->setDisabled(true);}
return;
}
QMessageBox::warning(this,"Datei nicht gefunden",QString::fromUtf8("Im gewählten Verzeichnis konnte keine Schlüsseldatei gefunden werden.\nStellen Sie sicher, dass der Schlüssel-Datenträger ordnungsgemäß eingehängt (mounted) ist.\nSollte die Schlüsseldatei nicht den Dateinamen 'pwsafe.key' haben, nutzen Sie bitte die manuelle Dateiauswahl."),"OK","","",0,0);
QMessageBox::warning(this,tr("No key file found"),tr(
"No key file could be found in the chosen directory.\n\
Make sure that the volume is mounted correctly.\n\
Please use the manual file selection for key files with a filename other than 'pwsafe.key'.")
,tr("OK"),"","",0,0);
Edit_Password->setEnabled(true);
Combo_Dirs->setCurrentItem(0);
return;
}
void CPasswordDialog::OnButtonBrowse()
{
///@PlatformSpecific
QString dir=Q3FileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,QString::fromUtf8("Verzeichnis wählen"));
QString dir=Q3FileDialog::getExistingDirectory(QDir::homeDirPath(),NULL,tr("Browse..."));
if(dir=="")return;
QFile file(dir+"/pwsafe.key");
if(file.exists()){
keyfile=dir+"/pwsafe.key";
@@ -119,13 +120,17 @@ if(!CheckBox_Both->isChecked()){
Paths.append(dir);
IsFile.append(false);
return;}
QMessageBox::warning(this,"Datei nicht gefunden",QString::fromUtf8("Im gewählten Verzeichnis konnte keine Schlüsseldatei gefunden werden.\nStellen Sie sicher, dass der Schlüssel-Datenträger ordnungsgemäß eingehängt (mounted) ist.\nSollte die Schlüsseldatei nicht den Dateinamen 'pwsafe.key' haben, nutzen Sie bitte die manuelle Dateiauswahl."),"OK","","",0,0);
QMessageBox::warning(this,tr("No key file found"),tr(
"No key file could be found in the chosen directory.\n\
Make sure that the volume is mounted correctly.\n\
Please use the manual file selection for key files with a filename other than 'pwsafe.key'.")
,tr("OK"),"","",0,0);
}
void CPasswordDialog::OnSelectClicked()
{
if(ButtonBrowse->isEnabled()){
keyfile=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,QString::fromUtf8("Schlüsseldatei öffnen"));
keyfile=Q3FileDialog::getOpenFileName(QDir::homeDirPath(),"",this,tr("Open Key File"));
if(keyfile=="")return;
Combo_Dirs->insertItem(keyfile);
Combo_Dirs->setCurrentItem(Combo_Dirs->count()-1);
@@ -148,17 +153,18 @@ void CPasswordDialog::OnOK()
{
if(CheckBox_Both->isChecked()){
if(password==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Bitte geben Sie ein Passwort ein.")
,trUtf8("OK"),"","",0,0);
if(password==""){QMessageBox::warning(this,tr("Error"),tr("Please enter a Password.")
,tr("OK"),"","",0,0);
return;}
if(keyfile==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Bitte wählen Sie eine Schlüsseldatei.")
,trUtf8("OK"),"","",0,0);
if(keyfile==""){QMessageBox::warning(this,tr("Error"),tr("Please choose a key file.")
,tr("OK"),"","",0,0);
return;}
}
else
{
if(password=="" && keyfile==""){QMessageBox::warning(this,trUtf8("Fehler"),trUtf8("Geben Sie bitte ein Passwort ein oder wählen Sie eine Schlüsseldatei.")
,trUtf8("OK"),"","",0,0);
if(password=="" && keyfile==""){QMessageBox::warning(this,tr("Error")
,tr("Please enter a Password or select a key file.")
,tr("OK"),"","",0,0);
return;}
}
done(1);

View File

@@ -87,12 +87,15 @@ else{
void CGenPwDialog::OnGeneratePw()
{
/*
Großbuchstaben 65...90
Kleinbuchstaben 97...122
Zahlen 48...57
Sonderzeichen 33...47;58...64;91...96;123...126
Minus 45
Unterstrich 95
-------
ASCII
-------
"A...Z" 65...90
"a...z" 97...122
"0...9" 48...57
Special Charakters 33...47;58...64;91...96;123...126
"-" 45
"_" 95
ANSI >127
*/
@@ -147,8 +150,8 @@ num++;
}
}
if(num==0){
if(Radio_2->isChecked())QMessageBox::information(this,"Hinweis",QString::fromUtf8("Es wird mindestens ein Zeichen benötigt"),"OK");
else QMessageBox::information(this,"Hinweis",QString::fromUtf8("Es muss mindestens ein Gruppe von Zeichen gewählt werden"),"OK");
if(Radio_2->isChecked())QMessageBox::information(this,tr("Notice"),tr("You need to enter at least one character"),tr("OK"));
else QMessageBox::information(this,tr("Notice"),QString::fromUtf8("You need to select at least one character group."),"OK");
return;
}
int length=Spin_Num->value();
@@ -161,7 +164,7 @@ else
{dev_random = fopen("/dev/urandom","r");}
if (dev_random==NULL){
QMessageBox::critical(this,"Fehler",QString::fromUtf8("'/dev/random' bzw. '/dev/urandom' konnte nicht zum lesen geöffnet werden."),"OK");
QMessageBox::critical(this,tr("Error"),tr("Could not open '/dev/random' or '/dev/urandom'."),tr("OK"));
return;
}
unsigned char tmp;

View File

@@ -33,7 +33,7 @@ setupUi(this);
connect( Button_Search, SIGNAL( clicked() ), this, SLOT( OnButtonSearch() ) );
connect( Button_Close, SIGNAL( clicked() ), this, SLOT( OnButtonClose() ) );
createBanner(Banner,Icon_Search32x32,tr("Suchen"));
createBanner(Banner,Icon_Search32x32,tr("Search"));
checkBox_Cs->setChecked(config.SearchOptions[0]);
checkBox_regExp->setChecked(config.SearchOptions[1]);
checkBox_Title->setChecked(config.SearchOptions[2]);
@@ -76,7 +76,7 @@ Hits.clear();
txt=Edit_Search->text();
regexp=checkBox_regExp->isChecked();
if(txt==""){
QMessageBox::information(this,trUtf8("Hinweis"),trUtf8("Bitte geben Sie einen Suchbegriff ein."),"OK",0,0);
QMessageBox::information(this,tr("Notice"),tr("Please enter a search string."),tr("OK"));
return;}
for(int i=0;i<db->Entries.size();i++){

View File

@@ -35,7 +35,7 @@ connect( ButtonCancel, SIGNAL( clicked() ), this, SLOT( OnCancel() ) );
connect( ButtonColor1, SIGNAL( clicked() ), this, SLOT( OnColor1() ) );
connect( ButtonColor2, SIGNAL( clicked() ), this, SLOT( OnColor2() ) );
connect( ButtonTextColor, SIGNAL( clicked() ), this, SLOT( OnTextColor() ) );
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"));
createBanner(Banner,Icon_Settings32x32,tr("Settings"));
CheckBox_OpenLast->setChecked(config.OpenLast);
SpinBox_ClipboardTime->setValue(config.ClipboardTimeOut);
@@ -95,7 +95,7 @@ QPixmap *px=new QPixmap(pixmTextColor->width(),pixmTextColor->height());
px->fill(c);
pixmTextColor->clear();
pixmTextColor->setPixmap(*px);
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);}
createBanner(Banner,Icon_Settings32x32,tr("Settings"),color1,color2,textcolor);}
}
@@ -108,7 +108,7 @@ QPixmap *px=new QPixmap(pixmColor2->width(),pixmColor2->height());
px->fill(c);
pixmColor2->clear();
pixmColor2->setPixmap(*px);
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);}
createBanner(Banner,Icon_Settings32x32,tr("Settings"),color1,color2,textcolor);}
}
@@ -121,7 +121,7 @@ QPixmap *px=new QPixmap(pixmColor1->width(),pixmColor1->height());
px->fill(c);
pixmColor1->clear();
pixmColor1->setPixmap(*px);
createBanner(Banner,Icon_Settings32x32,trUtf8("Einstellungen"),color1,color2,textcolor);
createBanner(Banner,Icon_Settings32x32,tr("Settings"),color1,color2,textcolor);
}
}