-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 29 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 40 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 3 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 3 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 11 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 2 |
7 files changed, 83 insertions, 9 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6ccf763..81b0d59 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,101 +1,103 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.0.6 ************ -Two bugfixes in the pi-sync mode. +Some bugfixes in the pi-sync mode. +Added German translation for pi-sync mode. + KO/Pi: Made the todolist using alternate background. Other minor fixes in KO/Pi. ********** VERSION 2.0.5 ************ Bugfixes in KO/Pi. ********** VERSION 2.0.4 ************ KO/Pi: Fixed problem loading translations for summary/location edit boxes in event/todo editor. Added a general "select week number" to the toolbar. Fixed some small problem of the new features introduced in version 2.0.3. Made it possible to specify one specific category as category color, if more than one categories are selected. Fixed a bug in saving colors for categories with non-ascii characters. (Like, e.g. German Umlauts). Propably you have to set your colors again for those categories. ********** VERSION 2.0.3 ************ KO/Pi: Added feature for changing alarm settings for many items at once: Open list view (or search dialog), select the desired items and choose in the popup menu: Set alarm for selected... Added to the event/todo viewer the option to send an email to all attendees or all selected (with RSVP) attendees. Made the week-month mode changing in month view faster. Made month view better useable with keyboard. Now TAB key jumps to next cell with an event/todo. Scroll in cell with coursor keys, scroll in time (next week) with Shift/Control + coursorkeys. Fixed bug that the todo view flat mode was reset after first view update. If a todo is displayed closed in the todo view, it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties. Added info about the numbers of years to the caption (title) information about a birthday event. Made completion date in todo editor editable. Added possibility to save/load templates for journals. (Which is just a simple "save text to file" or "insert text from file". ********** VERSION 2.0.2 ************ KO/Pi: Fixed the layout problem of the day label buttons of the agenda view introduced in version 2.0.1. Added WhatsThis support for the todo view and the list view. Added a quite useful feature to the montview. Just click on the week numbers on the left. And in the top right corner of month view/agenda view there is now a "week number quick selector". (Click on the black triangle). Made the quite difficult timezone change in KO/Pi easy. OM/Pi: Fixed too small icons on desktop. Fixed non visible icons in mainwindow on Z with fastload enabled. Added signature file setting to smtp account config. And the signature can be edited and saved in the edit mail dialog. That does mean: Simply edit the signature for the selected smtp account in the edit new mail dialog and press the "save signature" button there. Then the signature is saved to the file specified in the smtp account settings. If there is no file specified, it is saved automatically to the file kdepim/apps/kopiemail/<accountname>.sig. ********** VERSION 2.0.1 ************ Oooops ... I forgot to test on the Zaurus 5500 ... Fixed many problems of new (english) strings (and german translations) introduced in the latest versions, where the text was not fitting on the 240x320 display of the Zaurus 5500. KO/Pi: Added a popup menu ( press pen and hold to get popup ) to the agenda view diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index 57b2fda..5335f47 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -625,104 +625,133 @@ { "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" },
{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" },
{ "Cut","Ausschneiden" },
{ "Paste","Einfügen" },
{ "Delete","Löschen" },
{ "Choose...","Wähle..." },
{ "Add View","Ansicht hinzufügen" },
{ "View name:","Ansicht Name:" },
{ "View Type","Ainsicht Typ" },
{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." },
{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." },
{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." },
{ "Draw &separators","Zeichne &Trennlinie" },
{ "Separator &width:","Trennlinien &Breite:" },
{ "&Padding:","Füllung:" },
{ "Cards","Karten" },
{ "&Margin:","&Rand:" },
{ "Draw &borders","Zeichne Ränder" },
{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." },
{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." },
{ "Sets the width of column separators","Sets the width of column separators" },
{ "&Layout","&Layout" },
{ "Show &empty fields","Zeige leere Felder" },
{ "Show field &labels","Zeige Feld Label" },
{ "Be&havior","Ver&halten" },
{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" },
{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" },
{ "Confirm Delete","Bestätige Löschen" },
{ "Edit Address Book Filter","Editiere Adressbuch Filter" },
{ "Category rule","Kategorie Regel" },
{ "Include categories","Inklusive" },
{ "Exclude categories","Exclusive" },
{ "Include contacts, that are:","Schließe folgende Kontakte ein:" },
{ "public","Öffentlich" },
{ "private","Privat" },
{ "confidential","Vertraulich" },
{ "Configure Resources","Konfiguriere Resourcen" },
{ "Resource Configuration","Resource Konfiguration" },
{ "Resources","Resourcen" },
{ "Standard","Standard" },
{ "&Use as Standard","Setze als Standard" },
{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" },
{ "General Settings","Allgemeine Einstellungen" },
{ "Read-only","Nur-Lesen" },
{ "Include in sync","Schließe in Sync mit ein" },
{ "%1 Resource Settings","%1 Resource Einstellungen" },
{ "Format:","Format:" },
{ "Location:","Ort:" },
{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" },
{ "Language","Sprache" },
{ "Time Format","Zeit Format" },
{ "Time Zone","Zeit Zone" },
{ "Data storage path","Daten Speicherpfad" },
{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
{ "Save settings","Speichere Einstellungen" },
{ "Save standard","Speichere Standard" },
{ "Save","Speichern" },
{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
{ "Multiple Sync options","Multi Sync Optionen" },
{ "Sync algo options","Sync Ablauf Optionen" },
{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
{ "Write back options","Optionen zum Zurückschreiben" },
{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
{ "Time period","Zeitspanne" },
{ "From ","Von " },
{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
{ " weeks in the future "," Wochen in der Zukunft " },
{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
{ "Local temp file:","Lokale temp Datei:" },
{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." },
{ "Sorry","Tut mir leid" },
{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" },
{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" },
{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" },
{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" },
{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" },
{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
{ "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" },
{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
{ "Error","Fehler" },
{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
{ "Warning","Warnung" },
+{ "Select week number","Wähle Wochen Nummer" },
+{ "Februar","Februar" },
+{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
+{ "Password for remote access:","Passwort für fernen Zugriff:" },
+{ "Remote IP address:","Ferne IP Adresse:" },
+{ "Remote port number:","Ferne Port Nummer:" },
+{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
+{ "Remote from: ","Fern von: " },
+{ "Local from: ","Lokal von: " },
+{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
+{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
+{ "Write back","Schreibe zurück" },
+{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
+{ "Received sync request","Sync Anfrage erhalten" },
+{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
+{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
+{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
+{ "Sending file...","Sende Datei..." },
+{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
+{ "Receiving synced file...","Gesyncte Daten erhalten..." },
+{ "Received %1 bytes","%1 Bytes erhalten" },
+{ "Writing file to disk...","Speichere Datei..." },
+{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
+{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
+{ "Synchronize!","Synchronisiere!" },
+{ "High clock skew!","Großer Uhrzeitunterschied!" },
+{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
+{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
+{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
\ No newline at end of file diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 6587eaa..c85ca35 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1142,103 +1142,143 @@ { "Use &colors","Nutze Farben" }, { "Type of View","Typ der Ansicht" }, { "Print as &Filofax page","Drucke als &Filofax Seite" }, { "Alt+F","Alt+F" }, { "Print as &timetable view:","Drucke als Zeittabelle:" }, { "Alt+T","Alt+T" }, { "Print as split week view","Drucke als gesplittete Wochenansicht" }, { "Print month","Drucke Monat" }, { "CalPrintMonth_Base","CalPrintMonth_Base" }, { "&Start month:","&Startmonat:" }, { "&End month:","&Endmonat:" }, { "Print week &numbers","Drucke Wochen Nummer(n)" }, { "Print todos","Drucke Todos" }, { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, { "Include &description of the item","Inclusive Itembeschreibung" }, { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, { "Include &priority of the item","Inclusive Priorität des Items" }, { "Items to Print","Zu druckende Items" }, { "&From:","Von:" }, { "&To:","Bis:" }, { "Print &all todo items","Drucke alle Todo Items" }, { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, { "Todo List","Todo Liste" }, { "&Title:","&Titel:" }, { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, { "Todo list","Todo Liste" }, { "&Print...","Drucke..." }, { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, { "[Unconfigured]","[Unkonfiguriert]" }, { "OK","OK" }, { "FilterEditor","FilterEditor" }, { "Include","Inclusive" }, { "Exclude","Exclusive" }, { "Edit Selection...","Editiere Auswahl" }, { "recurring events","wiederholende Termine" }, { "recurr. events","wiederh.Termine" }, { "completed to-dos","erledigte Todos" }, { "events","Termine" }, { "todos","Todos" }, { "journals","Journale" }, { "public","öffentl." }, { "private","privat" }, { "confidential","vertraul." }, { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, { "Yesterday","Gestern" }, { "Day after tomorrow","Übermorgen" }, { "Tomorrow","Morgen" }, { "Day before yesterday","Vorgestern" }, { "Size %1","Größe %1" }, { "New Agendasize: %1","Neue Agendagröße: %1" }, { " (%1 y.)"," (%1 J.)" }, { "Allday:","Ganztägig:" }, { "compl.todos","erled.Todos" }, { "Day view","Tagesansicht" }, { "Next days","Nächste Tage" }, { "Next week","Nächste Woche" }, { "Next two weeks","Nächste zwei Wochen" }, { "Next month","Nächster Monat" }, { "Journal view","Journal" }, { "Display all opened","Zeige alle geöffnet" }, { "Display all closed","Zeige alle geschlossen" }, { "Display all flat","Zeige alle flach" }, { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, { "Default todo done color:","Standard Todo erledigt Farbe" }, { "Select week %1-%2","Wähle Woche %1-%2" }, { "Select Week","Wähle Woche" }, { "Set alarm for selected...","Setze Alarm für Selekt..." }, { "Set Alarm!","Setze Alarm!" }, { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, { " and "," und " }, { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, { "Mail to selected","Mail an Ausgewählte" }, { "Mail to all","Mail an Alle" }, { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, { " on"," am" }, { " completed on "," erledigt am " }, { "Save as Event template","Speichere als Vorlage" }, { "Load Event template","Lade Termin Vorlage" }, { "Save as Journal template","Speichere als Journal Vorlage" }, { "Insert Journal template","Füge Journal Vorlage ein" }, { "Sub todos:<br>","Unter Todos:<br>" }, { "Parent todo:<br>","Über Todo:<br>" }, { "Set current as color category","Setze Gewählte als Farbkategorie" }, { " completed"," erledigt" }, { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.net --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, { "Error","Fehler" }, { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, { "Warning","Warnung" }, +{ "Select week number","Wähle Wochen Nummer" }, +{ "Februar","Februar" }, +{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, +{ "W","W" }, +{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, +{ "T: %1","T: %1" }, +{ "Start: ","Start: " }, +{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, +{ "Password for remote access:","Passwort für fernen Zugriff:" }, +{ "Remote IP address:","Ferne IP Adresse:" }, +{ "Remote port number:","Ferne Port Nummer:" }, +{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, +{ "Remote from: ","Fern von: " }, +{ "Local from: ","Lokal von: " }, +{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, +{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, +{ "Write back","Schreibe zurück" }, +{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, +{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, +{ "Received sync request","Sync Anfrage erhalten" }, +{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, +{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, +{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, +{ "Sending file...","Sende Datei..." }, +{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, +{ "Receiving synced file...","Gesyncte Daten erhalten..." }, +{ "Received %1 bytes","%1 Bytes erhalten" }, +{ "Writing file to disk...","Speichere Datei..." }, +{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, +{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, +{ "Synchronize!","Synchronisiere!" }, +{ "High clock skew!","Großer Uhrzeitunterschied!" }, +{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, +{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, +{ "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" },
\ No newline at end of file diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index a8e4de5..1b17665 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -3041,193 +3041,194 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo ++incCounter; } er.clear(); QStringList el = local->uidList(); modulo = (el.count()/10)+1; syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); incCounter = 0; while ( incCounter < el.count()) { qApp->processEvents(); if (syncManager->isProgressBarCanceled()) return false; if ( incCounter % modulo == 0 ) syncManager->showProgressBar(incCounter); uid = el[ incCounter ]; bool skipIncidence = false; if ( uid.left(19) == QString("last-syncAddressee-") ) skipIncidence = true; if ( !skipIncidence ) { inL = local->findByUid( uid ); if ( !inL.resource() || inL.resource()->includeInSync() ) { inR = remote->findByUid( uid ); if ( inR.isEmpty() ){ if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { // no conflict ********** add or delete local if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); local->removeAddressee( inL ); ++deletedAddresseeL; } else { if ( ! syncManager->mWriteBackExistingOnly ) { inL.removeID(mCurrentSyncDevice ); ++addedAddresseeR; inL.setRevision( modifiedCalendar ); local->insertAddressee( inL, false ); inR = inL; inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); inR.setResource( 0 ); remote->insertAddressee( inR, false ); } } } else { if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { //qDebug("data %s ", inL.revision().toString().latin1()); // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); local->removeAddressee( inL ); ++deletedAddresseeL; } else { if ( ! syncManager->mWriteBackExistingOnly ) { ++addedAddresseeR; inL.setRevision( modifiedCalendar ); local->insertAddressee( inL, false ); inR = inL; inR.setIDStr( ":" ); inR.setResource( 0 ); remote->insertAddressee( inR, false ); } } } } else { ++filteredOUT; } } } } ++incCounter; } el.clear(); syncManager->hideProgressBar(); mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); // get rid of micro seconds QTime t = mLastAddressbookSync.time(); mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); addresseeLSync.setRevision( mLastAddressbookSync ); addresseeRSync.setRevision( mLastAddressbookSync ); addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); addresseeRSync.setNote( "" ) ; addresseeLSync.setNote( "" ); if ( mGlobalSyncMode == SYNC_MODE_NORMAL) remote->insertAddressee( addresseeRSync, false ); local->insertAddressee( addresseeLSync, false ); QString mes; mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT ); qDebug( mes ); mes = i18n("Local addressbook changed!\n") +mes; if ( syncManager->mShowSyncSummary ) { if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, i18n("KA/Pi Synchronization"),i18n("Write back"))) { qDebug("KA: WB cancelled "); - return false; + syncManager->mWriteBackFile = false; + return syncOK; } } return syncOK; } //this is a overwritten callbackmethods from the syncinterface bool KABCore::sync(KSyncManager* manager, QString filename, int mode) { //pending prepare addresseeview for output //pending detect, if remote file has REV field. if not switch to external sync mGlobalSyncMode = SYNC_MODE_NORMAL; if ( manager != syncManager ) qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); AddressBook abLocal(filename,"syncContact"); bool syncOK = false; if ( abLocal.load() ) { qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); bool external = false; bool isXML = false; if ( filename.right(4) == ".xml") { mGlobalSyncMode = SYNC_MODE_EXTERNAL; isXML = true; abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); } else { external = !manager->mIsKapiFile; if ( external ) { qDebug("KA: Sync::Setting vcf mode to external "); mGlobalSyncMode = SYNC_MODE_EXTERNAL; AddressBook::Iterator it; for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { (*it).setID( mCurrentSyncDevice, (*it).uid() ); (*it).computeCsum( mCurrentSyncDevice ); } } } //AddressBook::Iterator it; //QStringList vcards; //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { // qDebug("Name %s ", (*it).familyName().latin1()); //} syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); if ( syncOK ) { if ( syncManager->mWriteBackFile ) { if ( external ) abLocal.removeSyncAddressees( !isXML); qDebug("KA: Sync::Saving remote AB "); if ( ! abLocal.saveAB()) qDebug("KA: sync::Error writing back AB to file "); if ( external ) { // afterwrite processing abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); } } } setModified(); } abLocal.removeResources(); if ( syncOK ) mViewManager->refreshView(); return syncOK; } void KABCore::removeSyncInfo( QString syncProfile) { qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); mAddressBook->removeSyncInfo( syncProfile ); setModified(); } //this is a overwritten callbackmethods from the syncinterface bool KABCore::syncExternal(KSyncManager* manager, QString resource) { if ( resource == "phone" ) return syncPhone(); disableBR( true ); if ( manager != syncManager ) qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); AddressBook abLocal( resource,"syncContact"); bool syncOK = false; message(i18n("Loading DTM address data..."), false); if ( abLocal.load() ) { qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); mGlobalSyncMode = SYNC_MODE_EXTERNAL; message(i18n("Sync preprocessing..."),false); abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); message(i18n("Synchronizing..."),false); syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a9de65a..7c8316f 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1134,193 +1134,194 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { inL->removeID(mCurrentSyncDevice ); ++addedEventR; //qDebug("remote added Incidence %s ", inL->summary().latin1()); inL->setLastModified( modifiedCalendar ); inR = inL->clone(); inR->setIDStr( ":" ); inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); remote->addIncidence( inR ); } } } else { if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { checkExternSyncEvent(eventLSyncSharp, inL); local->deleteIncidence( inL ); ++deletedEventL; } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { ++addedEventR; inL->setLastModified( modifiedCalendar ); inR = inL->clone(); inR->setIDStr( ":" ); remote->addIncidence( inR ); } } } } else { ++filteredOUT; } } } inL = el.next(); } int delFut = 0; int remRem = 0; if ( mSyncManager->mWriteBackInFuture ) { er = remote->rawIncidences(); remRem = er.count(); inR = er.first(); QDateTime dt; QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); while ( inR ) { if ( inR->type() == "Todo" ) { Todo * t = (Todo*)inR; if ( t->hasDueDate() ) dt = t->dtDue(); else dt = cur.addSecs( 62 ); } else if (inR->type() == "Event" ) { bool ok; dt = inR->getNextOccurence( cur, &ok ); if ( !ok ) dt = cur.addSecs( -62 ); } else dt = inR->dtStart(); if ( dt < cur || dt > end ) { remote->deleteIncidence( inR ); ++delFut; } inR = er.next(); } } bar.hide(); mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); eventLSync->setReadOnly( false ); eventLSync->setDtStart( mLastCalendarSync ); eventRSync->setDtStart( mLastCalendarSync ); eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); eventLSync->setReadOnly( true ); qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... remote->addEvent( eventRSync ); else delete eventRSync; qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); QString mes; mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT ); QString delmess; if ( delFut ) { delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); mes += delmess; } mes = i18n("Local calendar changed!\n") +mes; mCalendar->checkAlarmForIncidence( 0, true ); qDebug( mes ); if ( mSyncManager->mShowSyncSummary ) { if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, i18n("KO/Pi Synchronization"),i18n("Write back"))) { qDebug("KO: WB cancelled "); - return false; + mSyncManager->mWriteBackFile = false; + return syncOK; } } return syncOK; } void CalendarView::setSyncDevice( QString s ) { mCurrentSyncDevice= s; } void CalendarView::setSyncName( QString s ) { mCurrentSyncName= s; } bool CalendarView::syncCalendar(QString filename, int mode) { //qDebug("syncCalendar %s ", filename.latin1()); mGlobalSyncMode = SYNC_MODE_NORMAL; CalendarLocal* calendar = new CalendarLocal(); calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); FileStorage* storage = new FileStorage( calendar ); bool syncOK = false; storage->setFileName( filename ); // qDebug("loading ... "); if ( storage->load() ) { getEventViewerDialog()->setSyncMode( true ); syncOK = synchronizeCalendar( mCalendar, calendar, mode ); getEventViewerDialog()->setSyncMode( false ); if ( syncOK ) { if ( mSyncManager->mWriteBackFile ) { storage->setSaveFormat( new ICalFormat() ); storage->save(); } } setModified( true ); } delete storage; delete calendar; if ( syncOK ) updateView(); return syncOK; } void CalendarView::syncExternal( int mode ) { mGlobalSyncMode = SYNC_MODE_EXTERNAL; qApp->processEvents(); CalendarLocal* calendar = new CalendarLocal(); calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); bool syncOK = false; bool loadSuccess = false; PhoneFormat* phoneFormat = 0; emit tempDisableBR(true); #ifndef DESKTOP_VERSION SharpFormat* sharpFormat = 0; if ( mode == 0 ) { // sharp sharpFormat = new SharpFormat () ; loadSuccess = sharpFormat->load( calendar, mCalendar ); } else #endif if ( mode == 1 ) { // phone phoneFormat = new PhoneFormat (mCurrentSyncDevice, mSyncManager->mPhoneDevice, mSyncManager->mPhoneConnection, mSyncManager->mPhoneModel); loadSuccess = phoneFormat->load( calendar,mCalendar); } else { emit tempDisableBR(false); return; } if ( loadSuccess ) { getEventViewerDialog()->setSyncMode( true ); syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); getEventViewerDialog()->setSyncMode( false ); qApp->processEvents(); if ( syncOK ) { if ( mSyncManager->mWriteBackFile ) { QPtrList<Incidence> iL = mCalendar->rawIncidences(); Incidence* inc = iL.first(); if ( phoneFormat ) { while ( inc ) { inc->removeID(mCurrentSyncDevice); inc = iL.next(); } } #ifndef DESKTOP_VERSION if ( sharpFormat ) sharpFormat->save(calendar); #endif if ( phoneFormat ) phoneFormat->save(calendar); iL = calendar->rawIncidences(); diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index c8d0e0d..02e5587 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -994,330 +994,331 @@ void KSyncManager::syncPhone() syncExternalApplication("phone"); } void KSyncManager::showProgressBar(int percentage, QString caption, int total) { if (!bar->isVisible()) { bar->setCaption (caption); bar->setTotalSteps ( total ) ; bar->show(); } bar->raise(); bar->setProgress( percentage ); qApp->processEvents(); } void KSyncManager::hideProgressBar() { bar->hide(); qApp->processEvents(); } bool KSyncManager::isProgressBarCanceled() { return !bar->isVisible(); } QString KSyncManager::syncFileName() { QString fn = "tempfile"; switch(mTargetApp) { case (KAPI): fn = "tempsyncab.vcf"; break; case (KOPI): fn = "tempsynccal.ics"; break; case (PWMPI): fn = "tempsyncpw.pwm"; break; default: break; } #ifdef _WIN32_ return locateLocal( "tmp", fn ); #else return (QString( "/tmp/" )+ fn ); #endif } void KSyncManager::syncPi() { mIsKapiFile = true; mPisyncFinished = false; qApp->processEvents(); if ( mAskForPreferences ) if ( !edit_pisync_options()) { mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); return; } bool ok; Q_UINT16 port = mActiveSyncPort.toUInt(&ok); if ( ! ok ) { mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); return; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); commandSocket->readFile( syncFileName() ); } void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) { //enum { success, errorW, errorR, quiet }; if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) { mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); delete s; if ( state == KCommandSocket::errorR ) { KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget()); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); commandSocket->sendStop(); } mPisyncFinished = true; return; } else if ( state == KCommandSocket::errorW ) { mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); mPisyncFinished = true; } else if ( state == KCommandSocket::successR ) { QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); } else if ( state == KCommandSocket::successW ) { - mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); mPisyncFinished = true; } delete s; } void KSyncManager::readFileFromSocket() { QString fileName = syncFileName(); + bool syncOK = true; mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); if ( ! syncWithFile( fileName , true ) ) { mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); - mPisyncFinished = true; - return; + syncOK = false; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); - if ( mWriteBackFile ) + if ( mWriteBackFile && syncOK ) commandSocket->writeFile( fileName ); else { commandSocket->sendStop(); + if ( syncOK ) mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); mPisyncFinished = true; } } KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) { mPassWord = pw; mSocket = 0; mSyncActionDialog = 0; blockRC = false; } void KServerSocket::newConnection ( int socket ) { // qDebug("KServerSocket:New connection %d ", socket); if ( mSocket ) { qDebug("KSS::newConnection Socket deleted! "); delete mSocket; mSocket = 0; } mSocket = new QSocket( this ); connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); mSocket->setSocket( socket ); } void KServerSocket::discardClient() { //qDebug(" KServerSocket::discardClient()"); if ( mSocket ) { delete mSocket; mSocket = 0; } //emit endConnect(); } void KServerSocket::readClient() { if ( blockRC ) return; if ( mSocket == 0 ) { qDebug("ERROR::KSS::readClient(): mSocket == 0 "); return; } //qDebug("KServerSocket::readClient()"); if ( mSocket->canReadLine() ) { QString line = mSocket->readLine(); //qDebug("KServerSocket readline: %s ", line.latin1()); QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line ); if ( tokens[0] == "GET" ) { if ( tokens[1] == mPassWord ) { //emit sendFile( mSocket ); bool ok = false; QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok); if ( ok ) { KSyncManager::mRequestedSyncEvent = dt; } else KSyncManager::mRequestedSyncEvent = QDateTime(); send_file(); } else { KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); } } if ( tokens[0] == "PUT" ) { if ( tokens[1] == mPassWord ) { //emit getFile( mSocket ); blockRC = true; get_file(); } else { KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); //qDebug("password %s, invalid password %s ",mPassWord.latin1(), tokens[1].latin1() ); } } if ( tokens[0] == "STOP" ) { //emit endConnect(); end_connect(); } } } void KServerSocket::end_connect() { delete mSyncActionDialog; mSyncActionDialog = 0; } void KServerSocket::send_file() { //qDebug("MainWindow::sendFile(QSocket* s) "); if ( mSyncActionDialog ) delete mSyncActionDialog; mSyncActionDialog = new QDialog ( 0, "input-dialog", true ); mSyncActionDialog->setCaption(i18n("Received sync request")); QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); label->setAlignment ( Qt::AlignHCenter ); QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); lay->addWidget( label); lay->setMargin(7); lay->setSpacing(7); if ( KSyncManager::mRequestedSyncEvent.isValid() ) { int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent ); if ( secs < 0 ) secs = secs * (-1); if ( secs > 30 ) //if ( true ) { QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs ); QLabel* label = new QLabel( warning, mSyncActionDialog ); label->setAlignment ( Qt::AlignHCenter ); lay->addWidget( label); if ( secs > 180 ) { if ( secs > 300 ) { - if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\n of more than 5 minutes.\nPlease adjust your clocks.\n<b>You may get wrong syncing results!<\b>\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) { + if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) { qDebug("KSS::Sync cancelled ,cs"); return ; } } QFont f = label->font(); f.setPointSize ( f.pointSize() *2 ); f. setBold (true ); QLabel* label = new QLabel( warning, mSyncActionDialog ); label->setFont( f ); warning = i18n("ADJUST\nYOUR\nCLOCKS!"); label->setText( warning ); label->setAlignment ( Qt::AlignHCenter ); lay->addWidget( label); mSyncActionDialog->setFixedSize( 230, 300); } else { mSyncActionDialog->setFixedSize( 230, 200); } } else { mSyncActionDialog->setFixedSize( 230, 120); } } else mSyncActionDialog->setFixedSize( 230, 120); mSyncActionDialog->show(); mSyncActionDialog->raise(); emit request_file(); qApp->processEvents(); QString fileName = mFileName; QFile file( fileName ); if (!file.open( IO_ReadOnly ) ) { delete mSyncActionDialog; mSyncActionDialog = 0; qDebug("KSS::error open sync file: %s ", fileName.latin1()); mSocket->close(); if ( mSocket->state() == QSocket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); return ; } mSyncActionDialog->setCaption( i18n("Sending file...") ); QTextStream ts( &file ); ts.setEncoding( QTextStream::Latin1 ); QTextStream os( mSocket ); os.setEncoding( QTextStream::Latin1 ); while ( ! ts.atEnd() ) { os << ts.readLine() << "\r\n\r\n"; } //os << ts.read(); file.close(); mSyncActionDialog->setCaption( i18n("Waiting for synced file...") ); mSocket->close(); if ( mSocket->state() == QSocket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); } void KServerSocket::get_file() { mSyncActionDialog->setCaption( i18n("Receiving synced file...") ); piTime.start(); piFileString = ""; QTimer::singleShot( 1, this , SLOT (readBackFileFromSocket( ) )); } void KServerSocket::readBackFileFromSocket() { //qDebug("readBackFileFromSocket() %d ", piTime.elapsed ()); while ( mSocket->canReadLine () ) { piTime.restart(); QString line = mSocket->readLine (); piFileString += line; //qDebug("readline: %s ", line.latin1()); mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) ); } if ( piTime.elapsed () < 3000 ) { // wait for more //qDebug("waitformore "); QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) )); return; } QString fileName = mFileName; QFile file ( fileName ); if (!file.open( IO_WriteOnly ) ) { delete mSyncActionDialog; mSyncActionDialog = 0; qDebug("KSS:Error open read back file "); piFileString = ""; emit file_received( false ); blockRC = false; return ; } // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); QTextStream ts ( &file ); diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 7f31ab1..aec74fa 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -1,107 +1,107 @@ #include <qregexp.h> #include <qapplication.h> #include "kdebug.h" #include "kcalendarsystemgregorian.h" #include "klocale.h" #include <qstringlist.h> -//#define COLLECT_TRANSLATION +#define COLLECT_TRANSLATION QDict<QString> *mLocaleDict = 0; void setLocaleDict( QDict<QString> * dict ) { mLocaleDict = dict; } #ifdef COLLECT_TRANSLATION QStringList missingTrans; QStringList existingTrans1; QStringList existingTrans2; void addMissing(const char *text) { QString mis ( text ); if ( !missingTrans.contains( mis ) ) missingTrans.append(mis); } void addExist(const char *text,QString trans ) { //return; QString mis ( text ); if ( !existingTrans1.contains( mis ) ) { existingTrans1.append(mis); existingTrans2.append(trans); } } #include <qfile.h> #include <qtextstream.h> #include <qtextcodec.h> #endif void dumpMissing() { #ifdef COLLECT_TRANSLATION QString fileName = "/tmp/usernewtrans.txt"; QFile file( fileName ); if (!file.open( IO_WriteOnly ) ) { return ; } QTextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); int i; for ( i = 0; i< missingTrans.count(); ++i ) { QString text = missingTrans[i].replace( QRegExp("\n"),"\\n" ); ts << "{ \""<<text<< "\",\""<< text <<"\" },\n"; } file.close(); { QString fileName = "/tmp/usertrans.txt"; QFile file( fileName ); if (!file.open( IO_WriteOnly ) ) { return ; } QTextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); int i; for ( i = 0; i< existingTrans1.count(); ++i ) { QString text = existingTrans1[i].replace( QRegExp("\n"),"\\n" ); QString text2 = existingTrans2[i].replace( QRegExp("\n"),"\\n" ); ts << "{ \""<<text<< "\",\""<< text2 <<"\" },\n"; } file.close(); } #endif } QString i18n(const char *text) { if ( ! mLocaleDict ) { #ifdef COLLECT_TRANSLATION addMissing( text ); #endif return QString( text ); } else { QString* ret = mLocaleDict->find(QString(text)) ; if ( ret == 0 ) { #ifdef COLLECT_TRANSLATION addMissing( text ); #endif return QString( text ); } else { |