-rw-r--r-- | bin/kdepim/kopiemail/germantranslation.txt | 13 | ||||
-rw-r--r-- | bin/kdepim/kopiemail/usertranslation.txt | 33 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 2 |
3 files changed, 39 insertions, 9 deletions
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt index 5039848..5037f5f 100644 --- a/bin/kdepim/kopiemail/germantranslation.txt +++ b/bin/kdepim/kopiemail/germantranslation.txt | |||
@@ -1,247 +1,260 @@ | |||
1 | { " Local Time"," Locale Zeit" }, | 1 | { " Local Time"," Locale Zeit" }, |
2 | { "Preferences","Vorlieben" }, | 2 | { "Preferences","Vorlieben" }, |
3 | { "Ok","Ok" }, | 3 | { "Ok","Ok" }, |
4 | { "Default","Standard" }, | 4 | { "Default","Standard" }, |
5 | { "Cancel","Abbrechen" }, | 5 | { "Cancel","Abbrechen" }, |
6 | { "Global","Global" }, | 6 | { "Global","Global" }, |
7 | { "Email","Email" }, | 7 | { "Email","Email" }, |
8 | { "Phone","Phone" }, | 8 | { "Phone","Phone" }, |
9 | { "SMS","SMS" }, | 9 | { "SMS","SMS" }, |
10 | { "Fax","Fax" }, | 10 | { "Fax","Fax" }, |
11 | { "Pager","Pager" }, | 11 | { "Pager","Pager" }, |
12 | { "SIP","SIP" }, | 12 | { "SIP","SIP" }, |
13 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 13 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
14 | { "English","Englisch" }, | 14 | { "English","Englisch" }, |
15 | { "German","Deutsch" }, | 15 | { "German","Deutsch" }, |
16 | { "French","Französich" }, | 16 | { "French","Französich" }, |
17 | { "Italian","Italienisch" }, | 17 | { "Italian","Italienisch" }, |
18 | { "User defined (usertranslation.txt)","Benutzerdef.(usertranslation.txt)" }, | 18 | { "User defined (usertranslation.txt)","Benutzerdef.(usertranslation.txt)" }, |
19 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 19 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
20 | { "24:00","24:00" }, | 20 | { "24:00","24:00" }, |
21 | { "12:00am","12:00am" }, | 21 | { "12:00am","12:00am" }, |
22 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 22 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
23 | { "Locale","Localisation" }, | 23 | { "Locale","Localisation" }, |
24 | { "Date Format:","Datums Format:" }, | 24 | { "Date Format:","Datums Format:" }, |
25 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 25 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
26 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 26 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
27 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 27 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
28 | { "User defined","Benutzerdefiniert" }, | 28 | { "User defined","Benutzerdefiniert" }, |
29 | { "User long date:","Format langes Datum:" }, | 29 | { "User long date:","Format langes Datum:" }, |
30 | { "User short date:","Format kurzes Datum:" }, | 30 | { "User short date:","Format kurzes Datum:" }, |
31 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 31 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
32 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 32 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
33 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 33 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
34 | { "Date Format","Datums Format" }, | 34 | { "Date Format","Datums Format" }, |
35 | { "Timezone:","Zeitzone:" }, | 35 | { "Timezone:","Zeitzone:" }, |
36 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 36 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
37 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 37 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
38 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, | 38 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
39 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 39 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
40 | { "Daylight start:","Sommerzeit Beginn:" }, | 40 | { "Daylight start:","Sommerzeit Beginn:" }, |
41 | { "Mon","Mo" }, | 41 | { "Mon","Mo" }, |
42 | { "Tue","Di" }, | 42 | { "Tue","Di" }, |
43 | { "Wed","Mi" }, | 43 | { "Wed","Mi" }, |
44 | { "Thu","Do" }, | 44 | { "Thu","Do" }, |
45 | { "Fri","Fr" }, | 45 | { "Fri","Fr" }, |
46 | { "Sat","Sa" }, | 46 | { "Sat","Sa" }, |
47 | { "Sun","So" }, | 47 | { "Sun","So" }, |
48 | { "January","Januar" }, | 48 | { "January","Januar" }, |
49 | { "February","Februar" }, | 49 | { "February","Februar" }, |
50 | { "March","März" }, | 50 | { "March","März" }, |
51 | { "April","April" }, | 51 | { "April","April" }, |
52 | { "May","Mai" }, | 52 | { "May","Mai" }, |
53 | { "June","Juni" }, | 53 | { "June","Juni" }, |
54 | { "July","Juli" }, | 54 | { "July","Juli" }, |
55 | { "August","August" }, | 55 | { "August","August" }, |
56 | { "September","September" }, | 56 | { "September","September" }, |
57 | { "October","Oktober" }, | 57 | { "October","Oktober" }, |
58 | { "November","November" }, | 58 | { "November","November" }, |
59 | { "December","Dezember" }, | 59 | { "December","Dezember" }, |
60 | { "tomorrow","morgen" }, | 60 | { "tomorrow","morgen" }, |
61 | { "today","heute" }, | 61 | { "today","heute" }, |
62 | { "yesterday","gestern" }, | 62 | { "yesterday","gestern" }, |
63 | { "Monday","Montag" }, | 63 | { "Monday","Montag" }, |
64 | { "Tuesday","Dienstag" }, | 64 | { "Tuesday","Dienstag" }, |
65 | { "Wednesday","Mittwoch" }, | 65 | { "Wednesday","Mittwoch" }, |
66 | { "Thursday","Donnerstag" }, | 66 | { "Thursday","Donnerstag" }, |
67 | { "Friday","Freitag" }, | 67 | { "Friday","Freitag" }, |
68 | { "Saturday","Samstag" }, | 68 | { "Saturday","Samstag" }, |
69 | { "Sunday","Sonntag" }, | 69 | { "Sunday","Sonntag" }, |
70 | { "Daylight end:","Sommerzeit Ende:" }, | 70 | { "Daylight end:","Sommerzeit Ende:" }, |
71 | { "Time Zone","Zeitzone" }, | 71 | { "Time Zone","Zeitzone" }, |
72 | { "Used Mail Client","Benutzter Mail Client" }, | 72 | { "Used Mail Client","Benutzter Mail Client" }, |
73 | { "Channel:","Channel:" }, | 73 | { "Channel:","Channel:" }, |
74 | { "Message:","Message:" }, | 74 | { "Message:","Message:" }, |
75 | { "Parameters:","Parameter:" }, | 75 | { "Parameters:","Parameter:" }, |
76 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 76 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
77 | { "extra Message:","extra Message:" }, | 77 | { "extra Message:","extra Message:" }, |
78 | { "extra Parameters:","extra Parameter:" }, | 78 | { "extra Parameters:","extra Parameter:" }, |
79 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 79 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
80 | { "External Apps.","Externe Appl." }, | 80 | { "External Apps.","Externe Appl." }, |
81 | { "General","Allgemein" }, | 81 | { "General","Allgemein" }, |
82 | { "Full &name:","Vor- und &Nachname:" }, | 82 | { "Full &name:","Vor- und &Nachname:" }, |
83 | { "E&mail address:","E&mail Adresse:" }, | 83 | { "E&mail address:","E&mail Adresse:" }, |
84 | { "Fonts","Schriftart" }, | 84 | { "Fonts","Schriftart" }, |
85 | { "Choose...","Wähle..." }, | 85 | { "Choose...","Wähle..." }, |
86 | { "Used %1 Client","Benutzter %1 Client" }, | 86 | { "Used %1 Client","Benutzter %1 Client" }, |
87 | { "No email client installed","Kein Email Klient installiert" }, | 87 | { "No email client installed","Kein Email Klient installiert" }, |
88 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 88 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
89 | { "OM/Pi email client","OM/Pi Email Klient" }, | 89 | { "OM/Pi email client","OM/Pi Email Klient" }, |
90 | { "Delete","Löschen" }, | 90 | { "Delete","Löschen" }, |
91 | { "New","Neu" }, | 91 | { "New","Neu" }, |
92 | { "Edit","Bearbeite" }, | 92 | { "Edit","Bearbeite" }, |
93 | { "Close","Schließen" }, | 93 | { "Close","Schließen" }, |
94 | { "Size","Größe" }, | 94 | { "Size","Größe" }, |
95 | { "Date","Datum" }, | 95 | { "Date","Datum" }, |
96 | { "Please set at","Bitte einstellen in" }, | 96 | { "Please set at","Bitte einstellen in" }, |
97 | { "Settings@General TAB","Einstellungen@Allgemein TAB" }, | 97 | { "Settings@General TAB","Einstellungen@Allgemein TAB" }, |
98 | { "KOpieMail/Pi","KOpieMail/Pi" }, | 98 | { "KOpieMail/Pi","KOpieMail/Pi" }, |
99 | { "Mail","Mail" }, | 99 | { "Mail","Mail" }, |
100 | { "Settings","Konfig" }, | 100 | { "Settings","Konfig" }, |
101 | { "Get all new mails","Hole alle neuen Mails" }, | 101 | { "Get all new mails","Hole alle neuen Mails" }, |
102 | { "Get new messages","Hole neue mails" }, | 102 | { "Get new messages","Hole neue mails" }, |
103 | { "Compose new mail","Schreibe neue Mail" }, | 103 | { "Compose new mail","Schreibe neue Mail" }, |
104 | { "Send queued mails","Sende gespeicherte Mails" }, | 104 | { "Send queued mails","Sende gespeicherte Mails" }, |
105 | { "Show/Hide folders","Zeige Verzeichnisse" }, | 105 | { "Show/Hide folders","Zeige Verzeichnisse" }, |
106 | { "Delete Mail","Lösche Mail" }, | 106 | { "Delete Mail","Lösche Mail" }, |
107 | { "Edit settings","Ändere Einstellungen" }, | 107 | { "Edit settings","Ändere Einstellungen" }, |
108 | { "Configure accounts","Konfiguriere Zugänge" }, | 108 | { "Configure accounts","Konfiguriere Zugänge" }, |
109 | { "Mailbox","Mailbox" }, | 109 | { "Mailbox","Mailbox" }, |
110 | { "Subject","Betreff" }, | 110 | { "Subject","Betreff" }, |
111 | { "Sender","Sender" }, | 111 | { "Sender","Sender" }, |
112 | { "Size","Größe" }, | 112 | { "Size","Größe" }, |
113 | { "Date","Datum" }, | 113 | { "Date","Datum" }, |
114 | { "Close","Schliessen" }, | 114 | { "Close","Schliessen" }, |
115 | { "Help","Hilfe" }, | 115 | { "Help","Hilfe" }, |
116 | { "About","Über" }, | 116 | { "About","Über" }, |
117 | { "Licence","Lizenz" }, | 117 | { "Licence","Lizenz" }, |
118 | { "LibEtPan Licence","LibEtPan Lizenz" }, | 118 | { "LibEtPan Licence","LibEtPan Lizenz" }, |
119 | { "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" }, | 119 | { "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" }, |
120 | { "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" }, | 120 | { "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" }, |
121 | { "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" }, | 121 | { "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" }, |
122 | { "View mail as html","Zeige Mails als html" }, | 122 | { "View mail as html","Zeige Mails als html" }, |
123 | { "Send mails later","Sende Mails später" }, | 123 | { "Send mails later","Sende Mails später" }, |
124 | { "Application(nr)","Applikation(nr)" }, | 124 | { "Application(nr)","Applikation(nr)" }, |
125 | { "OK","OK" }, | 125 | { "OK","OK" }, |
126 | { "Compose mail:","Verfasse Mail:" }, | 126 | { "Compose mail:","Verfasse Mail:" }, |
127 | { "Dear Mr.","Hallo Herr" }, | 127 | { "Dear Mr.","Hallo Herr" }, |
128 | { "Read mail:","Lese Mail:" }, | 128 | { "Read mail:","Lese Mail:" }, |
129 | { "Hello","Hallo" }, | 129 | { "Hello","Hallo" }, |
130 | { "Configure Accounts","Konfigure Zugänge" }, | 130 | { "Configure Accounts","Konfigure Zugänge" }, |
131 | { "Name of the Account","Name des Zugangs" }, | 131 | { "Name of the Account","Name des Zugangs" }, |
132 | { "News","News" }, | 132 | { "News","News" }, |
133 | { "Account","Zugang" }, | 133 | { "Account","Zugang" }, |
134 | { "Type","Typ" }, | 134 | { "Type","Typ" }, |
135 | { "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" }, | 135 | { "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" }, |
136 | { "Error","Fehler" }, | 136 | { "Error","Fehler" }, |
137 | { "Configure NNTP","Konfiguriere News" }, | 137 | { "Configure NNTP","Konfiguriere News" }, |
138 | { "Port","Port" }, | 138 | { "Port","Port" }, |
139 | { "Server","Server" }, | 139 | { "Server","Server" }, |
140 | { "Use SSL","Benutze SSL" }, | 140 | { "Use SSL","Benutze SSL" }, |
141 | { "User","Benutzer" }, | 141 | { "User","Benutzer" }, |
142 | { "Password","Passwort" }, | 142 | { "Password","Passwort" }, |
143 | { "Use Login","Benutze Login" }, | 143 | { "Use Login","Benutze Login" }, |
144 | { "Newsgroup","Newsgroup" }, | 144 | { "Newsgroup","Newsgroup" }, |
145 | { "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, | 145 | { "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, |
146 | { "Filter:","Filter:" }, | 146 | { "Filter:","Filter:" }, |
147 | { "Show subscribed","Zeige abbonnierte" }, | 147 | { "Show subscribed","Zeige abbonnierte" }, |
148 | { "Groups","NewsGroups" }, | 148 | { "Groups","NewsGroups" }, |
149 | { "Configure IMAP","Konfiguriere IMAP" }, | 149 | { "Configure IMAP","Konfiguriere IMAP" }, |
150 | { "Use secure sockets:","Benutze sichere Verbindung:" }, | 150 | { "Use secure sockets:","Benutze sichere Verbindung:" }, |
151 | { "ssh $SERVER exec","ssh $SERVER exec" }, | 151 | { "ssh $SERVER exec","ssh $SERVER exec" }, |
152 | { "Prefix","Prefix" }, | 152 | { "Prefix","Prefix" }, |
153 | { "Local storage folder:","Lokales Verzeichnis:" }, | 153 | { "Local storage folder:","Lokales Verzeichnis:" }, |
154 | { "Get only messages smaller","Hole nur Nachrichten kleiner" }, | 154 | { "Get only messages smaller","Hole nur Nachrichten kleiner" }, |
155 | { "kB","kB" }, | 155 | { "kB","kB" }, |
156 | { "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, | 156 | { "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, |
157 | { "Configure POP3","Konfiguriere POP3" }, | 157 | { "Configure POP3","Konfiguriere POP3" }, |
158 | { "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, | 158 | { "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, |
159 | { "Configure SMTP","Konfiguriere SMTP" }, | 159 | { "Configure SMTP","Konfiguriere SMTP" }, |
160 | { "Name of the SMTP Server","Name des SMTP Servers" }, | 160 | { "Name of the SMTP Server","Name des SMTP Servers" }, |
161 | { "Port of the SMTP Server","Port des SMTP Servers" }, | 161 | { "Port of the SMTP Server","Port des SMTP Servers" }, |
162 | { "Fetching folder list","Hole Verzeichnis Liste" }, | 162 | { "Fetching folder list","Hole Verzeichnis Liste" }, |
163 | { "Fetch ","Hole " }, | 163 | { "Fetch ","Hole " }, |
164 | { "Fetching header list","Hole Titel Liste" }, | 164 | { "Fetching header list","Hole Titel Liste" }, |
165 | { "Mailbox has %1 mails","Mailbox hat %1 Mails" }, | 165 | { "Mailbox has %1 mails","Mailbox hat %1 Mails" }, |
166 | { "Read this mail","Lies diese Mail" }, | 166 | { "Read this mail","Lies diese Mail" }, |
167 | { "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, | 167 | { "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, |
168 | { "Delete this mail","Lösche diese Mail" }, | 168 | { "Delete this mail","Lösche diese Mail" }, |
169 | { "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, | 169 | { "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, |
170 | { "Delete all selected mails","Lösche alle selektierten Mails" }, | 170 | { "Delete all selected mails","Lösche alle selektierten Mails" }, |
171 | { "Clear selection","Selektion aufheben" }, | 171 | { "Clear selection","Selektion aufheben" }, |
172 | { "Reply","Antworten" }, | 172 | { "Reply","Antworten" }, |
173 | { "Forward","Weiterleiten" }, | 173 | { "Forward","Weiterleiten" }, |
174 | { "Attachments","Anhang" }, | 174 | { "Attachments","Anhang" }, |
175 | { "Show Html","Zeige in html" }, | 175 | { "Show Html","Zeige in html" }, |
176 | { "Description","Beschreibung" }, | 176 | { "Description","Beschreibung" }, |
177 | { "Filename","Dateiname" }, | 177 | { "Filename","Dateiname" }, |
178 | { "E-Mail by %1","E-Mail von %1" }, | 178 | { "E-Mail by %1","E-Mail von %1" }, |
179 | { "Cc","Kopie" }, | 179 | { "Cc","Kopie" }, |
180 | { "To","An" }, | 180 | { "To","An" }, |
181 | { "From","Von" }, | 181 | { "From","Von" }, |
182 | { "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, | 182 | { "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, |
183 | { "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, | 183 | { "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, |
184 | { "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, | 184 | { "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, |
185 | { "Delete all mails","Lösche alle Mails" }, | 185 | { "Delete all mails","Lösche alle Mails" }, |
186 | { "Create new subfolder","Neues Unterverzeichnis" }, | 186 | { "Create new subfolder","Neues Unterverzeichnis" }, |
187 | { "Delete folder","Lösche Verzeichnis" }, | 187 | { "Delete folder","Lösche Verzeichnis" }, |
188 | { "Refresh folder list","Aktualisiere Verzeichnis Liste" }, | 188 | { "Refresh folder list","Aktualisiere Verzeichnis Liste" }, |
189 | { "Create new folder","Neues Verzeichnis" }, | 189 | { "Create new folder","Neues Verzeichnis" }, |
190 | { "Disconnect","Disconnect" }, | 190 | { "Disconnect","Disconnect" }, |
191 | { "Set offline","Gehe offline" }, | 191 | { "Set offline","Gehe offline" }, |
192 | { "Select target box","Wähle Ziel Box" }, | 192 | { "Select target box","Wähle Ziel Box" }, |
193 | { "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, | 193 | { "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, |
194 | { "Folder:","Verzeichnis:" }, | 194 | { "Folder:","Verzeichnis:" }, |
195 | { "Account:","Zugang:" }, | 195 | { "Account:","Zugang:" }, |
196 | { "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, | 196 | { "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, |
197 | { "Move mail(s)","Verschiebe Mail(s)" }, | 197 | { "Move mail(s)","Verschiebe Mail(s)" }, |
198 | { "only mails smaller","nur Mails kleiner" }, | 198 | { "only mails smaller","nur Mails kleiner" }, |
199 | { " kB"," kB" }, | 199 | { " kB"," kB" }, |
200 | { " message %1 of %2"," Nachricht %1 von %2" }, | 200 | { " message %1 of %2"," Nachricht %1 von %2" }, |
201 | { "Copying...","Am Kopieren..." }, | 201 | { "Copying...","Am Kopieren..." }, |
202 | { "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, | 202 | { "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, |
203 | { "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, | 203 | { "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, |
204 | { "Delete All Mails","Lösche alle Mails" }, | 204 | { "Delete All Mails","Lösche alle Mails" }, |
205 | { "Deleting ...","Am Löschen..." }, | 205 | { "Deleting ...","Am Löschen..." }, |
206 | { "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, | 206 | { "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, |
207 | { "Compose Message","Verfasse Nachricht" }, | 207 | { "Compose Message","Verfasse Nachricht" }, |
208 | { "Reply-To","Antwort-An" }, | 208 | { "Reply-To","Antwort-An" }, |
209 | { "BCC","BCC" }, | 209 | { "BCC","BCC" }, |
210 | { "Signature","Signatur" }, | 210 | { "Signature","Signatur" }, |
211 | { "CC","Kopie" }, | 211 | { "CC","Kopie" }, |
212 | { "Options","Optionen" }, | 212 | { "Options","Optionen" }, |
213 | { "Delete File","Lösche Datei" }, | 213 | { "Delete File","Lösche Datei" }, |
214 | { "Add File","Füge Datei hinzu" }, | 214 | { "Add File","Füge Datei hinzu" }, |
215 | { "Attachment","Anhang" }, | 215 | { "Attachment","Anhang" }, |
216 | { "send later","sende später" }, | 216 | { "send later","sende später" }, |
217 | { "use:","via:" }, | 217 | { "use:","via:" }, |
218 | { "Save","Speichern" }, | 218 | { "Save","Speichern" }, |
219 | { "Name","Name" }, | 219 | { "Name","Name" }, |
220 | { "No Receiver spezified","Kein Empfänger angegeben" }, | 220 | { "No Receiver spezified","Kein Empfänger angegeben" }, |
221 | { "Sending mail","Sende Mail" }, | 221 | { "Sending mail","Sende Mail" }, |
222 | { "No","Nein" }, | 222 | { "No","Nein" }, |
223 | { "Yes","Ja" }, | 223 | { "Yes","Ja" }, |
224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, | 224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, |
225 | { "Store message?","Nachricht speichern?" }, | 225 | { "Store message?","Nachricht speichern?" }, |
226 | { "Select Type","Selektiere Typ" }, | 226 | { "Select Type","Selektiere Typ" }, |
227 | { "Select Account Type","Wähle Art des Zugangs" }, | 227 | { "Select Account Type","Wähle Art des Zugangs" }, |
228 | { "IMAP","IMAP (online lesen)" }, | 228 | { "IMAP","IMAP (online lesen)" }, |
229 | { "POP3","POP3 (holen)" }, | 229 | { "POP3","POP3 (holen)" }, |
230 | { "SMTP","SMTP (senden)" }, | 230 | { "SMTP","SMTP (senden)" }, |
231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, | 231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, |
232 | { "Question","Eine Frage..." }, | 232 | { "Question","Eine Frage..." }, |
233 | { "Send this message?","Nachricht wirklich senden?" }, | 233 | { "Send this message?","Nachricht wirklich senden?" }, |
234 | { "Stop editing message","Stop editing message" }, | 234 | { "Stop editing message","Stop editing message" }, |
235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, | 235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, |
236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, | 236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, |
237 | { "Refresh header list","Aktualisiere Titel Liste" }, | 237 | { "Refresh header list","Aktualisiere Titel Liste" }, |
238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, | 238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, |
239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, | 239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, |
240 | { "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, | 240 | { "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, |
241 | { "Show next mail","Zeige nächste Mail" }, | 241 | { "Show next mail","Zeige nächste Mail" }, |
242 | { "End of List","Ende der Liste" }, | 242 | { "End of List","Ende der Liste" }, |
243 | { "Language","Sprache" }, | ||
244 | { "Time Format","Zeit Format" }, | ||
245 | { "%1 groups subscribed","%1 Guppen abboniert" }, | ||
246 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Ihr gerade genutztes Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverzeichnis)/apps/kopiemail/localmail" }, | ||
247 | { "<b>Set new data storage dir:</b>","<b>Setze neues Datenspeicherverzeichnis:</b>" }, | ||
248 | { "Not existing dirs are created automatically","Nicht existierende Verzeichnisse werden erstellt" }, | ||
249 | { "Save settings","Speichere Einstellungen" }, | ||
250 | { "Save standard","Speichere Standard" }, | ||
251 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | ||
252 | { "The settings of the storage\ndir is saved in the file\n%1","Die Einstellungen des Speicherverzeichnisses\nwerden in folgender Datei gespeichert:\n%1" }, | ||
253 | { "Data storage path","Daten Speicherpfad" }, | ||
254 | { "userdefined","benutzerdefiniert" }, | ||
255 | { "","" }, | ||
243 | { "","" }, | 256 | { "","" }, |
244 | { "","" }, | 257 | { "","" }, |
245 | { "","" }, | 258 | { "","" }, |
246 | { "","" }, | 259 | { "","" }, |
247 | { "","" }, | 260 | { "","" }, |
diff --git a/bin/kdepim/kopiemail/usertranslation.txt b/bin/kdepim/kopiemail/usertranslation.txt index 7a53d36..5037f5f 100644 --- a/bin/kdepim/kopiemail/usertranslation.txt +++ b/bin/kdepim/kopiemail/usertranslation.txt | |||
@@ -1,243 +1,260 @@ | |||
1 | { " Local Time"," Locale Zeit" }, | 1 | { " Local Time"," Locale Zeit" }, |
2 | { "Preferences","Vorlieben" }, | 2 | { "Preferences","Vorlieben" }, |
3 | { "Ok","Ok" }, | 3 | { "Ok","Ok" }, |
4 | { "Default","Standard" }, | 4 | { "Default","Standard" }, |
5 | { "Cancel","Abbrechen" }, | 5 | { "Cancel","Abbrechen" }, |
6 | { "Global","Global" }, | 6 | { "Global","Global" }, |
7 | { "Email","Email" }, | 7 | { "Email","Email" }, |
8 | { "Phone","Phone" }, | 8 | { "Phone","Phone" }, |
9 | { "SMS","SMS" }, | 9 | { "SMS","SMS" }, |
10 | { "Fax","Fax" }, | 10 | { "Fax","Fax" }, |
11 | { "Pager","Pager" }, | 11 | { "Pager","Pager" }, |
12 | { "SIP","SIP" }, | 12 | { "SIP","SIP" }, |
13 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 13 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
14 | { "English","Englisch" }, | 14 | { "English","Englisch" }, |
15 | { "German","Deutsch" }, | 15 | { "German","Deutsch" }, |
16 | { "French","Französich" }, | 16 | { "French","Französich" }, |
17 | { "Italian","Italienisch" }, | 17 | { "Italian","Italienisch" }, |
18 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 18 | { "User defined (usertranslation.txt)","Benutzerdef.(usertranslation.txt)" }, |
19 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 19 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
20 | { "24:00","24:00" }, | 20 | { "24:00","24:00" }, |
21 | { "12:00am","12:00am" }, | 21 | { "12:00am","12:00am" }, |
22 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 22 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
23 | { "Locale","Localisation" }, | 23 | { "Locale","Localisation" }, |
24 | { "Date Format:","Datums Format:" }, | 24 | { "Date Format:","Datums Format:" }, |
25 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 25 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
26 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 26 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
27 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 27 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
28 | { "User defined","Benutzerdefiniert" }, | 28 | { "User defined","Benutzerdefiniert" }, |
29 | { "User long date:","Format langes Datum:" }, | 29 | { "User long date:","Format langes Datum:" }, |
30 | { "User short date:","Format kurzes Datum:" }, | 30 | { "User short date:","Format kurzes Datum:" }, |
31 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 31 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
32 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 32 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
33 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 33 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
34 | { "Date Format","Datums Format" }, | 34 | { "Date Format","Datums Format" }, |
35 | { "Timezone:","Zeitzone:" }, | 35 | { "Timezone:","Zeitzone:" }, |
36 | { "Add 30 min (+00:30) to selected Timezone","Addiere 30 min zur selektierten Zeitzone" }, | 36 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
37 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 37 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
38 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der Sonntag\nvor diesem Datum!" }, | 38 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
39 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 39 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
40 | { "Daylight start:","Sommerzeit Beginn:" }, | 40 | { "Daylight start:","Sommerzeit Beginn:" }, |
41 | { "Mon","Mo" }, | 41 | { "Mon","Mo" }, |
42 | { "Tue","Di" }, | 42 | { "Tue","Di" }, |
43 | { "Wed","Mi" }, | 43 | { "Wed","Mi" }, |
44 | { "Thu","Do" }, | 44 | { "Thu","Do" }, |
45 | { "Fri","Fr" }, | 45 | { "Fri","Fr" }, |
46 | { "Sat","Sa" }, | 46 | { "Sat","Sa" }, |
47 | { "Sun","So" }, | 47 | { "Sun","So" }, |
48 | { "January","Januar" }, | 48 | { "January","Januar" }, |
49 | { "February","Februar" }, | 49 | { "February","Februar" }, |
50 | { "March","März" }, | 50 | { "March","März" }, |
51 | { "April","April" }, | 51 | { "April","April" }, |
52 | { "May","Mai" }, | 52 | { "May","Mai" }, |
53 | { "June","Juni" }, | 53 | { "June","Juni" }, |
54 | { "July","Juli" }, | 54 | { "July","Juli" }, |
55 | { "August","August" }, | 55 | { "August","August" }, |
56 | { "September","September" }, | 56 | { "September","September" }, |
57 | { "October","Oktober" }, | 57 | { "October","Oktober" }, |
58 | { "November","November" }, | 58 | { "November","November" }, |
59 | { "December","Dezember" }, | 59 | { "December","Dezember" }, |
60 | { "tomorrow","morgen" }, | 60 | { "tomorrow","morgen" }, |
61 | { "today","heute" }, | 61 | { "today","heute" }, |
62 | { "yesterday","gestern" }, | 62 | { "yesterday","gestern" }, |
63 | { "Monday","Montag" }, | 63 | { "Monday","Montag" }, |
64 | { "Tuesday","Dienstag" }, | 64 | { "Tuesday","Dienstag" }, |
65 | { "Wednesday","Mittwoch" }, | 65 | { "Wednesday","Mittwoch" }, |
66 | { "Thursday","Donnerstag" }, | 66 | { "Thursday","Donnerstag" }, |
67 | { "Friday","Freitag" }, | 67 | { "Friday","Freitag" }, |
68 | { "Saturday","Samstag" }, | 68 | { "Saturday","Samstag" }, |
69 | { "Sunday","Sonntag" }, | 69 | { "Sunday","Sonntag" }, |
70 | { "Daylight end:","Sommerzeit Ende:" }, | 70 | { "Daylight end:","Sommerzeit Ende:" }, |
71 | { "Time Zone","Zeitzone" }, | 71 | { "Time Zone","Zeitzone" }, |
72 | { "Used Mail Client","Benutzter Mail Client" }, | 72 | { "Used Mail Client","Benutzter Mail Client" }, |
73 | { "Channel:","Channel:" }, | 73 | { "Channel:","Channel:" }, |
74 | { "Message:","Message:" }, | 74 | { "Message:","Message:" }, |
75 | { "Parameters:","Parameter:" }, | 75 | { "Parameters:","Parameter:" }, |
76 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 76 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
77 | { "extra Message:","extra Message:" }, | 77 | { "extra Message:","extra Message:" }, |
78 | { "extra Parameters:","extra Parameter:" }, | 78 | { "extra Parameters:","extra Parameter:" }, |
79 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 79 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
80 | { "External Apps.","Externe Appl." }, | 80 | { "External Apps.","Externe Appl." }, |
81 | { "General","Allgemein" }, | 81 | { "General","Allgemein" }, |
82 | { "Full &name:","Vor- und &Nachname:" }, | 82 | { "Full &name:","Vor- und &Nachname:" }, |
83 | { "E&mail address:","E&mail Adresse:" }, | 83 | { "E&mail address:","E&mail Adresse:" }, |
84 | { "Fonts","Schriftart" }, | 84 | { "Fonts","Schriftart" }, |
85 | { "Choose...","Wähle..." }, | 85 | { "Choose...","Wähle..." }, |
86 | { "Used %1 Client","Benutzter %1 Client" }, | 86 | { "Used %1 Client","Benutzter %1 Client" }, |
87 | { "No email client installed","Kein Email Klient installiert" }, | 87 | { "No email client installed","Kein Email Klient installiert" }, |
88 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 88 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
89 | { "OM/Pi email client","OM/Pi Email Klient" }, | 89 | { "OM/Pi email client","OM/Pi Email Klient" }, |
90 | { "Delete","Löschen" }, | 90 | { "Delete","Löschen" }, |
91 | { "New","Neu" }, | 91 | { "New","Neu" }, |
92 | { "Edit","Bearbeite" }, | 92 | { "Edit","Bearbeite" }, |
93 | { "Close","Schließen" }, | 93 | { "Close","Schließen" }, |
94 | { "Size","Größe" }, | 94 | { "Size","Größe" }, |
95 | { "Date","Datum" }, | 95 | { "Date","Datum" }, |
96 | { "Please set at","Bitte einstellen in" }, | 96 | { "Please set at","Bitte einstellen in" }, |
97 | { "Settings@General TAB","Einstellungen@Allgemein TAB" }, | 97 | { "Settings@General TAB","Einstellungen@Allgemein TAB" }, |
98 | { "KOpieMail/Pi","KOpieMail/Pi" }, | 98 | { "KOpieMail/Pi","KOpieMail/Pi" }, |
99 | { "Mail","Mail" }, | 99 | { "Mail","Mail" }, |
100 | { "Settings","Einstellungen" }, | 100 | { "Settings","Konfig" }, |
101 | { "Get all new mails","Hole alle neuen Mails" }, | 101 | { "Get all new mails","Hole alle neuen Mails" }, |
102 | { "Get new messages","Hole neue mails" }, | 102 | { "Get new messages","Hole neue mails" }, |
103 | { "Compose new mail","Schreibe neue Mail" }, | 103 | { "Compose new mail","Schreibe neue Mail" }, |
104 | { "Send queued mails","Sende gespeicherte Mails" }, | 104 | { "Send queued mails","Sende gespeicherte Mails" }, |
105 | { "Show/Hide folders","Zeige Verzeichnisse" }, | 105 | { "Show/Hide folders","Zeige Verzeichnisse" }, |
106 | { "Delete Mail","Lösche Mail" }, | 106 | { "Delete Mail","Lösche Mail" }, |
107 | { "Edit settings","Ändere Einstellungen" }, | 107 | { "Edit settings","Ändere Einstellungen" }, |
108 | { "Configure accounts","Konfiguriere Zugänge" }, | 108 | { "Configure accounts","Konfiguriere Zugänge" }, |
109 | { "Mailbox","Mailbox" }, | 109 | { "Mailbox","Mailbox" }, |
110 | { "Subject","Betreff" }, | 110 | { "Subject","Betreff" }, |
111 | { "Sender","Sender" }, | 111 | { "Sender","Sender" }, |
112 | { "Size","Größe" }, | 112 | { "Size","Größe" }, |
113 | { "Date","Datum" }, | 113 | { "Date","Datum" }, |
114 | { "Close","Schliessen" }, | 114 | { "Close","Schliessen" }, |
115 | { "Help","Hilfe" }, | 115 | { "Help","Hilfe" }, |
116 | { "About","Über" }, | 116 | { "About","Über" }, |
117 | { "Licence","Lizenz" }, | 117 | { "Licence","Lizenz" }, |
118 | { "LibEtPan Licence","LibEtPan Lizenz" }, | 118 | { "LibEtPan Licence","LibEtPan Lizenz" }, |
119 | { "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" }, | 119 | { "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" }, |
120 | { "HINT: Separate multiple\neMail addresses by ";"","Hinweis: Trenne mehrere Addressen mit einem ";"" }, | 120 | { "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" }, |
121 | { "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich" stattdessen!" }, | 121 | { "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" }, |
122 | { "View mail as html","Zeige Mails als html" }, | 122 | { "View mail as html","Zeige Mails als html" }, |
123 | { "Send mails later","Sende Mails später" }, | 123 | { "Send mails later","Sende Mails später" }, |
124 | { "Application(nr)","Applikation(nr)" }, | 124 | { "Application(nr)","Applikation(nr)" }, |
125 | { "OK","OK" }, | 125 | { "OK","OK" }, |
126 | { "Compose mail:","Verfasse Mail:" }, | 126 | { "Compose mail:","Verfasse Mail:" }, |
127 | { "Dear Mr.","Hallo Herr" }, | 127 | { "Dear Mr.","Hallo Herr" }, |
128 | { "Read mail:","Lese Mail:" }, | 128 | { "Read mail:","Lese Mail:" }, |
129 | { "Hello","Hallo" }, | 129 | { "Hello","Hallo" }, |
130 | { "Configure Accounts","Konfigure Zugänge" }, | 130 | { "Configure Accounts","Konfigure Zugänge" }, |
131 | { "Name of the Account","Name des Zugangs" }, | 131 | { "Name of the Account","Name des Zugangs" }, |
132 | { "News","News" }, | 132 | { "News","News" }, |
133 | { "Account","Zugang" }, | 133 | { "Account","Zugang" }, |
134 | { "Type","Typ" }, | 134 | { "Type","Typ" }, |
135 | { "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" }, | 135 | { "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" }, |
136 | { "Error","Fehler" }, | 136 | { "Error","Fehler" }, |
137 | { "Configure NNTP","Konfiguriere News" }, | 137 | { "Configure NNTP","Konfiguriere News" }, |
138 | { "Port","Port" }, | 138 | { "Port","Port" }, |
139 | { "Server","Server" }, | 139 | { "Server","Server" }, |
140 | { "Use SSL","Benutze SSL" }, | 140 | { "Use SSL","Benutze SSL" }, |
141 | { "User","Benutzer" }, | 141 | { "User","Benutzer" }, |
142 | { "Password","Passwort" }, | 142 | { "Password","Passwort" }, |
143 | { "Use Login","Benutze Login" }, | 143 | { "Use Login","Benutze Login" }, |
144 | { "Newsgroup","Newsgroup" }, | 144 | { "Newsgroup","Newsgroup" }, |
145 | { "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, | 145 | { "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, |
146 | { "Filter:","Filter:" }, | 146 | { "Filter:","Filter:" }, |
147 | { "Show subscribed","Zeige abbonnierte" }, | 147 | { "Show subscribed","Zeige abbonnierte" }, |
148 | { "Groups","NewsGroups" }, | 148 | { "Groups","NewsGroups" }, |
149 | { "Configure IMAP","Konfiguriere IMAP" }, | 149 | { "Configure IMAP","Konfiguriere IMAP" }, |
150 | { "Use secure sockets:","Benutze sichere Verbindung:" }, | 150 | { "Use secure sockets:","Benutze sichere Verbindung:" }, |
151 | { "ssh $SERVER exec","ssh $SERVER exec" }, | 151 | { "ssh $SERVER exec","ssh $SERVER exec" }, |
152 | { "Prefix","Prefix" }, | 152 | { "Prefix","Prefix" }, |
153 | { "Local storage folder:","Lokales Verzeichnis:" }, | 153 | { "Local storage folder:","Lokales Verzeichnis:" }, |
154 | { "Get only messages smaller","Hole nur Nachrichten kleiner" }, | 154 | { "Get only messages smaller","Hole nur Nachrichten kleiner" }, |
155 | { "kB","kB" }, | 155 | { "kB","kB" }, |
156 | { "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, | 156 | { "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, |
157 | { "Configure POP3","Konfiguriere POP3" }, | 157 | { "Configure POP3","Konfiguriere POP3" }, |
158 | { "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, | 158 | { "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, |
159 | { "Configure SMTP","Konfiguriere SMTP" }, | 159 | { "Configure SMTP","Konfiguriere SMTP" }, |
160 | { "Name of the SMTP Server","Name des SMTP Servers" }, | 160 | { "Name of the SMTP Server","Name des SMTP Servers" }, |
161 | { "Port of the SMTP Server","Port des SMTP Servers" }, | 161 | { "Port of the SMTP Server","Port des SMTP Servers" }, |
162 | { "Fetching folder list","Hole Verzeichnis Liste" }, | 162 | { "Fetching folder list","Hole Verzeichnis Liste" }, |
163 | { "Fetch ","Hole " }, | 163 | { "Fetch ","Hole " }, |
164 | { "Fetching header list","Hole Titel Liste" }, | 164 | { "Fetching header list","Hole Titel Liste" }, |
165 | { "Mailbox has %1 mails","Mailbox hat %1 Mails" }, | 165 | { "Mailbox has %1 mails","Mailbox hat %1 Mails" }, |
166 | { "Read this mail","Lies diese Mail" }, | 166 | { "Read this mail","Lies diese Mail" }, |
167 | { "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, | 167 | { "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, |
168 | { "Delete this mail","Lösche diese Mail" }, | 168 | { "Delete this mail","Lösche diese Mail" }, |
169 | { "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, | 169 | { "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, |
170 | { "Delete all selected mails","Lösche alle selektierten Mails" }, | 170 | { "Delete all selected mails","Lösche alle selektierten Mails" }, |
171 | { "Clear selection","Selektion aufheben" }, | 171 | { "Clear selection","Selektion aufheben" }, |
172 | { "Reply","Antworten" }, | 172 | { "Reply","Antworten" }, |
173 | { "Forward","Weiterleiten" }, | 173 | { "Forward","Weiterleiten" }, |
174 | { "Attachments","Anhang" }, | 174 | { "Attachments","Anhang" }, |
175 | { "Show Html","Zeige in html" }, | 175 | { "Show Html","Zeige in html" }, |
176 | { "Description","Beschreibung" }, | 176 | { "Description","Beschreibung" }, |
177 | { "Filename","Dateiname" }, | 177 | { "Filename","Dateiname" }, |
178 | { "E-Mail by %1","E-Mail von %1" }, | 178 | { "E-Mail by %1","E-Mail von %1" }, |
179 | { "Cc","Kopie" }, | 179 | { "Cc","Kopie" }, |
180 | { "To","An" }, | 180 | { "To","An" }, |
181 | { "From","Von" }, | 181 | { "From","Von" }, |
182 | { "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, | 182 | { "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, |
183 | { "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, | 183 | { "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, |
184 | { "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, | 184 | { "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, |
185 | { "Delete all mails","Lösche alle Mails" }, | 185 | { "Delete all mails","Lösche alle Mails" }, |
186 | { "Create new subfolder","Neues Unterverzeichnis" }, | 186 | { "Create new subfolder","Neues Unterverzeichnis" }, |
187 | { "Delete folder","Lösche Verzeichnis" }, | 187 | { "Delete folder","Lösche Verzeichnis" }, |
188 | { "Refresh folder list","Aktualisiere Verzeichnis Liste" }, | 188 | { "Refresh folder list","Aktualisiere Verzeichnis Liste" }, |
189 | { "Create new folder","Neues Verzeichnis" }, | 189 | { "Create new folder","Neues Verzeichnis" }, |
190 | { "Disconnect","Disconnect" }, | 190 | { "Disconnect","Disconnect" }, |
191 | { "Set offline","Gehe offline" }, | 191 | { "Set offline","Gehe offline" }, |
192 | { "Select target box","Wähle Ziel Box" }, | 192 | { "Select target box","Wähle Ziel Box" }, |
193 | { "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, | 193 | { "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, |
194 | { "Folder:","Verzeichnis:" }, | 194 | { "Folder:","Verzeichnis:" }, |
195 | { "Account:","Zugang:" }, | 195 | { "Account:","Zugang:" }, |
196 | { "Prefix will prepend, no need to enter it!","Prefix wird vorangestellt, braucht nicht eingegeben zu werden!" }, | 196 | { "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, |
197 | { "Move mail(s)","Verschiebe Mail(s)" }, | 197 | { "Move mail(s)","Verschiebe Mail(s)" }, |
198 | { "apply only to mails smaller","wende nur auf Mails an, kleiner als" }, | 198 | { "only mails smaller","nur Mails kleiner" }, |
199 | { " kB"," kB" }, | 199 | { " kB"," kB" }, |
200 | { " message %1 of %2"," Nachricht %1 von %2" }, | 200 | { " message %1 of %2"," Nachricht %1 von %2" }, |
201 | { "Copying...","Am Kopieren..." }, | 201 | { "Copying...","Am Kopieren..." }, |
202 | { "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, | 202 | { "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, |
203 | { "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, | 203 | { "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, |
204 | { "Delete All Mails","Lösche alle Mails" }, | 204 | { "Delete All Mails","Lösche alle Mails" }, |
205 | { "Deleting ...","Am Löschen..." }, | 205 | { "Deleting ...","Am Löschen..." }, |
206 | { "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, | 206 | { "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, |
207 | { "Compose Message","Verfasse Nachricht" }, | 207 | { "Compose Message","Verfasse Nachricht" }, |
208 | { "Reply-To","Antwort-An" }, | 208 | { "Reply-To","Antwort-An" }, |
209 | { "BCC","BCC" }, | 209 | { "BCC","BCC" }, |
210 | { "Signature","Signatur" }, | 210 | { "Signature","Signatur" }, |
211 | { "CC","Kopie" }, | 211 | { "CC","Kopie" }, |
212 | { "Options","Optionen" }, | 212 | { "Options","Optionen" }, |
213 | { "Delete File","Lösche Datei" }, | 213 | { "Delete File","Lösche Datei" }, |
214 | { "Add File","Füge Datei hinzu" }, | 214 | { "Add File","Füge Datei hinzu" }, |
215 | { "Attachment","Anhang" }, | 215 | { "Attachment","Anhang" }, |
216 | { "send later","sende später" }, | 216 | { "send later","sende später" }, |
217 | { "use:","via:" }, | 217 | { "use:","via:" }, |
218 | { "Save","Speichern" }, | 218 | { "Save","Speichern" }, |
219 | { "Name","Name" }, | 219 | { "Name","Name" }, |
220 | { "No Receiver spezified","Kein Empfänger angegeben" }, | 220 | { "No Receiver spezified","Kein Empfänger angegeben" }, |
221 | { "Sending mail","Sende Mail" }, | 221 | { "Sending mail","Sende Mail" }, |
222 | { "No","Nein" }, | 222 | { "No","Nein" }, |
223 | { "Yes","Ja" }, | 223 | { "Yes","Ja" }, |
224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, | 224 | { "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, |
225 | { "Store message?","Nachricht speichern?" }, | 225 | { "Store message?","Nachricht speichern?" }, |
226 | { "Select Type","Selektiere Typ" }, | 226 | { "Select Type","Selektiere Typ" }, |
227 | { "Select Account Type","Wähle Art des Zugangs" }, | 227 | { "Select Account Type","Wähle Art des Zugangs" }, |
228 | { "IMAP","IMAP (online lesen)" }, | 228 | { "IMAP","IMAP (online lesen)" }, |
229 | { "POP3","POP3 (holen)" }, | 229 | { "POP3","POP3 (holen)" }, |
230 | { "SMTP","SMTP (senden)" }, | 230 | { "SMTP","SMTP (senden)" }, |
231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, | 231 | { "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, |
232 | { "Question","Eine Frage..." }, | 232 | { "Question","Eine Frage..." }, |
233 | { "Send this message?","Nachricht wirklich senden?" }, | 233 | { "Send this message?","Nachricht wirklich senden?" }, |
234 | { "Stop editing message","Stop editing message" }, | 234 | { "Stop editing message","Stop editing message" }, |
235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, | 235 | { "Sending mail %1 of %2","Sende Mail %1 von %2" }, |
236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, | 236 | { "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, |
237 | { "Refresh header list","Aktualisiere Titel Liste" }, | 237 | { "Refresh header list","Aktualisiere Titel Liste" }, |
238 | { "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, | ||
239 | { "Mail queue flushed","Gespeicherte Mails gesendet!" }, | ||
240 | { "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, | ||
241 | { "Show next mail","Zeige nächste Mail" }, | ||
242 | { "End of List","Ende der Liste" }, | ||
243 | { "Language","Sprache" }, | ||
244 | { "Time Format","Zeit Format" }, | ||
245 | { "%1 groups subscribed","%1 Guppen abboniert" }, | ||
246 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Ihr gerade genutztes Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverzeichnis)/apps/kopiemail/localmail" }, | ||
247 | { "<b>Set new data storage dir:</b>","<b>Setze neues Datenspeicherverzeichnis:</b>" }, | ||
248 | { "Not existing dirs are created automatically","Nicht existierende Verzeichnisse werden erstellt" }, | ||
249 | { "Save settings","Speichere Einstellungen" }, | ||
250 | { "Save standard","Speichere Standard" }, | ||
251 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | ||
252 | { "The settings of the storage\ndir is saved in the file\n%1","Die Einstellungen des Speicherverzeichnisses\nwerden in folgender Datei gespeichert:\n%1" }, | ||
253 | { "Data storage path","Daten Speicherpfad" }, | ||
254 | { "userdefined","benutzerdefiniert" }, | ||
238 | { "","" }, | 255 | { "","" }, |
239 | { "","" }, | 256 | { "","" }, |
240 | { "","" }, | 257 | { "","" }, |
241 | { "","" }, | 258 | { "","" }, |
242 | { "","" }, | 259 | { "","" }, |
243 | { "","" }, | 260 | { "","" }, |
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index aec74fa..7f31ab1 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp | |||
@@ -1,1085 +1,1085 @@ | |||
1 | #include <qregexp.h> | 1 | #include <qregexp.h> |
2 | #include <qapplication.h> | 2 | #include <qapplication.h> |
3 | 3 | ||
4 | #include "kdebug.h" | 4 | #include "kdebug.h" |
5 | #include "kcalendarsystemgregorian.h" | 5 | #include "kcalendarsystemgregorian.h" |
6 | 6 | ||
7 | #include "klocale.h" | 7 | #include "klocale.h" |
8 | 8 | ||
9 | #include <qstringlist.h> | 9 | #include <qstringlist.h> |
10 | 10 | ||
11 | #define COLLECT_TRANSLATION | 11 | //#define COLLECT_TRANSLATION |
12 | 12 | ||
13 | 13 | ||
14 | QDict<QString> *mLocaleDict = 0; | 14 | QDict<QString> *mLocaleDict = 0; |
15 | void setLocaleDict( QDict<QString> * dict ) | 15 | void setLocaleDict( QDict<QString> * dict ) |
16 | { | 16 | { |
17 | mLocaleDict = dict; | 17 | mLocaleDict = dict; |
18 | 18 | ||
19 | } | 19 | } |
20 | 20 | ||
21 | #ifdef COLLECT_TRANSLATION | 21 | #ifdef COLLECT_TRANSLATION |
22 | 22 | ||
23 | QStringList missingTrans; | 23 | QStringList missingTrans; |
24 | QStringList existingTrans1; | 24 | QStringList existingTrans1; |
25 | QStringList existingTrans2; | 25 | QStringList existingTrans2; |
26 | 26 | ||
27 | void addMissing(const char *text) | 27 | void addMissing(const char *text) |
28 | { | 28 | { |
29 | 29 | ||
30 | QString mis ( text ); | 30 | QString mis ( text ); |
31 | if ( !missingTrans.contains( mis ) ) | 31 | if ( !missingTrans.contains( mis ) ) |
32 | missingTrans.append(mis); | 32 | missingTrans.append(mis); |
33 | 33 | ||
34 | } | 34 | } |
35 | void addExist(const char *text,QString trans ) | 35 | void addExist(const char *text,QString trans ) |
36 | { | 36 | { |
37 | //return; | 37 | //return; |
38 | QString mis ( text ); | 38 | QString mis ( text ); |
39 | if ( !existingTrans1.contains( mis ) ) { | 39 | if ( !existingTrans1.contains( mis ) ) { |
40 | existingTrans1.append(mis); | 40 | existingTrans1.append(mis); |
41 | existingTrans2.append(trans); | 41 | existingTrans2.append(trans); |
42 | 42 | ||
43 | } | 43 | } |
44 | 44 | ||
45 | } | 45 | } |
46 | 46 | ||
47 | #include <qfile.h> | 47 | #include <qfile.h> |
48 | #include <qtextstream.h> | 48 | #include <qtextstream.h> |
49 | #include <qtextcodec.h> | 49 | #include <qtextcodec.h> |
50 | #endif | 50 | #endif |
51 | void dumpMissing() | 51 | void dumpMissing() |
52 | { | 52 | { |
53 | #ifdef COLLECT_TRANSLATION | 53 | #ifdef COLLECT_TRANSLATION |
54 | QString fileName = "/tmp/usernewtrans.txt"; | 54 | QString fileName = "/tmp/usernewtrans.txt"; |
55 | QFile file( fileName ); | 55 | QFile file( fileName ); |
56 | if (!file.open( IO_WriteOnly ) ) { | 56 | if (!file.open( IO_WriteOnly ) ) { |
57 | return ; | 57 | return ; |
58 | } | 58 | } |
59 | QTextStream ts( &file ); | 59 | QTextStream ts( &file ); |
60 | ts.setCodec( QTextCodec::codecForName("utf8") ); | 60 | ts.setCodec( QTextCodec::codecForName("utf8") ); |
61 | 61 | ||
62 | int i; | 62 | int i; |
63 | for ( i = 0; i< missingTrans.count(); ++i ) { | 63 | for ( i = 0; i< missingTrans.count(); ++i ) { |
64 | 64 | ||
65 | QString text = missingTrans[i].replace( QRegExp("\n"),"\\n" ); | 65 | QString text = missingTrans[i].replace( QRegExp("\n"),"\\n" ); |
66 | ts << "{ \""<<text<< "\",\""<< text <<"\" },\n"; | 66 | ts << "{ \""<<text<< "\",\""<< text <<"\" },\n"; |
67 | 67 | ||
68 | } | 68 | } |
69 | file.close(); | 69 | file.close(); |
70 | { | 70 | { |
71 | QString fileName = "/tmp/usertrans.txt"; | 71 | QString fileName = "/tmp/usertrans.txt"; |
72 | QFile file( fileName ); | 72 | QFile file( fileName ); |
73 | if (!file.open( IO_WriteOnly ) ) { | 73 | if (!file.open( IO_WriteOnly ) ) { |
74 | return ; | 74 | return ; |
75 | } | 75 | } |
76 | QTextStream ts( &file ); | 76 | QTextStream ts( &file ); |
77 | ts.setCodec( QTextCodec::codecForName("utf8") ); | 77 | ts.setCodec( QTextCodec::codecForName("utf8") ); |
78 | 78 | ||
79 | int i; | 79 | int i; |
80 | for ( i = 0; i< existingTrans1.count(); ++i ) { | 80 | for ( i = 0; i< existingTrans1.count(); ++i ) { |
81 | 81 | ||
82 | QString text = existingTrans1[i].replace( QRegExp("\n"),"\\n" ); | 82 | QString text = existingTrans1[i].replace( QRegExp("\n"),"\\n" ); |
83 | QString text2 = existingTrans2[i].replace( QRegExp("\n"),"\\n" ); | 83 | QString text2 = existingTrans2[i].replace( QRegExp("\n"),"\\n" ); |
84 | ts << "{ \""<<text<< "\",\""<< text2 <<"\" },\n"; | 84 | ts << "{ \""<<text<< "\",\""<< text2 <<"\" },\n"; |
85 | 85 | ||
86 | } | 86 | } |
87 | file.close(); | 87 | file.close(); |
88 | } | 88 | } |
89 | #endif | 89 | #endif |
90 | } | 90 | } |
91 | QString i18n(const char *text) | 91 | QString i18n(const char *text) |
92 | { | 92 | { |
93 | if ( ! mLocaleDict ) { | 93 | if ( ! mLocaleDict ) { |
94 | #ifdef COLLECT_TRANSLATION | 94 | #ifdef COLLECT_TRANSLATION |
95 | addMissing( text ); | 95 | addMissing( text ); |
96 | #endif | 96 | #endif |
97 | return QString( text ); | 97 | return QString( text ); |
98 | } | 98 | } |
99 | else { | 99 | else { |
100 | QString* ret = mLocaleDict->find(QString(text)) ; | 100 | QString* ret = mLocaleDict->find(QString(text)) ; |
101 | if ( ret == 0 ) { | 101 | if ( ret == 0 ) { |
102 | #ifdef COLLECT_TRANSLATION | 102 | #ifdef COLLECT_TRANSLATION |
103 | addMissing( text ); | 103 | addMissing( text ); |
104 | #endif | 104 | #endif |
105 | return QString( text ); | 105 | return QString( text ); |
106 | } | 106 | } |
107 | else { | 107 | else { |
108 | if ( (*ret).isEmpty() ) { | 108 | if ( (*ret).isEmpty() ) { |
109 | #ifdef COLLECT_TRANSLATION | 109 | #ifdef COLLECT_TRANSLATION |
110 | addMissing( text ); | 110 | addMissing( text ); |
111 | #endif | 111 | #endif |
112 | return QString( text ); | 112 | return QString( text ); |
113 | } | 113 | } |
114 | else { | 114 | else { |
115 | #ifdef COLLECT_TRANSLATION | 115 | #ifdef COLLECT_TRANSLATION |
116 | addExist( text, *ret ); | 116 | addExist( text, *ret ); |
117 | #endif | 117 | #endif |
118 | return (*ret); | 118 | return (*ret); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | } | 123 | } |
124 | 124 | ||
125 | QString i18n(const char *,const char *text) | 125 | QString i18n(const char *,const char *text) |
126 | { | 126 | { |
127 | return i18n( text ); | 127 | return i18n( text ); |
128 | } | 128 | } |
129 | 129 | ||
130 | QString i18n(const char *text1, const char *textn, int num) | 130 | QString i18n(const char *text1, const char *textn, int num) |
131 | { | 131 | { |
132 | if ( num == 1 ) return i18n( text1 ); | 132 | if ( num == 1 ) return i18n( text1 ); |
133 | else { | 133 | else { |
134 | QString text = i18n( textn ); | 134 | QString text = i18n( textn ); |
135 | int pos = text.find( "%n" ); | 135 | int pos = text.find( "%n" ); |
136 | if ( pos >= 0 ) text.replace( pos, 2, QString::number( num ) ); | 136 | if ( pos >= 0 ) text.replace( pos, 2, QString::number( num ) ); |
137 | return text; | 137 | return text; |
138 | } | 138 | } |
139 | } | 139 | } |
140 | 140 | ||
141 | inline void put_it_in( QChar *buffer, uint& index, const QString &s ) | 141 | inline void put_it_in( QChar *buffer, uint& index, const QString &s ) |
142 | { | 142 | { |
143 | for ( uint l = 0; l < s.length(); l++ ) | 143 | for ( uint l = 0; l < s.length(); l++ ) |
144 | buffer[index++] = s.at( l ); | 144 | buffer[index++] = s.at( l ); |
145 | } | 145 | } |
146 | 146 | ||
147 | inline void put_it_in( QChar *buffer, uint& index, int number ) | 147 | inline void put_it_in( QChar *buffer, uint& index, int number ) |
148 | { | 148 | { |
149 | buffer[index++] = number / 10 + '0'; | 149 | buffer[index++] = number / 10 + '0'; |
150 | buffer[index++] = number % 10 + '0'; | 150 | buffer[index++] = number % 10 + '0'; |
151 | } | 151 | } |
152 | 152 | ||
153 | static int readInt(const QString &str, uint &pos) | 153 | static int readInt(const QString &str, uint &pos) |
154 | { | 154 | { |
155 | if (!str.at(pos).isDigit()) return -1; | 155 | if (!str.at(pos).isDigit()) return -1; |
156 | int result = 0; | 156 | int result = 0; |
157 | for (; str.length() > pos && str.at(pos).isDigit(); pos++) | 157 | for (; str.length() > pos && str.at(pos).isDigit(); pos++) |
158 | { | 158 | { |
159 | result *= 10; | 159 | result *= 10; |
160 | result += str.at(pos).digitValue(); | 160 | result += str.at(pos).digitValue(); |
161 | } | 161 | } |
162 | 162 | ||
163 | return result; | 163 | return result; |
164 | } | 164 | } |
165 | 165 | ||
166 | KLocale::KLocale() : mCalendarSystem( 0 ) | 166 | KLocale::KLocale() : mCalendarSystem( 0 ) |
167 | { | 167 | { |
168 | 168 | ||
169 | m_decimalSymbol = "."; | 169 | m_decimalSymbol = "."; |
170 | m_positiveSign = ""; | 170 | m_positiveSign = ""; |
171 | m_negativeSign = "-"; | 171 | m_negativeSign = "-"; |
172 | m_thousandsSeparator = ","; | 172 | m_thousandsSeparator = ","; |
173 | 173 | ||
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | mWeekStartsMonday = true; | 177 | mWeekStartsMonday = true; |
178 | mHourF24Format = true; | 178 | mHourF24Format = true; |
179 | mIntDateFormat = Default; | 179 | mIntDateFormat = Default; |
180 | mIntTimeFormat = Default; | 180 | mIntTimeFormat = Default; |
181 | mLanguage = 0; | 181 | mLanguage = 0; |
182 | mDateFormat = "%a %Y %b %d"; | 182 | mDateFormat = "%a %Y %b %d"; |
183 | mDateFormatShort = "%Y-%m-%d"; | 183 | mDateFormatShort = "%Y-%m-%d"; |
184 | mTimeZoneList << ("-11:00 US/Samoa") | 184 | mTimeZoneList << ("-11:00 US/Samoa") |
185 | << ("-10:00 US/Hawaii") | 185 | << ("-10:00 US/Hawaii") |
186 | << ("-09:00 US/Alaska") | 186 | << ("-09:00 US/Alaska") |
187 | << ("-08:00 US/Pacific") | 187 | << ("-08:00 US/Pacific") |
188 | << ("-07:00 US/Mountain") | 188 | << ("-07:00 US/Mountain") |
189 | << ("-06:00 US/Central") | 189 | << ("-06:00 US/Central") |
190 | << ("-05:00 US/Eastern") | 190 | << ("-05:00 US/Eastern") |
191 | << ("-04:00 Brazil/West") | 191 | << ("-04:00 Brazil/West") |
192 | << ("-03:00 Brazil/East") | 192 | << ("-03:00 Brazil/East") |
193 | << ("-02:00 Brazil/DeNoronha") | 193 | << ("-02:00 Brazil/DeNoronha") |
194 | << ("-01:00 Atlantic/Azores") | 194 | << ("-01:00 Atlantic/Azores") |
195 | << (" 00:00 Europe/London(UTC)") | 195 | << (" 00:00 Europe/London(UTC)") |
196 | << ("+01:00 Europe/Oslo(CET)") | 196 | << ("+01:00 Europe/Oslo(CET)") |
197 | << ("+02:00 Europe/Helsinki") | 197 | << ("+02:00 Europe/Helsinki") |
198 | << ("+03:00 Europe/Moscow") | 198 | << ("+03:00 Europe/Moscow") |
199 | << ("+04:00 Indian/Mauritius") | 199 | << ("+04:00 Indian/Mauritius") |
200 | << ("+05:00 Indian/Maldives") | 200 | << ("+05:00 Indian/Maldives") |
201 | << ("+06:00 Indian/Chagos") | 201 | << ("+06:00 Indian/Chagos") |
202 | << ("+07:00 Asia/Bangkok") | 202 | << ("+07:00 Asia/Bangkok") |
203 | << ("+08:00 Asia/Hongkong") | 203 | << ("+08:00 Asia/Hongkong") |
204 | << ("+09:00 Asia/Tokyo") | 204 | << ("+09:00 Asia/Tokyo") |
205 | << ("+10:00 Asia/Vladivostok") | 205 | << ("+10:00 Asia/Vladivostok") |
206 | << ("+11:00 Asia/Magadan") | 206 | << ("+11:00 Asia/Magadan") |
207 | << ("+12:00 Asia/Kamchatka") | 207 | << ("+12:00 Asia/Kamchatka") |
208 | // << (" xx:xx User defined offset") | 208 | // << (" xx:xx User defined offset") |
209 | << i18n (" Local Time"); | 209 | << i18n (" Local Time"); |
210 | mSouthDaylight = false; | 210 | mSouthDaylight = false; |
211 | mTimeZoneOffset = 0; | 211 | mTimeZoneOffset = 0; |
212 | daylightEnabled = false; | 212 | daylightEnabled = false; |
213 | } | 213 | } |
214 | 214 | ||
215 | void KLocale::setDateFormat( QString s ) | 215 | void KLocale::setDateFormat( QString s ) |
216 | { | 216 | { |
217 | mDateFormat = s; | 217 | mDateFormat = s; |
218 | } | 218 | } |
219 | 219 | ||
220 | void KLocale::setDateFormatShort( QString s ) | 220 | void KLocale::setDateFormatShort( QString s ) |
221 | { | 221 | { |
222 | mDateFormatShort = s; | 222 | mDateFormatShort = s; |
223 | } | 223 | } |
224 | 224 | ||
225 | void KLocale::setHore24Format ( bool b ) | 225 | void KLocale::setHore24Format ( bool b ) |
226 | { | 226 | { |
227 | mHourF24Format = b; | 227 | mHourF24Format = b; |
228 | } | 228 | } |
229 | void KLocale::setWeekStartMonday( bool b ) | 229 | void KLocale::setWeekStartMonday( bool b ) |
230 | { | 230 | { |
231 | mWeekStartsMonday = b; | 231 | mWeekStartsMonday = b; |
232 | } | 232 | } |
233 | 233 | ||
234 | KLocale::IntDateFormat KLocale::getIntDateFormat( ) | 234 | KLocale::IntDateFormat KLocale::getIntDateFormat( ) |
235 | { | 235 | { |
236 | return mIntDateFormat; | 236 | return mIntDateFormat; |
237 | 237 | ||
238 | } | 238 | } |
239 | void KLocale::setIntDateFormat( KLocale::IntDateFormat i ) | 239 | void KLocale::setIntDateFormat( KLocale::IntDateFormat i ) |
240 | { | 240 | { |
241 | mIntDateFormat = i; | 241 | mIntDateFormat = i; |
242 | } | 242 | } |
243 | KLocale::IntDateFormat KLocale::getIntTimeFormat( ) | 243 | KLocale::IntDateFormat KLocale::getIntTimeFormat( ) |
244 | { | 244 | { |
245 | return mIntTimeFormat; | 245 | return mIntTimeFormat; |
246 | 246 | ||
247 | } | 247 | } |
248 | void KLocale::setIntTimeFormat( KLocale::IntDateFormat i ) | 248 | void KLocale::setIntTimeFormat( KLocale::IntDateFormat i ) |
249 | { | 249 | { |
250 | mIntTimeFormat = i; | 250 | mIntTimeFormat = i; |
251 | } | 251 | } |
252 | 252 | ||
253 | void KLocale::setLanguage( int i ) | 253 | void KLocale::setLanguage( int i ) |
254 | { | 254 | { |
255 | mLanguage = i; | 255 | mLanguage = i; |
256 | } | 256 | } |
257 | int KLocale::language( ) | 257 | int KLocale::language( ) |
258 | { | 258 | { |
259 | return mLanguage; | 259 | return mLanguage; |
260 | } | 260 | } |
261 | QString KLocale::translate( const char *index ) const | 261 | QString KLocale::translate( const char *index ) const |
262 | { | 262 | { |
263 | return i18n( index ); | 263 | return i18n( index ); |
264 | } | 264 | } |
265 | 265 | ||
266 | QString KLocale::translate( const char *, const char *fallback) const | 266 | QString KLocale::translate( const char *, const char *fallback) const |
267 | { | 267 | { |
268 | return i18n( fallback ); | 268 | return i18n( fallback ); |
269 | } | 269 | } |
270 | 270 | ||
271 | QString KLocale::formatTime(const QTime &pTime, bool includeSecs, IntDateFormat intIntDateFormat) const | 271 | QString KLocale::formatTime(const QTime &pTime, bool includeSecs, IntDateFormat intIntDateFormat) const |
272 | { | 272 | { |
273 | const QString rst = timeFormat(intIntDateFormat); | 273 | const QString rst = timeFormat(intIntDateFormat); |
274 | 274 | ||
275 | // only "pm/am" here can grow, the rest shrinks, but | 275 | // only "pm/am" here can grow, the rest shrinks, but |
276 | // I'm rather safe than sorry | 276 | // I'm rather safe than sorry |
277 | QChar *buffer = new QChar[rst.length() * 3 / 2 + 30]; | 277 | QChar *buffer = new QChar[rst.length() * 3 / 2 + 30]; |
278 | 278 | ||
279 | uint index = 0; | 279 | uint index = 0; |
280 | bool escape = false; | 280 | bool escape = false; |
281 | int number = 0; | 281 | int number = 0; |
282 | 282 | ||
283 | for ( uint format_index = 0; format_index < rst.length(); format_index++ ) | 283 | for ( uint format_index = 0; format_index < rst.length(); format_index++ ) |
284 | { | 284 | { |
285 | if ( !escape ) | 285 | if ( !escape ) |
286 | { | 286 | { |
287 | if ( rst.at( format_index ).unicode() == '%' ) | 287 | if ( rst.at( format_index ).unicode() == '%' ) |
288 | escape = true; | 288 | escape = true; |
289 | else | 289 | else |
290 | buffer[index++] = rst.at( format_index ); | 290 | buffer[index++] = rst.at( format_index ); |
291 | } | 291 | } |
292 | else | 292 | else |
293 | { | 293 | { |
294 | switch ( rst.at( format_index ).unicode() ) | 294 | switch ( rst.at( format_index ).unicode() ) |
295 | { | 295 | { |
296 | case '%': | 296 | case '%': |
297 | buffer[index++] = '%'; | 297 | buffer[index++] = '%'; |
298 | break; | 298 | break; |
299 | case 'H': | 299 | case 'H': |
300 | put_it_in( buffer, index, pTime.hour() ); | 300 | put_it_in( buffer, index, pTime.hour() ); |
301 | break; | 301 | break; |
302 | case 'I': | 302 | case 'I': |
303 | put_it_in( buffer, index, ( pTime.hour() + 11) % 12 + 1 ); | 303 | put_it_in( buffer, index, ( pTime.hour() + 11) % 12 + 1 ); |
304 | break; | 304 | break; |
305 | case 'M': | 305 | case 'M': |
306 | put_it_in( buffer, index, pTime.minute() ); | 306 | put_it_in( buffer, index, pTime.minute() ); |
307 | break; | 307 | break; |
308 | case 'S': | 308 | case 'S': |
309 | if (includeSecs) | 309 | if (includeSecs) |
310 | put_it_in( buffer, index, pTime.second() ); | 310 | put_it_in( buffer, index, pTime.second() ); |
311 | else | 311 | else |
312 | { | 312 | { |
313 | // we remove the seperator sign before the seconds and | 313 | // we remove the seperator sign before the seconds and |
314 | // assume that works everywhere | 314 | // assume that works everywhere |
315 | --index; | 315 | --index; |
316 | break; | 316 | break; |
317 | } | 317 | } |
318 | break; | 318 | break; |
319 | case 'k': | 319 | case 'k': |
320 | number = pTime.hour(); | 320 | number = pTime.hour(); |
321 | case 'l': | 321 | case 'l': |
322 | // to share the code | 322 | // to share the code |
323 | if ( rst.at( format_index ).unicode() == 'l' ) | 323 | if ( rst.at( format_index ).unicode() == 'l' ) |
324 | number = (pTime.hour() + 11) % 12 + 1; | 324 | number = (pTime.hour() + 11) % 12 + 1; |
325 | if ( number / 10 ) | 325 | if ( number / 10 ) |
326 | buffer[index++] = number / 10 + '0'; | 326 | buffer[index++] = number / 10 + '0'; |
327 | buffer[index++] = number % 10 + '0'; | 327 | buffer[index++] = number % 10 + '0'; |
328 | break; | 328 | break; |
329 | case 'p': | 329 | case 'p': |
330 | { | 330 | { |
331 | QString s; | 331 | QString s; |
332 | if ( pTime.hour() >= 12 ) | 332 | if ( pTime.hour() >= 12 ) |
333 | put_it_in( buffer, index, i18n("pm") ); | 333 | put_it_in( buffer, index, i18n("pm") ); |
334 | else | 334 | else |
335 | put_it_in( buffer, index, i18n("am") ); | 335 | put_it_in( buffer, index, i18n("am") ); |
336 | break; | 336 | break; |
337 | } | 337 | } |
338 | default: | 338 | default: |
339 | buffer[index++] = rst.at( format_index ); | 339 | buffer[index++] = rst.at( format_index ); |
340 | break; | 340 | break; |
341 | } | 341 | } |
342 | escape = false; | 342 | escape = false; |
343 | } | 343 | } |
344 | } | 344 | } |
345 | QString ret( buffer, index ); | 345 | QString ret( buffer, index ); |
346 | delete [] buffer; | 346 | delete [] buffer; |
347 | return ret; | 347 | return ret; |
348 | } | 348 | } |
349 | 349 | ||
350 | QString KLocale::formatDate(const QDate &pDate, bool shortFormat, IntDateFormat intIntDateFormat) const | 350 | QString KLocale::formatDate(const QDate &pDate, bool shortFormat, IntDateFormat intIntDateFormat) const |
351 | { | 351 | { |
352 | const QString rst = shortFormat?dateFormatShort(intIntDateFormat):dateFormat(intIntDateFormat); | 352 | const QString rst = shortFormat?dateFormatShort(intIntDateFormat):dateFormat(intIntDateFormat); |
353 | 353 | ||
354 | // I'm rather safe than sorry | 354 | // I'm rather safe than sorry |
355 | QChar *buffer = new QChar[rst.length() * 3 / 2 + 50]; | 355 | QChar *buffer = new QChar[rst.length() * 3 / 2 + 50]; |
356 | 356 | ||
357 | unsigned int index = 0; | 357 | unsigned int index = 0; |
358 | bool escape = false; | 358 | bool escape = false; |
359 | int number = 0; | 359 | int number = 0; |
360 | 360 | ||
361 | for ( uint format_index = 0; format_index < rst.length(); ++format_index ) | 361 | for ( uint format_index = 0; format_index < rst.length(); ++format_index ) |
362 | { | 362 | { |
363 | if ( !escape ) | 363 | if ( !escape ) |
364 | { | 364 | { |
365 | if ( rst.at( format_index ).unicode() == '%' ) | 365 | if ( rst.at( format_index ).unicode() == '%' ) |
366 | escape = true; | 366 | escape = true; |
367 | else | 367 | else |
368 | buffer[index++] = rst.at( format_index ); | 368 | buffer[index++] = rst.at( format_index ); |
369 | } | 369 | } |
370 | else | 370 | else |
371 | { | 371 | { |
372 | switch ( rst.at( format_index ).unicode() ) | 372 | switch ( rst.at( format_index ).unicode() ) |
373 | { | 373 | { |
374 | case '%': | 374 | case '%': |
375 | buffer[index++] = '%'; | 375 | buffer[index++] = '%'; |
376 | break; | 376 | break; |
377 | case 'Y': | 377 | case 'Y': |
378 | put_it_in( buffer, index, pDate.year() / 100 ); | 378 | put_it_in( buffer, index, pDate.year() / 100 ); |
379 | case 'y': | 379 | case 'y': |
380 | put_it_in( buffer, index, pDate.year() % 100 ); | 380 | put_it_in( buffer, index, pDate.year() % 100 ); |
381 | break; | 381 | break; |
382 | case 'n': | 382 | case 'n': |
383 | number = pDate.month(); | 383 | number = pDate.month(); |
384 | case 'e': | 384 | case 'e': |
385 | // to share the code | 385 | // to share the code |
386 | if ( rst.at( format_index ).unicode() == 'e' ) | 386 | if ( rst.at( format_index ).unicode() == 'e' ) |
387 | number = pDate.day(); | 387 | number = pDate.day(); |
388 | if ( number / 10 ) | 388 | if ( number / 10 ) |
389 | buffer[index++] = number / 10 + '0'; | 389 | buffer[index++] = number / 10 + '0'; |
390 | buffer[index++] = number % 10 + '0'; | 390 | buffer[index++] = number % 10 + '0'; |
391 | break; | 391 | break; |
392 | case 'm': | 392 | case 'm': |
393 | put_it_in( buffer, index, pDate.month() ); | 393 | put_it_in( buffer, index, pDate.month() ); |
394 | break; | 394 | break; |
395 | case 'b': | 395 | case 'b': |
396 | put_it_in( buffer, index, monthName(pDate.month(), true) ); | 396 | put_it_in( buffer, index, monthName(pDate.month(), true) ); |
397 | break; | 397 | break; |
398 | case 'B': | 398 | case 'B': |
399 | put_it_in( buffer, index, monthName(pDate.month(), false) ); | 399 | put_it_in( buffer, index, monthName(pDate.month(), false) ); |
400 | break; | 400 | break; |
401 | case 'd': | 401 | case 'd': |
402 | put_it_in( buffer, index, pDate.day() ); | 402 | put_it_in( buffer, index, pDate.day() ); |
403 | break; | 403 | break; |
404 | case 'a': | 404 | case 'a': |
405 | put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), true) ); | 405 | put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), true) ); |
406 | break; | 406 | break; |
407 | case 'A': | 407 | case 'A': |
408 | put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), false) ); | 408 | put_it_in( buffer, index, weekDayName(pDate.dayOfWeek(), false) ); |
409 | break; | 409 | break; |
410 | default: | 410 | default: |
411 | buffer[index++] = rst.at( format_index ); | 411 | buffer[index++] = rst.at( format_index ); |
412 | break; | 412 | break; |
413 | } | 413 | } |
414 | escape = false; | 414 | escape = false; |
415 | } | 415 | } |
416 | } | 416 | } |
417 | QString ret( buffer, index ); | 417 | QString ret( buffer, index ); |
418 | delete [] buffer; | 418 | delete [] buffer; |
419 | return ret; | 419 | return ret; |
420 | } | 420 | } |
421 | 421 | ||
422 | QString KLocale::formatDateTime(const QDateTime &pDateTime, | 422 | QString KLocale::formatDateTime(const QDateTime &pDateTime, |
423 | bool shortFormat, | 423 | bool shortFormat, |
424 | bool includeSeconds, | 424 | bool includeSeconds, |
425 | IntDateFormat intIntDateFormat) const | 425 | IntDateFormat intIntDateFormat) const |
426 | { | 426 | { |
427 | QString format("%1 %2"); | 427 | QString format("%1 %2"); |
428 | 428 | ||
429 | if ( intIntDateFormat == Default ) | 429 | if ( intIntDateFormat == Default ) |
430 | format = "%1 %2"; | 430 | format = "%1 %2"; |
431 | else if ( intIntDateFormat == Format1 ) | 431 | else if ( intIntDateFormat == Format1 ) |
432 | format = "%1 %2"; | 432 | format = "%1 %2"; |
433 | else if ( intIntDateFormat == ISODate ) | 433 | else if ( intIntDateFormat == ISODate ) |
434 | format = "%1T%2"; | 434 | format = "%1T%2"; |
435 | 435 | ||
436 | QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat )) | 436 | QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat )) |
437 | .arg(formatTime( pDateTime.time(), includeSeconds , intIntDateFormat )); | 437 | .arg(formatTime( pDateTime.time(), includeSeconds , intIntDateFormat )); |
438 | 438 | ||
439 | //qDebug("KLocale::formatDateTime transformed %s, into %s", pDateTime.toString().latin1(), res.latin1() ); | 439 | //qDebug("KLocale::formatDateTime transformed %s, into %s", pDateTime.toString().latin1(), res.latin1() ); |
440 | 440 | ||
441 | return res; | 441 | return res; |
442 | } | 442 | } |
443 | 443 | ||
444 | QString KLocale::formatDateTime(const QDateTime &pDateTime, IntDateFormat intIntDateFormat) const | 444 | QString KLocale::formatDateTime(const QDateTime &pDateTime, IntDateFormat intIntDateFormat) const |
445 | { | 445 | { |
446 | return formatDateTime(pDateTime, true, true, intIntDateFormat); | 446 | return formatDateTime(pDateTime, true, true, intIntDateFormat); |
447 | } | 447 | } |
448 | 448 | ||
449 | QDate KLocale::readDate(const QString &intstr, bool* ok) const | 449 | QDate KLocale::readDate(const QString &intstr, bool* ok) const |
450 | { | 450 | { |
451 | QDate date; | 451 | QDate date; |
452 | date = readDate(intstr, true, ok); | 452 | date = readDate(intstr, true, ok); |
453 | if (date.isValid()) return date; | 453 | if (date.isValid()) return date; |
454 | return readDate(intstr, false, ok); | 454 | return readDate(intstr, false, ok); |
455 | } | 455 | } |
456 | 456 | ||
457 | QDate KLocale::readDate(const QString &intstr, bool shortFormat, bool* ok) const | 457 | QDate KLocale::readDate(const QString &intstr, bool shortFormat, bool* ok) const |
458 | { | 458 | { |
459 | QString fmt = (shortFormat ? dateFormatShort() : dateFormat()).simplifyWhiteSpace(); | 459 | QString fmt = (shortFormat ? dateFormatShort() : dateFormat()).simplifyWhiteSpace(); |
460 | return readDate( intstr, fmt, ok ); | 460 | return readDate( intstr, fmt, ok ); |
461 | } | 461 | } |
462 | 462 | ||
463 | QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) const | 463 | QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) const |
464 | { | 464 | { |
465 | //kdDebug(173) << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl; | 465 | //kdDebug(173) << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl; |
466 | QString str = intstr.simplifyWhiteSpace().lower(); | 466 | QString str = intstr.simplifyWhiteSpace().lower(); |
467 | int day = -1, month = -1; | 467 | int day = -1, month = -1; |
468 | // allow the year to be omitted if not in the format | 468 | // allow the year to be omitted if not in the format |
469 | int year = QDate::currentDate().year(); | 469 | int year = QDate::currentDate().year(); |
470 | uint strpos = 0; | 470 | uint strpos = 0; |
471 | uint fmtpos = 0; | 471 | uint fmtpos = 0; |
472 | 472 | ||
473 | while (fmt.length() > fmtpos || str.length() > strpos) | 473 | while (fmt.length() > fmtpos || str.length() > strpos) |
474 | { | 474 | { |
475 | if ( !(fmt.length() > fmtpos && str.length() > strpos) ) | 475 | if ( !(fmt.length() > fmtpos && str.length() > strpos) ) |
476 | goto error; | 476 | goto error; |
477 | 477 | ||
478 | QChar c = fmt.at(fmtpos++); | 478 | QChar c = fmt.at(fmtpos++); |
479 | 479 | ||
480 | if (c != '%') { | 480 | if (c != '%') { |
481 | if (c.isSpace()) | 481 | if (c.isSpace()) |
482 | strpos++; | 482 | strpos++; |
483 | else if (c != str.at(strpos++)) | 483 | else if (c != str.at(strpos++)) |
484 | goto error; | 484 | goto error; |
485 | continue; | 485 | continue; |
486 | } | 486 | } |
487 | 487 | ||
488 | // remove space at the begining | 488 | // remove space at the begining |
489 | if (str.length() > strpos && str.at(strpos).isSpace()) | 489 | if (str.length() > strpos && str.at(strpos).isSpace()) |
490 | strpos++; | 490 | strpos++; |
491 | 491 | ||
492 | c = fmt.at(fmtpos++); | 492 | c = fmt.at(fmtpos++); |
493 | switch (c) | 493 | switch (c) |
494 | { | 494 | { |
495 | case 'a': | 495 | case 'a': |
496 | case 'A': | 496 | case 'A': |
497 | // this will just be ignored | 497 | // this will just be ignored |
498 | { // Cristian Tache: porting to Win: Block added because of "j" redefinition | 498 | { // Cristian Tache: porting to Win: Block added because of "j" redefinition |
499 | for (int j = 1; j < 8; j++) { | 499 | for (int j = 1; j < 8; j++) { |
500 | QString s = weekDayName(j, c == 'a').lower(); | 500 | QString s = weekDayName(j, c == 'a').lower(); |
501 | int len = s.length(); | 501 | int len = s.length(); |
502 | if (str.mid(strpos, len) == s) | 502 | if (str.mid(strpos, len) == s) |
503 | strpos += len; | 503 | strpos += len; |
504 | } | 504 | } |
505 | break; | 505 | break; |
506 | } | 506 | } |
507 | case 'b': | 507 | case 'b': |
508 | case 'B': | 508 | case 'B': |
509 | { // Cristian Tache: porting to Win: Block added because of "j" redefinition | 509 | { // Cristian Tache: porting to Win: Block added because of "j" redefinition |
510 | for (int j = 1; j < 13; j++) { | 510 | for (int j = 1; j < 13; j++) { |
511 | QString s = monthName(j, c == 'b').lower(); | 511 | QString s = monthName(j, c == 'b').lower(); |
512 | int len = s.length(); | 512 | int len = s.length(); |
513 | if (str.mid(strpos, len) == s) { | 513 | if (str.mid(strpos, len) == s) { |
514 | month = j; | 514 | month = j; |
515 | strpos += len; | 515 | strpos += len; |
516 | } | 516 | } |
517 | } | 517 | } |
518 | break; | 518 | break; |
519 | } | 519 | } |
520 | case 'd': | 520 | case 'd': |
521 | case 'e': | 521 | case 'e': |
522 | day = readInt(str, strpos); | 522 | day = readInt(str, strpos); |
523 | if (day < 1 || day > 31) | 523 | if (day < 1 || day > 31) |
524 | goto error; | 524 | goto error; |
525 | 525 | ||
526 | break; | 526 | break; |
527 | 527 | ||
528 | case 'n': | 528 | case 'n': |
529 | case 'm': | 529 | case 'm': |
530 | month = readInt(str, strpos); | 530 | month = readInt(str, strpos); |
531 | if (month < 1 || month > 12) | 531 | if (month < 1 || month > 12) |
532 | goto error; | 532 | goto error; |
533 | 533 | ||
534 | break; | 534 | break; |
535 | 535 | ||
536 | case 'Y': | 536 | case 'Y': |
537 | case 'y': | 537 | case 'y': |
538 | year = readInt(str, strpos); | 538 | year = readInt(str, strpos); |
539 | if (year < 0) | 539 | if (year < 0) |
540 | goto error; | 540 | goto error; |
541 | // Qt treats a year in the range 0-100 as 1900-1999. | 541 | // Qt treats a year in the range 0-100 as 1900-1999. |
542 | // It is nicer for the user if we treat 0-68 as 2000-2068 | 542 | // It is nicer for the user if we treat 0-68 as 2000-2068 |
543 | if (year < 69) | 543 | if (year < 69) |
544 | year += 2000; | 544 | year += 2000; |
545 | else if (c == 'y') | 545 | else if (c == 'y') |
546 | year += 1900; | 546 | year += 1900; |
547 | 547 | ||
548 | break; | 548 | break; |
549 | } | 549 | } |
550 | } | 550 | } |
551 | //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl; | 551 | //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl; |
552 | if ( year != -1 && month != -1 && day != -1 ) | 552 | if ( year != -1 && month != -1 && day != -1 ) |
553 | { | 553 | { |
554 | if (ok) *ok = true; | 554 | if (ok) *ok = true; |
555 | return QDate(year, month, day); | 555 | return QDate(year, month, day); |
556 | } | 556 | } |
557 | error: | 557 | error: |
558 | if (ok) *ok = false; | 558 | if (ok) *ok = false; |
559 | return QDate(); // invalid date | 559 | return QDate(); // invalid date |
560 | } | 560 | } |
561 | 561 | ||
562 | QTime KLocale::readTime(const QString &intstr, bool *ok) const | 562 | QTime KLocale::readTime(const QString &intstr, bool *ok) const |
563 | { | 563 | { |
564 | QTime _time; | 564 | QTime _time; |
565 | _time = readTime(intstr, false, ok); | 565 | _time = readTime(intstr, false, ok); |
566 | if (_time.isValid()) return _time; | 566 | if (_time.isValid()) return _time; |
567 | return readTime(intstr, true, ok); | 567 | return readTime(intstr, true, ok); |
568 | } | 568 | } |
569 | 569 | ||
570 | QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const | 570 | QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const |
571 | { | 571 | { |
572 | QString str = intstr.simplifyWhiteSpace().lower(); | 572 | QString str = intstr.simplifyWhiteSpace().lower(); |
573 | QString Format = timeFormat().simplifyWhiteSpace(); | 573 | QString Format = timeFormat().simplifyWhiteSpace(); |
574 | if (!seconds) | 574 | if (!seconds) |
575 | Format.replace(QRegExp(QString::fromLatin1(".%S")), QString::null); | 575 | Format.replace(QRegExp(QString::fromLatin1(".%S")), QString::null); |
576 | 576 | ||
577 | int hour = -1, minute = -1, second = seconds ? -1 : 0; // don't require seconds | 577 | int hour = -1, minute = -1, second = seconds ? -1 : 0; // don't require seconds |
578 | 578 | ||
579 | bool g_12h = false; | 579 | bool g_12h = false; |
580 | bool pm = false; | 580 | bool pm = false; |
581 | uint strpos = 0; | 581 | uint strpos = 0; |
582 | uint Formatpos = 0; | 582 | uint Formatpos = 0; |
583 | 583 | ||
584 | while (Format.length() > Formatpos || str.length() > strpos) | 584 | while (Format.length() > Formatpos || str.length() > strpos) |
585 | { | 585 | { |
586 | if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error; | 586 | if ( !(Format.length() > Formatpos && str.length() > strpos) ) goto error; |
587 | 587 | ||
588 | QChar c = Format.at(Formatpos++); | 588 | QChar c = Format.at(Formatpos++); |
589 | 589 | ||
590 | if (c != '%') | 590 | if (c != '%') |
591 | { | 591 | { |
592 | if (c.isSpace()) | 592 | if (c.isSpace()) |
593 | strpos++; | 593 | strpos++; |
594 | else if (c != str.at(strpos++)) | 594 | else if (c != str.at(strpos++)) |
595 | goto error; | 595 | goto error; |
596 | continue; | 596 | continue; |
597 | } | 597 | } |
598 | 598 | ||
599 | // remove space at the begining | 599 | // remove space at the begining |
600 | if (str.length() > strpos && str.at(strpos).isSpace()) | 600 | if (str.length() > strpos && str.at(strpos).isSpace()) |
601 | strpos++; | 601 | strpos++; |
602 | 602 | ||
603 | c = Format.at(Formatpos++); | 603 | c = Format.at(Formatpos++); |
604 | switch (c) | 604 | switch (c) |
605 | { | 605 | { |
606 | case 'p': | 606 | case 'p': |
607 | { | 607 | { |
608 | QString s; | 608 | QString s; |
609 | s = i18n("pm").lower(); | 609 | s = i18n("pm").lower(); |
610 | int len = s.length(); | 610 | int len = s.length(); |
611 | if (str.mid(strpos, len) == s) | 611 | if (str.mid(strpos, len) == s) |
612 | { | 612 | { |
613 | pm = true; | 613 | pm = true; |
614 | strpos += len; | 614 | strpos += len; |
615 | } | 615 | } |
616 | else | 616 | else |
617 | { | 617 | { |
618 | s = i18n("am").lower(); | 618 | s = i18n("am").lower(); |
619 | len = s.length(); | 619 | len = s.length(); |
620 | if (str.mid(strpos, len) == s) { | 620 | if (str.mid(strpos, len) == s) { |
621 | pm = false; | 621 | pm = false; |
622 | strpos += len; | 622 | strpos += len; |
623 | } | 623 | } |
624 | else | 624 | else |
625 | goto error; | 625 | goto error; |
626 | } | 626 | } |
627 | } | 627 | } |
628 | break; | 628 | break; |
629 | 629 | ||
630 | case 'k': | 630 | case 'k': |
631 | case 'H': | 631 | case 'H': |
632 | g_12h = false; | 632 | g_12h = false; |
633 | hour = readInt(str, strpos); | 633 | hour = readInt(str, strpos); |
634 | if (hour < 0 || hour > 23) | 634 | if (hour < 0 || hour > 23) |
635 | goto error; | 635 | goto error; |
636 | 636 | ||
637 | break; | 637 | break; |
638 | 638 | ||
639 | case 'l': | 639 | case 'l': |
640 | case 'I': | 640 | case 'I': |
641 | g_12h = true; | 641 | g_12h = true; |
642 | hour = readInt(str, strpos); | 642 | hour = readInt(str, strpos); |
643 | if (hour < 1 || hour > 12) | 643 | if (hour < 1 || hour > 12) |
644 | goto error; | 644 | goto error; |
645 | 645 | ||
646 | break; | 646 | break; |
647 | 647 | ||
648 | case 'M': | 648 | case 'M': |
649 | minute = readInt(str, strpos); | 649 | minute = readInt(str, strpos); |
650 | if (minute < 0 || minute > 59) | 650 | if (minute < 0 || minute > 59) |
651 | goto error; | 651 | goto error; |
652 | 652 | ||
653 | break; | 653 | break; |
654 | 654 | ||
655 | case 'S': | 655 | case 'S': |
656 | second = readInt(str, strpos); | 656 | second = readInt(str, strpos); |
657 | if (second < 0 || second > 59) | 657 | if (second < 0 || second > 59) |
658 | goto error; | 658 | goto error; |
659 | 659 | ||
660 | break; | 660 | break; |
661 | } | 661 | } |
662 | } | 662 | } |
663 | if (g_12h) | 663 | if (g_12h) |
664 | { | 664 | { |
665 | hour %= 12; | 665 | hour %= 12; |
666 | if (pm) hour += 12; | 666 | if (pm) hour += 12; |
667 | } | 667 | } |
668 | 668 | ||
669 | if (ok) *ok = true; | 669 | if (ok) *ok = true; |
670 | return QTime(hour, minute, second); | 670 | return QTime(hour, minute, second); |
671 | 671 | ||
672 | error: | 672 | error: |
673 | if (ok) *ok = false; | 673 | if (ok) *ok = false; |
674 | return QTime(-1, -1, -1); // return invalid date if it didn't work | 674 | return QTime(-1, -1, -1); // return invalid date if it didn't work |
675 | // This will be removed in the near future, since it gives a warning on stderr. | 675 | // This will be removed in the near future, since it gives a warning on stderr. |
676 | // The presence of the bool* (since KDE-3.0) removes the need for an invalid QTime. | 676 | // The presence of the bool* (since KDE-3.0) removes the need for an invalid QTime. |
677 | } | 677 | } |
678 | 678 | ||
679 | QDateTime KLocale::readDateTime(const QString &intstr, | 679 | QDateTime KLocale::readDateTime(const QString &intstr, |
680 | IntDateFormat intIntDateFormat, | 680 | IntDateFormat intIntDateFormat, |
681 | bool* ok) const | 681 | bool* ok) const |
682 | { | 682 | { |
683 | bool ok1, ok2; | 683 | bool ok1, ok2; |
684 | 684 | ||
685 | // AT the moment we can not read any other format then ISODate | 685 | // AT the moment we can not read any other format then ISODate |
686 | if ( intIntDateFormat != ISODate ) | 686 | if ( intIntDateFormat != ISODate ) |
687 | { | 687 | { |
688 | qDebug("KLocale::readDateTime, only ISODate is supported."); | 688 | qDebug("KLocale::readDateTime, only ISODate is supported."); |
689 | return QDateTime(); | 689 | return QDateTime(); |
690 | } | 690 | } |
691 | 691 | ||
692 | int pos = intstr.find("T"); | 692 | int pos = intstr.find("T"); |
693 | QString date = intstr.left(pos); | 693 | QString date = intstr.left(pos); |
694 | QString time = intstr.mid(pos+1); | 694 | QString time = intstr.mid(pos+1); |
695 | 695 | ||
696 | QString dformat = dateFormat(intIntDateFormat); | 696 | QString dformat = dateFormat(intIntDateFormat); |
697 | QString tformat = timeFormat(intIntDateFormat); | 697 | QString tformat = timeFormat(intIntDateFormat); |
698 | 698 | ||
699 | QDate m_date = readDate(date, dformat, &ok1); | 699 | QDate m_date = readDate(date, dformat, &ok1); |
700 | QTime m_time = readTime(time, tformat, &ok2); | 700 | QTime m_time = readTime(time, tformat, &ok2); |
701 | 701 | ||
702 | QDateTime m_dt; | 702 | QDateTime m_dt; |
703 | 703 | ||
704 | if (ok) | 704 | if (ok) |
705 | { | 705 | { |
706 | if ((ok1 == false) || (ok2 == false)) | 706 | if ((ok1 == false) || (ok2 == false)) |
707 | *ok = false; | 707 | *ok = false; |
708 | else | 708 | else |
709 | *ok = true; | 709 | *ok = true; |
710 | } | 710 | } |
711 | 711 | ||
712 | //only set values if both operations returned true. | 712 | //only set values if both operations returned true. |
713 | if ((ok1 == true) && (ok2 == true)) | 713 | if ((ok1 == true) && (ok2 == true)) |
714 | { | 714 | { |
715 | m_dt.setDate(m_date); | 715 | m_dt.setDate(m_date); |
716 | m_dt.setTime(m_time); | 716 | m_dt.setTime(m_time); |
717 | } | 717 | } |
718 | 718 | ||
719 | //qDebug("KLocale::readDateTime() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2); | 719 | //qDebug("KLocale::readDateTime() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2); |
720 | return m_dt; | 720 | return m_dt; |
721 | } | 721 | } |
722 | 722 | ||
723 | QDate KLocale::readDate(const QString &intstr, | 723 | QDate KLocale::readDate(const QString &intstr, |
724 | IntDateFormat intIntDateFormat, | 724 | IntDateFormat intIntDateFormat, |
725 | bool* ok) const | 725 | bool* ok) const |
726 | { | 726 | { |
727 | bool ok1; | 727 | bool ok1; |
728 | 728 | ||
729 | QString dformat = dateFormat(intIntDateFormat); | 729 | QString dformat = dateFormat(intIntDateFormat); |
730 | 730 | ||
731 | QDate m_date = readDate(intstr, dformat, &ok1); | 731 | QDate m_date = readDate(intstr, dformat, &ok1); |
732 | 732 | ||
733 | if (ok) | 733 | if (ok) |
734 | *ok = ok1; | 734 | *ok = ok1; |
735 | 735 | ||
736 | //qDebug("KLocale::readDate() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2); | 736 | //qDebug("KLocale::readDate() transformed %s into %s (%s), %s (%s) : err1=%i, err2=%i", intstr.latin1(), date.latin1(), dformat.latin1(), time.latin1(), tformat.latin1(), ok1, ok2); |
737 | return m_date; | 737 | return m_date; |
738 | } | 738 | } |
739 | 739 | ||
740 | 740 | ||
741 | bool KLocale::use12Clock() const | 741 | bool KLocale::use12Clock() const |
742 | { | 742 | { |
743 | return !mHourF24Format ;; | 743 | return !mHourF24Format ;; |
744 | } | 744 | } |
745 | 745 | ||
746 | bool KLocale::weekStartsMonday() const | 746 | bool KLocale::weekStartsMonday() const |
747 | { | 747 | { |
748 | return mWeekStartsMonday; | 748 | return mWeekStartsMonday; |
749 | } | 749 | } |
750 | 750 | ||
751 | int KLocale::weekStartDay() const | 751 | int KLocale::weekStartDay() const |
752 | { | 752 | { |
753 | if ( mWeekStartsMonday ) | 753 | if ( mWeekStartsMonday ) |
754 | return 1; | 754 | return 1; |
755 | return 7; | 755 | return 7; |
756 | } | 756 | } |
757 | 757 | ||
758 | QString KLocale::weekDayName(int i,bool shortName) const | 758 | QString KLocale::weekDayName(int i,bool shortName) const |
759 | { | 759 | { |
760 | if ( shortName ) | 760 | if ( shortName ) |
761 | switch ( i ) | 761 | switch ( i ) |
762 | { | 762 | { |
763 | case 1: return i18n("Monday", "Mon"); | 763 | case 1: return i18n("Monday", "Mon"); |
764 | case 2: return i18n("Tuesday", "Tue"); | 764 | case 2: return i18n("Tuesday", "Tue"); |
765 | case 3: return i18n("Wednesday", "Wed"); | 765 | case 3: return i18n("Wednesday", "Wed"); |
766 | case 4: return i18n("Thursday", "Thu"); | 766 | case 4: return i18n("Thursday", "Thu"); |
767 | case 5: return i18n("Friday", "Fri"); | 767 | case 5: return i18n("Friday", "Fri"); |
768 | case 6: return i18n("Saturday", "Sat"); | 768 | case 6: return i18n("Saturday", "Sat"); |
769 | case 7: return i18n("Sunday", "Sun"); | 769 | case 7: return i18n("Sunday", "Sun"); |
770 | } | 770 | } |
771 | else | 771 | else |
772 | switch ( i ) | 772 | switch ( i ) |
773 | { | 773 | { |
774 | case 1: return i18n("Monday"); | 774 | case 1: return i18n("Monday"); |
775 | case 2: return i18n("Tuesday"); | 775 | case 2: return i18n("Tuesday"); |
776 | case 3: return i18n("Wednesday"); | 776 | case 3: return i18n("Wednesday"); |
777 | case 4: return i18n("Thursday"); | 777 | case 4: return i18n("Thursday"); |
778 | case 5: return i18n("Friday"); | 778 | case 5: return i18n("Friday"); |
779 | case 6: return i18n("Saturday"); | 779 | case 6: return i18n("Saturday"); |
780 | case 7: return i18n("Sunday"); | 780 | case 7: return i18n("Sunday"); |
781 | } | 781 | } |
782 | 782 | ||
783 | return QString::null; | 783 | return QString::null; |
784 | } | 784 | } |
785 | 785 | ||
786 | QString KLocale::monthName(int i,bool shortName) const | 786 | QString KLocale::monthName(int i,bool shortName) const |
787 | { | 787 | { |
788 | if ( shortName ) | 788 | if ( shortName ) |
789 | switch ( i ) | 789 | switch ( i ) |
790 | { | 790 | { |
791 | case 1: return i18n("January", "Jan"); | 791 | case 1: return i18n("January", "Jan"); |
792 | case 2: return i18n("February", "Feb"); | 792 | case 2: return i18n("February", "Feb"); |
793 | case 3: return i18n("March", "Mar"); | 793 | case 3: return i18n("March", "Mar"); |
794 | case 4: return i18n("April", "Apr"); | 794 | case 4: return i18n("April", "Apr"); |
795 | case 5: return i18n("May short", "May"); | 795 | case 5: return i18n("May short", "May"); |
796 | case 6: return i18n("June", "Jun"); | 796 | case 6: return i18n("June", "Jun"); |
797 | case 7: return i18n("July", "Jul"); | 797 | case 7: return i18n("July", "Jul"); |
798 | case 8: return i18n("August", "Aug"); | 798 | case 8: return i18n("August", "Aug"); |
799 | case 9: return i18n("September", "Sep"); | 799 | case 9: return i18n("September", "Sep"); |
800 | case 10: return i18n("October", "Oct"); | 800 | case 10: return i18n("October", "Oct"); |
801 | case 11: return i18n("November", "Nov"); | 801 | case 11: return i18n("November", "Nov"); |
802 | case 12: return i18n("December", "Dec"); | 802 | case 12: return i18n("December", "Dec"); |
803 | } | 803 | } |
804 | else | 804 | else |
805 | switch (i) | 805 | switch (i) |
806 | { | 806 | { |
807 | case 1: return i18n("January"); | 807 | case 1: return i18n("January"); |
808 | case 2: return i18n("February"); | 808 | case 2: return i18n("February"); |
809 | case 3: return i18n("March"); | 809 | case 3: return i18n("March"); |
810 | case 4: return i18n("April"); | 810 | case 4: return i18n("April"); |
811 | case 5: return i18n("May long", "May"); | 811 | case 5: return i18n("May long", "May"); |
812 | case 6: return i18n("June"); | 812 | case 6: return i18n("June"); |
813 | case 7: return i18n("July"); | 813 | case 7: return i18n("July"); |
814 | case 8: return i18n("August"); | 814 | case 8: return i18n("August"); |
815 | case 9: return i18n("September"); | 815 | case 9: return i18n("September"); |
816 | case 10: return i18n("October"); | 816 | case 10: return i18n("October"); |
817 | case 11: return i18n("November"); | 817 | case 11: return i18n("November"); |
818 | case 12: return i18n("December"); | 818 | case 12: return i18n("December"); |
819 | } | 819 | } |
820 | 820 | ||
821 | return QString::null; | 821 | return QString::null; |
822 | } | 822 | } |
823 | 823 | ||
824 | QString KLocale::country() const | 824 | QString KLocale::country() const |
825 | { | 825 | { |
826 | return QString::null; | 826 | return QString::null; |
827 | } | 827 | } |
828 | 828 | ||
829 | QString KLocale::dateFormat(IntDateFormat intIntDateFormat) const | 829 | QString KLocale::dateFormat(IntDateFormat intIntDateFormat) const |
830 | { | 830 | { |
831 | const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat; | 831 | const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat; |
832 | 832 | ||
833 | if ( dformat == ISODate ) | 833 | if ( dformat == ISODate ) |
834 | return "%Y-%m-%d"; | 834 | return "%Y-%m-%d"; |
835 | 835 | ||
836 | if ( QApplication::desktop()->width() < 480 ) { | 836 | if ( QApplication::desktop()->width() < 480 ) { |
837 | if ( dformat == Default ) | 837 | if ( dformat == Default ) |
838 | return "%a %d %b %Y"; | 838 | return "%a %d %b %Y"; |
839 | else if ( dformat == Format1 ) | 839 | else if ( dformat == Format1 ) |
840 | return "%a %b %d %Y"; | 840 | return "%a %b %d %Y"; |
841 | } else { | 841 | } else { |
842 | if ( dformat == Default ) | 842 | if ( dformat == Default ) |
843 | return "%A %d %B %Y"; | 843 | return "%A %d %B %Y"; |
844 | else if ( dformat == Format1 ) | 844 | else if ( dformat == Format1 ) |
845 | return "%A %B %d %Y"; | 845 | return "%A %B %d %Y"; |
846 | 846 | ||
847 | } | 847 | } |
848 | return mDateFormat ; | 848 | return mDateFormat ; |
849 | } | 849 | } |
850 | 850 | ||
851 | QString KLocale::dateFormatShort(IntDateFormat intIntDateFormat) const | 851 | QString KLocale::dateFormatShort(IntDateFormat intIntDateFormat) const |
852 | { | 852 | { |
853 | const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat; | 853 | const IntDateFormat dformat = (intIntDateFormat == Undefined)?mIntDateFormat:intIntDateFormat; |
854 | 854 | ||
855 | if ( dformat == Default ) | 855 | if ( dformat == Default ) |
856 | return "%d.%m.%Y"; | 856 | return "%d.%m.%Y"; |
857 | else if ( dformat == Format1 ) | 857 | else if ( dformat == Format1 ) |
858 | return "%m.%d.%Y"; | 858 | return "%m.%d.%Y"; |
859 | else if ( dformat == ISODate ) // = Qt::ISODate | 859 | else if ( dformat == ISODate ) // = Qt::ISODate |
860 | return "%Y-%m-%d"; | 860 | return "%Y-%m-%d"; |
861 | return mDateFormatShort ; | 861 | return mDateFormatShort ; |
862 | 862 | ||
863 | } | 863 | } |
864 | 864 | ||
865 | 865 | ||
866 | QString KLocale::timeFormat(IntDateFormat intIntTimeFormat) const | 866 | QString KLocale::timeFormat(IntDateFormat intIntTimeFormat) const |
867 | { | 867 | { |
868 | const IntDateFormat tformat = (intIntTimeFormat == Undefined)?mIntTimeFormat:intIntTimeFormat; | 868 | const IntDateFormat tformat = (intIntTimeFormat == Undefined)?mIntTimeFormat:intIntTimeFormat; |
869 | 869 | ||
870 | if ( tformat == Default ) | 870 | if ( tformat == Default ) |
871 | if ( mHourF24Format) | 871 | if ( mHourF24Format) |
872 | return "%H:%M:%S"; | 872 | return "%H:%M:%S"; |
873 | else | 873 | else |
874 | return "%I:%M:%S%p"; | 874 | return "%I:%M:%S%p"; |
875 | 875 | ||
876 | else if ( tformat == Format1 ) | 876 | else if ( tformat == Format1 ) |
877 | if ( mHourF24Format) | 877 | if ( mHourF24Format) |
878 | return "%H:%M:%S"; | 878 | return "%H:%M:%S"; |
879 | else | 879 | else |
880 | return "%I:%M:%S%p"; | 880 | return "%I:%M:%S%p"; |
881 | 881 | ||
882 | else if ( tformat == ISODate ) // = Qt::ISODate | 882 | else if ( tformat == ISODate ) // = Qt::ISODate |
883 | if ( mHourF24Format) | 883 | if ( mHourF24Format) |
884 | return "%H:%M:%S"; | 884 | return "%H:%M:%S"; |
885 | else | 885 | else |
886 | return "%I:%M:%S%p"; | 886 | return "%I:%M:%S%p"; |
887 | // to satisfy the compiler | 887 | // to satisfy the compiler |
888 | return "%H:%M:%S"; | 888 | return "%H:%M:%S"; |
889 | } | 889 | } |
890 | 890 | ||
891 | void KLocale::insertCatalogue ( const QString & ) | 891 | void KLocale::insertCatalogue ( const QString & ) |
892 | { | 892 | { |
893 | } | 893 | } |
894 | 894 | ||
895 | KCalendarSystem *KLocale::calendar() | 895 | KCalendarSystem *KLocale::calendar() |
896 | { | 896 | { |
897 | if ( !mCalendarSystem ) { | 897 | if ( !mCalendarSystem ) { |
898 | mCalendarSystem = new KCalendarSystemGregorian; | 898 | mCalendarSystem = new KCalendarSystemGregorian; |
899 | } | 899 | } |
900 | 900 | ||
901 | return mCalendarSystem; | 901 | return mCalendarSystem; |
902 | } | 902 | } |
903 | 903 | ||
904 | int KLocale::timezoneOffset( QString timeZone ) | 904 | int KLocale::timezoneOffset( QString timeZone ) |
905 | { | 905 | { |
906 | int ret = 1001; | 906 | int ret = 1001; |
907 | int index = mTimeZoneList.findIndex( timeZone ); | 907 | int index = mTimeZoneList.findIndex( timeZone ); |
908 | if ( index < 24 ) | 908 | if ( index < 24 ) |
909 | ret = ( index-11 ) * 60 ; | 909 | ret = ( index-11 ) * 60 ; |
910 | return ret; | 910 | return ret; |
911 | } | 911 | } |
912 | 912 | ||
913 | QStringList KLocale::timeZoneList() const | 913 | QStringList KLocale::timeZoneList() const |
914 | { | 914 | { |
915 | return mTimeZoneList; | 915 | return mTimeZoneList; |
916 | } | 916 | } |
917 | void KLocale::setTimezone( const QString &timeZone, bool oddTZ ) | 917 | void KLocale::setTimezone( const QString &timeZone, bool oddTZ ) |
918 | { | 918 | { |
919 | mTimeZoneOffset = timezoneOffset( timeZone ); | 919 | mTimeZoneOffset = timezoneOffset( timeZone ); |
920 | if ( oddTZ ) | 920 | if ( oddTZ ) |
921 | mTimeZoneOffset += 30; | 921 | mTimeZoneOffset += 30; |
922 | } | 922 | } |
923 | 923 | ||
924 | void KLocale::setDaylightSaving( bool b, int start , int end ) | 924 | void KLocale::setDaylightSaving( bool b, int start , int end ) |
925 | { | 925 | { |
926 | daylightEnabled = b; | 926 | daylightEnabled = b; |
927 | daylightStart = start; | 927 | daylightStart = start; |
928 | daylightEnd = end; | 928 | daylightEnd = end; |
929 | mSouthDaylight = (end < start); | 929 | mSouthDaylight = (end < start); |
930 | // qDebug("klocale daylight %d %d %d ", b, start , end ); | 930 | // qDebug("klocale daylight %d %d %d ", b, start , end ); |
931 | } | 931 | } |
932 | 932 | ||
933 | int KLocale::localTimeOffset( const QDateTime &dt ) | 933 | int KLocale::localTimeOffset( const QDateTime &dt ) |
934 | { | 934 | { |
935 | bool addDaylight = false; | 935 | bool addDaylight = false; |
936 | if ( daylightEnabled ) { | 936 | if ( daylightEnabled ) { |
937 | int d_end, d_start; | 937 | int d_end, d_start; |
938 | int dayofyear = dt.date().dayOfYear(); | 938 | int dayofyear = dt.date().dayOfYear(); |
939 | int year = dt.date().year(); | 939 | int year = dt.date().year(); |
940 | int add = 0; | 940 | int add = 0; |
941 | if ( QDate::leapYear(year) ) | 941 | if ( QDate::leapYear(year) ) |
942 | add = 1; | 942 | add = 1; |
943 | QDate date ( year,1,1 ); | 943 | QDate date ( year,1,1 ); |
944 | if ( daylightEnd > 59 ) | 944 | if ( daylightEnd > 59 ) |
945 | d_end = daylightEnd +add; | 945 | d_end = daylightEnd +add; |
946 | else | 946 | else |
947 | d_end = daylightEnd; | 947 | d_end = daylightEnd; |
948 | if ( daylightStart > 59 ) | 948 | if ( daylightStart > 59 ) |
949 | d_start = daylightStart +add; | 949 | d_start = daylightStart +add; |
950 | else | 950 | else |
951 | d_start = daylightStart; | 951 | d_start = daylightStart; |
952 | QDate s_date = date.addDays( d_start -1 ); | 952 | QDate s_date = date.addDays( d_start -1 ); |
953 | QDate e_date = date.addDays( d_end -1 ); | 953 | QDate e_date = date.addDays( d_end -1 ); |
954 | int dof = s_date.dayOfWeek(); | 954 | int dof = s_date.dayOfWeek(); |
955 | if ( dof < 7 ) | 955 | if ( dof < 7 ) |
956 | s_date = s_date.addDays( -dof ); | 956 | s_date = s_date.addDays( -dof ); |
957 | dof = e_date.dayOfWeek(); | 957 | dof = e_date.dayOfWeek(); |
958 | if ( dof < 7 ) | 958 | if ( dof < 7 ) |
959 | e_date = e_date.addDays( -dof ); | 959 | e_date = e_date.addDays( -dof ); |
960 | QTime startTime ( 3,0,0 ); | 960 | QTime startTime ( 3,0,0 ); |
961 | QDateTime startDt( s_date, startTime ); | 961 | QDateTime startDt( s_date, startTime ); |
962 | QDateTime endDt( e_date, startTime ); | 962 | QDateTime endDt( e_date, startTime ); |
963 | //qDebug("dayligt saving start %s end %s ",startDt.toString().latin1(),endDt.toString().latin1( )); | 963 | //qDebug("dayligt saving start %s end %s ",startDt.toString().latin1(),endDt.toString().latin1( )); |
964 | if ( mSouthDaylight ) { | 964 | if ( mSouthDaylight ) { |
965 | if ( ! ( endDt < dt && dt < startDt) ) | 965 | if ( ! ( endDt < dt && dt < startDt) ) |
966 | addDaylight = true; | 966 | addDaylight = true; |
967 | } else { | 967 | } else { |
968 | if ( startDt < dt && dt < endDt ) | 968 | if ( startDt < dt && dt < endDt ) |
969 | addDaylight = true; | 969 | addDaylight = true; |
970 | 970 | ||
971 | 971 | ||
972 | } | 972 | } |
973 | } | 973 | } |
974 | int addMin = 0; | 974 | int addMin = 0; |
975 | if ( addDaylight ) | 975 | if ( addDaylight ) |
976 | addMin = 60; | 976 | addMin = 60; |
977 | return mTimeZoneOffset + addMin; | 977 | return mTimeZoneOffset + addMin; |
978 | } | 978 | } |
979 | // ****************************************************************** | 979 | // ****************************************************************** |
980 | // added LR | 980 | // added LR |
981 | QString KLocale::formatNumber(double num, int precision) const | 981 | QString KLocale::formatNumber(double num, int precision) const |
982 | { | 982 | { |
983 | bool neg = num < 0; | 983 | bool neg = num < 0; |
984 | if (precision == -1) precision = 2; | 984 | if (precision == -1) precision = 2; |
985 | QString res = QString::number(neg?-num:num, 'f', precision); | 985 | QString res = QString::number(neg?-num:num, 'f', precision); |
986 | int pos = res.find('.'); | 986 | int pos = res.find('.'); |
987 | if (pos == -1) pos = res.length(); | 987 | if (pos == -1) pos = res.length(); |
988 | else res.replace(pos, 1, decimalSymbol()); | 988 | else res.replace(pos, 1, decimalSymbol()); |
989 | 989 | ||
990 | while (0 < (pos -= 3)) | 990 | while (0 < (pos -= 3)) |
991 | res.insert(pos, thousandsSeparator()); // thousand sep | 991 | res.insert(pos, thousandsSeparator()); // thousand sep |
992 | 992 | ||
993 | // How can we know where we should put the sign? | 993 | // How can we know where we should put the sign? |
994 | res.prepend(neg?negativeSign():positiveSign()); | 994 | res.prepend(neg?negativeSign():positiveSign()); |
995 | 995 | ||
996 | return res; | 996 | return res; |
997 | } | 997 | } |
998 | QString KLocale::formatNumber(const QString &numStr) const | 998 | QString KLocale::formatNumber(const QString &numStr) const |
999 | { | 999 | { |
1000 | return formatNumber(numStr.toDouble()); | 1000 | return formatNumber(numStr.toDouble()); |
1001 | } | 1001 | } |
1002 | double KLocale::readNumber(const QString &_str, bool * ok) const | 1002 | double KLocale::readNumber(const QString &_str, bool * ok) const |
1003 | { | 1003 | { |
1004 | QString str = _str.stripWhiteSpace(); | 1004 | QString str = _str.stripWhiteSpace(); |
1005 | bool neg = str.find(negativeSign()) == 0; | 1005 | bool neg = str.find(negativeSign()) == 0; |
1006 | if (neg) | 1006 | if (neg) |
1007 | str.remove( 0, negativeSign().length() ); | 1007 | str.remove( 0, negativeSign().length() ); |
1008 | 1008 | ||
1009 | /* will hold the scientific notation portion of the number. | 1009 | /* will hold the scientific notation portion of the number. |
1010 | Example, with 2.34E+23, exponentialPart == "E+23" | 1010 | Example, with 2.34E+23, exponentialPart == "E+23" |
1011 | */ | 1011 | */ |
1012 | QString exponentialPart; | 1012 | QString exponentialPart; |
1013 | int EPos; | 1013 | int EPos; |
1014 | 1014 | ||
1015 | EPos = str.find('E', 0, false); | 1015 | EPos = str.find('E', 0, false); |
1016 | 1016 | ||
1017 | if (EPos != -1) | 1017 | if (EPos != -1) |
1018 | { | 1018 | { |
1019 | exponentialPart = str.mid(EPos); | 1019 | exponentialPart = str.mid(EPos); |
1020 | str = str.left(EPos); | 1020 | str = str.left(EPos); |
1021 | } | 1021 | } |
1022 | 1022 | ||
1023 | int pos = str.find(decimalSymbol()); | 1023 | int pos = str.find(decimalSymbol()); |
1024 | QString major; | 1024 | QString major; |
1025 | QString minor; | 1025 | QString minor; |
1026 | if ( pos == -1 ) | 1026 | if ( pos == -1 ) |
1027 | major = str; | 1027 | major = str; |
1028 | else | 1028 | else |
1029 | { | 1029 | { |
1030 | major = str.left(pos); | 1030 | major = str.left(pos); |
1031 | minor = str.mid(pos + decimalSymbol().length()); | 1031 | minor = str.mid(pos + decimalSymbol().length()); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | // Remove thousand separators | 1034 | // Remove thousand separators |
1035 | int thlen = thousandsSeparator().length(); | 1035 | int thlen = thousandsSeparator().length(); |
1036 | int lastpos = 0; | 1036 | int lastpos = 0; |
1037 | while ( ( pos = major.find( thousandsSeparator() ) ) > 0 ) | 1037 | while ( ( pos = major.find( thousandsSeparator() ) ) > 0 ) |
1038 | { | 1038 | { |
1039 | // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N | 1039 | // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N |
1040 | int fromEnd = major.length() - pos; | 1040 | int fromEnd = major.length() - pos; |
1041 | if ( fromEnd % (3+thlen) != 0 // Needs to be a multiple, otherwise it's an error | 1041 | if ( fromEnd % (3+thlen) != 0 // Needs to be a multiple, otherwise it's an error |
1042 | || pos - lastpos > 3 // More than 3 digits between two separators -> error | 1042 | || pos - lastpos > 3 // More than 3 digits between two separators -> error |
1043 | || pos == 0 // Can't start with a separator | 1043 | || pos == 0 // Can't start with a separator |
1044 | || (lastpos>0 && pos-lastpos!=3)) // Must have exactly 3 digits between two separators | 1044 | || (lastpos>0 && pos-lastpos!=3)) // Must have exactly 3 digits between two separators |
1045 | { | 1045 | { |
1046 | if (ok) *ok = false; | 1046 | if (ok) *ok = false; |
1047 | return 0.0; | 1047 | return 0.0; |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | lastpos = pos; | 1050 | lastpos = pos; |
1051 | major.remove( pos, thlen ); | 1051 | major.remove( pos, thlen ); |
1052 | } | 1052 | } |
1053 | if (lastpos>0 && major.length()-lastpos!=3) // Must have exactly 3 digits after the last separator | 1053 | if (lastpos>0 && major.length()-lastpos!=3) // Must have exactly 3 digits after the last separator |
1054 | { | 1054 | { |
1055 | if (ok) *ok = false; | 1055 | if (ok) *ok = false; |
1056 | return 0.0; | 1056 | return 0.0; |
1057 | } | 1057 | } |
1058 | 1058 | ||
1059 | QString tot; | 1059 | QString tot; |
1060 | if (neg) tot = '-'; | 1060 | if (neg) tot = '-'; |
1061 | 1061 | ||
1062 | tot += major + '.' + minor + exponentialPart; | 1062 | tot += major + '.' + minor + exponentialPart; |
1063 | 1063 | ||
1064 | return tot.toDouble(ok); | 1064 | return tot.toDouble(ok); |
1065 | } | 1065 | } |
1066 | QString KLocale::decimalSymbol() const | 1066 | QString KLocale::decimalSymbol() const |
1067 | { | 1067 | { |
1068 | 1068 | ||
1069 | return m_decimalSymbol; | 1069 | return m_decimalSymbol; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | QString KLocale::thousandsSeparator() const | 1072 | QString KLocale::thousandsSeparator() const |
1073 | { | 1073 | { |
1074 | 1074 | ||
1075 | return m_thousandsSeparator; | 1075 | return m_thousandsSeparator; |
1076 | } | 1076 | } |
1077 | QString KLocale::positiveSign() const | 1077 | QString KLocale::positiveSign() const |
1078 | { | 1078 | { |
1079 | return m_positiveSign; | 1079 | return m_positiveSign; |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | QString KLocale::negativeSign() const | 1082 | QString KLocale::negativeSign() const |
1083 | { | 1083 | { |
1084 | return m_negativeSign; | 1084 | return m_negativeSign; |
1085 | } | 1085 | } |