From: eshe Date: Sat, 17 Apr 2010 11:52:07 +0000 (+0100) Subject: Added some missing Finnish translations to settings dialog. Added missing build deped... X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=b637fdb3f5803104d4da20e6455f6de4de075927;hp=cf883c1283eb6b096592ef875a32696fee9dd6ff;p=jenirok Added some missing Finnish translations to settings dialog. Added missing build depedencies to control file and fixed preinst, prerm and postrm scripts. --- diff --git a/COPYING b/COPYING index 94a9ed0..6ddee8b 100644 --- a/COPYING +++ b/COPYING @@ -631,8 +631,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - Copyright (C) + Copyright (C) 2010 Jesse Hakanen 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 @@ -652,7 +651,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Jenirok Copyright (C) 2010 Jesse Hakanen This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/Makefile b/Makefile index 8b93f1f..bf8ed45 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: jenirok -# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Apr 16 11:46:54 2010 +# Generated by qmake (2.01a) (Qt 4.6.2) on: Sat Apr 17 12:38:18 2010 # Project: jenirok.pro # Template: subdirs # Command: /usr/bin/qmake -unix -o Makefile jenirok.pro diff --git a/debian/control b/debian/control index 73fbc0b..6db7d1e 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: jenirok Section: user/other Priority: optional Maintainer: Jesse Hakanen -Build-Depends: debhelper (>= 5), libqt4-dev +Build-Depends: debhelper (>= 5), libqt4-dev, libebook-dev, libx11-dev Standards-Version: 3.7.2 Package: jenirok diff --git a/debian/postrm b/debian/postrm index cca0a15..b479182 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,6 +1,7 @@ #!/bin/sh -e rm -f /home/user/.jenirok.db +update-rc.d -f jenirokd remove exit 0 diff --git a/debian/preinst b/debian/preinst index 6d0f2ba..e672a47 100644 --- a/debian/preinst +++ b/debian/preinst @@ -1,6 +1,6 @@ #!/bin/sh -e -/etc/init.d/jenirokd stop +/etc/init.d/jenirokd stop >/dev/null 2>&1 exit 0 diff --git a/debian/prerm b/debian/prerm index 6d0f2ba..e672a47 100644 --- a/debian/prerm +++ b/debian/prerm @@ -1,6 +1,6 @@ #!/bin/sh -e -/etc/init.d/jenirokd stop +/etc/init.d/jenirokd stop >/dev/null 2>&1 exit 0 diff --git a/src/common/eniro.cpp b/src/common/eniro.cpp index 0b8579b..20af69c 100644 --- a/src/common/eniro.cpp +++ b/src/common/eniro.cpp @@ -21,18 +21,32 @@ namespace { - static const QString SITE_URLS[] = + static const QString SITE_URLS[Eniro::SITE_COUNT] = { "http://wap.eniro.fi/", "http://wap.eniro.se/", "http://wap.eniro.dk/" }; - const QString INVALID_LOGIN_STRING = "Invalid login details"; - const QString PERSON_REGEXP = "(.*)(.*)"; - const QString YELLOW_REGEXP = "(.*)(.*)"; - const QString NUMBER_REGEXP = "
(.*)
"; - const QString LOGIN_CHECK = "(.*)(.*)"; + static const QString YELLOW_REGEXP = "(.*)(.*)"; + static const QString NUMBER_REGEXP = "
(.*)
"; + static const QString LOGIN_CHECK = " Eniro::getSites() { QMap sites; SiteDetails details; - details.name = tr("Finnish"); - details.id = "fi"; - sites[FI] = details; - - details.name = tr("Swedish"); - details.id = "se"; - sites[SE] = details; - details.name = tr("Danish"); - details.id = "dk"; - sites[DK] = details; + for(int i = 0; i < SITE_COUNT; i++) + { + SiteDetails details; + details.name = SITE_NAMES[i]; + details.id = SITE_IDS[i]; + sites[static_cast(i)] = details; + } return sites; } @@ -567,16 +578,14 @@ QMap Eniro::getSites() Eniro::Site Eniro::stringToSite(QString const& str) { Site site = FI; - QString lower = str.toLower(); - if(lower == "se" || lower == "swedish") + for(int i = 0; i < SITE_COUNT; i++) { - site = SE; - } - else if(lower == "dk" || lower == "danish") - { - site = DK; + if(lower == SITE_NAMES[i] || lower == SITE_IDS[i]) + { + site = static_cast (i); + } } return site; diff --git a/src/common/eniro.h b/src/common/eniro.h index 44165ee..50b0aba 100644 --- a/src/common/eniro.h +++ b/src/common/eniro.h @@ -34,6 +34,7 @@ class Eniro: public QObject public: enum Site {FI, SE, DK}; + static const int SITE_COUNT = 3; enum SearchType {YELLOW_PAGES, PERSONS}; diff --git a/src/common/translations/fi_FI.qm b/src/common/translations/fi_FI.qm index 88980f0..bbbfaef 100644 Binary files a/src/common/translations/fi_FI.qm and b/src/common/translations/fi_FI.qm differ diff --git a/src/common/translations/fi_FI.ts b/src/common/translations/fi_FI.ts index 91dcfb8..e6bd91e 100644 --- a/src/common/translations/fi_FI.ts +++ b/src/common/translations/fi_FI.ts @@ -20,7 +20,7 @@ DetailWindow - + Add to contacts Lisää yhteistietoihin @@ -30,71 +30,53 @@ Kopioi numero leikepöydälle - - + + Name Nimi - + Street Katu - + City Kaupunki - + Phone number Puhelinnumero - + Add Lisää - + Contact was successfully added to contacts. Yhteystieto lisättiin onnistuneesti. - + Error Virhe - + Unable to add contact. Yhteystiedon lisääminen epäonnistui, - + Number was successfully copied to clipboard. Numero kopioitiin onnistuneesti leikepöydälle. - Eniro - - - Finnish - Suomi - - - - Swedish - Ruotsi - - - - Danish - Tanska - - - MainWindow @@ -162,17 +144,17 @@ ResultWindow - + Search results Hakutulokset - + Error Virhe - + No results found Ei hakutuloksia @@ -222,52 +204,67 @@ SettingsDialog - + Settings Asetukset - + Eniro username Eniro-tunnus - + Eniro password Eniro-salasana - + Cache size (numbers) Välimuistin koko (numeroa) - + Eniro site Eniro-sivusto - + + Finnish + Suomi + + + + Swedish + Ruotsi + + + + Danish + Tanska + + + Autostart Käynnistä automaattisesti - + Enabled Kyllä - + Disabled Ei - + Save Tallenna - + Restarting daemon... Käynnistetään palvelu uudelleen... diff --git a/src/daemon/Makefile b/src/daemon/Makefile index 7cf83fb..196f428 100644 --- a/src/daemon/Makefile +++ b/src/daemon/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: jenirokd -# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed Apr 14 21:02:47 2010 +# Generated by qmake (2.01a) (Qt 4.6.2) on: Sat Apr 17 12:38:30 2010 # Project: daemon.pro # Template: app # Command: /usr/bin/qmake -unix -o Makefile daemon.pro diff --git a/src/gui/Makefile b/src/gui/Makefile index 7d03770..1ccf24e 100644 --- a/src/gui/Makefile +++ b/src/gui/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: jenirok -# Generated by qmake (2.01a) (Qt 4.6.2) on: Wed Apr 14 21:02:34 2010 +# Generated by qmake (2.01a) (Qt 4.6.2) on: Sat Apr 17 12:38:19 2010 # Project: gui.pro # Template: app # Command: /usr/bin/qmake -unix -o Makefile gui.pro diff --git a/src/gui/detailwindow.cpp b/src/gui/detailwindow.cpp index 71cffce..1fdbf7e 100644 --- a/src/gui/detailwindow.cpp +++ b/src/gui/detailwindow.cpp @@ -78,8 +78,6 @@ void DetailWindow::makeCall() { QString number = numberButton_->valueText(); - qDebug() << number; - if(number.isEmpty()) { return; diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index b2f3904..757a0ff 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -61,7 +61,25 @@ autostartSelector_(0) QMap ::const_iterator it; for(it = sites_.begin(); it != sites_.end(); it++) { - siteSelector_->addItem(it.value().name, it.value().id); + QString name; + + switch(it.key()) + { + case Eniro::FI: + name = tr("Finnish"); + break; + case Eniro::SE: + name = tr("Swedish"); + break; + case Eniro::DK: + name = tr("Danish"); + break; + default: + qDebug() << "Unknown site"; + continue; + + } + siteSelector_->addItem(name, it.value().id); if(it.value().id == site) {