From 9cb8b3c59ea2932b407c144529eb7a8375222baa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sandro=20Knau=C3=9F?= Date: Mon, 4 Feb 2019 14:57:11 +0000 Subject: [PATCH 1/1] Import kcontacts_18.08.3.orig.tar.xz [dgit import orig kcontacts_18.08.3.orig.tar.xz] --- .arcconfig | 3 + .gitignore | 21 + .krazy | 1 + CMakeLists.txt | 80 + COPYING.LIB | 510 +++ KF5ContactsConfig.cmake.in | 5 + README | 28 + README.AddressFormat | 66 + README.md | 3 + autotests/CMakeLists.txt | 47 + autotests/addresseetest.cpp | 480 +++ autotests/addresseetest.h | 44 + autotests/addresstest.cpp | 437 ++ autotests/addresstest.h | 48 + autotests/birthdaytest.cpp | 231 ++ autotests/birthdaytest.h | 45 + autotests/calendarurltest.cpp | 304 ++ autotests/calendarurltest.h | 47 + autotests/clientpidmaptest.cpp | 240 ++ autotests/clientpidmaptest.h | 46 + autotests/contactgrouptest.cpp | 385 ++ autotests/customidentifiertest.cpp | 121 + autotests/customidentifiertest.h | 39 + autotests/data/testfullvcard.vcf | 33 + autotests/data/testfullvcard.vcf.ref | 33 + autotests/data/v4_0.vcard1.vcf.ref | 15 + autotests/data/v4_0.vcard2.vcf.ref | 12 + autotests/data/v4_0.vcard3.vcf.ref | 12 + autotests/data/v4_0.vcard4.vcf.ref | 14 + autotests/data/v4_0.vcard5.vcf.ref | 313 ++ autotests/data/v4_0.vcard6.vcf.ref | 10 + autotests/data/v4_0.vcard7.vcf.ref | 8 + autotests/data/v4_0.vcard8.vcf.ref | 8 + autotests/data/vcard1.vcf | 14 + autotests/data/vcard1.vcf.2_1ref | 14 + autotests/data/vcard1.vcf.ref | 15 + autotests/data/vcard10.vcf | 56 + autotests/data/vcard10.vcf.ref | 53 + autotests/data/vcard11.vcf | 10 + autotests/data/vcard11.vcf.ref | 10 + autotests/data/vcard12.vcf | 15 + autotests/data/vcard12.vcf.2_1ref | Bin 0 -> 555 bytes autotests/data/vcard12.vcf.ref | 16 + autotests/data/vcard13.vcf | 12 + autotests/data/vcard13.vcf.ref | 12 + autotests/data/vcard14.vcf | 12 + autotests/data/vcard14.vcf.2_1ref | 11 + autotests/data/vcard14.vcf.ref | 12 + autotests/data/vcard15.vcf | 10 + autotests/data/vcard15.vcf.ref | 11 + autotests/data/vcard2.vcf | 12 + autotests/data/vcard2.vcf.2_1ref | 12 + autotests/data/vcard2.vcf.ref | 12 + autotests/data/vcard3.vcf | 12 + autotests/data/vcard3.vcf.2_1ref | 12 + autotests/data/vcard3.vcf.ref | 12 + autotests/data/vcard4.vcf | 14 + autotests/data/vcard4.vcf.ref | 14 + autotests/data/vcard5.vcf | 313 ++ autotests/data/vcard5.vcf.ref | 312 ++ autotests/data/vcard6.vcf | 10 + autotests/data/vcard6.vcf.2_1ref | 9 + autotests/data/vcard6.vcf.ref | 10 + autotests/data/vcard7.vcf | 7 + autotests/data/vcard7.vcf.2_1ref | 8 + autotests/data/vcard7.vcf.ref | 8 + autotests/data/vcard8.vcf | 8 + autotests/data/vcard8.vcf.ref | 8 + autotests/data/vcard9.vcf | 14 + autotests/data/vcard9.vcf.ref | 14 + autotests/datetimetest.cpp | 174 + autotests/datetimetest.h | 39 + autotests/emailtest.cpp | 185 + autotests/emailtest.h | 45 + autotests/fieldgrouptest.cpp | 263 ++ autotests/fieldgrouptest.h | 46 + autotests/gendertest.cpp | 256 ++ autotests/gendertest.h | 51 + autotests/geotest.cpp | 205 + autotests/geotest.h | 44 + autotests/importexportvcardtest.cpp | 224 + autotests/importexportvcardtest.h | 39 + autotests/impptest.cpp | 323 ++ autotests/impptest.h | 52 + autotests/keytest.cpp | 186 + autotests/keytest.h | 43 + autotests/langtest.cpp | 240 ++ autotests/langtest.h | 46 + autotests/ldifconvertertest.cpp | 548 +++ autotests/ldifconvertertest.h | 59 + autotests/nicknametest.cpp | 243 ++ autotests/nicknametest.h | 46 + autotests/orgtest.cpp | 286 ++ autotests/orgtest.h | 48 + autotests/phonenumbertest.cpp | 328 ++ autotests/phonenumbertest.h | 48 + autotests/picturetest.cpp | 267 ++ autotests/picturetest.h | 49 + autotests/relatedtest.cpp | 262 ++ autotests/relatedtest.h | 47 + autotests/resourcelocatorurltest.cpp | 225 + autotests/resourcelocatorurltest.h | 45 + autotests/roletest.cpp | 243 ++ autotests/roletest.h | 46 + autotests/secrecytest.cpp | 86 + autotests/secrecytest.h | 39 + autotests/soundtest.cpp | 262 ++ autotests/soundtest.h | 47 + autotests/testlock.h | 52 + autotests/testroundtrip.cpp | 178 + autotests/testroundtrip.qrc | 65 + autotests/timezonetest.cpp | 137 + autotests/timezonetest.h | 41 + autotests/titletest.cpp | 264 ++ autotests/titletest.h | 47 + autotests/vcarddragtest.cpp | 182 + autotests/vcardlinetest.cpp | 127 + autotests/vcardlinetest.h | 39 + autotests/vcardtool_benchmark.cpp | 78 + autotests/vcardtool_benchmark.h | 37 + kcontacts.categories | 1 + kcontacts.renamecategories | 1 + metainfo.yaml | 16 + po/ar/kcontacts5.po | 745 ++++ po/ast/kcontacts5.po | 584 +++ po/bs/kcontacts5.po | 744 ++++ po/ca/kcontacts5.po | 741 ++++ po/ca@valencia/kcontacts5.po | 741 ++++ po/cs/kcontacts5.po | 585 +++ po/da/kcontacts5.po | 742 ++++ po/de/kcontacts5.po | 744 ++++ po/el/kcontacts5.po | 746 ++++ po/en_GB/kcontacts5.po | 591 +++ po/eo/kcontacts5.po | 627 +++ po/es/kcontacts5.po | 590 +++ po/et/kcontacts5.po | 740 ++++ po/fi/kcontacts5.po | 596 +++ po/fr/kcontacts5.po | 767 ++++ po/ga/kcontacts5.po | 742 ++++ po/gl/kcontacts5.po | 758 ++++ po/hi/kcontacts5.po | 809 ++++ po/hu/kcontacts5.po | 742 ++++ po/ia/kcontacts5.po | 743 ++++ po/it/kcontacts5.po | 746 ++++ po/ja/kcontacts5.po | 585 +++ po/kk/kcontacts5.po | 741 ++++ po/km/kcontacts5.po | 745 ++++ po/ko/kcontacts5.po | 739 ++++ po/lt/kcontacts5.po | 593 +++ po/lv/kcontacts5.po | 745 ++++ po/mr/kcontacts5.po | 642 +++ po/nb/kcontacts5.po | 587 +++ po/nds/kcontacts5.po | 594 +++ po/nl/kcontacts5.po | 748 ++++ po/nn/kcontacts5.po | 587 +++ po/pa/kcontacts5.po | 741 ++++ po/pl/kcontacts5.po | 592 +++ po/pt/kcontacts5.po | 584 +++ po/pt_BR/kcontacts5.po | 590 +++ po/ro/kcontacts5.po | 746 ++++ po/ru/kcontacts5.po | 750 ++++ po/sk/kcontacts5.po | 589 +++ po/sl/kcontacts5.po | 746 ++++ po/sr/kcontacts5.po | 606 +++ po/sv/kcontacts5.po | 740 ++++ po/tr/kcontacts5.po | 745 ++++ po/ug/kcontacts5.po | 652 +++ po/uk/kcontacts5.po | 594 +++ po/zh_CN/kcontacts5.po | 588 +++ po/zh_TW/kcontacts5.po | 587 +++ src/CMakeLists.txt | 131 + src/Messages.sh | 2 + src/address.cpp | 737 ++++ src/address.h | 351 ++ src/addressee.cpp | 2575 ++++++++++++ src/addressee.h | 1095 +++++ src/addresseehelper.cpp | 119 + src/addresseehelper.h | 119 + src/addresseelist.cpp | 361 ++ src/addresseelist.h | 420 ++ src/addressformatrc | 149 + src/calendarurl.cpp | 177 + src/calendarurl.h | 82 + src/clientpidmap.cpp | 137 + src/clientpidmap.h | 69 + src/contactgroup.cpp | 507 +++ src/contactgroup.h | 487 +++ src/contactgroup.xsd | 76 + src/contactgrouptool.cpp | 369 ++ src/contactgrouptool.h | 67 + src/converter/CMakeLists.txt | 22 + src/converter/ldifconverter.cpp | 638 +++ src/converter/ldifconverter.h | 89 + src/converter/vcardconverter.cpp | 148 + src/converter/vcardconverter.h | 155 + src/countrytransl.map | 5685 ++++++++++++++++++++++++++ src/email.cpp | 138 + src/email.h | 74 + src/field.cpp | 658 +++ src/field.h | 234 ++ src/fieldgroup.cpp | 150 + src/fieldgroup.h | 73 + src/gender.cpp | 128 + src/gender.h | 70 + src/geo.cpp | 174 + src/geo.h | 139 + src/impp.cpp | 193 + src/impp.h | 94 + src/kcontacts.qrc | 6 + src/key.cpp | 243 ++ src/key.h | 183 + src/lang.cpp | 137 + src/lang.h | 69 + src/ldapdn.cpp | 214 + src/ldapdn_p.h | 84 + src/ldif.cpp | 447 ++ src/ldif_p.h | 191 + src/nickname.cpp | 137 + src/nickname.h | 69 + src/note.cpp | 137 + src/note.h | 69 + src/org.cpp | 137 + src/org.h | 69 + src/phonenumber.cpp | 296 ++ src/phonenumber.h | 234 ++ src/picture.cpp | 247 ++ src/picture.h | 202 + src/related.cpp | 137 + src/related.h | 66 + src/resourcelocatorurl.cpp | 132 + src/resourcelocatorurl.h | 73 + src/role.cpp | 137 + src/role.h | 69 + src/secrecy.cpp | 160 + src/secrecy.h | 124 + src/sortmode.cpp | 114 + src/sortmode.h | 134 + src/sound.cpp | 169 + src/sound.h | 181 + src/timezone.cpp | 133 + src/timezone.h | 105 + src/title.cpp | 137 + src/title.h | 69 + src/vcarddrag.cpp | 93 + src/vcarddrag.h | 97 + src/vcardparser/CMakeLists.txt | 10 + src/vcardparser/vcard.cpp | 121 + src/vcardparser/vcard.h | 89 + src/vcardparser/vcardline.cpp | 149 + src/vcardparser/vcardline.h | 133 + src/vcardparser/vcardparser.cpp | 501 +++ src/vcardparser/vcardparser.h | 44 + src/vcardtool.cpp | 1617 ++++++++ src/vcardtool.h | 93 + tests/CMakeLists.txt | 22 + tests/README.testing | 12 + tests/checkvcard.pl | 79 + tests/testread.cpp | 73 + tests/testread2.cpp | 61 + tests/testutils.cpp | 117 + tests/testutils.h | 36 + tests/testwrite.cpp | 122 + 262 files changed, 69194 insertions(+) create mode 100644 .arcconfig create mode 100644 .gitignore create mode 100644 .krazy create mode 100644 CMakeLists.txt create mode 100644 COPYING.LIB create mode 100644 KF5ContactsConfig.cmake.in create mode 100644 README create mode 100644 README.AddressFormat create mode 100644 README.md create mode 100644 autotests/CMakeLists.txt create mode 100644 autotests/addresseetest.cpp create mode 100644 autotests/addresseetest.h create mode 100644 autotests/addresstest.cpp create mode 100644 autotests/addresstest.h create mode 100644 autotests/birthdaytest.cpp create mode 100644 autotests/birthdaytest.h create mode 100644 autotests/calendarurltest.cpp create mode 100644 autotests/calendarurltest.h create mode 100644 autotests/clientpidmaptest.cpp create mode 100644 autotests/clientpidmaptest.h create mode 100644 autotests/contactgrouptest.cpp create mode 100644 autotests/customidentifiertest.cpp create mode 100644 autotests/customidentifiertest.h create mode 100644 autotests/data/testfullvcard.vcf create mode 100644 autotests/data/testfullvcard.vcf.ref create mode 100644 autotests/data/v4_0.vcard1.vcf.ref create mode 100644 autotests/data/v4_0.vcard2.vcf.ref create mode 100644 autotests/data/v4_0.vcard3.vcf.ref create mode 100644 autotests/data/v4_0.vcard4.vcf.ref create mode 100644 autotests/data/v4_0.vcard5.vcf.ref create mode 100644 autotests/data/v4_0.vcard6.vcf.ref create mode 100644 autotests/data/v4_0.vcard7.vcf.ref create mode 100644 autotests/data/v4_0.vcard8.vcf.ref create mode 100644 autotests/data/vcard1.vcf create mode 100644 autotests/data/vcard1.vcf.2_1ref create mode 100644 autotests/data/vcard1.vcf.ref create mode 100644 autotests/data/vcard10.vcf create mode 100644 autotests/data/vcard10.vcf.ref create mode 100644 autotests/data/vcard11.vcf create mode 100644 autotests/data/vcard11.vcf.ref create mode 100644 autotests/data/vcard12.vcf create mode 100644 autotests/data/vcard12.vcf.2_1ref create mode 100644 autotests/data/vcard12.vcf.ref create mode 100644 autotests/data/vcard13.vcf create mode 100644 autotests/data/vcard13.vcf.ref create mode 100644 autotests/data/vcard14.vcf create mode 100644 autotests/data/vcard14.vcf.2_1ref create mode 100644 autotests/data/vcard14.vcf.ref create mode 100644 autotests/data/vcard15.vcf create mode 100644 autotests/data/vcard15.vcf.ref create mode 100644 autotests/data/vcard2.vcf create mode 100644 autotests/data/vcard2.vcf.2_1ref create mode 100644 autotests/data/vcard2.vcf.ref create mode 100644 autotests/data/vcard3.vcf create mode 100644 autotests/data/vcard3.vcf.2_1ref create mode 100644 autotests/data/vcard3.vcf.ref create mode 100644 autotests/data/vcard4.vcf create mode 100644 autotests/data/vcard4.vcf.ref create mode 100644 autotests/data/vcard5.vcf create mode 100644 autotests/data/vcard5.vcf.ref create mode 100644 autotests/data/vcard6.vcf create mode 100644 autotests/data/vcard6.vcf.2_1ref create mode 100644 autotests/data/vcard6.vcf.ref create mode 100644 autotests/data/vcard7.vcf create mode 100644 autotests/data/vcard7.vcf.2_1ref create mode 100644 autotests/data/vcard7.vcf.ref create mode 100644 autotests/data/vcard8.vcf create mode 100644 autotests/data/vcard8.vcf.ref create mode 100644 autotests/data/vcard9.vcf create mode 100644 autotests/data/vcard9.vcf.ref create mode 100644 autotests/datetimetest.cpp create mode 100644 autotests/datetimetest.h create mode 100644 autotests/emailtest.cpp create mode 100644 autotests/emailtest.h create mode 100644 autotests/fieldgrouptest.cpp create mode 100644 autotests/fieldgrouptest.h create mode 100644 autotests/gendertest.cpp create mode 100644 autotests/gendertest.h create mode 100644 autotests/geotest.cpp create mode 100644 autotests/geotest.h create mode 100644 autotests/importexportvcardtest.cpp create mode 100644 autotests/importexportvcardtest.h create mode 100644 autotests/impptest.cpp create mode 100644 autotests/impptest.h create mode 100644 autotests/keytest.cpp create mode 100644 autotests/keytest.h create mode 100644 autotests/langtest.cpp create mode 100644 autotests/langtest.h create mode 100644 autotests/ldifconvertertest.cpp create mode 100644 autotests/ldifconvertertest.h create mode 100644 autotests/nicknametest.cpp create mode 100644 autotests/nicknametest.h create mode 100644 autotests/orgtest.cpp create mode 100644 autotests/orgtest.h create mode 100644 autotests/phonenumbertest.cpp create mode 100644 autotests/phonenumbertest.h create mode 100644 autotests/picturetest.cpp create mode 100644 autotests/picturetest.h create mode 100644 autotests/relatedtest.cpp create mode 100644 autotests/relatedtest.h create mode 100644 autotests/resourcelocatorurltest.cpp create mode 100644 autotests/resourcelocatorurltest.h create mode 100644 autotests/roletest.cpp create mode 100644 autotests/roletest.h create mode 100644 autotests/secrecytest.cpp create mode 100644 autotests/secrecytest.h create mode 100644 autotests/soundtest.cpp create mode 100644 autotests/soundtest.h create mode 100644 autotests/testlock.h create mode 100644 autotests/testroundtrip.cpp create mode 100644 autotests/testroundtrip.qrc create mode 100644 autotests/timezonetest.cpp create mode 100644 autotests/timezonetest.h create mode 100644 autotests/titletest.cpp create mode 100644 autotests/titletest.h create mode 100644 autotests/vcarddragtest.cpp create mode 100644 autotests/vcardlinetest.cpp create mode 100644 autotests/vcardlinetest.h create mode 100644 autotests/vcardtool_benchmark.cpp create mode 100644 autotests/vcardtool_benchmark.h create mode 100644 kcontacts.categories create mode 100644 kcontacts.renamecategories create mode 100644 metainfo.yaml create mode 100644 po/ar/kcontacts5.po create mode 100644 po/ast/kcontacts5.po create mode 100644 po/bs/kcontacts5.po create mode 100644 po/ca/kcontacts5.po create mode 100644 po/ca@valencia/kcontacts5.po create mode 100644 po/cs/kcontacts5.po create mode 100644 po/da/kcontacts5.po create mode 100644 po/de/kcontacts5.po create mode 100644 po/el/kcontacts5.po create mode 100644 po/en_GB/kcontacts5.po create mode 100644 po/eo/kcontacts5.po create mode 100644 po/es/kcontacts5.po create mode 100644 po/et/kcontacts5.po create mode 100644 po/fi/kcontacts5.po create mode 100644 po/fr/kcontacts5.po create mode 100644 po/ga/kcontacts5.po create mode 100644 po/gl/kcontacts5.po create mode 100644 po/hi/kcontacts5.po create mode 100644 po/hu/kcontacts5.po create mode 100644 po/ia/kcontacts5.po create mode 100644 po/it/kcontacts5.po create mode 100644 po/ja/kcontacts5.po create mode 100644 po/kk/kcontacts5.po create mode 100644 po/km/kcontacts5.po create mode 100644 po/ko/kcontacts5.po create mode 100644 po/lt/kcontacts5.po create mode 100644 po/lv/kcontacts5.po create mode 100644 po/mr/kcontacts5.po create mode 100644 po/nb/kcontacts5.po create mode 100644 po/nds/kcontacts5.po create mode 100644 po/nl/kcontacts5.po create mode 100644 po/nn/kcontacts5.po create mode 100644 po/pa/kcontacts5.po create mode 100644 po/pl/kcontacts5.po create mode 100644 po/pt/kcontacts5.po create mode 100644 po/pt_BR/kcontacts5.po create mode 100644 po/ro/kcontacts5.po create mode 100644 po/ru/kcontacts5.po create mode 100644 po/sk/kcontacts5.po create mode 100644 po/sl/kcontacts5.po create mode 100644 po/sr/kcontacts5.po create mode 100644 po/sv/kcontacts5.po create mode 100644 po/tr/kcontacts5.po create mode 100644 po/ug/kcontacts5.po create mode 100644 po/uk/kcontacts5.po create mode 100644 po/zh_CN/kcontacts5.po create mode 100644 po/zh_TW/kcontacts5.po create mode 100644 src/CMakeLists.txt create mode 100644 src/Messages.sh create mode 100644 src/address.cpp create mode 100644 src/address.h create mode 100644 src/addressee.cpp create mode 100644 src/addressee.h create mode 100644 src/addresseehelper.cpp create mode 100644 src/addresseehelper.h create mode 100644 src/addresseelist.cpp create mode 100644 src/addresseelist.h create mode 100644 src/addressformatrc create mode 100644 src/calendarurl.cpp create mode 100644 src/calendarurl.h create mode 100644 src/clientpidmap.cpp create mode 100644 src/clientpidmap.h create mode 100644 src/contactgroup.cpp create mode 100644 src/contactgroup.h create mode 100644 src/contactgroup.xsd create mode 100644 src/contactgrouptool.cpp create mode 100644 src/contactgrouptool.h create mode 100644 src/converter/CMakeLists.txt create mode 100644 src/converter/ldifconverter.cpp create mode 100644 src/converter/ldifconverter.h create mode 100644 src/converter/vcardconverter.cpp create mode 100644 src/converter/vcardconverter.h create mode 100644 src/countrytransl.map create mode 100644 src/email.cpp create mode 100644 src/email.h create mode 100644 src/field.cpp create mode 100644 src/field.h create mode 100644 src/fieldgroup.cpp create mode 100644 src/fieldgroup.h create mode 100644 src/gender.cpp create mode 100644 src/gender.h create mode 100644 src/geo.cpp create mode 100644 src/geo.h create mode 100644 src/impp.cpp create mode 100644 src/impp.h create mode 100644 src/kcontacts.qrc create mode 100644 src/key.cpp create mode 100644 src/key.h create mode 100644 src/lang.cpp create mode 100644 src/lang.h create mode 100644 src/ldapdn.cpp create mode 100644 src/ldapdn_p.h create mode 100644 src/ldif.cpp create mode 100644 src/ldif_p.h create mode 100644 src/nickname.cpp create mode 100644 src/nickname.h create mode 100644 src/note.cpp create mode 100644 src/note.h create mode 100644 src/org.cpp create mode 100644 src/org.h create mode 100644 src/phonenumber.cpp create mode 100644 src/phonenumber.h create mode 100644 src/picture.cpp create mode 100644 src/picture.h create mode 100644 src/related.cpp create mode 100644 src/related.h create mode 100644 src/resourcelocatorurl.cpp create mode 100644 src/resourcelocatorurl.h create mode 100644 src/role.cpp create mode 100644 src/role.h create mode 100644 src/secrecy.cpp create mode 100644 src/secrecy.h create mode 100644 src/sortmode.cpp create mode 100644 src/sortmode.h create mode 100644 src/sound.cpp create mode 100644 src/sound.h create mode 100644 src/timezone.cpp create mode 100644 src/timezone.h create mode 100644 src/title.cpp create mode 100644 src/title.h create mode 100644 src/vcarddrag.cpp create mode 100644 src/vcarddrag.h create mode 100644 src/vcardparser/CMakeLists.txt create mode 100644 src/vcardparser/vcard.cpp create mode 100644 src/vcardparser/vcard.h create mode 100644 src/vcardparser/vcardline.cpp create mode 100644 src/vcardparser/vcardline.h create mode 100644 src/vcardparser/vcardparser.cpp create mode 100644 src/vcardparser/vcardparser.h create mode 100644 src/vcardtool.cpp create mode 100644 src/vcardtool.h create mode 100644 tests/CMakeLists.txt create mode 100644 tests/README.testing create mode 100755 tests/checkvcard.pl create mode 100644 tests/testread.cpp create mode 100644 tests/testread2.cpp create mode 100644 tests/testutils.cpp create mode 100644 tests/testutils.h create mode 100644 tests/testwrite.cpp diff --git a/.arcconfig b/.arcconfig new file mode 100644 index 0000000..3ff2b47 --- /dev/null +++ b/.arcconfig @@ -0,0 +1,3 @@ +{ + "phabricator.uri": "https://phabricator.kde.org/project/profile/34/" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7032c32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Ignore the following files +*~ +*.[oa] +*.diff +*.kate-swp +*.kdev4 +.kdev_include_paths +*.kdevelop.pcs +*.moc +*.moc.cpp +*.orig +*.user +.*.swp +.swp.* +Doxyfile +Makefile +avail +random_seed +/build/ +CMakeLists.txt.user* +*.unc-backup* diff --git a/.krazy b/.krazy new file mode 100644 index 0000000..80b3c47 --- /dev/null +++ b/.krazy @@ -0,0 +1 @@ +SKIP /scripts/|/tests/|/testroundtrip diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9dcfae4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,80 @@ +cmake_minimum_required(VERSION 3.0) +set(PIM_VERSION "5.9.3") + +project(KContacts VERSION ${PIM_VERSION}) + +# ECM setup +set(QT_REQUIRED_VERSION "5.9.0") +set(KF5_VERSION "5.47.0") + +find_package(ECM ${KF5_VERSION} CONFIG REQUIRED) +set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${KContacts_SOURCE_DIR}/cmake) +set(CMAKE_AUTORCC ON) + +include(GenerateExportHeader) +include(ECMGenerateHeaders) +include(ECMGeneratePriFile) +include(CMakePackageConfigHelpers) +include(ECMSetupVersion) +include(FeatureSummary) +include(KDEInstallDirs) +include(KDECMakeSettings) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) +include(ECMQtDeclareLoggingCategory) +include(ECMCoverageOption) + + + +set(KCONTACTS_LIB_VERSION ${PIM_VERSION}) + +ecm_setup_version(PROJECT VARIABLE_PREFIX KContacts + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kcontacts_version.h" + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5ContactsConfigVersion.cmake" + SOVERSION 5 +) + +########### Find packages ########### +find_package(Qt5 ${QT_REQUIRED_VERSION} REQUIRED COMPONENTS Gui) +find_package(KF5 ${KF5_VERSION} REQUIRED COMPONENTS CoreAddons I18n Config Codecs) + +########### Targets ########### + +add_definitions(-DTRANSLATION_DOMAIN=\"kcontacts5\") +add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") +add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000) +add_definitions(-DQT_NO_URL_CAST_FROM_STRING) +add_subdirectory(src) + +if(BUILD_TESTING) + add_subdirectory(autotests) + add_subdirectory(tests) +endif() + +########### CMake Config Files ########### +set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Contacts") + +configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/KF5ContactsConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/KF5ContactsConfig.cmake" + INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/KF5ContactsConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/KF5ContactsConfigVersion.cmake" + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + COMPONENT Devel +) + +install(EXPORT KF5ContactsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5ContactsTargets.cmake NAMESPACE KF5::) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/kcontacts_version.h + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel +) + +install( FILES kcontacts.renamecategories kcontacts.categories DESTINATION ${KDE_INSTALL_CONFDIR} ) + +feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) +ki18n_install(po) diff --git a/COPYING.LIB b/COPYING.LIB new file mode 100644 index 0000000..2d2d780 --- /dev/null +++ b/COPYING.LIB @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/KF5ContactsConfig.cmake.in b/KF5ContactsConfig.cmake.in new file mode 100644 index 0000000..3af115c --- /dev/null +++ b/KF5ContactsConfig.cmake.in @@ -0,0 +1,5 @@ +@PACKAGE_INIT@ +include(CMakeFindDependencyMacro) +find_dependency(KF5CoreAddons "@KF5_VERSION@") + +include("${CMAKE_CURRENT_LIST_DIR}/KF5ContactsTargets.cmake") diff --git a/README b/README new file mode 100644 index 0000000..5376317 --- /dev/null +++ b/README @@ -0,0 +1,28 @@ +KContacts - new address book API for KDE + +PURPOSE: + +KCcontacts provides an API for address book data. This can be used by all +application using data of this type, e.g. KAddressBook, KMail, KOrganizer, +etc. + +FEATURES: + +- Value based interface, addressbook entry data is implicitly shared. +- Address book entries are identified by a unique id. +- vCard backend (RFC 2425 / RFC 2426). +- Locking mechanism to support concurrent access to the address book by + multiple processes. +- Notification on change of addressbook by other process. +- Dialog for selecting address book entries, supports mouse and keyboard + selection, supports automatic name completion. +- GUI client for viewing, modifying address book data. This is aimed at + developers not end users. +- Tool for converting data, written with libkab, to libkabc format. +- Multiple backends (resources) for storing entries e.g. LDAP + +AUTHOR: Cornelius Schumacher + +LICENCE: LGPL + +DATE: 13 Oct 2001 diff --git a/README.AddressFormat b/README.AddressFormat new file mode 100644 index 0000000..6c53f5c --- /dev/null +++ b/README.AddressFormat @@ -0,0 +1,66 @@ +Address formats can be a tricky thing. KContacts tries very hard to perfectly fit +the needs of ~95% of users and to be at least sufficient for the other 5%. + +The formatting of an address depends on the destination country as well as on +the origin country of a letter. Basically, the part indicating the destination +country follows the rules of the country of origin, all the rest follows the +rules of the destination country. So we need to store for every country a) the +country positioning and b) the address formatting. + +Address formats should usually be stored in a country's entry.desktop. There we +store the country position in field "AddressCountryPosition" and the address +format in a field "AddressFormat". Note that for most countries one field +"AddressFormat" is sufficient for personal as well as company addresses +(because personal addresses look just like business addresses without company); +however, in some countries (eg. Hungary) business addresses differ in their +structure. In this case you have the possibility of adding another field +"BusinessAddressFormat" which will be preferred for formatting of business +addresses; if KContacts can't find such a field, it will fall back to +"AddressFormat". (Please use BusinessAddressFormat ONLY if you really need to) + +The format consists mainly of tags that will be replaced by address fields. +The list of tags may grow in the future, the format *might* change in the near +future, but I hope not. + +Any comments very very welcome to kde-pim@kde.org or to jost@schenck.de. + +-Jost. + +Fields AddressFormat and BusinessAddressFormat +------------------------------------------------ +%n = real name +%N = REAL NAME +%cm = company +%CM = COMPANY +%s = street +%S = STREET +%z = zip code +%l = location +%L = LOCATION +%r = region +%R = REGION +%p = post office box +%, = conditional comma+whitespace, + will be left out if the value left or right of it is purged +%w = conditional whitespace, + will be left out if the value left or right of it is purged +%0(...) = the text inside the brackets will be completely purged if not + at least one tag inside it evaluates to something. Example: when the + address doesn't have a postbox, the string %0(PO Box %p) will not + evaluate to "PO Box " but to an empty string. +\n = newline + +Field AddressCountryPosition +------------------------------------------------ +below = country name below rest of address +BELOW = country name below in capital letters +above = country name above rest of address +ABOVE = country name above in capital letters + +Some Tips +------------------------------------------------ +- You sometimes have three fields in a line which can all be empty. If you eg. +separate them all with conditional whitespace (same goes for cond. comma) like +in "%z%w%r%w%l" and only the middle value (here: region) is empty, there will +be no whitespace at all between the outer values (here: zipcode and location). +To avoid this, combine two of these values with purge brackets: %0(%z%w%r)%w%l. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6d88886 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# KContact + +KContact library provides vcard support diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt new file mode 100644 index 0000000..496fd82 --- /dev/null +++ b/autotests/CMakeLists.txt @@ -0,0 +1,47 @@ +include(ECMAddTests) + +set(QT_REQUIRED_VERSION "5.9.0") +find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED) + +########### next target ############### + +set(testroundtrip_srcs testroundtrip.cpp) +qt5_add_resources(testroundtrip_srcs testroundtrip.qrc) +add_executable(testroundtrip ${testroundtrip_srcs}) +add_test(NAME kcontacts-testroundtrip COMMAND testroundtrip) +target_link_libraries(testroundtrip KF5Contacts Qt5::Test) + +ecm_add_tests(birthdaytest.cpp + addresseetest.cpp + impptest.cpp + emailtest.cpp + addresstest.cpp + geotest.cpp + keytest.cpp + phonenumbertest.cpp + secrecytest.cpp + soundtest.cpp + timezonetest.cpp + contactgrouptest.cpp + vcarddragtest.cpp + langtest.cpp gendertest.cpp + calendarurltest.cpp + ldifconvertertest.cpp + relatedtest.cpp + resourcelocatorurltest.cpp + customidentifiertest.cpp + vcardlinetest.cpp + fieldgrouptest.cpp + importexportvcardtest.cpp + titletest.cpp + nicknametest.cpp + roletest.cpp + orgtest.cpp + datetimetest.cpp + clientpidmaptest.cpp + vcardtool_benchmark.cpp + NAME_PREFIX "kcontacts-" LINK_LIBRARIES KF5Contacts Qt5::Test KF5::ConfigCore) + +ecm_add_tests(picturetest.cpp + NAME_PREFIX "kcontacts-" LINK_LIBRARIES KF5Contacts Qt5::Test KF5::ConfigCore Qt5::Gui) + diff --git a/autotests/addresseetest.cpp b/autotests/addresseetest.cpp new file mode 100644 index 0000000..362465c --- /dev/null +++ b/autotests/addresseetest.cpp @@ -0,0 +1,480 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +//krazy:excludeall=contractions + +#include "addresseetest.h" +#include "kcontacts/addressee.h" +#include + +QTEST_MAIN(AddresseeTest) + +void AddresseeTest::emptyTest() +{ + KContacts::Addressee addressee; + QVERIFY(addressee.isEmpty()); + + KContacts::Addressee addresseeWithMail; + addresseeWithMail.insertEmail(QStringLiteral("foo@bar.org")); + QVERIFY(!addresseeWithMail.isEmpty()); +} + +void AddresseeTest::storeTest() +{ + KContacts::Addressee addressee; + + KContacts::Picture logo(QStringLiteral("http://scottlandyard.info/pics/logo.png")); + KContacts::Picture photo(QStringLiteral("http://scottlandyard.info/~sinclair/photo.png")); + KContacts::Sound sound(QStringLiteral("http://scottlandyard.info/~sinclair/sound.wav")); + + QStringList emails; + emails << QStringLiteral("john@sinclair.com") << QStringLiteral("ghosthunter@sinclair.com"); + + KContacts::Key::List keys; + keys << KContacts::Key(QStringLiteral("SecretKey")); + + QStringList categories; + categories << QStringLiteral("Helper") << QStringLiteral("Friend"); + + QStringList customs; + customs << QStringLiteral("X-Danger: high"); + + KContacts::Gender gender(QStringLiteral("H")); + addressee.setGender(gender); + KContacts::Lang lang(QLatin1String("lang")); + addressee.setLangs(KContacts::Lang::List() << lang); + + addressee.setUid(QStringLiteral("My uid")); + addressee.setName(QStringLiteral("John Sinclair")); + addressee.setFormattedName(QStringLiteral("Sinclair, John")); + addressee.setFamilyName(QStringLiteral("Sinclair")); + addressee.setGivenName(QStringLiteral("John")); + addressee.setAdditionalName(QStringLiteral("Bob")); + addressee.setPrefix(QStringLiteral("Sir")); + addressee.setSuffix(QStringLiteral("II")); + addressee.setNickName(QStringLiteral("ghosthunter")); + addressee.setBirthday(QDate(1982, 7, 19)); + addressee.setMailer(QStringLiteral("mutt")); + addressee.setTimeZone(KContacts::TimeZone(2)); + addressee.setGeo(KContacts::Geo(42, 23)); + addressee.setTitle(QStringLiteral("Ghost Hunter")); + addressee.setRole(QStringLiteral("Leader")); + addressee.setOrganization(QStringLiteral("Scottland Yard")); + addressee.setNote(QStringLiteral("Don't cross black deads way...")); + addressee.setProductId(QStringLiteral("ProductId45")); + addressee.setRevision(QDateTime(QDate(1982, 9, 15))); + addressee.setSortString(QStringLiteral("Name")); + KContacts::ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("www.scottlandyard.info"))); + addressee.setUrl(url); + addressee.setSecrecy(KContacts::Secrecy(KContacts::Secrecy::Public)); + addressee.setLogo(logo); + addressee.setPhoto(photo); + addressee.setSound(sound); + addressee.setEmails(emails); + addressee.setKeys(keys); + addressee.setCategories(categories); + addressee.setCustoms(customs); + addressee.setKind(QStringLiteral("foo")); + addressee.setChanged(false); + KContacts::Impp imp; + imp.setType(KContacts::Impp::GaduGadu); + imp.setAddress(QStringLiteral("foo@kde.org")); + KContacts::Impp::List listImp; + listImp << imp; + addressee.setImppList(listImp); + + QVERIFY(addressee.imppList() == listImp); + QVERIFY(addressee.langs() == (KContacts::Lang::List() << lang)); + QVERIFY(addressee.gender() == gender); + QVERIFY(addressee.uid() == QStringLiteral("My uid")); + QVERIFY(addressee.name() == QStringLiteral("John Sinclair")); + QVERIFY(addressee.formattedName() == QStringLiteral("Sinclair, John")); + QVERIFY(addressee.familyName() == QStringLiteral("Sinclair")); + QVERIFY(addressee.givenName() == QStringLiteral("John")); + QVERIFY(addressee.additionalName() == QStringLiteral("Bob")); + QVERIFY(addressee.prefix() == QStringLiteral("Sir")); + QVERIFY(addressee.suffix() == QStringLiteral("II")); + QVERIFY(addressee.nickName() == QStringLiteral("ghosthunter")); + QVERIFY(addressee.birthday().date() == QDate(1982, 7, 19)); + QVERIFY(addressee.birthday().time() == QTime(0, 0)); + QVERIFY(!addressee.birthdayHasTime()); + QVERIFY(addressee.mailer() == QStringLiteral("mutt")); + QVERIFY(addressee.timeZone() == KContacts::TimeZone(2)); + QVERIFY(addressee.geo() == KContacts::Geo(42, 23)); + QVERIFY(addressee.title() == QStringLiteral("Ghost Hunter")); + QVERIFY(addressee.role() == QStringLiteral("Leader")); + QVERIFY(addressee.organization() == QStringLiteral("Scottland Yard")); + QVERIFY(addressee.note() == QStringLiteral("Don't cross black deads way...")); + QVERIFY(addressee.productId() == QStringLiteral("ProductId45")); + QVERIFY(addressee.revision() == QDateTime(QDate(1982, 9, 15))); + QVERIFY(addressee.sortString() == QStringLiteral("Name")); + QVERIFY(addressee.url() == url); + QVERIFY(addressee.secrecy() == KContacts::Secrecy(KContacts::Secrecy::Public)); + QVERIFY(addressee.logo() == logo); + QVERIFY(addressee.photo() == photo); + QVERIFY(addressee.sound() == sound); + QVERIFY(addressee.emails() == emails); + QVERIFY(addressee.keys() == keys); + QVERIFY(addressee.categories() == categories); + QVERIFY(addressee.customs() == customs); + QVERIFY(addressee.changed() == false); + QCOMPARE(addressee.kind(), QStringLiteral("foo")); +} + +void AddresseeTest::equalsTest() +{ + KContacts::Addressee addressee1, addressee2; + + KContacts::Picture logo(QStringLiteral("http://scottlandyard.info/pics/logo.png")); + KContacts::Picture photo(QStringLiteral("http://scottlandyard.info/~sinclair/photo.png")); + KContacts::Sound sound(QStringLiteral("http://scottlandyard.info/~sinclair/sound.wav")); + + QStringList emails; + emails << QStringLiteral("john@sinclair.com") << QStringLiteral("ghosthunter@sinclair.com"); + + KContacts::Key::List keys; + keys << KContacts::Key(QStringLiteral("SecretKey")); + + QStringList categories; + categories << QStringLiteral("Helper") << QStringLiteral("Friend"); + + QStringList customs; + customs << QStringLiteral("X-Danger: high"); + + addressee1.setUid(QStringLiteral("My uid")); + addressee1.setName(QStringLiteral("John Sinclair")); + addressee1.setFormattedName(QStringLiteral("Sinclair, John")); + addressee1.setFamilyName(QStringLiteral("Sinclair")); + addressee1.setGivenName(QStringLiteral("John")); + addressee1.setAdditionalName(QStringLiteral("Bob")); + addressee1.setPrefix(QStringLiteral("Sir")); + addressee1.setSuffix(QStringLiteral("II")); + addressee1.setNickName(QStringLiteral("ghosthunter")); + addressee1.setBirthday(QDateTime(QDate(1982, 7, 19))); + addressee1.setMailer(QStringLiteral("mutt")); + addressee1.setTimeZone(KContacts::TimeZone(2)); + addressee1.setGeo(KContacts::Geo(42, 23)); + addressee1.setTitle(QStringLiteral("Ghost Hunter")); + addressee1.setRole(QStringLiteral("Leader")); + addressee1.setOrganization(QStringLiteral("Scottland Yard")); + addressee1.setNote(QStringLiteral("Don't cross black deads way...")); + addressee1.setProductId(QStringLiteral("ProductId45")); + addressee1.setRevision(QDateTime(QDate(1982, 9, 15))); + addressee1.setSortString(QStringLiteral("Name")); + KContacts::ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("www.scottlandyard.info"))); + addressee1.setUrl(url); + addressee1.setSecrecy(KContacts::Secrecy(KContacts::Secrecy::Public)); + addressee1.setLogo(logo); + addressee1.setPhoto(photo); + addressee1.setSound(sound); + addressee1.setEmails(emails); + addressee1.setKeys(keys); + addressee1.setCategories(categories); + addressee1.setCustoms(customs); + addressee1.setChanged(false); + + addressee2.setUid(QStringLiteral("My uid")); + addressee2.setName(QStringLiteral("John Sinclair")); + addressee2.setFormattedName(QStringLiteral("Sinclair, John")); + addressee2.setFamilyName(QStringLiteral("Sinclair")); + addressee2.setGivenName(QStringLiteral("John")); + addressee2.setAdditionalName(QStringLiteral("Bob")); + addressee2.setPrefix(QStringLiteral("Sir")); + addressee2.setSuffix(QStringLiteral("II")); + addressee2.setNickName(QStringLiteral("ghosthunter")); + addressee2.setBirthday(QDateTime(QDate(1982, 7, 19))); + addressee2.setMailer(QStringLiteral("mutt")); + addressee2.setTimeZone(KContacts::TimeZone(2)); + addressee2.setGeo(KContacts::Geo(42, 23)); + addressee2.setTitle(QStringLiteral("Ghost Hunter")); + addressee2.setRole(QStringLiteral("Leader")); + addressee2.setOrganization(QStringLiteral("Scottland Yard")); + addressee2.setNote(QStringLiteral("Don't cross black deads way...")); + addressee2.setProductId(QStringLiteral("ProductId45")); + addressee2.setRevision(QDateTime(QDate(1982, 9, 15))); + addressee2.setSortString(QStringLiteral("Name")); + addressee2.setUrl(url); + addressee2.setSecrecy(KContacts::Secrecy(KContacts::Secrecy::Public)); + addressee2.setLogo(logo); + addressee2.setPhoto(photo); + addressee2.setSound(sound); + addressee2.setEmails(emails); + addressee2.setKeys(keys); + addressee2.setCategories(categories); + addressee2.setCustoms(customs); + addressee2.setChanged(false); + + QVERIFY(addressee1 == addressee2); +} + +void AddresseeTest::differsTest() +{ + KContacts::Addressee addressee1, addressee2; + + addressee1.setNameFromString(QStringLiteral("John Sinclair")); + addressee2.setNameFromString(QStringLiteral("Suko")); + + QVERIFY(addressee1 != addressee2); +} + +void AddresseeTest::assignmentTest() +{ + KContacts::Addressee addressee1, addressee2; + + KContacts::Picture logo(QStringLiteral("http://scottlandyard.info/pics/logo.png")); + KContacts::Picture photo(QStringLiteral("http://scottlandyard.info/~sinclair/photo.png")); + KContacts::Sound sound(QStringLiteral("http://scottlandyard.info/~sinclair/sound.wav")); + + QStringList emails; + emails << QStringLiteral("john@sinclair.com") << QStringLiteral("ghosthunter@sinclair.com"); + + KContacts::Key::List keys; + keys << KContacts::Key(QStringLiteral("SecretKey")); + + QStringList categories; + categories << QStringLiteral("Helper") << QStringLiteral("Friend"); + + QStringList customs; + customs << QStringLiteral("X-Danger: high"); + + addressee1.setUid(QStringLiteral("My uid")); + addressee1.setName(QStringLiteral("John Sinclair")); + addressee1.setFormattedName(QStringLiteral("Sinclair, John")); + addressee1.setFamilyName(QStringLiteral("Sinclair")); + addressee1.setGivenName(QStringLiteral("John")); + addressee1.setAdditionalName(QStringLiteral("Bob")); + addressee1.setPrefix(QStringLiteral("Sir")); + addressee1.setSuffix(QStringLiteral("II")); + addressee1.setNickName(QStringLiteral("ghosthunter")); + addressee1.setBirthday(QDateTime(QDate(1982, 7, 19))); + addressee1.setMailer(QStringLiteral("mutt")); + addressee1.setTimeZone(KContacts::TimeZone(2)); + addressee1.setGeo(KContacts::Geo(42, 23)); + addressee1.setTitle(QStringLiteral("Ghost Hunter")); + addressee1.setRole(QStringLiteral("Leader")); + addressee1.setOrganization(QStringLiteral("Scottland Yard")); + addressee1.setNote(QStringLiteral("Don't cross black deads way...")); + addressee1.setProductId(QStringLiteral("ProductId45")); + addressee1.setRevision(QDateTime(QDate(1982, 9, 15))); + addressee1.setSortString(QStringLiteral("Name")); + KContacts::ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("www.scottlandyard.info"))); + addressee1.setUrl(url); + addressee1.setSecrecy(KContacts::Secrecy(KContacts::Secrecy::Public)); + addressee1.setLogo(logo); + addressee1.setPhoto(photo); + addressee1.setSound(sound); + addressee1.setEmails(emails); + addressee1.setKeys(keys); + addressee1.setCategories(categories); + addressee1.setCustoms(customs); + addressee1.setChanged(false); + + addressee2 = addressee1; + + QVERIFY(addressee1 == addressee2); +} + +void AddresseeTest::serializeTest() +{ + KContacts::Addressee addressee1, addressee2; + + KContacts::Picture logo(QStringLiteral("http://scottlandyard.info/pics/logo.png")); + KContacts::Picture photo(QStringLiteral("http://scottlandyard.info/~sinclair/photo.png")); + KContacts::Sound sound(QStringLiteral("http://scottlandyard.info/~sinclair/sound.wav")); + + QStringList emails; + emails << QStringLiteral("john@sinclair.com") << QStringLiteral("ghosthunter@sinclair.com"); + + KContacts::Key::List keys; + keys << KContacts::Key(QStringLiteral("SecretKey")); + + QStringList categories; + categories << QStringLiteral("Helper") << QStringLiteral("Friend"); + + QStringList customs; + customs << QStringLiteral("FirstApp-FirstKey:FirstValue") + << QStringLiteral("SecondApp-SecondKey:SecondValue") + << QStringLiteral("ThirdApp-ThirdKey:ThirdValue"); + + addressee1.setUid(QStringLiteral("My uid")); + addressee1.setName(QStringLiteral("John Sinclair")); + addressee1.setFormattedName(QStringLiteral("Sinclair, John")); + addressee1.setFamilyName(QStringLiteral("Sinclair")); + addressee1.setGivenName(QStringLiteral("John")); + addressee1.setAdditionalName(QStringLiteral("Bob")); + addressee1.setPrefix(QStringLiteral("Sir")); + addressee1.setSuffix(QStringLiteral("II")); + addressee1.setNickName(QStringLiteral("ghosthunter")); + addressee1.setBirthday(QDateTime(QDate(1982, 7, 19))); + addressee1.setMailer(QStringLiteral("mutt")); + addressee1.setTimeZone(KContacts::TimeZone(2)); + addressee1.setGeo(KContacts::Geo(42, 23)); + addressee1.setTitle(QStringLiteral("Ghost Hunter")); + addressee1.setRole(QStringLiteral("Leader")); + addressee1.setOrganization(QStringLiteral("Scottland Yard")); + addressee1.setNote(QStringLiteral("Don't cross black deads way...")); + addressee1.setProductId(QStringLiteral("ProductId45")); + addressee1.setRevision(QDateTime(QDate(1982, 9, 15))); + addressee1.setSortString(QStringLiteral("Name")); + KContacts::ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("www.scottlandyard.info"))); + + addressee1.setUrl(url); + addressee1.setSecrecy(KContacts::Secrecy(KContacts::Secrecy::Public)); + addressee1.setLogo(logo); + addressee1.setPhoto(photo); + addressee1.setSound(sound); + addressee1.setEmails(emails); + addressee1.setKeys(keys); + addressee1.setCategories(categories); + addressee1.setCustoms(customs); + addressee1.setChanged(false); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << addressee1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> addressee2; + + QVERIFY(addressee1 == addressee2); +} + +void AddresseeTest::fullEmailTest() +{ + KContacts::Addressee a; + QStringList emails; + emails << QStringLiteral("foo@bar.com"); + a.setEmails(emails); + a.setFormattedName(QStringLiteral("firstname \"nickname\" lastname")); + QCOMPARE(a.fullEmail(), + QStringLiteral("\"firstname \\\"nickname\\\" lastname\" ")); +} + +void AddresseeTest::nameFromStringTest() +{ + KContacts::Addressee a; + a.setNameFromString(QStringLiteral("Firstname Lastname")); + QCOMPARE(a.givenName(), QStringLiteral("Firstname")); + QCOMPARE(a.familyName(), QStringLiteral("Lastname")); + QCOMPARE(a.formattedName(), QStringLiteral("Firstname Lastname")); +} + +void AddresseeTest::customFieldsTest() +{ + KContacts::Addressee a; + + // test for empty + QVERIFY(a.customs().isEmpty()); + + // test insert + a.insertCustom(QStringLiteral("MyApp"), QStringLiteral("MyKey"), QStringLiteral("MyValue")); + QCOMPARE(a.customs().count(), 1); + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("MyKey")), QStringLiteral("MyValue")); + + a.insertCustom(QStringLiteral("MyApp"), QStringLiteral("MyKey"), QStringLiteral("YourValue")); + QCOMPARE(a.customs().count(), 1); // still one, we overwrite... + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("MyKey")), QStringLiteral("YourValue")); + + // test query non-existing app/key + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("UnknownKey")), QString()); + QCOMPARE(a.custom(QStringLiteral("UnknownApp"), QStringLiteral("MyKey")), QString()); + + // test insert with different key + a.insertCustom(QStringLiteral("MyApp"), QStringLiteral("AnotherKey"), QStringLiteral("OtherValue")); + QCOMPARE(a.customs().count(), 2); + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("AnotherKey")), QStringLiteral("OtherValue")); + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("MyKey")), QStringLiteral("YourValue")); + + // test insert with different app + a.insertCustom(QStringLiteral("OtherApp"), QStringLiteral("OtherKey"), QStringLiteral("OurValue")); + QCOMPARE(a.customs().count(), 3); + QCOMPARE(a.custom(QStringLiteral("OtherApp"), QStringLiteral("OtherKey")), QStringLiteral("OurValue")); + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("AnotherKey")), QStringLiteral("OtherValue")); + QCOMPARE(a.custom(QStringLiteral("MyApp"), QStringLiteral("MyKey")), QStringLiteral("YourValue")); + +#if 0 //Order is not defined now as we use a QHash + // test customs + QCOMPARE(a.customs().at(0), QStringLiteral("MyApp-MyKey:YourValue")); + QCOMPARE(a.customs().at(1), QStringLiteral("MyApp-AnotherKey:OtherValue")); + QCOMPARE(a.customs().at(2), QStringLiteral("OtherApp-OtherKey:OurValue")); +#endif + // test equal operator + KContacts::Addressee b; + b.setUid(a.uid()); + b.insertCustom(QStringLiteral("OtherApp"), QStringLiteral("OtherKey"), QStringLiteral("OurValue")); + b.insertCustom(QStringLiteral("MyApp"), QStringLiteral("MyKey"), QStringLiteral("YourValue")); + b.insertCustom(QStringLiteral("MyApp"), QStringLiteral("AnotherKey"), QStringLiteral("OtherValue")); + + QCOMPARE(a, b); + + b.insertCustom(QStringLiteral("MyApp"), QStringLiteral("AnotherKey"), QStringLiteral("WrongValue")); + QVERIFY(a != b); + + // test setCustoms + KContacts::Addressee c; + c.insertCustom(QStringLiteral("ThisApp"), QStringLiteral("ShouldNotBe"), QStringLiteral("There")); + QCOMPARE(c.customs().count(), 1); + + const QStringList testData = QStringList() << QStringLiteral("FirstApp-FirstKey:FirstValue") + << QStringLiteral("SecondApp-SecondKey:SecondValue") + << QStringLiteral("ThirdApp-ThirdKey:ThirdValue"); + + c.setCustoms(testData); + QCOMPARE(c.customs().count(), 3); + + QCOMPARE(c.custom(QStringLiteral("FirstApp"), QStringLiteral("FirstKey")), QStringLiteral("FirstValue")); + QCOMPARE(c.custom(QStringLiteral("SecondApp"), QStringLiteral("SecondKey")), QStringLiteral("SecondValue")); + QCOMPARE(c.custom(QStringLiteral("ThirdApp"), QStringLiteral("ThirdKey")), QStringLiteral("ThirdValue")); + + // test remove + QCOMPARE(c.customs().count(), 3); + c.removeCustom(QStringLiteral("UnknownApp"), QStringLiteral("FirstKey")); + QCOMPARE(c.customs().count(), 3); + c.removeCustom(QStringLiteral("FirstApp"), QStringLiteral("UnknownKey")); + QCOMPARE(c.customs().count(), 3); + c.removeCustom(QStringLiteral("FirstApp"), QStringLiteral("FirstKey")); + QCOMPARE(c.customs().count(), 2); +} + +void AddresseeTest::parseEmailAddress_data() +{ + QTest::addColumn("inputEmail"); + QTest::addColumn("email"); + QTest::addColumn("name"); + QTest::newRow("simpleemail") << QStringLiteral("foo@kde.org") << QStringLiteral("foo@kde.org") << QString(); + QTest::newRow("email") << QStringLiteral("foo ") << QStringLiteral("foo@kde.org") << QStringLiteral("foo"); + QTest::newRow("namewithdoublequote") << QStringLiteral("\"foo\" ") << QStringLiteral("foo@kde.org") << QStringLiteral("foo"); +} + +void AddresseeTest::parseEmailAddress() +{ + QFETCH(QString, inputEmail); + QFETCH(QString, email); + QFETCH(QString, name); + + QString parsedName; + QString parsedEmail; + KContacts::Addressee::parseEmailAddress(inputEmail, parsedName, parsedEmail); + QCOMPARE(parsedEmail, email); + QCOMPARE(parsedName, name); +} diff --git a/autotests/addresseetest.h b/autotests/addresseetest.h new file mode 100644 index 0000000..a227fdc --- /dev/null +++ b/autotests/addresseetest.h @@ -0,0 +1,44 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ADDRESSEE_TEST_H +#define ADDRESSEE_TEST_H + +#include + +class AddresseeTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void emptyTest(); + void storeTest(); + void equalsTest(); + void differsTest(); + void assignmentTest(); + void serializeTest(); + void fullEmailTest(); + void nameFromStringTest(); + void customFieldsTest(); + void parseEmailAddress_data(); + void parseEmailAddress(); +}; + +#endif diff --git a/autotests/addresstest.cpp b/autotests/addresstest.cpp new file mode 100644 index 0000000..7874c7f --- /dev/null +++ b/autotests/addresstest.cpp @@ -0,0 +1,437 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "addresstest.h" +#include "addresseelist.h" +#include "vcardtool.h" +#include "kcontacts/address.h" +#include +#include +#include +#include +#include + +QTEST_MAIN(AddressTest) +#ifndef Q_OS_WIN +void initLocale() +{ + qputenv("LC_ALL", "it_CH.utf-8"); +} + +Q_CONSTRUCTOR_FUNCTION(initLocale) +#endif + +void AddressTest::initTestCase() +{ +} + +void AddressTest::emptyTest() +{ + KContacts::Address address; + + QVERIFY(address.isEmpty()); +} + +void AddressTest::storeTest() +{ + KContacts::Address address; + + address.setId(QStringLiteral("My Id")); + address.setType(KContacts::Address::Home); + address.setPostOfficeBox(QStringLiteral("1234")); + address.setExtended(QStringLiteral("My Extended Label")); + address.setStreet(QStringLiteral("My Street")); + address.setLocality(QStringLiteral("My Locality")); + address.setRegion(QStringLiteral("My Region")); + address.setPostalCode(QStringLiteral("My PostalCode")); + address.setCountry(QStringLiteral("My Country")); + address.setLabel(QStringLiteral("My Label")); + + QCOMPARE(address.id(), QStringLiteral("My Id")); + QCOMPARE(address.type(), KContacts::Address::Home); + QCOMPARE(address.postOfficeBox(), QStringLiteral("1234")); + QCOMPARE(address.extended(), QStringLiteral("My Extended Label")); + QCOMPARE(address.street(), QStringLiteral("My Street")); + QCOMPARE(address.locality(), QStringLiteral("My Locality")); + QCOMPARE(address.region(), QStringLiteral("My Region")); + QCOMPARE(address.postalCode(), QStringLiteral("My PostalCode")); + QCOMPARE(address.country(), QStringLiteral("My Country")); + QCOMPARE(address.label(), QStringLiteral("My Label")); + QVERIFY(!address.geo().isValid()); +} + +void AddressTest::equalsTest() +{ + KContacts::Address address1, address2; + + address1.setId(QStringLiteral("My Id")); + address1.setType(KContacts::Address::Home); + address1.setPostOfficeBox(QStringLiteral("1234")); + address1.setExtended(QStringLiteral("My Extended Label")); + address1.setStreet(QStringLiteral("My Street")); + address1.setLocality(QStringLiteral("My Locality")); + address1.setRegion(QStringLiteral("My Region")); + address1.setPostalCode(QStringLiteral("My Postalcode")); + address1.setCountry(QStringLiteral("My country")); + address1.setLabel(QStringLiteral("My Label")); + + address2.setId(QStringLiteral("My Id")); + address2.setType(KContacts::Address::Home); + address2.setPostOfficeBox(QStringLiteral("1234")); + address2.setExtended(QStringLiteral("My Extended Label")); + address2.setStreet(QStringLiteral("My Street")); + address2.setLocality(QStringLiteral("My Locality")); + address2.setRegion(QStringLiteral("My Region")); + address2.setPostalCode(QStringLiteral("My Postalcode")); + address2.setCountry(QStringLiteral("My country")); + address2.setLabel(QStringLiteral("My Label")); + + QVERIFY(address1 == address2); +} + +void AddressTest::differsTest() +{ + KContacts::Address address1(KContacts::Address::Home); + KContacts::Address address2(KContacts::Address::Work); + + QVERIFY(address1 != address2); +} + +void AddressTest::assignmentTest() +{ + KContacts::Address address1, address2; + + address1.setId(QStringLiteral("My Id")); + address1.setType(KContacts::Address::Home); + address1.setPostOfficeBox(QStringLiteral("1234")); + address1.setExtended(QStringLiteral("My Extended Label")); + address1.setStreet(QStringLiteral("My Street")); + address1.setLocality(QStringLiteral("My Locality")); + address1.setRegion(QStringLiteral("My Region")); + address1.setPostalCode(QStringLiteral("My Postalcode")); + address1.setCountry(QStringLiteral("My country")); + address1.setLabel(QStringLiteral("My Label")); + + address2 = address1; + + QVERIFY(address1 == address2); +} + +void AddressTest::serializeTest() +{ + KContacts::Address address1, address2; + + address1.setType(KContacts::Address::Work); + address1.setPostOfficeBox(QStringLiteral("1234")); + address1.setExtended(QStringLiteral("My Extended Label")); + address1.setStreet(QStringLiteral("My Street")); + address1.setLocality(QStringLiteral("My Locality")); + address1.setRegion(QStringLiteral("My Region")); + address1.setPostalCode(QStringLiteral("My Postalcode")); + address1.setCountry(QStringLiteral("My country")); + address1.setLabel(QStringLiteral("My Label")); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << address1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> address2; + + QVERIFY(address1 == address2); +} + +void AddressTest::formatTest() +{ + { + // check availability of country to ISO code mapping data file + QFileInfo fileInfo(QStringLiteral(":/org.kde.kcontacts/countrytransl.map")); + QVERIFY2(fileInfo.exists(), "Country to ISO code mapping data file does not exist"); + QVERIFY2(fileInfo.isReadable(), "Country to ISO code mapping data file is not readable"); + } + + { + KContacts::Address address; + address.setStreet(QStringLiteral("Lummerlandstr. 1")); + address.setPostalCode(QStringLiteral("12345")); + address.setLocality(QStringLiteral("Lummerstadt")); + address.setCountry(QStringLiteral("Germany")); + + const QString result(QStringLiteral("Jim Knopf\nLummerlandstr. 1\n" + "12345 Lummerstadt\n\nGERMANY")); + + QCOMPARE(address.formattedAddress(QStringLiteral("Jim Knopf")), result); + } + + { + KContacts::Address address; + address.setStreet(QStringLiteral("457 Foobar Ave")); + address.setPostalCode(QStringLiteral("1A2B3C")); + address.setLocality(QStringLiteral("Nervousbreaktown")); + address.setRegion(QStringLiteral("DC")); + address.setCountry(QStringLiteral("United States of America")); + + const QString result( + QStringLiteral("Huck Finn\n457 Foobar Ave\nNervousbreaktown," + " DC 1A2B3C\n\nUNITED STATES OF AMERICA")); + QCOMPARE(address.formattedAddress(QStringLiteral("Huck Finn")), result); + } + + { + KContacts::Address address; + address.setStreet(QStringLiteral("Lummerlandstr. 1")); + address.setPostalCode(QStringLiteral("12345")); + address.setLocality(QStringLiteral("Lummerstadt")); + address.setCountry(QStringLiteral("Deutschland")); + + const QString result(QStringLiteral("Jim Knopf\nLummerlandstr. 1\n" + "12345 Lummerstadt\n\nDEUTSCHLAND")); + + QCOMPARE(address.formattedAddress(QStringLiteral("Jim Knopf")), result); + } + + { + KContacts::Address address; + address.setStreet(QStringLiteral("Lummerlandstr. 1")); + address.setPostalCode(QStringLiteral("12345")); + address.setLocality(QStringLiteral("Lummerstadt")); + address.setCountry(QString()); + + const QString result(QStringLiteral("Jim Knopf\nLummerlandstr. 1\n12345 Lummerstadt")); + + QCOMPARE(address.formattedAddress(QStringLiteral("Jim Knopf")), result); + } + + { + KContacts::Address address; + address.setStreet(QStringLiteral("Haus Randa")); + address.setPostalCode(QStringLiteral("1234")); + address.setLocality(QStringLiteral("Randa")); + address.setPostOfficeBox(QStringLiteral("5678")); + address.setCountry(QStringLiteral("Schweiz")); + + // we want the Italian variant of the Swiss format for it_CH + const QString result(QStringLiteral("Dr. Konqui\nCasella postale 5678\nHaus Randa\n1234 Randa\n\nSCHWEIZ")); + + QCOMPARE(address.formattedAddress(QStringLiteral("Dr. Konqui")), result); + } +} + +void AddressTest::shouldExportVcard3() +{ + KContacts::Address address; + + address.setId(QStringLiteral("My Id")); + address.setType(KContacts::Address::Home); + address.setPostOfficeBox(QStringLiteral("1234")); + address.setExtended(QStringLiteral("My Extended Label")); + address.setStreet(QStringLiteral("My Street")); + address.setLocality(QStringLiteral("My Locality")); + address.setRegion(QStringLiteral("My Region")); + address.setPostalCode(QStringLiteral("My Postalcode")); + address.setCountry(QStringLiteral("My country")); + address.setLabel(QStringLiteral("My Label")); + + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + addr.insertAddress(address); + lst << addr; + + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "ADR;TYPE=home:1234;My Extended Label;My Street;My Locality;My Region;My Pos\r\n" + " talcode;My country\r\n" + "EMAIL:foo@kde.org\r\n" + "LABEL;TYPE=home:My Label\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void AddressTest::shouldParseAddressVCard3() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "ADR;TYPE=home:1234;My Extended Label;My Street;My Locality;My Region;My Pos\r\n" + " talcode;My country\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "LABEL;TYPE=home:My Label\r\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).addresses().count(), 1); + KContacts::Address address = lst.at(0).addresses().at(0); + QCOMPARE(address.type(), KContacts::Address::Home); + QCOMPARE(address.postOfficeBox(), QStringLiteral("1234")); + QCOMPARE(address.extended(), QStringLiteral("My Extended Label")); + QCOMPARE(address.region(), QStringLiteral("My Region")); + QCOMPARE(address.street(), QStringLiteral("My Street")); + QCOMPARE(address.country(), QStringLiteral("My country")); + QCOMPARE(address.postalCode(), QStringLiteral("My Postalcode")); + QCOMPARE(address.label(), QStringLiteral("My Label")); +} + +void AddressTest::shouldParseAddressVCard4() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "ADR;LABEL=\"My Label\";TYPE=home:1234;My Extended Label;My Street;My Locality\r\n" + " ;My Region;My Postalcode;My country\r\nEMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).addresses().count(), 1); + KContacts::Address address = lst.at(0).addresses().at(0); + QCOMPARE(address.type(), KContacts::Address::Home); + QCOMPARE(address.postOfficeBox(), QStringLiteral("1234")); + QCOMPARE(address.extended(), QStringLiteral("My Extended Label")); + QCOMPARE(address.region(), QStringLiteral("My Region")); + QCOMPARE(address.street(), QStringLiteral("My Street")); + QCOMPARE(address.country(), QStringLiteral("My country")); + QCOMPARE(address.postalCode(), QStringLiteral("My Postalcode")); + QCOMPARE(address.label(), QStringLiteral("My Label")); +} + +void AddressTest::shouldParseAddressVCard4WithGeoPosition() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "ADR;GEO=\"geo:22.500000,45.099998\";LABEL=\"My Label\";TYPE=home:1234;My Extend\r\n" + " ed Label;My Street;My Locality;My Region;My Postalcode;My country\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).addresses().count(), 1); + KContacts::Address address = lst.at(0).addresses().at(0); + QCOMPARE(address.type(), KContacts::Address::Home); + QCOMPARE(address.postOfficeBox(), QStringLiteral("1234")); + QCOMPARE(address.extended(), QStringLiteral("My Extended Label")); + QCOMPARE(address.region(), QStringLiteral("My Region")); + QCOMPARE(address.street(), QStringLiteral("My Street")); + QCOMPARE(address.country(), QStringLiteral("My country")); + QCOMPARE(address.postalCode(), QStringLiteral("My Postalcode")); + QCOMPARE(address.label(), QStringLiteral("My Label")); + KContacts::Geo geo = address.geo(); + QVERIFY(geo.isValid()); + QCOMPARE(geo.latitude(), 22.5f); + QCOMPARE(geo.longitude(), 45.1f); +} + +void AddressTest::shouldExportVCard4WithGeoPosition() +{ + KContacts::Address address; + + address.setId(QStringLiteral("My Id")); + address.setType(KContacts::Address::Home); + address.setPostOfficeBox(QStringLiteral("1234")); + address.setExtended(QStringLiteral("My Extended Label")); + address.setStreet(QStringLiteral("My Street")); + address.setLocality(QStringLiteral("My Locality")); + address.setRegion(QStringLiteral("My Region")); + address.setPostalCode(QStringLiteral("My Postalcode")); + address.setCountry(QStringLiteral("My country")); + address.setLabel(QStringLiteral("My Label")); + + KContacts::Geo geo; + + geo.setLatitude(22.5f); + geo.setLongitude(45.1f); + address.setGeo(geo); + + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + addr.insertAddress(address); + lst << addr; + + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "ADR;GEO=\"geo:22.500000,45.099998\";LABEL=\"My Label\";TYPE=home:1234;My Extend\r\n" + " ed Label;My Street;My Locality;My Region;My Postalcode;My country\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void AddressTest::shouldExportVcard4() +{ + KContacts::Address address; + + address.setId(QStringLiteral("My Id")); + address.setType(KContacts::Address::Home); + address.setPostOfficeBox(QStringLiteral("1234")); + address.setExtended(QStringLiteral("My Extended Label")); + address.setStreet(QStringLiteral("My Street")); + address.setLocality(QStringLiteral("My Locality")); + address.setRegion(QStringLiteral("My Region")); + address.setPostalCode(QStringLiteral("My Postalcode")); + address.setCountry(QStringLiteral("My country")); + address.setLabel(QStringLiteral("My Label")); + + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + addr.insertAddress(address); + lst << addr; + + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "ADR;LABEL=\"My Label\";TYPE=home:1234;My Extended Label;My Street;My Locality\r\n" + " ;My Region;My Postalcode;My country\r\nEMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void AddressTest::countryToISOTest() +{ + using namespace KContacts; + QCOMPARE(Address::countryToISO(QStringLiteral("France")), QLatin1String("fr")); + QCOMPARE(Address::countryToISO(QStringLiteral("Frankreich")), QLatin1String("fr")); + QCOMPARE(Address::countryToISO(QStringLiteral("Germany")), QLatin1String("de")); + QCOMPARE(Address::countryToISO(QStringLiteral("Österreich")), QLatin1String("at")); + QCOMPARE(Address::countryToISO(QStringLiteral("Disneyland")), QString()); +} diff --git a/autotests/addresstest.h b/autotests/addresstest.h new file mode 100644 index 0000000..efcadc4 --- /dev/null +++ b/autotests/addresstest.h @@ -0,0 +1,48 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ADDRESS_TEST_H +#define ADDRESS_TEST_H + +#include + +class AddressTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void initTestCase(); + void emptyTest(); + void storeTest(); + void equalsTest(); + void differsTest(); + void assignmentTest(); + void serializeTest(); + void formatTest(); + void shouldExportVcard4(); + void shouldExportVcard3(); + void shouldParseAddressVCard3(); + void shouldParseAddressVCard4(); + void shouldExportVCard4WithGeoPosition(); + void shouldParseAddressVCard4WithGeoPosition(); + void countryToISOTest(); +}; + +#endif diff --git a/autotests/birthdaytest.cpp b/autotests/birthdaytest.cpp new file mode 100644 index 0000000..18d59fb --- /dev/null +++ b/autotests/birthdaytest.cpp @@ -0,0 +1,231 @@ +/* + This file is part of kcontacts. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "birthdaytest.h" +#include +#include +#include "addressee.h" +#include "vcard.h" + +BirthDayTest::BirthDayTest(QObject *parent) + : QObject(parent) +{ +} + +BirthDayTest::~BirthDayTest() +{ +} + +void BirthDayTest::shouldParseBirthDay() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "BDAY:19760505T120505\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QDateTime dt(QDate(1976, 5, 5), QTime(12, 5, 5)); + QCOMPARE(lst.at(0).birthday(), dt); + QCOMPARE(lst.at(0).birthdayHasTime(), true); +} + +void BirthDayTest::shouldParseBirthDayWithoutTime() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "BDAY:19760505\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QDateTime dt(QDate(1976, 5, 5)); + QCOMPARE(lst.at(0).birthday(), dt); + QCOMPARE(lst.at(0).birthdayHasTime(), false); +} + +void BirthDayTest::shouldParseBirthDayWithoutTimeAndYear() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "BDAY:--0505\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QDateTime dt(QDate(-1, 5, 5)); + QCOMPARE(lst.at(0).birthday(), dt); + QCOMPARE(lst.at(0).birthdayHasTime(), false); +} + +void BirthDayTest::shouldExportVcard4() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QDateTime dt(QDate(1976, 5, 5), QTime(12, 5, 5)); + addr.setBirthday(dt); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "BDAY:19760505T120505\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void BirthDayTest::shouldExportVcard4WithoutTime() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QDate d(1976, 5, 5); + addr.setBirthday(d); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "BDAY:19760505\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void BirthDayTest::shouldExportVcard4WithoutTimeAndWithoutYear() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QDate d(-1, 5, 5); + addr.setBirthday(d); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "BDAY:--0505\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void BirthDayTest::shouldExportVcard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QDateTime dt(QDate(1976, 5, 5), QTime(12, 5, 5)); + addr.setBirthday(dt); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "BDAY:1976-05-05T12:05:05\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void BirthDayTest::shouldExportVcard3WithoutTimeAndWithoutYear() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QDate d(-1, 5, 5); + addr.setBirthday(d); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "BDAY:--05-05\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void BirthDayTest::shouldExportVcard3WithoutTime() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QDate d(1976, 5, 5); + addr.setBirthday(d); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "BDAY:1976-05-05\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +QTEST_MAIN(BirthDayTest) diff --git a/autotests/birthdaytest.h b/autotests/birthdaytest.h new file mode 100644 index 0000000..818f7fb --- /dev/null +++ b/autotests/birthdaytest.h @@ -0,0 +1,45 @@ +/* + This file is part of kcontacts. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef BIRTHDAYTEST_H +#define BIRTHDAYTEST_H + +#include + +class BirthDayTest : public QObject +{ + Q_OBJECT +public: + explicit BirthDayTest(QObject *parent = nullptr); + ~BirthDayTest(); + +private Q_SLOTS: + void shouldExportVcard4(); + void shouldExportVcard4WithoutTime(); + void shouldExportVcard3(); + void shouldExportVcard3WithoutTime(); + void shouldParseBirthDay(); + void shouldParseBirthDayWithoutTime(); + void shouldParseBirthDayWithoutTimeAndYear(); + void shouldExportVcard4WithoutTimeAndWithoutYear(); + void shouldExportVcard3WithoutTimeAndWithoutYear(); +}; + +#endif // BIRTHDAYTEST_H diff --git a/autotests/calendarurltest.cpp b/autotests/calendarurltest.cpp new file mode 100644 index 0000000..ee11cca --- /dev/null +++ b/autotests/calendarurltest.cpp @@ -0,0 +1,304 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "calendarurltest.h" + +#include "calendarurl.h" +#include "vcardtool.h" +#include + +using namespace KContacts; +Q_DECLARE_METATYPE(KContacts::CalendarUrl::CalendarType) +CalendarUrlTest::CalendarUrlTest(QObject *parent) + : QObject(parent) +{ +} + +CalendarUrlTest::~CalendarUrlTest() +{ +} + +void CalendarUrlTest::shouldHaveDefaultValue() +{ + CalendarUrl calendarUrl(CalendarUrl::FBUrl); + QVERIFY(!calendarUrl.isValid()); + QVERIFY(calendarUrl.url().isEmpty()); + QVERIFY(calendarUrl.parameters().isEmpty()); +} + +void CalendarUrlTest::shouldAssignValue() +{ + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + CalendarUrl calendarUrl(CalendarUrl::FBUrl); + calendarUrl.setParameters(params); + QVERIFY(!calendarUrl.isValid()); + QCOMPARE(calendarUrl.type(), CalendarUrl::FBUrl); + QVERIFY(calendarUrl.url().isEmpty()); + QVERIFY(!calendarUrl.parameters().isEmpty()); + QCOMPARE(calendarUrl.parameters(), params); +} + +void CalendarUrlTest::shouldAssignExternal() +{ + CalendarUrl calendarUrl(CalendarUrl::FBUrl); + const CalendarUrl::CalendarType type = CalendarUrl::CALUri; + calendarUrl.setType(type); + QVERIFY(calendarUrl.url().isEmpty()); + QCOMPARE(calendarUrl.type(), type); +} + +void CalendarUrlTest::shouldSerialized() +{ + for (int i = 0; i < CalendarUrl::EndCalendarType; ++i) { + CalendarUrl calendarUrl; + CalendarUrl result; + CalendarUrl::CalendarType type = static_cast(i); + calendarUrl.setType(type); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + calendarUrl.setParameters(params); + calendarUrl.setUrl(QUrl(QStringLiteral("mailto:foo@kde.org"))); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << calendarUrl; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(calendarUrl == result); + } +} + +void CalendarUrlTest::shouldEqualCalendarUrl() +{ + for (int i = 0; i < CalendarUrl::EndCalendarType; ++i) { + CalendarUrl calendarUrl; + CalendarUrl result; + CalendarUrl::CalendarType type = static_cast(i); + calendarUrl.setType(type); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + calendarUrl.setUrl(QUrl(QStringLiteral("mailto:foo@kde.org"))); + calendarUrl.setParameters(params); + + result = calendarUrl; + QVERIFY(calendarUrl == result); + } +} + +void CalendarUrlTest::shouldParseCalendarUrl() +{ + for (int i = CalendarUrl::Unknown + 1; i < CalendarUrl::EndCalendarType; ++i) { + CalendarUrl::CalendarType type = static_cast(i); + QByteArray baType; + switch (type) { + case CalendarUrl::Unknown: + case CalendarUrl::EndCalendarType: + break; + case CalendarUrl::FBUrl: + baType = QByteArray("FBURL"); + break; + case CalendarUrl::CALUri: + baType = QByteArray("CALURI"); + break; + case CalendarUrl::CALADRUri: + baType = QByteArray("CALADRURI"); + break; + } + + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n"); + vcarddata += baType; + vcarddata += QByteArray( + ";PREF=1:https://sherlockholmes.com/calendar/sherlockholmes\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).calendarUrlList().count(), 1); + const CalendarUrl calurl = lst.at(0).calendarUrlList().at(0); + QCOMPARE(calurl.type(), type); + QCOMPARE(calurl.url(), QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + QVERIFY(!calurl.parameters().isEmpty()); + } +} + +void CalendarUrlTest::shouldGenerateVCard_data() +{ + QTest::addColumn("type"); + QTest::addColumn("value"); + for (int i = CalendarUrl::Unknown + 1; i < CalendarUrl::EndCalendarType; ++i) { + KContacts::CalendarUrl::CalendarType type = static_cast(i); + QByteArray baType; + switch (type) { + case CalendarUrl::Unknown: + case CalendarUrl::EndCalendarType: + break; + case CalendarUrl::FBUrl: + baType = QByteArray("FBURL"); + break; + case CalendarUrl::CALUri: + baType = QByteArray("CALURI"); + break; + case CalendarUrl::CALADRUri: + baType = QByteArray("CALADRURI"); + break; + } + QTest::newRow(baType.constData()) << type << baType; + } +} + +void CalendarUrlTest::shouldGenerateVCard() +{ + QFETCH(KContacts::CalendarUrl::CalendarType, type); + QFETCH(QByteArray, value); + + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + CalendarUrl url; + url.setType(type); + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + addr.insertCalendarUrl(url); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected; + // Different order + if (type == KContacts::CalendarUrl::FBUrl) { + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n"); + expected += value + QByteArray(":https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + } else { + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n"); + expected += value + QByteArray(":https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + } + + QCOMPARE(ba, expected); +} + +void CalendarUrlTest::shouldGenerateVCardWithParameter() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + CalendarUrl url; + url.setType(CalendarUrl::CALUri); + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + QMap params; + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + url.setParameters(params); + addr.insertCalendarUrl(url); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "CALURI;FOO2=bla2,blo2:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void CalendarUrlTest::shouldNotGeneratedAttributeForVcard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + CalendarUrl url; + url.setType(CalendarUrl::CALUri); + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + QMap params; + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + url.setParameters(params); + addr.insertCalendarUrl(url); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void CalendarUrlTest::shouldGenerateMultiCalendarUrl() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + CalendarUrl url; + url.setType(CalendarUrl::CALUri); + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + QMap params; + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + url.setParameters(params); + addr.insertCalendarUrl(url); + + url.setType(CalendarUrl::FBUrl); + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes2"))); + params.clear(); + + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + url.setParameters(params); + addr.insertCalendarUrl(url); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "CALURI;FOO2=bla2,blo2:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "EMAIL:foo@kde.org\r\n" + "FBURL;FOO1=bla1,blo1:https://sherlockholmes.com/calendar/sherlockholmes2\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(CalendarUrlTest) diff --git a/autotests/calendarurltest.h b/autotests/calendarurltest.h new file mode 100644 index 0000000..3f4fd8a --- /dev/null +++ b/autotests/calendarurltest.h @@ -0,0 +1,47 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef CALENDARURLTEST_H +#define CALENDARURLTEST_H + +#include + +class CalendarUrlTest : public QObject +{ + Q_OBJECT +public: + explicit CalendarUrlTest(QObject *parent = nullptr); + ~CalendarUrlTest(); + +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualCalendarUrl(); + void shouldParseCalendarUrl(); + void shouldGenerateVCard_data(); + void shouldGenerateVCard(); + void shouldGenerateVCardWithParameter(); + void shouldNotGeneratedAttributeForVcard3(); + void shouldGenerateMultiCalendarUrl(); +}; + +#endif // CALENDARURLTEST_H diff --git a/autotests/clientpidmaptest.cpp b/autotests/clientpidmaptest.cpp new file mode 100644 index 0000000..2f51a82 --- /dev/null +++ b/autotests/clientpidmaptest.cpp @@ -0,0 +1,240 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "clientpidmaptest.h" +#include "clientpidmap.h" +#include "vcardtool.h" +#include + +ClientPidMapTest::ClientPidMapTest(QObject *parent) + : QObject(parent) +{ +} + +ClientPidMapTest::~ClientPidMapTest() +{ +} + +void ClientPidMapTest::shouldHaveDefaultValue() +{ + KContacts::ClientPidMap role; + QVERIFY(!role.isValid()); + QVERIFY(role.clientPidMap().isEmpty()); + QVERIFY(role.parameters().isEmpty()); +} + +void ClientPidMapTest::shouldAssignValue() +{ + const QString lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::ClientPidMap role(lang); + role.setParameters(params); + QVERIFY(role.isValid()); + QVERIFY(!role.clientPidMap().isEmpty()); + QCOMPARE(role.clientPidMap(), lang); + QVERIFY(!role.parameters().isEmpty()); + QCOMPARE(role.parameters(), params); +} + +void ClientPidMapTest::shouldAssignExternal() +{ + KContacts::ClientPidMap role; + const QString lang(QStringLiteral("fr")); + role.setClientPidMap(lang); + QVERIFY(role.isValid()); + QCOMPARE(role.clientPidMap(), lang); +} + +void ClientPidMapTest::shouldSerialized() +{ + KContacts::ClientPidMap role; + KContacts::ClientPidMap result; + const QString lang(QStringLiteral("fr")); + role.setClientPidMap(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + role.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << role; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(role == result); +} + +void ClientPidMapTest::shouldEqualClientPidMap() +{ + KContacts::ClientPidMap role; + KContacts::ClientPidMap result; + const QString lang(QStringLiteral("fr")); + role.setClientPidMap(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + role.setParameters(params); + + result = role; + QVERIFY(role == result); +} + +void ClientPidMapTest::shouldParseClientPidMap() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "CLIENTPIDMAP:boo\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).clientPidMapList().count(), 1); + QCOMPARE(lst.at(0).clientPidMapList().at(0).clientPidMap(), QStringLiteral("boo")); +} + +void ClientPidMapTest::shouldParseWithoutClientPidMap() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).clientPidMapList().count(), 0); +} + +void ClientPidMapTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ClientPidMap::List lstClientPidMap; + KContacts::ClientPidMap clientpidmap(QStringLiteral("fr")); + lstClientPidMap << clientpidmap; + addr.setClientPidMapList(lstClientPidMap); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "CLIENTPIDMAP:fr\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void ClientPidMapTest::shouldCreateVCardWithTwoClientPidMap() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ClientPidMap::List lstClientPidMap; + KContacts::ClientPidMap clientpidmap(QStringLiteral("fr")); + KContacts::ClientPidMap clientpidmap2(QStringLiteral("fr2")); + lstClientPidMap << clientpidmap << clientpidmap2; + addr.setClientPidMapList(lstClientPidMap); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "CLIENTPIDMAP:fr\r\n" + "CLIENTPIDMAP:fr2\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void ClientPidMapTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ClientPidMap::List lstClientPidMap; + KContacts::ClientPidMap clientpidmap(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + clientpidmap.setParameters(params); + lstClientPidMap << clientpidmap; + addr.setClientPidMapList(lstClientPidMap); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "CLIENTPIDMAP;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void ClientPidMapTest::shouldGenerateClientPidMapForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ClientPidMap::List lstClientPidMap; + KContacts::ClientPidMap clientpidmap(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + clientpidmap.setParameters(params); + lstClientPidMap << clientpidmap; + addr.setClientPidMapList(lstClientPidMap); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(ClientPidMapTest) diff --git a/autotests/clientpidmaptest.h b/autotests/clientpidmaptest.h new file mode 100644 index 0000000..2a09f32 --- /dev/null +++ b/autotests/clientpidmaptest.h @@ -0,0 +1,46 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ROLETEST_H +#define ROLETEST_H + +#include + +class ClientPidMapTest : public QObject +{ + Q_OBJECT +public: + explicit ClientPidMapTest(QObject *parent = nullptr); + ~ClientPidMapTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualClientPidMap(); + void shouldParseClientPidMap(); + void shouldParseWithoutClientPidMap(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoClientPidMap(); + void shouldCreateVCardWithParameters(); + void shouldGenerateClientPidMapForVCard3(); +}; + +#endif // ROLETEST_H diff --git a/autotests/contactgrouptest.cpp b/autotests/contactgrouptest.cpp new file mode 100644 index 0000000..89563db --- /dev/null +++ b/autotests/contactgrouptest.cpp @@ -0,0 +1,385 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2008 Kevin Krammer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "kcontacts/contactgroup.h" +#include "kcontacts/contactgrouptool.h" + +#include + +using namespace KContacts; + +class ContactGroupTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void contactGroupContactReference(); + void contactGroupContactGroupReference(); + void contactGroupData(); + void contactGroup(); + void testGroupRoundTrip(); + void testGroupListRoundTrip(); +}; + +QTEST_MAIN(ContactGroupTest) + +void ContactGroupTest::contactGroupContactReference() +{ + const QLatin1String uid("MyReferenceId"); + const QLatin1String gid("GID"); + const QLatin1String preferredEMail("tokoe@kde.org"); + const QLatin1String customKey("MyCustomKey"); + const QLatin1String customValue("MyCustomValue"); + + // uid test + { + ContactGroup::ContactReference ref(uid); + QCOMPARE(ref.uid(), uid); + } + + // uid test + { + ContactGroup::ContactReference ref; + ref.setUid(uid); + QCOMPARE(ref.uid(), uid); + } + + // preferredEmail test + { + ContactGroup::ContactReference ref(uid); + ref.setPreferredEmail(preferredEMail); + QCOMPARE(ref.preferredEmail(), preferredEMail); + } + + // custom test + { + ContactGroup::ContactReference ref(uid); + ref.insertCustom(customKey, customValue); + QCOMPARE(ref.custom(customKey), customValue); + ref.removeCustom(customKey); + QCOMPARE(ref.custom(customKey), QString()); + } + + // assignment test + { + ContactGroup::ContactReference ref(uid); + ref.setGid(gid); + ref.setPreferredEmail(preferredEMail); + ref.insertCustom(customKey, customValue); + + ContactGroup::ContactReference ref2(ref); + QCOMPARE(ref.uid(), ref2.uid()); + QCOMPARE(ref.gid(), ref2.gid()); + QCOMPARE(ref.preferredEmail(), ref2.preferredEmail()); + QCOMPARE(ref.custom(customKey), ref2.custom(customKey)); + + QVERIFY(ref == ref2); + } + + // const test + { + ContactGroup::ContactReference ref(uid); + ref.setPreferredEmail(preferredEMail); + ref.insertCustom(customKey, customValue); + + const ContactGroup::ContactReference constRef(ref); + constRef.uid(); + constRef.preferredEmail(); + constRef.custom(customKey); + constRef.gid(); + } +} + +void ContactGroupTest::contactGroupContactGroupReference() +{ + const QLatin1String uid("MyReferenceId"); + const QLatin1String customKey("MyCustomKey"); + const QLatin1String customValue("MyCustomValue"); + + // uid test + { + ContactGroup::ContactGroupReference ref(uid); + QCOMPARE(ref.uid(), uid); + } + + // uid test + { + ContactGroup::ContactGroupReference ref; + ref.setUid(uid); + QCOMPARE(ref.uid(), uid); + } + + // custom test + { + ContactGroup::ContactGroupReference ref(uid); + ref.insertCustom(customKey, customValue); + QCOMPARE(ref.custom(customKey), customValue); + ref.removeCustom(customKey); + QCOMPARE(ref.custom(customKey), QString()); + } + + // assignment test + { + ContactGroup::ContactGroupReference ref(uid); + ref.insertCustom(customKey, customValue); + + ContactGroup::ContactGroupReference ref2(ref); + QCOMPARE(ref.uid(), ref2.uid()); + QCOMPARE(ref.custom(customKey), ref2.custom(customKey)); + + QVERIFY(ref == ref2); + } + + // const test + { + ContactGroup::ContactGroupReference ref(uid); + ref.insertCustom(customKey, customValue); + + const ContactGroup::ContactGroupReference constRef(ref); + constRef.uid(); + constRef.custom(customKey); + } +} + +void ContactGroupTest::contactGroupData() +{ + const QLatin1String name("Tobias Koenig"); + const QLatin1String email("tokoe@kde.org"); + const QLatin1String customKey("MyCustomKey"); + const QLatin1String customValue("MyCustomValue"); + + // name/email test + { + ContactGroup::Data data(name, email); + QCOMPARE(data.name(), name); + QCOMPARE(data.email(), email); + } + + // name test + { + ContactGroup::Data data; + data.setName(name); + QCOMPARE(data.name(), name); + } + + // email test + { + ContactGroup::Data data; + data.setEmail(email); + QCOMPARE(data.email(), email); + } + + // custom test + { + ContactGroup::Data data(name, email); + data.insertCustom(customKey, customValue); + QCOMPARE(data.custom(customKey), customValue); + data.removeCustom(customKey); + QCOMPARE(data.custom(customKey), QString()); + } + + // assignment test + { + ContactGroup::Data data(name, email); + data.insertCustom(customKey, customValue); + + ContactGroup::Data data2(data); + QCOMPARE(data.name(), data2.name()); + QCOMPARE(data.email(), data2.email()); + QCOMPARE(data.custom(customKey), data2.custom(customKey)); + + QVERIFY(data == data2); + } + + // const test + { + ContactGroup::Data data(name, email); + data.insertCustom(customKey, customValue); + + const ContactGroup::Data constData(data); + constData.name(); + constData.email(); + constData.custom(customKey); + } +} + +void ContactGroupTest::contactGroup() +{ + const QLatin1String groupName("MyGroupName"); + const QLatin1String groupId("MyGroupID"); + const QLatin1String name("Tobias Koenig"); + const QLatin1String email("tokoe@kde.org"); + const QLatin1String uid("MyUid"); + + // name test + { + ContactGroup group(groupName); + QCOMPARE(group.name(), groupName); + } + + // id test + { + ContactGroup group(groupName); + group.setId(groupId); + QCOMPARE(group.id(), groupId); + } + + // contact reference test + { + ContactGroup group(groupName); + QCOMPARE(group.contactReferenceCount(), (unsigned int)0); + + ContactGroup::ContactReference ref(uid); + ref.setPreferredEmail(email); + + group.append(ref); + QCOMPARE(group.contactReferenceCount(), (unsigned int)1); + + const ContactGroup::ContactReference ref2 = group.contactReference(0); + QCOMPARE(ref, ref2); + + group.remove(ref); + QCOMPARE(group.contactReferenceCount(), (unsigned int)0); + } + + // contact group reference test + { + ContactGroup group(groupName); + QCOMPARE(group.contactGroupReferenceCount(), (unsigned int)0); + + ContactGroup::ContactGroupReference ref(uid); + + group.append(ref); + QCOMPARE(group.contactGroupReferenceCount(), (unsigned int)1); + + const ContactGroup::ContactGroupReference ref2 = group.contactGroupReference(0); + QCOMPARE(ref, ref2); + + group.remove(ref); + QCOMPARE(group.contactGroupReferenceCount(), (unsigned int)0); + } + + // data test + { + ContactGroup group(groupName); + QCOMPARE(group.dataCount(), (unsigned int)0); + + ContactGroup::Data data(name, email); + + group.append(data); + QCOMPARE(group.dataCount(), (unsigned int)1); + + const ContactGroup::Data data2 = group.data(0); + QCOMPARE(data, data2); + + group.remove(data); + QCOMPARE(group.dataCount(), (unsigned int)0); + } + + // mimetype test + { + ContactGroup group(groupName); + QCOMPARE(group.mimeType(), QLatin1String("application/x-vnd.kde.contactgroup")); + } +} + +void ContactGroupTest::testGroupRoundTrip() +{ + // TODO should also test empty group + + ContactGroup group(QLatin1String("TestGroup")); + group.append(ContactGroup::ContactReference(QLatin1String("Xggdjetw"))); + ContactGroup::ContactReference gidReference; + gidReference.setGid(QLatin1String("gid")); + group.append(gidReference); + group.append(ContactGroup::ContactGroupReference(QLatin1String("aaXggdjetw"))); + group.append(ContactGroup::Data(QLatin1String("Tobias Koenig"), + QLatin1String("tokoe@kde.org"))); + group.append(ContactGroup::Data(QLatin1String("Kevin Krammer"), + QLatin1String("kevin.krammer@gmx.at"))); + + QBuffer buffer; + buffer.open(QIODevice::WriteOnly); + + QString errorMessage; + bool result = ContactGroupTool::convertToXml(group, &buffer, &errorMessage); + + QVERIFY(result); + QVERIFY(errorMessage.isEmpty()); + buffer.close(); + QVERIFY(buffer.size() > 0); + buffer.open(QIODevice::ReadOnly); + + ContactGroup group2; + result = ContactGroupTool::convertFromXml(&buffer, group2, &errorMessage); + QVERIFY(result); + QVERIFY(errorMessage.isEmpty()); + QCOMPARE(group, group2); +} + +void ContactGroupTest::testGroupListRoundTrip() +{ + // TODO should also test empty list + + ContactGroup::List list; + + ContactGroup group1(QLatin1String("TestGroup1")); + group1.append(ContactGroup::ContactReference(QLatin1String("Xggdjetw"))); + group1.append(ContactGroup::Data(QLatin1String("Tobias Koenig"), + QLatin1String("tokoe@kde.org"))); + group1.append(ContactGroup::Data(QLatin1String("Kevin Krammer"), + QLatin1String("kevin.krammer@gmx.at"))); + + list.append(group1); + + ContactGroup group2(QLatin1String("TestGroup2")); + group2.append(ContactGroup::ContactReference(QLatin1String("Xggdjetw"))); + group2.append(ContactGroup::Data(QLatin1String("Tobias Koenig"), + QLatin1String("tokoe@kde.org"))); + group2.append(ContactGroup::Data(QLatin1String("Kevin Krammer"), + QLatin1String("kevin.krammer@gmx.at"))); + + list.append(group2); + + QBuffer buffer; + buffer.open(QIODevice::WriteOnly); + + QString errorMessage; + bool result = ContactGroupTool::convertToXml(list, &buffer, &errorMessage); + + QVERIFY(result); + QVERIFY(errorMessage.isEmpty()); + buffer.close(); + QVERIFY(buffer.size() > 0); + + buffer.open(QIODevice::ReadOnly); + + ContactGroup::List list2; + result = ContactGroupTool::convertFromXml(&buffer, list2, &errorMessage); + QVERIFY(result); + QVERIFY(errorMessage.isEmpty()); + QVERIFY(list2.size() == 2); + QCOMPARE(list2[0], group1); + QCOMPARE(list2[1], group2); +} + +#include "contactgrouptest.moc" diff --git a/autotests/customidentifiertest.cpp b/autotests/customidentifiertest.cpp new file mode 100644 index 0000000..187e082 --- /dev/null +++ b/autotests/customidentifiertest.cpp @@ -0,0 +1,121 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "customidentifiertest.h" +#include +#include "vcardtool.h" +#include "addressee.h" + +CustomIdentifierTest::CustomIdentifierTest(QObject *parent) + : QObject(parent) +{ +} + +CustomIdentifierTest::~CustomIdentifierTest() +{ +} + +void CustomIdentifierTest::shouldHaveEmptyCustoms() +{ + KContacts::Addressee addresseeWithMail; + addresseeWithMail.insertEmail(QStringLiteral("foo@bar.org")); + QVERIFY(!addresseeWithMail.isEmpty()); + QVERIFY(addresseeWithMail.customs().isEmpty()); +} + +void CustomIdentifierTest::shouldExportVcard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + addr.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-SpousesName"), QStringLiteral("foo")); + lst << addr; + KContacts::VCardTool vcard; + QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "X-KADDRESSBOOK-X-SpousesName:foo\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); + + addr.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-ANNIVERSARY"), QStringLiteral("19960415")); + lst.clear(); + lst << addr; + ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "X-KADDRESSBOOK-X-ANNIVERSARY:19960415\r\n" + "X-KADDRESSBOOK-X-SpousesName:foo\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void CustomIdentifierTest::shouldExportVcard4() +{ + //TODO don't work to export custom! + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + addr.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-SpousesName"), QStringLiteral("foo")); + lst << addr; + KContacts::VCardTool vcard; + QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "RELATED;TYPE=spouse;VALUE=foo:;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); + + QDate dt(12, 9, 3); + addr.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-ANNIVERSARY"), dt.toString(Qt::ISODate)); + lst.clear(); + lst << addr; + ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "ANNIVERSARY:00120903\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "RELATED;TYPE=spouse;VALUE=foo:;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +QTEST_MAIN(CustomIdentifierTest) diff --git a/autotests/customidentifiertest.h b/autotests/customidentifiertest.h new file mode 100644 index 0000000..17de30f --- /dev/null +++ b/autotests/customidentifiertest.h @@ -0,0 +1,39 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef CUSTOMIDENTIFIERTEST_H +#define CUSTOMIDENTIFIERTEST_H + +#include + +class CustomIdentifierTest : public QObject +{ + Q_OBJECT +public: + explicit CustomIdentifierTest(QObject *parent = nullptr); + ~CustomIdentifierTest(); + +private Q_SLOTS: + void shouldExportVcard4(); + void shouldHaveEmptyCustoms(); + void shouldExportVcard3(); +}; + +#endif // CUSTOMIDENTIFIERTEST_H diff --git a/autotests/data/testfullvcard.vcf b/autotests/data/testfullvcard.vcf new file mode 100644 index 0000000..466d7e6 --- /dev/null +++ b/autotests/data/testfullvcard.vcf @@ -0,0 +1,33 @@ +BEGIN:VCARD +VERSION:4.0 +FN:Sherlock Holmes +TEL;VALUE=uri;PREF=1;TYPE="voice,home":tel:+44-555-555-5555;ext=5555 +TEL;VALUE=uri;TYPE="voice,cell,text":tel:+44-555-555-6666 +TEL;VALUE=uri;TYPE="voice,work":tel:+44-555-555-7777 +N:Holmes;Sherlock;;Mr;; +KIND:individual +NICKNAME:Shirley +PHOTO: +BDAY:19531015T231000Z +ANNIVERSARY:19960415 +GENDER:M +ADR;GEO="geo:51.5237,0.1585";LABEL="Mr Sherlock Holmes, 221B Baker Street, London NW1, England, United Kingdom":;;221B Baker Street;London;;NW1;United Kingdom +EMAIL;TYPE=home:sherlock.holmes@gmail.com +EMAIL;PREF=1;TYPE=work:detective@sherlockholmes.com +IMPP;PREF=1:xmpp:detective@sherlockholmes.com +LANG;TYPE=work;PREF=1:en +LANG;TYPE=work;PREF=2:fr +TZ:London/Europe +GEO:geo:51.5237,0.1585 +TITLE:Detective +ROLE:Detective +UID:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519 +CATEGORIES:FICTION,LITERATURE +PRODID:-//KADDRESSBOOK//NONSGML Version 1//EN +REV:2014722T222710Z +URL:https://sherlockholmes.com +KEY;MEDIATYPE=application/pgp-keys:https://sherlockholmes.com/sherlock-holmes.pub.asc +CALURI;PREF=1:https://sherlockholmes.com/calendar/sherlockholmes +FBURL;PREF=1:https://sherlockholmes.com/busy/detective +CALADRURI;PREF=1:mailto:detective@sherlockholmes.com +END:VCARD diff --git a/autotests/data/testfullvcard.vcf.ref b/autotests/data/testfullvcard.vcf.ref new file mode 100644 index 0000000..466d7e6 --- /dev/null +++ b/autotests/data/testfullvcard.vcf.ref @@ -0,0 +1,33 @@ +BEGIN:VCARD +VERSION:4.0 +FN:Sherlock Holmes +TEL;VALUE=uri;PREF=1;TYPE="voice,home":tel:+44-555-555-5555;ext=5555 +TEL;VALUE=uri;TYPE="voice,cell,text":tel:+44-555-555-6666 +TEL;VALUE=uri;TYPE="voice,work":tel:+44-555-555-7777 +N:Holmes;Sherlock;;Mr;; +KIND:individual +NICKNAME:Shirley +PHOTO: +BDAY:19531015T231000Z +ANNIVERSARY:19960415 +GENDER:M +ADR;GEO="geo:51.5237,0.1585";LABEL="Mr Sherlock Holmes, 221B Baker Street, London NW1, England, United Kingdom":;;221B Baker Street;London;;NW1;United Kingdom +EMAIL;TYPE=home:sherlock.holmes@gmail.com +EMAIL;PREF=1;TYPE=work:detective@sherlockholmes.com +IMPP;PREF=1:xmpp:detective@sherlockholmes.com +LANG;TYPE=work;PREF=1:en +LANG;TYPE=work;PREF=2:fr +TZ:London/Europe +GEO:geo:51.5237,0.1585 +TITLE:Detective +ROLE:Detective +UID:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519 +CATEGORIES:FICTION,LITERATURE +PRODID:-//KADDRESSBOOK//NONSGML Version 1//EN +REV:2014722T222710Z +URL:https://sherlockholmes.com +KEY;MEDIATYPE=application/pgp-keys:https://sherlockholmes.com/sherlock-holmes.pub.asc +CALURI;PREF=1:https://sherlockholmes.com/calendar/sherlockholmes +FBURL;PREF=1:https://sherlockholmes.com/busy/detective +CALADRURI;PREF=1:mailto:detective@sherlockholmes.com +END:VCARD diff --git a/autotests/data/v4_0.vcard1.vcf.ref b/autotests/data/v4_0.vcard1.vcf.ref new file mode 100644 index 0000000..41030ef --- /dev/null +++ b/autotests/data/v4_0.vcard1.vcf.ref @@ -0,0 +1,15 @@ +BEGIN:VCARD +VERSION:4.0 +ADR;TYPE=parcel;TYPE=postal;TYPE=work:;;6544 Battleford Drive;Raleigh;NC;27 + 613-3502;U.S.A. +EMAIL;TYPE=PREF:Frank_Dawson@Lotus.com +EMAIL:fdawson@earthlink.net +FN:Frank Dawson +N:;;;; +ORG:Lotus Development Corporation +TEL;TYPE=MSG;TYPE=VOICE;TYPE=WORK:+1-919-676-9515 +TEL;TYPE=FAX;TYPE=WORK:+1-919-676-9564 +UID:gDVbA6LY3t +URL:http://home.earthlink.net/~fdawson +END:VCARD + diff --git a/autotests/data/v4_0.vcard2.vcf.ref b/autotests/data/v4_0.vcard2.vcf.ref new file mode 100644 index 0000000..446da45 --- /dev/null +++ b/autotests/data/v4_0.vcard2.vcf.ref @@ -0,0 +1,12 @@ +BEGIN:VCARD +VERSION:4.0 +ADR;TYPE=work:;;501 E. Middlefield Rd.;Mountain View;CA; 94043;U.S.A. +EMAIL:howes@netscape.com +FN:Tim Howes +N:;;;; +ORG:Netscape Communications Corp. +TEL;TYPE=MSG;TYPE=VOICE;TYPE=WORK:+1-415-937-3419 +TEL;TYPE=FAX;TYPE=WORK:+1-415-528-4164 +UID:1UgvYejJMs +END:VCARD + diff --git a/autotests/data/v4_0.vcard3.vcf.ref b/autotests/data/v4_0.vcard3.vcf.ref new file mode 100644 index 0000000..b91a5d7 --- /dev/null +++ b/autotests/data/v4_0.vcard3.vcf.ref @@ -0,0 +1,12 @@ +BEGIN:VCARD +VERSION:4.0 +EMAIL:geiseri@yahoo.com +FN:ian geiser +N:geiser;ian;;; +ORG:Source eXtreme +TITLE:VP of Engineering +UID:ebvq9Wo9rO +X-mozilla-cpt:;0 +X-mozilla-html:FALSE +END:VCARD + diff --git a/autotests/data/v4_0.vcard4.vcf.ref b/autotests/data/v4_0.vcard4.vcf.ref new file mode 100644 index 0000000..5e628d3 --- /dev/null +++ b/autotests/data/v4_0.vcard4.vcf.ref @@ -0,0 +1,14 @@ +BEGIN:VCARD +VERSION:4.0 +EMAIL:hello@ximian.com +FN: +LABEL;TYPE=work:401 Park Drive 3 West\nBoston\, MA 02215\nUSA +NOTE:Welcome to the Ximian Addressbook. +ORG:Ximian\, Inc. +TEL;TYPE=VOICE;TYPE=WORK:(617) 236-0442 +TEL;TYPE=FAX;TYPE=WORK:(617) 236-8630 +UID:pas-id-3E136F9B00000000 +URL:www.ximian.com/ +X-EVOLUTION-FILE-AS:Ximian\, Inc. +END:VCARD + diff --git a/autotests/data/v4_0.vcard5.vcf.ref b/autotests/data/v4_0.vcard5.vcf.ref new file mode 100644 index 0000000..10f6749 --- /dev/null +++ b/autotests/data/v4_0.vcard5.vcf.ref @@ -0,0 +1,313 @@ +BEGIN:VCARD +VERSION:4.0 +ADR;TYPE=home;TYPE=pref:;;Buehlauer Strasse 45;Dresden;Sachsen;01327;German + y +ADR;TYPE=work:;;Prager Strasse 55;Dresden;Sachsen;01066;Germany +BDAY:1955-07-19T00:00:00Z +CATEGORIES:Friend +CLASS:CONFIDENTIAL +EMAIL;TYPE=PREF:heiko.mustermann@freenet.org +EMAIL:heiko8@tst.inf.tu-dresden.de +FN:Mustermann\, Heiko +GEO:19.283333;166.616669 +LOGO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVU + AAAOW0lEQVR4nO1df2hb1xX+OlyQwQEJXJAgBQlaiEwDsdqO2l1H47RjMe2gbjOoszG2dozG7aC + YMIqTjS7NYKSmbE1StsQpWxMXmsSF1WhlTeSwJlZY06gsSVXWUAkakKAGPajBDxrQ/jjnez8k27 + EjJdyU+/0jPz29X9L57jnnO+deAxYWFhYWFhYWFu3Hbe082XT2ZF3+WgAAdHZ0AgBqTg0A4H7DT + 7oAgNSdKQDAg99/sK33caPB53RqFQBA5PYIAMBdkOf6yc9+ct3P852W786irWjJMs/8+0wdACpV + sZTS50V5vSLb1UoVQMCCvnFDx0c65f3BHw4CABJ3RL19mwYfM4Y1e/+0V5h/VbbPXzwPACiVSgA + A15XnikVjAIB44Dli3TIKjL+2e0XPYxliGFZshSdzZ+r8OyKGjdl8AQCQfe84AKBaFUaUrojlRL + vEUpx5h0eGjo9EZH+kQ7Yz9/d71+vdkAYApO+W16d+/NQNZ8ye8T11ACiV5TkcR5jufCX3XyrLc + 9XmxUe6bvi5XH3OaNRnSKRL9vWsywAAstNTyz6HZYhhsD+IYbjmMPDxfz6uA0BMqQcAR96eAgBM + vSevtTkJa6tzQnVSNn2XOLSZ03ljHHQ7MLxlSIa2kg5pOrTVHHHu/hANRDrke4t2y3cy+KgEMPs + P7F/0O7EMMQzXtNxLn16qA8DUu1nvvcm3DgEAFlxxbo4jFpFYK4woXix8qxhxLYxuH6sDQG5Gvq + NSueLtcxwdNTTASemoUTi3+HdkGWIYlrTkj2clzC1ckGRv3xv7vH2VK7QAlUDuktA0f/bG+YpL5 + 4WpDDXv7TdPbjm472AdACbe9L+r4mdMHuW+42uTAIByuWwZciugY6kdER3zzn8iMkFt3pc93Kvy + d0QzvHYxI5h8Qq/BiK1YLur78nJw4mBIznj2V88ueg+HjxyrA0BEdE7EumLePp773u/e25b7jyb + kfAObh7z3SleELS40SVZ/u+2F0ToA7H99PHRtyxDD0GQZZ9RKKxUZ+/YdmAAAFD4peJ9hbF2dq7 + aHGSpn12p+dJI7PQsAcDS3YcxfmZPXnrt65F40P+pd3wsgwF69x/xHedlWNkfX+PlUep0ck0omA + ACxO+R10w82tfRch8leAJOas82ek+cho/sfkGtnT8xYhpiMJh9CiytVZayjYIgO37KCmWgrOPy3 + w3UAKKpsf/zd496+wkVhpOu5Lje0XS6X9X5lbJ49KxZIJqSSEu+Xrsj9V1Xw5OcBIPJBDoCfPw0 + 9IVn0sanpOgA8NXR9JYBILO7/rd8n/RV9SM1tPg6wDDEOTQxhFEKLYjbuBljBX9tjzyox/Q+xQO + crOf7I20cAAIVz+cCnVNJu8Alo3Nb43nEjoSfa8dIOAMDs6Zy+3wcAyM3kvCtUyZ6qXLd0WZj6z + E+fAeAX4FZbYo5Fmt9zXfeanwEsQ4xDE0Nqbi203ZhztANVZUb2PdF+imqZLgLX0OvSd7lLbPO+ + OFan1B8wGotEE3pCYfpWtX4A2L1rZ+gcHN+Pa8EtEpX3mR9tGlieKSf/dVJ9Ysl7j/fhMYTfuDa + ANMIyxDA0Z+r6Qy7MC1Mi3lge1PijTYetBNNTkjUfOjQJAMi+LzE6S7nJtX50krknE74hZQZbij + o19U7eKcfQAKuaP7lam+hRdZXl19kZX7Xe+PBG2acM7YzE9Bpi1UfeFN9G7Y6+77EfLR59UdGtV + X2G8D7IEPrf7PtZq2XdCmhiCBsUYnGxLJfxP5rzkI0Pb6wDwMypmWXHVupOk0eFEfQZIy+MAQB6 + 79OGhnSvd0yk4c5o4c7Xamlrwj7Nqck9uVf5eblGVnONqIY1W38+4h3DyJH1i6j6jFi3+B1GaPm + 8RGFsa9qrqu7zI6KfHXtHmM8KKq8ZfNZg/rMcLEMMQ5NlH/zLwVDz28SbomVRUxI0RDZJZrqici + biYmHFz8Q6cmox6bR8bsfOVwD44ylzH47dgK9lTf5dqpOzZ0V1Hnh0AIDfXMdmO7Zx0h8MaO2aT + JtQf7D16Se9a9CS0+uEofQVmV7ZjqhPmXhrIvQcnV2doeemv6UfIysAeNoVg9TMfdLqZH3ILYIl + x36Oi/v+Knp+/mwhsFfHcR0X2W3Su0Gy4ZrG3tU5GaOHtwhzXv3jqwB8ZgFiaezamFVWAMDO30u + OQAsjfvFL8QHpdFLOoPE8FQXG99UvxecMbhameOrCnB8tbh0WtjA3IZuYl6TXC1PoY/b9eRwAUL + hYDH3emXdD20EwX4p3SzS4VKWQsAwxDPYHMQxLlnDpJNlbSyEO8BvjvDKrJnZFlcxJ+biGkRT6Y + nf45VMAqHypXfMa0uY+8JM2Fpycr+QzfQ+JM0+nhPoMBHit3FFxuHT6FB8rGsYnusWZVsoBAVOH + QzrlkoqlcW1qSyQkOMmsE+c9sk2Gy+d//Xzo+Ago40RD3wsARKMrG6oIyxDDsCRDOAtodLsU44M + d3QtXKcnzLGELoXN7cos4y3jcl0QAYOFrOZ4ySLGooWqgOYBs4XVp+Qw9i2XZX1GyZtIJvQdhRi + Il23S4ntgYSNB67xcWTs2ouDmn97FRrlX6MlzUSt8jo8XQlq0AgMm3J8Ln1OfmnBBg9U2DliGGY + UmGEON7pE1lVNtWAGD2IwlPK1fF6jhziGMxE8eR54QhnWtUatY5hpS5ixfCPmexsDHRLedOeDK6 + YOARsdLxabHqVJIiozbvqQzvsZnvJ33r7dkgfuXQBWHC6NMSIrvqZ+grOTOsX+evPLlZRMlCXsv + GGsZn1osgOt7Q2rMaWIYYhmsyhAj+6tue2ybNZ59ruVfl5k614igL+90NvoNz9LT5jkJgKiVWS5 + 8CAOVSGYAv9FU0eezXaItsHHkkCQBI360RnDKBzODx7iKNGcPa1FCZk3JArZzT53FC5yB4DxGN8 + IY04d3+m+23AcDMqZmma6wWliGGYcUMCWL/G+HJJsNbhkPtPBxrGwv5pcufAgDcrzlPXayX430w + D2GMTx/CQlkqqUzokGO8MpZGUwtagqbASTAScuZ8ATOVlGa7wT6Jnnb/QacTaO4CFR0JFsXiiXj + oGrte3lUHgJ2/29ly46BliGG4LoY0YvLoZMgyjr9zXCKyTrEozuemsEfRjtEZfUq+4MvWjFxojd + ympTNqamq+iKjP8LJlln6VGQGxkj4hpS2lbJYeXC++xZuQpOxjO2hCi3f0lSxVtAOWIYahLQxpB + KXmijJjQed1R9nbptbNAhbbgRBoQYomxAobW0M5jvuWrpGQRj7MyFlsYg6RSDCS863ZnZf3EmuF + VcNPDMv9/FNKsfsPHAoxf/RFmbpWLLBtVa5JNvY90FcHWpueYRliGNrKkC/+90Ud8EucLjR7dtQ + 3qALLaCz7vsT9nO6V7vVXcqBi6jYUqHB7wyvCDWccz6kGpFU1ZqNCENWaKAWOMjZzn8RsbOTDgU + Ohz690vZJWYBliGNr6i1/6r0zM9LQqVXGZI3yqeQjfZ4ae2SCWyaY3QbhldOB7kqHHEuGaSiNe+ + a3UXlh2zeiaKYOPS7nW19uA8dekPB3TXGf0xVEAgXKv1oCok+VOCcs2DbY2oWc5WIYYhrb4kOms + tFgWL0tUlf9QNB0ygcwoXw5XzQY3D9YBIK7M4MQZwM87HM1dSmzP1KgrFgv7joUFNjlwqSF5efV + 1YUHurFj32PYx75gdL+uUhbyuf6UZeq9WFznJv6KqL33fjYRliGFoiSGc0FLUxQW8VsolmsAa4U + VCSRnng1PlqBPFNO/gKnVs76RP6WRuo35q6HHJsqkKsPZOto7v2e1dY+QF8RkDfaqIdZCVmsOo+ + swIjbX/GwnLEMPQEkPatZoomdE47QsAoHX6aDRcm+B4X/K6YbT+oYxg/ZttopzKxsmhgF8zrzR0 + 0bDjhp/l8iL508s3lbcDliGGwf4ghsGIFXWONaxHAvgrDMVUhmGLEfuA4xoiT70rgQQdrteBr6X + bktcoF94G/GY6hrO5U9pipAEAz1mttmfFipXAMsQw3BD5fbVwuJbUGl868UJMXdNEa0eIdocLUJ + wH8souSfI8eV7DYcr2lPqDgUNlPtzKSqawIMXQ+3rn418PLEMMgxE+hNirCxkDQK82SrgqBqY5K + 1eZUanK+94ahrpaUfGCyCCDm0VMpDBImb4SaHKgD/FWFVVmMGFl6Tl3Qgpok0eXXwS5HbAMMQxG + MSSIsZekXNp7v8zKymzo0T26WpHO42MjNxsmGHWx6a6/rz/0uWDBi+coFJRdnDHLiI4rTqxQCmo + HLEMMgxFR1mJgMOQ1YHO7S14b1zQhQ5iHsLXoiM6g9SbTICDPdIRbiLw5kyqpNK72djNgGWIYjG + VIPB5e+cBrauvSdh5tGWKbEHMJFrn6HxDf0bNOfE+Na7cEWaFPT+m+oNMjip9J/pE90Xrz9GphG + WIYjGUIW/zZyMysOcrGuTjXVAwXjbgST0WjKbZ70nXkC77VFy9r/jEXZteC077W0NXCMsQwGJuH + NGJsp+QlfZqXsHWHKi4n1xS0YZvToWc+lPLr+U+k2BSqgV31MnNjvgfLEMNgjGWsFFytiM3WcZW + BOUWgoj6kqv/Ii00RXBm7GljViBFXwaD/d2IZYhiMjbKWgreUhlb3OAFz4CHZz6aGWHd4hTnHFc + WWjeBAeJKpKbAMMQy3HEO45Mfecfl3qNSyuB5iRtt/XP43hK5w3nK+4rcBNa7FZQIsQwyDMdFFq + xh9UZb+6HtIlr1wF8SHFM6JPsVGueDiMzej8W21sAwxDPYHMQy3nFNfCmltrKuWRDrhv0HlUMWV + 8Rrn1JsGyxDDYLS1XA927ZZWooL+MzC29sycuHmNCq3AMsQwfGt8CFHISwEqskbDWwPlkeVgGWJ + xczH20lidTXe3AixDLCwsLCwsviX4P68/8cprSSqmAAAAAElFTkSuQmCC +N:Mustermann;Heiko;;; +NICKNAME:clown +NOTE:I'm a friendly note text\,\nplease copy me to your address book... +ORG:KDE +PHOTO;ENCODING=b;TYPE=image/png:iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pV + UAAAOW0lEQVR4nO1df2hb1xX+OlyQwQEJXJAgBQlaiEwDsdqO2l1H47RjMe2gbjOoszG2dozG7a + CYMIqTjS7NYKSmbE1StsQpWxMXmsSF1WhlTeSwJlZY06gsSVXWUAkakKAGPajBDxrQ/jjnez8k2 + 7EjJdyU+/0jPz29X9L57jnnO+deAxYWFhYWFhYWFu3Hbe082XT2ZF3+WgAAdHZ0AgBqTg0A4H7D + T7oAgNSdKQDAg99/sK33caPB53RqFQBA5PYIAMBdkOf6yc9+ct3P852W786irWjJMs/8+0wdACp + VsZTS50V5vSLb1UoVQMCCvnFDx0c65f3BHw4CABJ3RL19mwYfM4Y1e/+0V5h/VbbPXzwPACiVSg + AA15XnikVjAIB44Dli3TIKjL+2e0XPYxliGFZshSdzZ+r8OyKGjdl8AQCQfe84AKBaFUaUrojlR + LvEUpx5h0eGjo9EZH+kQ7Yz9/d71+vdkAYApO+W16d+/NQNZ8ye8T11ACiV5TkcR5jufCX3XyrL + c9XmxUe6bvi5XH3OaNRnSKRL9vWsywAAstNTyz6HZYhhsD+IYbjmMPDxfz6uA0BMqQcAR96eAgB + MvSevtTkJa6tzQnVSNn2XOLSZ03ljHHQ7MLxlSIa2kg5pOrTVHHHu/hANRDrke4t2y3cy+KgEMP + sP7F/0O7EMMQzXtNxLn16qA8DUu1nvvcm3DgEAFlxxbo4jFpFYK4woXix8qxhxLYxuH6sDQG5Gv + qNSueLtcxwdNTTASemoUTi3+HdkGWIYlrTkj2clzC1ckGRv3xv7vH2VK7QAlUDuktA0f/bG+YpL + 54WpDDXv7TdPbjm472AdACbe9L+r4mdMHuW+42uTAIByuWwZciugY6kdER3zzn8iMkFt3pc93Kv + yd0QzvHYxI5h8Qq/BiK1YLur78nJw4mBIznj2V88ueg+HjxyrA0BEdE7EumLePp773u/e25b7jy + bkfAObh7z3SleELS40SVZ/u+2F0ToA7H99PHRtyxDD0GQZZ9RKKxUZ+/YdmAAAFD4peJ9hbF2dq + 7aHGSpn12p+dJI7PQsAcDS3YcxfmZPXnrt65F40P+pd3wsgwF69x/xHedlWNkfX+PlUep0ck0om + AACxO+R10w82tfRch8leAJOas82ek+cho/sfkGtnT8xYhpiMJh9CiytVZayjYIgO37KCmWgrOPy + 3w3UAKKpsf/zd496+wkVhpOu5Lje0XS6X9X5lbJ49KxZIJqSSEu+Xrsj9V1Xw5OcBIPJBDoCfPw + 09IVn0sanpOgA8NXR9JYBILO7/rd8n/RV9SM1tPg6wDDEOTQxhFEKLYjbuBljBX9tjzyox/Q+xQ + OcrOf7I20cAAIVz+cCnVNJu8Alo3Nb43nEjoSfa8dIOAMDs6Zy+3wcAyM3kvCtUyZ6qXLd0WZj6 + zE+fAeAX4FZbYo5Fmt9zXfeanwEsQ4xDE0Nqbi203ZhztANVZUb2PdF+imqZLgLX0OvSd7lLbPO + +OFan1B8wGotEE3pCYfpWtX4A2L1rZ+gcHN+Pa8EtEpX3mR9tGlieKSf/dVJ9Ysl7j/fhMYTfuD + aANMIyxDA0Z+r6Qy7MC1Mi3lge1PijTYetBNNTkjUfOjQJAMi+LzE6S7nJtX50krknE74hZQZbi + jo19U7eKcfQAKuaP7lam+hRdZXl19kZX7Xe+PBG2acM7YzE9Bpi1UfeFN9G7Y6+77EfLR59UdGt + VX2G8D7IEPrf7PtZq2XdCmhiCBsUYnGxLJfxP5rzkI0Pb6wDwMypmWXHVupOk0eFEfQZIy+MAQB + 679OGhnSvd0yk4c5o4c7Xamlrwj7Nqck9uVf5eblGVnONqIY1W38+4h3DyJH1i6j6jFi3+B1GaP + m8RGFsa9qrqu7zI6KfHXtHmM8KKq8ZfNZg/rMcLEMMQ5NlH/zLwVDz28SbomVRUxI0RDZJZrqic + ibiYmHFz8Q6cmox6bR8bsfOVwD44ylzH47dgK9lTf5dqpOzZ0V1Hnh0AIDfXMdmO7Zx0h8MaO2a + TJtQf7D16Se9a9CS0+uEofQVmV7ZjqhPmXhrIvQcnV2doeemv6UfIysAeNoVg9TMfdLqZH3ILYI + lx36Oi/v+Knp+/mwhsFfHcR0X2W3Su0Gy4ZrG3tU5GaOHtwhzXv3jqwB8ZgFiaezamFVWAMDO30 + uOQAsjfvFL8QHpdFLOoPE8FQXG99UvxecMbhameOrCnB8tbh0WtjA3IZuYl6TXC1PoY/b9eRwAU + LhYDH3emXdD20EwX4p3SzS4VKWQsAwxDPYHMQxLlnDpJNlbSyEO8BvjvDKrJnZFlcxJ+biGkRT6 + Ynf45VMAqHypXfMa0uY+8JM2Fpycr+QzfQ+JM0+nhPoMBHit3FFxuHT6FB8rGsYnusWZVsoBAVO + HQzrlkoqlcW1qSyQkOMmsE+c9sk2Gy+d//Xzo+Ago40RD3wsARKMrG6oIyxDDsCRDOAtodLsU44 + Md3QtXKcnzLGELoXN7cos4y3jcl0QAYOFrOZ4ySLGooWqgOYBs4XVp+Qw9i2XZX1GyZtIJvQdhR + iIl23S4ntgYSNB67xcWTs2ouDmn97FRrlX6MlzUSt8jo8XQlq0AgMm3J8Ln1OfmnBBg9U2DliGG + YUmGEON7pE1lVNtWAGD2IwlPK1fF6jhziGMxE8eR54QhnWtUatY5hpS5ixfCPmexsDHRLedOeDK + 6YOARsdLxabHqVJIiozbvqQzvsZnvJ33r7dkgfuXQBWHC6NMSIrvqZ+grOTOsX+evPLlZRMlCXs + vGGsZn1osgOt7Q2rMaWIYYhmsyhAj+6tue2ybNZ59ruVfl5k614igL+90NvoNz9LT5jkJgKiVWS + 58CAOVSGYAv9FU0eezXaItsHHkkCQBI360RnDKBzODx7iKNGcPa1FCZk3JArZzT53FC5yB4DxGN + 8IY04d3+m+23AcDMqZmma6wWliGGYcUMCWL/G+HJJsNbhkPtPBxrGwv5pcufAgDcrzlPXayX430 + wD2GMTx/CQlkqqUzokGO8MpZGUwtagqbASTAScuZ8ATOVlGa7wT6Jnnb/QacTaO4CFR0JFsXiiX + joGrte3lUHgJ2/29ly46BliGG4LoY0YvLoZMgyjr9zXCKyTrEozuemsEfRjtEZfUq+4MvWjFxoj + dympTNqamq+iKjP8LJlln6VGQGxkj4hpS2lbJYeXC++xZuQpOxjO2hCi3f0lSxVtAOWIYahLQxp + BKXmijJjQed1R9nbptbNAhbbgRBoQYomxAobW0M5jvuWrpGQRj7MyFlsYg6RSDCS863ZnZf3Emu + FVcNPDMv9/FNKsfsPHAoxf/RFmbpWLLBtVa5JNvY90FcHWpueYRliGNrKkC/+90Ud8EucLjR7dt + Q3qALLaCz7vsT9nO6V7vVXcqBi6jYUqHB7wyvCDWccz6kGpFU1ZqNCENWaKAWOMjZzn8RsbOTDg + UOhz690vZJWYBliGNr6i1/6r0zM9LQqVXGZI3yqeQjfZ4ae2SCWyaY3QbhldOB7kqHHEuGaSiNe + +a3UXlh2zeiaKYOPS7nW19uA8dekPB3TXGf0xVEAgXKv1oCok+VOCcs2DbY2oWc5WIYYhrb4kOm + stFgWL0tUlf9QNB0ygcwoXw5XzQY3D9YBIK7M4MQZwM87HM1dSmzP1KgrFgv7joUFNjlwqSF5ef + V1YUHurFj32PYx75gdL+uUhbyuf6UZeq9WFznJv6KqL33fjYRliGFoiSGc0FLUxQW8VsolmsAa4 + UVCSRnng1PlqBPFNO/gKnVs76RP6WRuo35q6HHJsqkKsPZOto7v2e1dY+QF8RkDfaqIdZCVmsOo + +swIjbX/GwnLEMPQEkPatZoomdE47QsAoHX6aDRcm+B4X/K6YbT+oYxg/ZttopzKxsmhgF8zrzR + 00bDjhp/l8iL508s3lbcDliGGwf4ghsGIFXWONaxHAvgrDMVUhmGLEfuA4xoiT70rgQQdrteBr6 + XbktcoF94G/GY6hrO5U9pipAEAz1mttmfFipXAMsQw3BD5fbVwuJbUGl868UJMXdNEa0eIdocLU + JwH8souSfI8eV7DYcr2lPqDgUNlPtzKSqawIMXQ+3rn418PLEMMgxE+hNirCxkDQK82SrgqBqY5 + K1eZUanK+94ahrpaUfGCyCCDm0VMpDBImb4SaHKgD/FWFVVmMGFl6Tl3Qgpok0eXXwS5HbAMMQx + GMSSIsZekXNp7v8zKymzo0T26WpHO42MjNxsmGHWx6a6/rz/0uWDBi+coFJRdnDHLiI4rTqxQCm + oHLEMMgxFR1mJgMOQ1YHO7S14b1zQhQ5iHsLXoiM6g9SbTICDPdIRbiLw5kyqpNK72djNgGWIYj + GVIPB5e+cBrauvSdh5tGWKbEHMJFrn6HxDf0bNOfE+Na7cEWaFPT+m+oNMjip9J/pE90Xrz9Gph + GWIYjGUIW/zZyMysOcrGuTjXVAwXjbgST0WjKbZ70nXkC77VFy9r/jEXZteC077W0NXCMsQwGJu + HNGJsp+QlfZqXsHWHKi4n1xS0YZvToWc+lPLr+U+k2BSqgV31MnNjvgfLEMNgjGWsFFytiM3WcZ + WBOUWgoj6kqv/Ii00RXBm7GljViBFXwaD/d2IZYhiMjbKWgreUhlb3OAFz4CHZz6aGWHd4hTnHF + cWWjeBAeJKpKbAMMQy3HEO45Mfecfl3qNSyuB5iRtt/XP43hK5w3nK+4rcBNa7FZQIsQwyDMdFF + qxh9UZb+6HtIlr1wF8SHFM6JPsVGueDiMzej8W21sAwxDPYHMQy3nFNfCmltrKuWRDrhv0HlUMW + V8Rrn1JsGyxDDYLS1XA927ZZWooL+MzC29sycuHmNCq3AMsQwfGt8CFHISwEqskbDWwPlkeVgGW + JxczH20lidTXe3AixDLCwsLCwsviX4P68/8cprSSqmAAAAAElFTkSuQmCC +ROLE:Developer +SOUND;ENCODING=b:UklGRiQgAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQAgAA + B/f39/f39/f39/f39/f4B/gH+Af4CAgIGBgYGBgYGBgYGBgYGBgYGBgIGAgICBgYGBgYGBgYCAg + YGAgICAgICAgIGBgICAgYCAgICBgICAgICAgICAgIGAgICAgYCAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAf4CAgICAgICAgICAgICAgIB/f4CAgICAgICAgIB/f4B/f39/f39/f3+AgICAf4CAf3 + 9/gIB/f4CAgH9/gICAgH+AgICAgICAgICAf4CAgIB/gICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgIB/gICAf39/f39/f3+Af4CAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgH9/f39/f39/f39/f39/f4CAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYCAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgYCAgICB + gICAgYGBgICAgICAgICAgIGAgICBgICBgYGBgYGBgYGAgYGBgYCBgYGBgYGBgYGBgYGBgYGBgYG + BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgICAgYGBgIGBgYGAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYGAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgH+AgICAgICAgICAgICAgICAgICAf4CAgIB/gH+Af4B/f39/f39/f + 39/f39/f4CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgYG + BgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgY + GBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAgIGBgYCAgICBgYCAgYGBgYCAgICBg + YCAgICAgICAgICAgICAgIGAgICAgICAgICAgICAgYGBgYGAgICAgIGBgYCAgICBgYGAgICAgIGA + gICAgICAgIGBgYCBgYGAgYGBgYGBgoGBgYGCgoGAgICBgYGBgYCBgYKCgYGBgYGBgYGAgYGBgH9 + /gIB/f3+AgIB/gH9/gICAf4CBgYB/f35+gIB/f4CBgX9/gYCAgYKCgYCAgYOBgICAgoGAf4GCgn + 9/gIB/gICBgH5/f4GAfX+BgYB+fn9/fn+Afn6Af39+f35+fn9+fn6AgH9/f4CAgYCAgYKCgH9/g + IKBf3+AgYJ/f4GCg4F/gIGCgoOBfoCDgYF/fH+BgYGAfn6Af4CCgn58gIN/fX+AgICBgYGAgYCB + goOCgICBgYB/fXyBhIGAgH5+f4GBgX9/f35+gIKCgXt9goN/f318f4GAf4B/fHt9fn5+fXx+fn5 + /gH9+fHx/gHx9f4CAfn18gIB9e4GBfn5+foCBfHyAgoGAfX6CgYCBgH+DgHt9gYN/fX2BhYB7en + 6AgH98foKCgH18foCAfoCAf4CAf31+fn+AgH1+goJ/fX5/gIKAgIGAfH6CgX17foCBf3+BgoB/g + YOBgIB/f4KDgoJ+e3+ChIOBfn1/gX+BfX2BgH59foCCfn1/gX99fICAgoB/f39/gISCf36AgoSB + foCBgYGAf4CCf4CCgX5/gYKDgYB/gH+BhIOBgYB/gIOEhIF9foGCg4OBgICBgoOCgICChIOBg4O + CgoSDgoKAgYKBgoODhISBf4CCg4SEgoGCg4SEgH6BhIWEgX+EhYKAgoKFhIB+gIKChYKAgYOCgo + B+gYWFhIKAg4WEg4ODhIWFhYaGhIWGhYWGh4eHhYOCgoSFg4B/gIB+fX1+fn57e3t7fHt6fH5/f + 4GDhYiMkJGQj5GVmZycmZiXlZGIfXRwcnZ4d3Nva2hoamppaWxvc3R0dXl+iJCPjZShqrCzvNHi + rFYxOmKSrJ6UmJOAbV1ZboSMjI6JfnNjW2JweYGFg4B/e3Z0c3Btc3p9fHp4fIGBf3+Dh4qLjJG + YnZuWkY6MhnpwbnN6fHlya2hlZmdmaW9ycXFzd3t/g42cpquzvMzd/sRADiBZkL6xpLa1jFpANV + iHoJ2ioJWGbEQ2VHaOm5aHhIFuYmZzgoVxZFxfdJCSgnt/kKewr7bDsopcSV6JopyRjpOQfmNXZ + HmGhYB8fXtvXExKXnyKgnJsc3t8fZC0ysfK0+vHTxEeXY6yr6rAxJRSNTdbh5+fp7KjglQ6PVx3 + ho6Ph3dmW15oa2x0hIuNkK3R18jJ0Ys8LUlxkqais8WtdlBFT2yDjpywro9mS0VVaXaBiIdyX2J + rcG5udYKKjaXT4dfV2Y82JkBpiaKkvdO2eE9GTGZ4hZu6u51yTUNOX2l9kZWKdl5PXG93dHeAip + KZut7j2tacRjJIYHCOo77XvoRdVlFYZniVuL+kfl9ST1Rcb4mTjoNxW1pqdXd5fH6CiKHN4d7k2 + 4E4N05Yaoqo1eO0emVbTU5ZdKDCuZV9b1tMSVlyiYp8dHl7cmpqdYCCgIqixNTR2OqnRTlPXFt3 + ksbnw4lzcFdKS2KMtLWZiIZwV0lPZXZ1b3uNinZqbXJ3dX2XxOPg4/zDUDRCTUhmiMXx1p+If1g + +O1J7pK+yspN3W0pGVGdugYmCen54b21rb3V9i6vZ7vD92WpAS0gzSny04tq3qp5qPDhHX3uVrs + KukXVhT0hRYnF/gnuCh31ubG9zdHeMs+Dr8P7KalFVOylJeq7QzMPIqmtIRUZOY4KovqicknhZS + 1BWXWh6gIeLiH91b21vc4GcyuXt/umTZGhGIjJfh6y+yt7LkGlfTD1GYYOipKKwnXhkXldVUFhs + dYOMjYWBem9ucoCWvNTm9+2weHdZMSpQboujvtnUrY6BZEdDUmV4jZypppeFd2dcWVFWWWh8hYS + Ii393c3Z7iJ3A1ePp3aGDfVYyOVZkfJe5zsavpJNsU1BTVmR9kpmcn5uGdGxoWU5VVGZ0fIKLh4 + F/d3Z6g4ufuc3e3depjoViPz9VWm2FqLu8tLGifmphWlJZbH+Lj5+elod+c19WU0xUZW11gISEg + nx6e3h6g4qWp7zM3NrSpZGIYkRFVVVlfZ6vsbW3qIl7b2BUWGVwe4ybn52TkIRuX2BVRVFjZmp7 + hIF9fX12cnZ6eX6LlZyousfP0c++jot6X0ZRXF9sgaCnqa6yn4eAdGZZYGlvd4mcnqCWnY91aWN + cSUtYYmJxf399f351cXFzcHF4foOIlZ+hp7CytLm8uLKNg4RtYF5oanN8j5qZnqGaioV9dGpqb3 + J1f42Rk5iZjIKAcmFcW1RXYGhwdXt+e3Z2c25tcXJxd3yChY2Tl5udn6Gho6ioq6uonoaHbWNzZ + GdxgoGPlZqdj5CJgHFzcWxwdH1/hYqOioSFfnFpaWBdX2Jqb3N5fHh4eHNxcXFxc3d7foOJjI6Q + lZOSlZOTl5eYnJucnpyZkYiEfnd1dnZ5fYKHio6QkIyHg394dHRzc3Z5fHt2enJrcG5obG9sbW9 + ucHJzdnh3eXp5eXt9foCDhoeJjI6OkJGSk5aYmZudn6Gjn5qLh4J3cnJ0dHR5g4GEi42Ih4aBfH + h4dXR1eHl4dXhuaW5rZ2ltaWttbW5vcnR1dHZ2dXV2d3d7fn+BhIeIiYuOjpCTlJWZnJueoKarr + ZuJhntvaW1ucnh+hIWJi4qFg4F7d3V1c3R3fH1/gHlvbXJnXmdpYmdtamtxcW9vbm9tamxtbG5z + dXZ5fHx7fX9+fH6AgoWHioyNj5CRlZeYmp2TiYyGenp9eXh9fX19foB/fH1/e3p8e3l5e3x7e3x + 6d3FxcnBwcG9vb29vb29wb25tbWxsbW5vb3Fyc3N1dXV1dnd4ent9fn+BgoGAgoWEhoqJiYyLi4 + yPioaLiYSEh4WDhIOCgoKAgX58fXx5eXp4eHl4dXZ1cnN0dHR1cnJycXBxcnJycW9ubGxsbW1ub + m5ub29vcXNzdHZ2dXh6enp+fn5/gYCBhIKFiYeGiomJi4qKjIuLjIyLiomKh4aKioeIiIWDgYB9 + fHx7e3l4eHh2dnd3d3l7enp6enp5ent7e3x7enl6e3t7fHx7e3p8fX5/gIKDg4GCg4KCg4OEhoe + Hh4iJiomLjIqLi4uLi46Pjo2OjouJiomHh4aDgH9/fXp5eXh3d3h4eHh4d3V2d3Z0dnd0dXd3d3 + p7fH59fX19fH5+fn+Af4CAf3+Af359f4KDgoSIiIeJjI6PkJOUk5SYmZiYmZqZmJqamJiZmJaWl + ZSTkZCQj46Ni4qHh4iFgoKBfn9+fn+AgYCAgYOCgoSEg4SFhIODg4OCgICBf35/gICAgYKCgYGD + hIOBgYOCgYGAgIGBgIGCgoKBgoSEg4KCgH9/f318fHt6e3t7enl5eHh5fH18foCAf4GDg4OFhoa + GhoeJh4aJioiIiYiIhoWGh4aGh4eHiImHh4mIiIeHh4iIiIqJioqJh4mKh4eJiYiHh4eHhoWGhY + OEhYWEhYWDg4SFhYWEg4SDgYKCgH+AgICBgoOCgYGBgYKEhoaGhoiIh4eJiYmKioqKiomKioiJi + oqJiYmJiIiIiYiHh4eHh4eGhYWFhISDgoKCgoKCgYGAf31+fXx9fn58e3x8fHx9fX19fX19fX19 + fHx9fn5/gICBgYGCgoKCg4OCgoODgoKDg4OCgoKCgoGBgYGBgYGCgYCBgIGCgoKDg4KCg4OEhIS + FhYWFhYWFhYWFhoWGhoWEhISDg4ODg4ODg4ODg4SDgoKDg4OCg4SDgoKDgoGBgoGAgIB/f35+fn + 9+fn9/f35+fn5/gICAgIGBgYKCg4ODg4SEg4OEhIODhIODhIODg4ODg4OCgoKBgoKCg4OCgoODg + 4ODg4OEhISEhIWEhIWFhISEhISEhIWEhISEhIODhISEg4ODg4ODg4ODg4ODgoKCgoKCg4KCgoKC + goKCgoKCgoOCgoKCgoKBgYKCgoKCgoGBgYGAgICAgYGBgYCAf39/f39/f3+Af39/f39/f39/gIC + AgIB/f39/f39/gICAgIB/f39/gIB/f39/gH9/f39/f39/fn5+f39/f39/fn5+fn5/f39/f39/fn + 5+fn9/f39/f35+fn5+fn9/f35/f39+fn5+fn9/fn5+fn5+fn5+f39+fn5+fn19fX5+fn5+fn5+f + X5+fn5+fn5+fn19fn5+fn5+fX19fX59fn5+fn19fX19fX1+fX19fX19fX19fX19fX19fX19fX19 + fX19fX19fX19fX19fX19fX19fX19fX19fXx9fX18fH19fXx8fXx9fXx8fHx8fHx8fH19fX19fXx + 9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX + 19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f + X19fX19fX19fX19fX19fX19fX19fX19fX1+fX5+fn19fn5+fn5+fn5+fn5+fn5+fn5+fn5+fn5+ + fn5+fn5+fn5+fn5+f39/fn5/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f4B/f3 + 9/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f + 39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/ + f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f4B/f39/f39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3 + 9/f39/f39/f39/f39/f39/f35+fn5+f35/f39/f39/f39/f39/f39/f39/f39/f39/f39/f35+f + 39+fn5/fn5+f39/fn9/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/ + f39/f39/f39/f39/f39+fn9/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f4CAf39/f39/f39/gIB/f39/f39/f4B/f4CAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgIB/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/gICAgIC + AgICAgICAgICAgICAgICAgICAgICAgIGBgYGAgYGBgICAgIGAgICBgYGAgYGBgYGBgYGBgYGBgY + GBgYGBgYGBgYGBgYGBgYGAgYCAgICAgICAgICAgICAgICAgICAgICAgICAgH+AgICAf39/gH9/f + 3+Af39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f4CAgH9/gIB/f39/f4B/f3+AgICAf4CA + gICAgICAgICAgICAgH9/f4CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgIB/f39/f39/f39/f4CAf39/f39/f39/f39/f39/f39+fn + 9/fn5+fn5+fn5+fn5+fX19fX19fX19fX19fX19fX19fn5+fn5+fn9/f39/f4CAgICAgICBgYGBg + YGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYCAgICAgICAgICAgICAgICAgYGAgICA + gICAgICAgICAgICBgYGAgICAgICAgICAgICAgICAgICAgICAgIB/gICAgH9/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/gICAgICAf39/f39/gH+AgI + CAgICAgIB/f39/f39/f4B/f39/f39/f39/f39/f39/f39/f39/f39/f39/fn9/f39/f39/f39+f + 39/f39/f39/f39/f39/f39/f39/f4B/f4CAgICAf39/f39/gICAf39/gICAgICAgICAgICAgICA + gICAgIGAgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYCAgICBgYGBgYGBgYCBgYGBgYCAgIG + BgICAgICAgICAgICAgICAgICAgICAgICAgICBgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAf3+AgIB/f4CAf39/f39/f3+AgICAgH+AgICAf3+AgICAgICAgH9/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3 + 9/f39/f39/gH9/gICAgICAgICAgIB/gICAgH+AgIB/f39/f39/gICAgICAgH9/f3+AgH9/f4B/f + 39/f39/f39/f39/f3+AgICAgICAf3+AgIB/f4CAgIB/f4CAgICAgICAgICAf39/f3+AgIB/f4CA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAf39/f39 + /f4CAgH9/f39/f39/f39/f39/f39/f39/f39/f39/f4B/f39/f39/gIB/f39/f39/f39/gH9/f3 + 9/f4CAgICAgIB/gICAgICAgICAgICAgICAgICAgICAgICAgH+AgICAf4CAgICAgICAgIB/gICAf + 4CAgICAgH+Af4CAgH9/f39/f39/f39/gICAgICAgICAgICAf39/f39/f4CAgH9/gICAf3+AgICA + gICAgICAgICAgICAgICAgICAgIB/f39/gIB/f4CAgIB/f4CAgH9/gICAf39/f39/f39/f39/f39 + /f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3 + 9/f39/f39/f39/f39/f39/f39/f39/f39/f39/gICAf39/gH9/f3+AgH9/f39/f39/f39/f39/f + 39/f39/f39/f39/f39/f39/f39/gICAf3+AgH9/f3+AgH9/f4CAgH9/gICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAgICAgICBgYGBgIGBgYCAgYGAgICAgYCAgICAgICAgICAgICAgICAg + ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA + gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC + AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI + CAgICAgICAgICAgICAgICAf39/f39/f4CAgIB/f4CAgICAgICAgICAgICAgICAgICAgICAgICAg + ICAf39/f3+Af39/f39/f39/f4B/f39/f4CAgICAgICAgICAgA== +TEL;TYPE=HOME:0351 223344 +TEL;TYPE=WORK:0351 443322 +TEL;TYPE=CELL:0173 223344 +UID:P9HXg34Oav +URL:http://www.mustermann.de/~heiko/ +X-KADDRESSBOOK-X-Anniversary:1982-07-07 +X-KADDRESSBOOK-X-AssistantsName:Mr. Smithers +X-KADDRESSBOOK-X-Department:Edutainment +X-KADDRESSBOOK-X-IMAddress:122334455 +X-KADDRESSBOOK-X-ManagersName:Mr. Burnes +X-KADDRESSBOOK-X-Office:223 2nd stage +X-KADDRESSBOOK-X-Profession:Clown +X-KADDRESSBOOK-X-SpousesName:femal clown +END:VCARD + diff --git a/autotests/data/v4_0.vcard6.vcf.ref b/autotests/data/v4_0.vcard6.vcf.ref new file mode 100644 index 0000000..80622a6 --- /dev/null +++ b/autotests/data/v4_0.vcard6.vcf.ref @@ -0,0 +1,10 @@ +BEGIN:VCARD +VERSION:4.0 +CLASS:PUBLIC +EMAIL;TYPE=PREF:email1@abc.de +EMAIL:email2@abc.de +FN:Test User +N:User;Test;;; +UID:uJTkVqH5Qt +END:VCARD + diff --git a/autotests/data/v4_0.vcard7.vcf.ref b/autotests/data/v4_0.vcard7.vcf.ref new file mode 100644 index 0000000..64ff743 --- /dev/null +++ b/autotests/data/v4_0.vcard7.vcf.ref @@ -0,0 +1,8 @@ +BEGIN:VCARD +VERSION:4.0 +FN: +LABEL;TYPE=work:401 Park Drive 3 West\nBoston\, MA 02215\nUSA\nHerecomesye + tanotherline +UID:pas-id-3E136F9B00000000 +END:VCARD + diff --git a/autotests/data/v4_0.vcard8.vcf.ref b/autotests/data/v4_0.vcard8.vcf.ref new file mode 100644 index 0000000..55bf303 --- /dev/null +++ b/autotests/data/v4_0.vcard8.vcf.ref @@ -0,0 +1,8 @@ +BEGIN:VCARD +VERSION:4.0 +FN:test +N:test;;;; +NOTE:line one\nline two\nline three\n +UID:8OD165Pope +END:VCARD + diff --git a/autotests/data/vcard1.vcf b/autotests/data/vcard1.vcf new file mode 100644 index 0000000..da4613e --- /dev/null +++ b/autotests/data/vcard1.vcf @@ -0,0 +1,14 @@ +BEGIN:vCard +VERSION:3.0 +UID:gDVbA6LY3t +FN:Frank Dawson +ORG:Lotus Development Corporation +ADR;TYPE=WORK,POSTAL,PARCEL:;;6544 Battleford Drive + ;Raleigh;NC;27613-3502;U.S.A. +TEL;TYPE=VOICE,MSG,WORK:+1-919-676-9515 +TEL;TYPE=FAX,WORK:+1-919-676-9564 +EMAIL;TYPE=INTERNET,PREF:Frank_Dawson@Lotus.com +EMAIL;TYPE=INTERNET:fdawson@earthlink.net +URL:http://home.earthlink.net/~fdawson +END:vCard + diff --git a/autotests/data/vcard1.vcf.2_1ref b/autotests/data/vcard1.vcf.2_1ref new file mode 100644 index 0000000..08ede3e --- /dev/null +++ b/autotests/data/vcard1.vcf.2_1ref @@ -0,0 +1,14 @@ +BEGIN:VCARD +VERSION:2.1 +ADR;PARCEL;POSTAL;WORK:;;6544 Battleford Drive;Raleigh;NC;27613-3502;U.S.A. +EMAIL;INTERNET;PREF:Frank_Dawson@Lotus.com +EMAIL;INTERNET:fdawson@earthlink.net +FN:Frank Dawson +N:;;;; +ORG:Lotus Development Corporation +TEL;MSG;VOICE;WORK:+1-919-676-9515 +TEL;FAX;WORK:+1-919-676-9564 +UID:gDVbA6LY3t +URL:http://home.earthlink.net/~fdawson +END:VCARD + diff --git a/autotests/data/vcard1.vcf.ref b/autotests/data/vcard1.vcf.ref new file mode 100644 index 0000000..038cb5f --- /dev/null +++ b/autotests/data/vcard1.vcf.ref @@ -0,0 +1,15 @@ +BEGIN:VCARD +VERSION:3.0 +ADR;TYPE=parcel,postal,work:;;6544 Battleford Drive;Raleigh;NC;27613-3502;U + .S.A. +EMAIL;TYPE=INTERNET,PREF:Frank_Dawson@Lotus.com +EMAIL;TYPE=INTERNET:fdawson@earthlink.net +FN:Frank Dawson +N:;;;; +ORG:Lotus Development Corporation +TEL;TYPE=MSG,VOICE,WORK:+1-919-676-9515 +TEL;TYPE=FAX,WORK:+1-919-676-9564 +UID:gDVbA6LY3t +URL:http://home.earthlink.net/~fdawson +END:VCARD + diff --git a/autotests/data/vcard10.vcf b/autotests/data/vcard10.vcf new file mode 100644 index 0000000..821aea6 --- /dev/null +++ b/autotests/data/vcard10.vcf @@ -0,0 +1,56 @@ +BEGIN:VCARD +VERSION:2.1 +UID:bfa5fdc5-fbfc-4ce2-8196-29ca0deb3bd3 +ADR;WORK;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44=2D=53=74=61=C3=9F=65=20= +=32=0A=30=30=30=30=30=20=44=44=44=44=44=44=44=44=44=44;;;; +ORG:Bike Shop +Note:This one has a funny character at the end in the contact list +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:f8361311-b25c-4237-a94e-3015d8fe19de +N:;Broken;;; +FN:Field after Address broken +ADR;HOME;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=41=41=41=41=41=41=41=2D=41=C3=A4=41=41=41=41=41=20= +=31=31;=55=72=74;;=30=30=30=30=30; +URL:http://some-webseite.com +NOTE:This one's URL field is truncated (see contact's edit form). Remove the linebreak in the VCF's address field and the URL will will be correct. +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:462269fd-607c-4284-998b-6771143b63a7 +N:;Broken;;; +FN:Field after Address not broken +ADR;HOME;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=41=41=41=41=41=41=41=2D=41=C3=A4=41=41=41=41=41=20= +=31=31;=55=72=74;;=30=30=30=30=30; +NOTE:this is identical to "Website broken", but with Note and URL swapped. The Note field does not get truncated as the URL field does. +URL:http://some-webseite.com +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:b4fc4930-043f-446a-9a76-cf0b548368d8 +N:Name;Surname;;Dr. med.; +FN:Dr. med. Surname Name +TITLE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=46=61=63=68=61=72=7A=74=20=66=C3=BC=72=20=41=6C=6C=67=65=6D=65=69=6E= +=6D=65=64=69=7A=69=6E +NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=53=70=72=65=63=68=7A=65=69=74=65=6E=3A=0A=4D=6F=20=20=20=38=E2=80=93= +=31=32=2C=20=31=35=E2=80=93=31=38=0A=44=69=20=20=20=20=20=38=E2=80=93= +=31=32=0A=4D=69=20=20=20=20=38=E2=80=93=31=32=2C=20=31=34=E2=80=93=31= +=35=0A=44=6F=20=31=34=E2=80=93=31=39=0A=46=72=20=20=20=20=20=38=E2=80= +=93=31=32 +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:941b057d-e959-4644-b41f-e122b26c3807 +N:Doctor;Second;;; +FN:Second Doctor +ADR;WORK;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=44=44=44=44=44=44=44=44=44=44=44=73=74=72=61=C3=9F=65=20=32=36=0A=30= +=30=30=30=30=20=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44;;;; +ORG: +TITLE:Dentist +NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=53=70=72=65=63=68=7A=65=69=74=65=6E=3A=0A=4D=6F=20=20=20=38=E2=80=93= +=31=33=0A=44=69=20=20=20=31=30=E2=80=93=31=32=2C=20=31=33=E2=80=93=31= +=38=0A=4D=69=20=20=31=30=E2=80=93=31=32=2C=20=31=33=E2=80=93=31=38=0A= +=44=6F=20=20=31=33=E2=80=93=31=38=0A=46=72=20=20=20=20=20=20=38=E2=80= +=93=31=32 +END:VCARD diff --git a/autotests/data/vcard10.vcf.ref b/autotests/data/vcard10.vcf.ref new file mode 100644 index 0000000..149a7ed --- /dev/null +++ b/autotests/data/vcard10.vcf.ref @@ -0,0 +1,53 @@ +BEGIN:VCARD +VERSION:3.0 +ADR;TYPE=work:;;DDDDDDDDDDDDDDD-Staße 2\n00000 DDDDDDDDDD;;;; +N:;;;; +NOTE:This one has a funny character at the end in the contact list +ORG:Bike Shop +UID:bfa5fdc5-fbfc-4ce2-8196-29ca0deb3bd3 +END:VCARD + +BEGIN:VCARD +VERSION:3.0 +ADR;TYPE=home:;;AAAAAAA-AäAAAAA 11;Urt;;00000; +FN:Field after Address broken +N:;Broken;;; +NOTE:This one's URL field is truncated (see contact's edit form). Remove th + e linebreak in the VCF's address field and the URL will will be correct. +UID:f8361311-b25c-4237-a94e-3015d8fe19de +URL:http://some-webseite.com +END:VCARD + +BEGIN:VCARD +VERSION:3.0 +ADR;TYPE=home:;;AAAAAAA-AäAAAAA 11;Urt;;00000; +FN:Field after Address not broken +N:;Broken;;; +NOTE:this is identical to "Website broken"\, but with Note and URL swapped. + The Note field does not get truncated as the URL field does. +UID:462269fd-607c-4284-998b-6771143b63a7 +URL:http://some-webseite.com +END:VCARD + +BEGIN:VCARD +VERSION:3.0 +FN:Dr. med. Surname Name +N:Name;Surname;;Dr. med.; +NOTE:Sprechzeiten:\nMo 8–12\, 15–18\nDi 8–12\nMi 8–12\, 14 + –15\nDo 14–19\nFr 8–12 +TITLE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=46acharzt f=C3=BCr Allgemein + medizin +UID:b4fc4930-043f-446a-9a76-cf0b548368d8 +END:VCARD + +BEGIN:VCARD +VERSION:3.0 +ADR;TYPE=work:;;DDDDDDDDDDDstraße 26\n00000 DDDDDDDDDDDDDDDDD;;;; +FN:Second Doctor +N:Doctor;Second;;; +NOTE:Sprechzeiten:\nMo 8–13\nDi 10–12\, 13–18\nMi 10–12\, 13 + –18\nDo 13–18\nFr 8–12 +TITLE:Dentist +UID:941b057d-e959-4644-b41f-e122b26c3807 +END:VCARD + diff --git a/autotests/data/vcard11.vcf b/autotests/data/vcard11.vcf new file mode 100644 index 0000000..904e083 --- /dev/null +++ b/autotests/data/vcard11.vcf @@ -0,0 +1,10 @@ +BEGIN:VCARD +CLASS:PUBLIC +EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:thejoe@abc.com +EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:johndoe@abc.com +FN:Test User +N:User;Test;;; +UID:uJTkVqH5Qt +VERSION:3.0 +END:VCARD + diff --git a/autotests/data/vcard11.vcf.ref b/autotests/data/vcard11.vcf.ref new file mode 100644 index 0000000..2b8709a --- /dev/null +++ b/autotests/data/vcard11.vcf.ref @@ -0,0 +1,10 @@ +BEGIN:VCARD +VERSION:3.0 +CLASS:PUBLIC +EMAIL;TYPE=HOME;X-EVOLUTION-UI-SLOT=2:thejoe@abc.com +EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:johndoe@abc.com +FN:Test User +N:User;Test;;; +UID:uJTkVqH5Qt +END:VCARD + diff --git a/autotests/data/vcard12.vcf b/autotests/data/vcard12.vcf new file mode 100644 index 0000000..ecb2d6c --- /dev/null +++ b/autotests/data/vcard12.vcf @@ -0,0 +1,15 @@ +BEGIN:VCARD +VERSION:3.0 +UID:pas-id-54B2522600000001 +FN:Good Looking +N:Looking;Good;;; +PHOTO;TYPE=WORK;ENCODING=b:iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAA + CXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wELCiUrjAUGmgAAABl0RVh0Q29tbWVudABDcm + VhdGVkIHdpdGggR0lNUFeBDhcAAAAZSURBVAjXY/zPAAVMDAwMDP//MzAwMMLFAEMrBAHo3Yr/ + AAAAAElFTkSuQmCC +PHOTO;TYPE=HOME;ENCODING=b:iVBORw0KGgoAAAANSUhEUgAAAAMAAAADCAIAAADZSiLoAAAA + CXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wELCiQG0MFrrgAAABl0RVh0Q29tbWVudABDcm + VhdGVkIHdpdGggR0lNUFeBDhcAAAAUSURBVAjXY/j//z8DAwOEhAG4GACzagv1unIx3wAAAABJ + RU5ErkJggg== +EMAIL;TYPE=WORK;X-EVOLUTION-UI-SLOT=1:goodlooking@example.com +END:VCARD diff --git a/autotests/data/vcard12.vcf.2_1ref b/autotests/data/vcard12.vcf.2_1ref new file mode 100644 index 0000000000000000000000000000000000000000..65601350508304f7ab150524187691b18f3347dd GIT binary patch literal 555 zcmZ>Ab@%kM3UhW0a^d9)a}5gi^!Kwe(lg}ca`koe^sx^25AwE-&~**-_X!OF%ISuB z>IVDxhu9igrRV3TWX80|P@$k*9}C5RkzP z!W>LM@}`&43n0Z=;1OBOz`)JRr63HXgc%uT&5;0#vzK`Ky0YJA + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "datetimetest.h" +#include +#include + +DateTimeTest::DateTimeTest(QObject *parent) + : QObject(parent) +{ +} + +DateTimeTest::~DateTimeTest() +{ +} + +void DateTimeTest::shouldParseDateTime() +{ + using namespace KContacts; + + QDateTime expected, dt; + bool timeIsValid; + + dt = VCardTool::parseDateTime(QStringLiteral("2016-01-20T12:33:30+0200")); + expected = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30), Qt::OffsetFromUTC, 2 * 3600); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("2016-01-20T12:33:30+02")); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("20160120T123330+0200")); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("2016-01-20T12:33Z")); + expected = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 0), Qt::UTC); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("2016-01-20T12:33-0300")); + expected = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 0), Qt::OffsetFromUTC, -3 * 3600); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("2016-01-20T12:33"), &timeIsValid); + expected = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 0), Qt::LocalTime); + QCOMPARE(dt, expected); + QVERIFY(timeIsValid); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("2016-01-20"), &timeIsValid); + expected = QDateTime(QDate(2016, 1, 20), QTime(), Qt::LocalTime); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + QVERIFY(!timeIsValid); + QCOMPARE(dt.time(), QTime(0, 0)); + + dt = VCardTool::parseDateTime(QStringLiteral("T1233Z"), &timeIsValid); + QVERIFY(!dt.isValid()); + QVERIFY(timeIsValid); + QCOMPARE(dt.time(), QTime(12, 33)); + + dt = VCardTool::parseDateTime(QStringLiteral("--0120")); + expected = QDateTime(QDate(-1, 1, 20)); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); + + dt = VCardTool::parseDateTime(QStringLiteral("--01-20")); + expected = QDateTime(QDate(-1, 1, 20)); + QCOMPARE(dt, expected); + QVERIFY(dt.isValid()); +} + +void DateTimeTest::shouldCreateDateTime() +{ + using namespace KContacts; + + QDateTime dt; + QString str, expected; + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30), Qt::UTC); + str = VCardTool::createDateTime(dt, VCard::v4_0); + expected = QStringLiteral("20160120T123330Z"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(), Qt::UTC); + str = VCardTool::createDateTime(dt, VCard::v4_0); + expected = QStringLiteral("20160120T000000Z"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30), Qt::LocalTime); + str = VCardTool::createDateTime(dt, VCard::v4_0); + expected = QStringLiteral("20160120T123330"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30), Qt::OffsetFromUTC, -2 * 3600); + str = VCardTool::createDateTime(dt, VCard::v4_0); + expected = QStringLiteral("20160120T123330-0200"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30), Qt::OffsetFromUTC, +2.5 * 3600); + str = VCardTool::createDateTime(dt, VCard::v4_0); + expected = QStringLiteral("20160120T123330+0230"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30), Qt::OffsetFromUTC, -2 * 3600); + str = VCardTool::createDateTime(dt, VCard::v3_0); + expected = QStringLiteral("2016-01-20T12:33:30-02:00"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(), QTime(12, 33, 30), Qt::OffsetFromUTC, -2 * 3600); + str = VCardTool::createDateTime(dt, VCard::v3_0); + expected = QString(); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30)); + str = VCardTool::createDateTime(dt, VCard::v3_0, false); + expected = QStringLiteral("2016-01-20"); + QCOMPARE(str, expected); + + dt = QDateTime(QDate(2016, 1, 20), QTime(12, 33, 30)); + str = VCardTool::createDateTime(dt, VCard::v4_0, false); + expected = QStringLiteral("20160120"); + QCOMPARE(str, expected); +} + +void DateTimeTest::shouldCreateDate() +{ + using namespace KContacts; + + QDate d; + QString str, expected; + + d = QDate(2016, 1, 20); + str = VCardTool::createDate(d, VCard::v3_0); + expected = QStringLiteral("2016-01-20"); + QCOMPARE(str, expected); + + d = QDate(2016, 1, 20); + str = VCardTool::createDate(d, VCard::v4_0); + expected = QStringLiteral("20160120"); + QCOMPARE(str, expected); + + d = QDate(-1, 1, 20); + str = VCardTool::createDate(d, VCard::v3_0); + expected = QStringLiteral("--01-20"); + QCOMPARE(str, expected); + + d = QDate(-1, 1, 20); + str = VCardTool::createDate(d, VCard::v4_0); + expected = QStringLiteral("--0120"); + QCOMPARE(str, expected); +} + +QTEST_MAIN(DateTimeTest) diff --git a/autotests/datetimetest.h b/autotests/datetimetest.h new file mode 100644 index 0000000..0297ea4 --- /dev/null +++ b/autotests/datetimetest.h @@ -0,0 +1,39 @@ +/* + This file is part of kcontacts. + Copyright (c) 2016 Benjamin Löwe + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef DATETIMETEST_H +#define DATETIMETEST_H + +#include + +class DateTimeTest : public QObject +{ + Q_OBJECT +public: + explicit DateTimeTest(QObject *parent = nullptr); + ~DateTimeTest(); + +private Q_SLOTS: + void shouldParseDateTime(); + void shouldCreateDateTime(); + void shouldCreateDate(); +}; + +#endif // DATETIMETEST_H diff --git a/autotests/emailtest.cpp b/autotests/emailtest.cpp new file mode 100644 index 0000000..3768c9c --- /dev/null +++ b/autotests/emailtest.cpp @@ -0,0 +1,185 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#include "emailtest.h" +#include "email.h" +#include +#include "vcardtool.h" + +EmailTest::EmailTest(QObject *parent) + : QObject(parent) +{ +} + +EmailTest::~EmailTest() +{ +} + +void EmailTest::shouldHaveDefaultValue() +{ + KContacts::Email email; + QVERIFY(!email.isValid()); + QVERIFY(email.mail().isEmpty()); + QVERIFY(email.parameters().isEmpty()); +} + +void EmailTest::shouldAssignValue() +{ + const QString mail(QStringLiteral("foo@kde.org")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Email email(mail); + email.setParameters(params); + QVERIFY(email.isValid()); + QVERIFY(!email.mail().isEmpty()); + QCOMPARE(email.mail(), mail); + QVERIFY(!email.parameters().isEmpty()); + QCOMPARE(email.parameters(), params); +} + +void EmailTest::shouldAssignExternal() +{ + KContacts::Email email; + const QString mail(QStringLiteral("foo@kde.org")); + email.setEmail(mail); + QVERIFY(email.isValid()); + QVERIFY(!email.mail().isEmpty()); + QCOMPARE(email.mail(), mail); +} + +void EmailTest::shouldSerialized() +{ + KContacts::Email email; + KContacts::Email result; + const QString mail(QStringLiteral("foo@kde.org")); + email.setEmail(mail); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + email.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << email; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(email == result); +} + +void EmailTest::shouldEqualEmail() +{ + KContacts::Email email; + KContacts::Email result; + const QString mail(QStringLiteral("foo@kde.org")); + email.setEmail(mail); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + email.setParameters(params); + + result = email; + QVERIFY(email == result); +} + +void EmailTest::shouldParseEmailVCard() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "EMAIL;TYPE=HOME,PREF;X-EVOLUTION-UI-SLOT=2:foo@foo.com\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(!lst.at(0).emailList().isEmpty()); + QCOMPARE(lst.at(0).emailList().count(), 1); + KContacts::Email email = lst.at(0).emailList().at(0); + QCOMPARE(email.mail(), QStringLiteral("foo@foo.com")); + QCOMPARE(email.parameters().count(), 2); +} + +void EmailTest::shouldParseEmailVCardWithMultiEmails() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "EMAIL;TYPE=HOME,PREF;X-EVOLUTION-UI-SLOT=2:foo@foo.com\n" + "EMAIL;TYPE=HOME,PREF;X-EVOLUTION-UI-SLOT=2:bla@bla.com\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(!lst.at(0).emailList().isEmpty()); + QCOMPARE(lst.at(0).emailList().count(), 2); + KContacts::Email email = lst.at(0).emailList().at(0); + QCOMPARE(email.mail(), QStringLiteral("bla@bla.com")); + email = lst.at(0).emailList().at(1); + QCOMPARE(email.mail(), QStringLiteral("foo@foo.com")); + + QCOMPARE(email.parameters().count(), 2); +} + +void EmailTest::shouldParseEmailVCardWithoutEmail() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(lst.at(0).emailList().isEmpty()); +} + +void EmailTest::shouldExportVcard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("bla@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "EMAIL:bla@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +QTEST_MAIN(EmailTest) diff --git a/autotests/emailtest.h b/autotests/emailtest.h new file mode 100644 index 0000000..fa11de8 --- /dev/null +++ b/autotests/emailtest.h @@ -0,0 +1,45 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef EMAILTEST_H +#define EMAILTEST_H + +#include + +class EmailTest : public QObject +{ + Q_OBJECT +public: + explicit EmailTest(QObject *parent = nullptr); + ~EmailTest(); + +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualEmail(); + void shouldParseEmailVCard(); + void shouldParseEmailVCardWithoutEmail(); + void shouldParseEmailVCardWithMultiEmails(); + void shouldExportVcard(); +}; + +#endif // EMAILTEST_H diff --git a/autotests/fieldgrouptest.cpp b/autotests/fieldgrouptest.cpp new file mode 100644 index 0000000..f06fa30 --- /dev/null +++ b/autotests/fieldgrouptest.cpp @@ -0,0 +1,263 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "fieldgrouptest.h" +#include "fieldgroup.h" +#include "vcardtool.h" +#include + +FieldGroupTest::FieldGroupTest(QObject *parent) + : QObject(parent) +{ +} + +FieldGroupTest::~FieldGroupTest() +{ +} + +void FieldGroupTest::shouldHaveDefaultValue() +{ + KContacts::FieldGroup fieldgroup; + QVERIFY(!fieldgroup.isValid()); + QVERIFY(fieldgroup.fieldGroupName().isEmpty()); + QVERIFY(fieldgroup.parameters().isEmpty()); + QVERIFY(fieldgroup.value().isEmpty()); +} + +void FieldGroupTest::shouldAssignValue() +{ + const QString fielgroundname(QStringLiteral("fr")); + const QString value(QStringLiteral("bla")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::FieldGroup fieldGroup(fielgroundname); + fieldGroup.setParameters(params); + fieldGroup.setValue(value); + QVERIFY(fieldGroup.isValid()); + QVERIFY(!fieldGroup.fieldGroupName().isEmpty()); + QCOMPARE(fieldGroup.fieldGroupName(), fielgroundname); + QVERIFY(!fieldGroup.parameters().isEmpty()); + QCOMPARE(fieldGroup.parameters(), params); + QCOMPARE(fieldGroup.value(), value); +} + +void FieldGroupTest::shouldAssignExternal() +{ + KContacts::FieldGroup fieldgroup; + const QString fieldgroundname(QStringLiteral("fr")); + const QString value(QStringLiteral("bla")); + fieldgroup.setValue(value); + fieldgroup.setFieldGroupName(fieldgroundname); + QVERIFY(fieldgroup.isValid()); + QCOMPARE(fieldgroup.fieldGroupName(), fieldgroundname); + QCOMPARE(fieldgroup.value(), value); +} + +void FieldGroupTest::shouldSerialized() +{ + KContacts::FieldGroup fieldGroup; + KContacts::FieldGroup result; + const QString lang(QStringLiteral("fr")); + fieldGroup.setFieldGroupName(lang); + const QString value(QStringLiteral("bla")); + fieldGroup.setValue(value); + + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + fieldGroup.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << fieldGroup; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(fieldGroup == result); +} + +void FieldGroupTest::shouldEqualFieldGroup() +{ + KContacts::FieldGroup fieldGroup; + KContacts::FieldGroup result; + const QString lang(QStringLiteral("fr")); + const QString value(QStringLiteral("bla")); + fieldGroup.setValue(value); + fieldGroup.setFieldGroupName(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + fieldGroup.setParameters(params); + + result = fieldGroup; + QVERIFY(fieldGroup == result); +} + +void FieldGroupTest::shouldParseFieldGroup() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "fr.foo:bla\n" + "fr2.foo:bla\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).fieldGroupList().count(), 2); +} + +void FieldGroupTest::shouldParseWithoutFieldGroup() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).fieldGroupList().count(), 0); +} + +void FieldGroupTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::FieldGroup::List lstFieldGroup; + KContacts::FieldGroup fieldGroup(QStringLiteral("fr")); + const QString value(QStringLiteral("bla")); + fieldGroup.setValue(value); + lstFieldGroup << fieldGroup; + addr.setFieldGroupList(lstFieldGroup); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "fr:bla\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void FieldGroupTest::shouldCreateVCardWithTwoLang() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::FieldGroup::List lstFieldGroup; + KContacts::FieldGroup fieldGroup1(QStringLiteral("fr")); + const QString value(QStringLiteral("bla")); + fieldGroup1.setValue(value); + + KContacts::FieldGroup fieldGroup2(QStringLiteral("fr2")); + fieldGroup2.setValue(value); + lstFieldGroup << fieldGroup1 << fieldGroup2; + addr.setFieldGroupList(lstFieldGroup); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "fr:bla\r\n" + "fr2:bla\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void FieldGroupTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + const QString value(QStringLiteral("bla")); + KContacts::FieldGroup::List lstFieldGroup; + KContacts::FieldGroup fieldGroup(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + fieldGroup.setParameters(params); + fieldGroup.setValue(value); + lstFieldGroup << fieldGroup; + addr.setFieldGroupList(lstFieldGroup); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "fr;FOO1=bla1,blo1;FOO2=bla2,blo2:bla\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void FieldGroupTest::shouldNotGenerateFieldGroupForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::FieldGroup::List lstFieldGroup; + KContacts::FieldGroup fieldGroup(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + fieldGroup.setParameters(params); + const QString value(QStringLiteral("bla")); + fieldGroup.setValue(value); + lstFieldGroup << fieldGroup; + addr.setFieldGroupList(lstFieldGroup); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "fr;FOO1=bla1,blo1;FOO2=bla2,blo2:bla\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(FieldGroupTest) diff --git a/autotests/fieldgrouptest.h b/autotests/fieldgrouptest.h new file mode 100644 index 0000000..508c0dd --- /dev/null +++ b/autotests/fieldgrouptest.h @@ -0,0 +1,46 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef FieldGroupTest_H +#define FieldGroupTest_H + +#include + +class FieldGroupTest : public QObject +{ + Q_OBJECT +public: + explicit FieldGroupTest(QObject *parent = nullptr); + ~FieldGroupTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualFieldGroup(); + void shouldParseFieldGroup(); + void shouldParseWithoutFieldGroup(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoLang(); + void shouldCreateVCardWithParameters(); + void shouldNotGenerateFieldGroupForVCard3(); +}; + +#endif // FieldGroupTest_H diff --git a/autotests/gendertest.cpp b/autotests/gendertest.cpp new file mode 100644 index 0000000..8f441c5 --- /dev/null +++ b/autotests/gendertest.cpp @@ -0,0 +1,256 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "gendertest.h" +#include "gender.h" +#include "vcardtool.h" +#include + +GenderTest::GenderTest(QObject *parent) + : QObject(parent) +{ +} + +GenderTest::~GenderTest() +{ +} + +void GenderTest::shouldHaveDefaultValue() +{ + KContacts::Gender gender; + QVERIFY(!gender.isValid()); + QVERIFY(gender.gender().isEmpty()); + QVERIFY(gender.comment().isEmpty()); +} + +void GenderTest::shouldAssignValue() +{ + const QString genderStr(QStringLiteral("F")); + KContacts::Gender gender(genderStr); + const QString commentStr(QStringLiteral("foo")); + gender.setComment(commentStr); + QVERIFY(gender.isValid()); + QVERIFY(!gender.gender().isEmpty()); + QCOMPARE(gender.gender(), genderStr); + QVERIFY(!gender.comment().isEmpty()); + QCOMPARE(gender.comment(), commentStr); +} + +void GenderTest::shouldAssignExternal() +{ + KContacts::Gender gender; + const QString genderStr(QStringLiteral("H")); + gender.setGender(genderStr); + QVERIFY(gender.isValid()); + QVERIFY(!gender.gender().isEmpty()); + QCOMPARE(gender.gender(), genderStr); +} + +void GenderTest::shouldSerialized() +{ + KContacts::Gender gender; + KContacts::Gender result; + const QString genderStr(QStringLiteral("H")); + gender.setGender(genderStr); + gender.setComment(QStringLiteral("foo")); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << gender; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(gender == result); +} + +void GenderTest::shouldEqualGender() +{ + KContacts::Gender gender; + KContacts::Gender result; + const QString genderStr(QStringLiteral("H")); + gender.setGender(genderStr); + gender.setComment(QStringLiteral("foo")); + + result = gender; + QVERIFY(gender == result); +} + +void GenderTest::shouldParseGender_data() +{ + QTest::addColumn("vcarddata"); + QTest::addColumn("genre"); + QTest::addColumn("comment"); + QTest::addColumn("hasGender"); + + QByteArray str("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + QTest::newRow("nogender") << str << QString() << QString() << false; + + str = QByteArray("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "GENDER:H\n" + "END:VCARD\n"); + QTest::newRow("hasgenderbutnocomment") << str << QStringLiteral("H") << QString() << true; + + str = QByteArray("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "GENDER:;foo\n" + "END:VCARD\n"); + QTest::newRow("hasgenderbutnotypebutcomment") << str << QString() << QStringLiteral("foo") << true; + + str = QByteArray("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "GENDER:H;foo\n" + "END:VCARD\n"); + QTest::newRow("hasgendertypeandcomment") << str << QStringLiteral("H") << QStringLiteral("foo") << true; +} + +void GenderTest::shouldParseGender() +{ + QFETCH(QByteArray, vcarddata); + QFETCH(QString, genre); + QFETCH(QString, comment); + QFETCH(bool, hasGender); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).gender().isValid(), hasGender); + QCOMPARE(lst.at(0).gender().comment(), comment); + QCOMPARE(lst.at(0).gender().gender(), genre); +} + +QByteArray GenderTest::createCard(const QByteArray &gender) +{ + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n"); + if (!gender.isEmpty()) { + expected += gender + "\r\n"; + } + expected += QByteArray( + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + return expected; +} + +void GenderTest::shouldExportEmptyGender() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected = createCard(QByteArray()); + QCOMPARE(ba, expected); +} + +void GenderTest::shouldExportOnlyGenderWithoutCommentGender() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Gender gender; + gender.setGender(QStringLiteral("H")); + addr.setGender(gender); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected = createCard(QByteArray("GENDER:H")); + QCOMPARE(ba, expected); +} + +void GenderTest::shouldExportOnlyGenderWithCommentGender() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Gender gender; + gender.setGender(QStringLiteral("H")); + gender.setComment(QStringLiteral("comment")); + addr.setGender(gender); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected = createCard(QByteArray("GENDER:H;comment")); + QCOMPARE(ba, expected); +} + +void GenderTest::shouldExportOnlyGenderWithoutTypeCommentGender() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Gender gender; + gender.setComment(QStringLiteral("comment")); + addr.setGender(gender); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected = createCard(QByteArray("GENDER:;comment")); + QCOMPARE(ba, expected); +} + +void GenderTest::shouldNotExportInVcard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Gender gender; + gender.setComment(QStringLiteral("comment")); + addr.setGender(gender); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(GenderTest) diff --git a/autotests/gendertest.h b/autotests/gendertest.h new file mode 100644 index 0000000..0ba2121 --- /dev/null +++ b/autotests/gendertest.h @@ -0,0 +1,51 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef GENDERTEST_H +#define GENDERTEST_H + +#include + +class GenderTest : public QObject +{ + Q_OBJECT +public: + explicit GenderTest(QObject *parent = nullptr); + ~GenderTest(); + +private: + QByteArray createCard(const QByteArray &gender); + +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualGender(); + void shouldParseGender(); + void shouldParseGender_data(); + void shouldExportOnlyGenderWithoutCommentGender(); + void shouldExportEmptyGender(); + void shouldExportOnlyGenderWithCommentGender(); + void shouldExportOnlyGenderWithoutTypeCommentGender(); + void shouldNotExportInVcard3(); +}; + +#endif // GENDERTEST_H diff --git a/autotests/geotest.cpp b/autotests/geotest.cpp new file mode 100644 index 0000000..1abdb4a --- /dev/null +++ b/autotests/geotest.cpp @@ -0,0 +1,205 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "geotest.h" +#include "kcontacts/geo.h" +#include "vcardtool.h" +#include + +QTEST_MAIN(GeoTest) + +void GeoTest::constructor() +{ + KContacts::Geo geo(1.2f, 3.4f); + + QVERIFY((float)geo.latitude() == (float)1.2); + QVERIFY((float)geo.longitude() == (float)3.4); +} + +void GeoTest::isValid() +{ + KContacts::Geo geo; + + QVERIFY(!geo.isValid()); + + geo.setLatitude(23); + + QVERIFY(!geo.isValid()); + + geo.setLongitude(45); + + QVERIFY(geo.isValid()); + + geo.clear(); + + QVERIFY(!geo.isValid()); + QVERIFY(geo == KContacts::Geo()); +} + +void GeoTest::setData() +{ + KContacts::Geo geo; + + geo.setLatitude(22.5f); + geo.setLongitude(45.1f); + + QVERIFY((float)geo.latitude() == (float)22.5); + QVERIFY((float)geo.longitude() == (float)45.1); +} + +void GeoTest::equals() +{ + KContacts::Geo geo1(22.5f, 33.7f); + KContacts::Geo geo2(22.5f, 33.7f); + + QVERIFY(geo1 == geo2); +} + +void GeoTest::differs() +{ + KContacts::Geo geo1(22.5f, 33.7f); + KContacts::Geo geo2(22.5f, 33.6f); + + QVERIFY(geo1 != geo2); +} + +void GeoTest::serialization() +{ + KContacts::Geo geo1(22.5f, 33.7f); + QByteArray data; + + QDataStream s(&data, QIODevice::WriteOnly); + s << geo1; + + KContacts::Geo geo2; + QDataStream t(&data, QIODevice::ReadOnly); + t >> geo2; + + QVERIFY(geo1 == geo2); +} + +void GeoTest::shouldParseGeoVCard3() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "GEO:22.5;180.0\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(lst.at(0).geo().isValid()); + KContacts::Geo geo = lst.at(0).geo(); + QCOMPARE(geo.latitude(), 22.5); + QCOMPARE(geo.longitude(), 180.0); +} + +void GeoTest::shouldParseGeoVCard4() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:4.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "GEO:geo:22.5,180.0\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(lst.at(0).geo().isValid()); + KContacts::Geo geo = lst.at(0).geo(); + QCOMPARE(geo.latitude(), 22.5); + QCOMPARE(geo.longitude(), 180.0); +} + +void GeoTest::shouldGenerateVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + + KContacts::Geo geo; + geo.setLongitude(180.0); + geo.setLatitude(22.5); + addr.setGeo(geo); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "GEO:22.500000;180.000000\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void GeoTest::shouldGenerateVCard4() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + + KContacts::Geo geo; + geo.setLongitude(180.0); + geo.setLatitude(22.5); + addr.setGeo(geo); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "GEO:geo:22.500000,180.000000\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void GeoTest::shouldGenerateWithoutGeo() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} diff --git a/autotests/geotest.h b/autotests/geotest.h new file mode 100644 index 0000000..48bdd78 --- /dev/null +++ b/autotests/geotest.h @@ -0,0 +1,44 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef GEOTEST_H +#define GEOTEST_H + +#include + +class GeoTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void constructor(); + void isValid(); + void setData(); + void equals(); + void differs(); + void serialization(); + void shouldParseGeoVCard3(); + void shouldParseGeoVCard4(); + void shouldGenerateVCard3(); + void shouldGenerateVCard4(); + void shouldGenerateWithoutGeo(); +}; + +#endif diff --git a/autotests/importexportvcardtest.cpp b/autotests/importexportvcardtest.cpp new file mode 100644 index 0000000..841acb8 --- /dev/null +++ b/autotests/importexportvcardtest.cpp @@ -0,0 +1,224 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "importexportvcardtest.h" +#include +#include "vcardtool.h" +#include + +ImportExportVCardTest::ImportExportVCardTest(QObject *parent) + : QObject(parent) +{ +} + +ImportExportVCardTest::~ImportExportVCardTest() +{ +} + +static void compareBuffers(const QByteArray &outputData, const QByteArray &expected) +{ + if (outputData != expected) { + qDebug() << " outputData " << outputData; + qDebug() << " expected " << expected; + } + const QList outputLines = outputData.split('\n'); + const QList outputRefLines = expected.split('\n'); + for (int i = 0; i < qMin(outputLines.count(), outputRefLines.count()); ++i) { + const QByteArray actual = outputLines.at(i); + const QByteArray expect = outputRefLines.at(i); + if (actual != expect) { + qCritical() << "Mismatch at output line" << (i + 1); + QCOMPARE(actual, expect); + QCOMPARE(actual.count(), expect.count()); + } + } + QCOMPARE(outputLines.count(), outputRefLines.count()); + QCOMPARE(outputData.size(), expected.size()); +} + +void ImportExportVCardTest::shouldExportFullTestVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "FN:Sherlock Holmes\r\n" + "TEL;VALUE=uri;PREF=1;TYPE=\"voice,home\":tel:+44-555-555-5555;ext=5555\r\n" + "TEL;VALUE=uri;TYPE=\"voice,cell,text\":tel:+44-555-555-6666\r\n" + "TEL;VALUE=uri;TYPE=\"voice,work\":tel:+44-555-555-7777\r\n" + "N:Holmes;Sherlock;;Mr;;\r\n" + "KIND:individual\r\n" + "NICKNAME:Shirley\r\n" + "PHOTO:\r\n" + "BDAY:19531015T231000Z\r\n" + "ANNIVERSARY:19960415\r\n" + "GENDER:M\r\n" + "ADR;GEO=\"geo:51.5237,0.1585\";LABEL=\"Mr Sherlock Holmes, 221B Baker Street, London NW1, England, United Kingdom\":;;221B Baker Street;London;;NW1;United Kingdom\r\n" + "EMAIL;TYPE=home:sherlock.holmes@gmail.com\r\n" + "EMAIL;PREF=1;TYPE=work:detective@sherlockholmes.com\r\n" + "IMPP;PREF=1:xmpp:detective@sherlockholmes.com\r\n" + "LANG;TYPE=work;PREF=1:en\r\n" + "LANG;TYPE=work;PREF=2:fr\r\n" + "TZ:London/Europe\r\n" + "GEO:geo:51.5237,0.1585\r\n" + "TITLE;ALTID=1;LANGUAGE=fr:Patron\r\n" + "TITLE;ALTID=2;LANGUAGE=en:Boss\r\n" + "ROLE:Detective\r\n" + "UID:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519\r\n" + "CATEGORIES:FICTION,LITERATURE\r\n" + "PRODID:-//KADDRESSBOOK//NONSGML Version 1//EN\r\n" + "REV:20140722T222710Z\r\n" + "URL;TYPE=home:https://sherlockholmes.com\r\n" + "KEY;MEDIATYPE=application/pgp-keys:https://sherlockholmes.com/sherlock-holmes.pub.asc\r\n" + "CALURI;PREF=1:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "FBURL;PREF=1:https://sherlockholmes.com/busy/detective\r\n" + "CALADRURI;PREF=1:mailto:detective@sherlockholmes.com\r\n" + "END:VCARD\r\n\r\n"); + QByteArray vcardexpected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "ADR;GEO=\"geo:51.523701,0.158500\";LABEL=\"Mr Sherlock Holmes, 221B Baker Stre\r\n" + " et, London NW1, England, United Kingdom\";TYPE:;;221B Baker Street;London;;\r\n" + " NW1;United Kingdom\r\n" + "ANNIVERSARY:19960415\r\n" + "BDAY:19531015T231000Z\r\n" + "CALADRURI;PREF=1:mailto:detective@sherlockholmes.com\r\n" + "CALURI;PREF=1:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "EMAIL;TYPE=home:sherlock.holmes@gmail.com\r\n" + "EMAIL;PREF=1;TYPE=work:detective@sherlockholmes.com\r\n" + "FBURL;PREF=1:https://sherlockholmes.com/busy/detective\r\n" + "FN:Sherlock Holmes\r\n" + "GENDER:M\r\n" + "GEO:geo:51.523701,0.158500\r\n" + "IMPP;X-SERVICE-TYPE=xmpp;PREF=1:detective@sherlockholmes.com\r\n" + "KEY;MEDIATYPE=application/pgp-keys:https://sherlockholmes.com/sherlock-holm\r\n" + " es.pub.asc\r\nKIND:individual\r\n" + "LANG;PREF=1;TYPE=work:en\r\n" + "LANG;PREF=2;TYPE=work:fr\r\n" + "N:Holmes;Sherlock;;Mr;\r\n" + "NICKNAME:Shirley\r\n" + "PRODID:-//KADDRESSBOOK//NONSGML Version 1//EN\r\n" + "REV:20140722T222710Z\r\n" + "ROLE:Detective\r\n" + "TEL;TYPE=\"home,voice\";PREF=1;VALUE=uri:tel:+44-555-555-5555;ext=5555\r\n" + "TEL;TYPE=\"cell,voice\";VALUE=uri:tel:+44-555-555-6666\r\n" + "TEL;TYPE=\"voice,work\";VALUE=uri:tel:+44-555-555-7777\r\n" + "TITLE;ALTID=1;LANGUAGE=fr:Patron\r\n" + "TITLE;ALTID=2;LANGUAGE=en:Boss\r\n" + "TZ:+00:00\r\n" + "UID:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519\r\n" + "URL;TYPE=home:https://sherlockholmes.com\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + + const QByteArray result = vcard.exportVCards(lst, KContacts::VCard::v4_0); + compareBuffers(result, vcardexpected); +} + +void ImportExportVCardTest::shouldExportMiscElementVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "UID:urn:uuid:4fbe8971-0bc3-424c-9c26-36c3e1eff6b1\r\n" + "FN;PID=1.1:J. Doe\r\n" + "N:Doe;J.;;;\r\n" + "EMAIL;PID=1.1:jdoe@example.com\r\n" + "EMAIL;PID=2.1:boss@example.com\r\n" + "TEL;PID=1.1;VALUE=uri:tel:+1-555-555-5555\r\n" + "TEL;PID=2.1;VALUE=uri:tel:+1-666-666-6666\r\n" + "CLIENTPIDMAP:1;urn:uuid:53e374d9-337e-4727-8803-a1e9c14e0556\r\n" + "END:VCARD\r\n\r\n"); + QByteArray vcardexpected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "CLIENTPIDMAP:1;urn:uuid:53e374d9-337e-4727-8803-a1e9c14e0556\r\n" + "EMAIL;PID=1.1:jdoe@example.com\r\n" + "EMAIL;PID=2.1:boss@example.com\r\n" + "FN:J. Doe\r\n" + "N:Doe;J.;;;\r\n" + "TEL;PID=1.1;VALUE=uri:tel:+1-555-555-5555\r\n" + "TEL;PID=2.1;VALUE=uri:tel:+1-666-666-6666\r\n" + "UID:urn:uuid:4fbe8971-0bc3-424c-9c26-36c3e1eff6b1\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + + const QByteArray result = vcard.exportVCards(lst, KContacts::VCard::v4_0); + compareBuffers(result, vcardexpected); +} + +void ImportExportVCardTest::shouldExportMemberElementVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD" + "VERSION:4.0\r\n" + "KIND:group\r\n" + "FN:Funky distribution list\r\n" + "MEMBER:mailto:subscriber1@example.com\r\n" + "MEMBER:xmpp:subscriber2@example.com\r\n" + "MEMBER:sip:subscriber3@example.com\r\n" + "MEMBER:tel:+1-418-555-5555\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\r\n" + "END:VCARD\r\n"); + + QByteArray vcardexpected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "FN:Funky distribution list\r\n" + "KIND:group\r\n" + "MEMBER:mailto:subscriber1@example.com\r\n" + "MEMBER:xmpp:subscriber2@example.com\r\n" + "MEMBER:sip:subscriber3@example.com\r\n" + "MEMBER:tel:+1-418-555-5555\r\n" + "N:;;;;\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + + const QByteArray result = vcard.exportVCards(lst, KContacts::VCard::v4_0); + compareBuffers(result, vcardexpected); +} + +void ImportExportVCardTest::shouldExportMissingNewlineVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD" + "VERSION:4.0\r\n" + "KIND:group\r\n" + "FN:Funky distribution list\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\r\n" + "END:VCARD"); + + QByteArray vcardexpected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "FN:Funky distribution list\r\n" + "KIND:group\r\n" + "N:;;;;\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + + const QByteArray result = vcard.exportVCards(lst, KContacts::VCard::v4_0); + compareBuffers(result, vcardexpected); +} + +// TODO please make this data driven before copy/pasting more methods here... + +QTEST_MAIN(ImportExportVCardTest) diff --git a/autotests/importexportvcardtest.h b/autotests/importexportvcardtest.h new file mode 100644 index 0000000..200dedd --- /dev/null +++ b/autotests/importexportvcardtest.h @@ -0,0 +1,39 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef IMPORTEXPORTVCARDTEST_H +#define IMPORTEXPORTVCARDTEST_H + +#include + +class ImportExportVCardTest : public QObject +{ + Q_OBJECT +public: + explicit ImportExportVCardTest(QObject *parent = nullptr); + ~ImportExportVCardTest(); +private Q_SLOTS: + void shouldExportFullTestVcard4(); + void shouldExportMiscElementVcard4(); + void shouldExportMemberElementVcard4(); + void shouldExportMissingNewlineVcard4(); +}; + +#endif // IMPORTEXPORTVCARDTEST_H diff --git a/autotests/impptest.cpp b/autotests/impptest.cpp new file mode 100644 index 0000000..7188cfa --- /dev/null +++ b/autotests/impptest.cpp @@ -0,0 +1,323 @@ +/* + This file is part of libkabc. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "impptest.h" +#include "impp.h" +#include +#include "vcardtool.h" +Q_DECLARE_METATYPE(KContacts::Impp::ImppType) + +ImppTest::ImppTest(QObject *parent) + : QObject(parent) +{ +} + +ImppTest::~ImppTest() +{ +} + +void ImppTest::shouldHaveDefaultValue() +{ + KContacts::Impp impp; + QVERIFY(!impp.isValid()); + QVERIFY(impp.address().isEmpty()); + QCOMPARE(impp.type(), KContacts::Impp::Unknown); + QVERIFY(impp.parameters().isEmpty()); +} + +void ImppTest::shouldAssignValue() +{ + const QString address(QStringLiteral("address")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Impp impp; + impp.setParameters(params); + impp.setType(KContacts::Impp::Icq); + impp.setAddress(address); + QVERIFY(impp.isValid()); + QVERIFY(!impp.address().isEmpty()); + QCOMPARE(impp.address(), address); + QCOMPARE(impp.type(), KContacts::Impp::Icq); + QVERIFY(!impp.parameters().isEmpty()); + QCOMPARE(impp.parameters(), params); +} + +void ImppTest::shouldSerialized() +{ + const QString address(QStringLiteral("address")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Impp impp; + impp.setParameters(params); + impp.setType(KContacts::Impp::Icq); + impp.setAddress(address); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << impp; + + KContacts::Impp result; + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(impp == result); +} + +void ImppTest::shouldEqualImpp() +{ + const QString address(QStringLiteral("address")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Impp impp; + impp.setParameters(params); + impp.setType(KContacts::Impp::Icq); + impp.setAddress(address); + + KContacts::Impp result(impp); + QVERIFY(impp == result); +} + +void ImppTest::shouldParseWithoutImpp() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "LANG:fr" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).imppList().count(), 0); +} + +void ImppTest::shouldParseImpp() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "IMPP;X-SERVICE-TYPE=skype:skype:xxxxxxxx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).imppList().count(), 1); + KContacts::Impp impp = lst.at(0).imppList().at(0); + QCOMPARE(impp.address(), QStringLiteral("skype:xxxxxxxx")); + QCOMPARE(impp.type(), KContacts::Impp::Skype); +} + +void ImppTest::shouldParseImppVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:4.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "IMPP:skype:xxxxxxxx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).imppList().count(), 1); + KContacts::Impp impp = lst.at(0).imppList().at(0); + QCOMPARE(impp.address(), QStringLiteral("xxxxxxxx")); + QCOMPARE(impp.type(), KContacts::Impp::Skype); +} + +QByteArray createCard(KContacts::Impp::ImppType type) +{ + QByteArray expected("BEGIN:VCARD\n" + "VERSION:3.0\n" + "EMAIL:foo@kde.org\n"); + if (type != KContacts::Impp::Unknown) { + const QByteArray baType = KContacts::Impp::typeToString(type).toLatin1(); + expected += "IMPP;X-SERVICE-TYPE=" + baType + ":" + baType + ":address\n"; + } + expected += QByteArray( + "N:;;;;\n" + "UID:testuid\n" + "END:VCARD\n\n"); + return expected; +} + +void ImppTest::shouldParseServiceType_data() +{ + QTest::addColumn("type"); + QTest::addColumn("hasImpp"); + QTest::newRow("withoutimpp") << KContacts::Impp::Unknown << false; + QTest::newRow("skype") << KContacts::Impp::Skype << true; + for (int i = KContacts::Impp::Unknown + 1; i < KContacts::Impp::EndList; ++i) { + KContacts::Impp::ImppType type = static_cast(i); + QTest::newRow(KContacts::Impp::typeToString(type).toLatin1().constData()) << type << true; + } +} + +void ImppTest::shouldParseServiceType() +{ + QFETCH(KContacts::Impp::ImppType, type); + QFETCH(bool, hasImpp); + + QByteArray vcarddata = createCard(type); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + + QCOMPARE(!lst.at(0).imppList().isEmpty(), hasImpp); + if (hasImpp) { + KContacts::Impp impp = lst.at(0).imppList().at(0); + QCOMPARE(impp.address(), QStringLiteral("%1:address").arg(KContacts::Impp::typeToString(type))); + QCOMPARE(impp.type(), type); + } +} + +QByteArray expectedVcard(KContacts::Impp::ImppType type) +{ + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n"); + if (type != KContacts::Impp::Unknown) { + const QByteArray baType = KContacts::Impp::typeToString(type).toLatin1(); + expected += "IMPP;X-SERVICE-TYPE=" + baType + ":address\r\n"; + } + + expected += ("N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + return expected; +} + +void ImppTest::shouldExportEmptyType() +{ + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QCOMPARE(ba, expected); +} + +void ImppTest::shouldExportType_data() +{ + QTest::addColumn("type"); + for (int i = KContacts::Impp::Unknown + 1; i < KContacts::Impp::EndList; ++i) { + KContacts::Impp::ImppType type = static_cast(i); + QTest::newRow(KContacts::Impp::typeToString(type).toLatin1().constData()) << type; + } +} + +void ImppTest::shouldExportType() +{ + QFETCH(KContacts::Impp::ImppType, type); + + QByteArray expected = expectedVcard(type); + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Impp impp; + impp.setAddress(QStringLiteral("address")); + impp.setType(type); + addr.insertImpp(impp); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QCOMPARE(ba, expected); +} + +void ImppTest::shouldExportWithParameters() +{ + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "IMPP;FOO1=bla1,blo1;FOO2=bla2,blo2;X-SERVICE-TYPE=skype:address\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Impp impp; + impp.setAddress(QStringLiteral("address")); + impp.setType(KContacts::Impp::Skype); + impp.setParameters(params); + addr.insertImpp(impp); + lst << addr; + + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QCOMPARE(ba, expected); +} + +void ImppTest::shouldShouldNotExportTwiceServiceType() +{ + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "IMPP;FOO1=bla1,blo1;FOO2=bla2,blo2;X-SERVICE-TYPE=skype:address\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + params.insert(QStringLiteral("X-SERVICE-TYPE"), QStringList() << QStringLiteral("aim")); + KContacts::Impp impp; + impp.setAddress(QStringLiteral("address")); + impp.setType(KContacts::Impp::Skype); + impp.setParameters(params); + addr.insertImpp(impp); + lst << addr; + + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(ImppTest) diff --git a/autotests/impptest.h b/autotests/impptest.h new file mode 100644 index 0000000..da0c3e5 --- /dev/null +++ b/autotests/impptest.h @@ -0,0 +1,52 @@ +/* + This file is part of libkabc. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef IMPPTEST_H +#define IMPPTEST_H + +#include + +class ImppTest : public QObject +{ + Q_OBJECT +public: + explicit ImppTest(QObject *parent = nullptr); + ~ImppTest(); + +private Q_SLOTS: + void shouldParseImppVcard4(); + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldSerialized(); + void shouldEqualImpp(); + void shouldParseWithoutImpp(); + void shouldParseImpp(); + void shouldParseServiceType_data(); + void shouldParseServiceType(); + void shouldExportEmptyType(); + + void shouldExportType_data(); + void shouldExportType(); + + void shouldExportWithParameters(); + void shouldShouldNotExportTwiceServiceType(); +}; + +#endif // IMPPTEST_H diff --git a/autotests/keytest.cpp b/autotests/keytest.cpp new file mode 100644 index 0000000..934206a --- /dev/null +++ b/autotests/keytest.cpp @@ -0,0 +1,186 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "keytest.h" +#include "kcontacts/key.h" +#include +#include "vcardtool.h" + +QTEST_MAIN(KeyTest) + +void KeyTest::storeTest() +{ + KContacts::Key key; + + key.setId(QStringLiteral("My Id")); + key.setType(KContacts::Key::Custom); + key.setCustomTypeString(QStringLiteral("GnuPG")); + key.setTextData(QStringLiteral("That's my super secret key")); + + QVERIFY(key.id() == QStringLiteral("My Id")); + QVERIFY(key.type() == KContacts::Key::Custom); + QVERIFY(key.customTypeString() == QStringLiteral("GnuPG")); + QVERIFY(key.textData() == QStringLiteral("That's my super secret key")); + QVERIFY(key.isBinary() == false); +} + +void KeyTest::equalsTest() +{ + KContacts::Key key1, key2; + + key1.setId(QStringLiteral("My Id")); + key1.setType(KContacts::Key::Custom); + key1.setCustomTypeString(QStringLiteral("GnuPG")); + key1.setTextData(QStringLiteral("That's my super secret key")); + + key2.setId(QStringLiteral("My Id")); + key2.setType(KContacts::Key::Custom); + key2.setCustomTypeString(QStringLiteral("GnuPG")); + key2.setTextData(QStringLiteral("That's my super secret key")); + + QVERIFY(key1 == key2); +} + +void KeyTest::differsTest() +{ + KContacts::Key key1(QStringLiteral("TextKey"), KContacts::Key::PGP); + KContacts::Key key2(QStringLiteral("TextKey"), KContacts::Key::Custom); + + QVERIFY(key1 != key2); +} + +void KeyTest::assignmentTest() +{ + KContacts::Key key1, key2; + + key1.setId(QStringLiteral("My Id")); + key1.setType(KContacts::Key::Custom); + key1.setCustomTypeString(QStringLiteral("GnuPG")); + key1.setTextData(QStringLiteral("That's my super secret key")); + + key2 = key1; + + QVERIFY(key1 == key2); +} + +void KeyTest::serializeTest() +{ + KContacts::Key key1, key2; + + key1.setId(QStringLiteral("My Id")); + key1.setType(KContacts::Key::Custom); + key1.setCustomTypeString(QStringLiteral("GnuPG")); + key1.setTextData(QStringLiteral("That's my super secret key")); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << key1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> key2; + + QVERIFY(key1 == key2); +} + +void KeyTest::shouldExportVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Key key1(QStringLiteral("https://foo.org/sherlock-holmes.pub.asc"), KContacts::Key::PGP); + addr.setKeys(KContacts::Key::List{key1}); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "KEY;TYPE=PGP:https://foo.org/sherlock-holmes.pub.asc\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void KeyTest::shouldExportVCard4() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Key key1(QStringLiteral("https://foo.org/sherlock-holmes.pub.asc"), KContacts::Key::PGP); + addr.setKeys(KContacts::Key::List{key1}); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "KEY;MEDIATYPE=application/pgp-keys:https://foo.org/sherlock-holmes.pub.asc\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void KeyTest::shouldParseVcard3() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "KEY;TYPE=PGP:https://foo.org/sherlock-holmes.pub.asc\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(!lst.at(0).keys().isEmpty()); + QCOMPARE(lst.at(0).keys().count(), 1); + + KContacts::Key key = lst.at(0).keys().at(0); + QCOMPARE(key.type(), KContacts::Key::PGP); + QCOMPARE(key.textData(), QStringLiteral("https://foo.org/sherlock-holmes.pub.asc")); +} + +void KeyTest::shouldParseVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "KEY;MEDIATYPE=application/pgp-keys:https://foo.org/sherlock-holmes.pub.asc\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(!lst.at(0).keys().isEmpty()); + QCOMPARE(lst.at(0).keys().count(), 1); + + KContacts::Key key = lst.at(0).keys().at(0); + QCOMPARE(key.type(), KContacts::Key::PGP); + QCOMPARE(key.textData(), QStringLiteral("https://foo.org/sherlock-holmes.pub.asc")); +} diff --git a/autotests/keytest.h b/autotests/keytest.h new file mode 100644 index 0000000..999327b --- /dev/null +++ b/autotests/keytest.h @@ -0,0 +1,43 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KEY_TEST_H +#define KEY_TEST_H + +#include + +class KeyTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void storeTest(); + void equalsTest(); + void differsTest(); + void assignmentTest(); + void serializeTest(); + void shouldExportVCard3(); + void shouldExportVCard4(); + void shouldParseVcard3(); + void shouldParseVcard4(); +}; + +#endif diff --git a/autotests/langtest.cpp b/autotests/langtest.cpp new file mode 100644 index 0000000..d3ce748 --- /dev/null +++ b/autotests/langtest.cpp @@ -0,0 +1,240 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "langtest.h" +#include "lang.h" +#include "vcardtool.h" +#include + +LangTest::LangTest(QObject *parent) + : QObject(parent) +{ +} + +LangTest::~LangTest() +{ +} + +void LangTest::shouldHaveDefaultValue() +{ + KContacts::Lang language; + QVERIFY(!language.isValid()); + QVERIFY(language.language().isEmpty()); + QVERIFY(language.parameters().isEmpty()); +} + +void LangTest::shouldAssignValue() +{ + const QString lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Lang language(lang); + language.setParameters(params); + QVERIFY(language.isValid()); + QVERIFY(!language.language().isEmpty()); + QCOMPARE(language.language(), lang); + QVERIFY(!language.parameters().isEmpty()); + QCOMPARE(language.parameters(), params); +} + +void LangTest::shouldAssignExternal() +{ + KContacts::Lang language; + const QString lang(QStringLiteral("fr")); + language.setLanguage(lang); + QVERIFY(language.isValid()); + QCOMPARE(language.language(), lang); +} + +void LangTest::shouldSerialized() +{ + KContacts::Lang language; + KContacts::Lang result; + const QString lang(QStringLiteral("fr")); + language.setLanguage(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + language.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << language; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(language == result); +} + +void LangTest::shouldEqualLanguage() +{ + KContacts::Lang language; + KContacts::Lang result; + const QString lang(QStringLiteral("fr")); + language.setLanguage(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + language.setParameters(params); + + result = language; + QVERIFY(language == result); +} + +void LangTest::shouldParseLanguage() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "LANG:fr\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).langs().count(), 1); + QCOMPARE(lst.at(0).langs().at(0).language(), QStringLiteral("fr")); +} + +void LangTest::shouldParseWithoutLanguage() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).langs().count(), 0); +} + +void LangTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Lang::List lstLang; + KContacts::Lang lang(QStringLiteral("fr")); + lstLang << lang; + addr.setLangs(lstLang); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "LANG:fr\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void LangTest::shouldCreateVCardWithTwoLang() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Lang::List lstLang; + KContacts::Lang lang(QStringLiteral("fr")); + KContacts::Lang lang2(QStringLiteral("fr2")); + lstLang << lang << lang2; + addr.setLangs(lstLang); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "LANG:fr\r\n" + "LANG:fr2\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void LangTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Lang::List lstLang; + KContacts::Lang lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + lang.setParameters(params); + lstLang << lang; + addr.setLangs(lstLang); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "LANG;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void LangTest::shouldNotGenerateLangForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Lang::List lstLang; + KContacts::Lang lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + lang.setParameters(params); + lstLang << lang; + addr.setLangs(lstLang); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(LangTest) diff --git a/autotests/langtest.h b/autotests/langtest.h new file mode 100644 index 0000000..921d32d --- /dev/null +++ b/autotests/langtest.h @@ -0,0 +1,46 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LANGTEST_H +#define LANGTEST_H + +#include + +class LangTest : public QObject +{ + Q_OBJECT +public: + explicit LangTest(QObject *parent = nullptr); + ~LangTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualLanguage(); + void shouldParseLanguage(); + void shouldParseWithoutLanguage(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoLang(); + void shouldCreateVCardWithParameters(); + void shouldNotGenerateLangForVCard3(); +}; + +#endif // LANGTEST_H diff --git a/autotests/ldifconvertertest.cpp b/autotests/ldifconvertertest.cpp new file mode 100644 index 0000000..a4dd862 --- /dev/null +++ b/autotests/ldifconvertertest.cpp @@ -0,0 +1,548 @@ +/* + This file is part of libkabc. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "ldifconvertertest.h" +#include "converter/ldifconverter.h" +#include +using namespace KContacts; + +LDifConverterTest::LDifConverterTest(QObject *parent) + : QObject(parent) +{ +} + +LDifConverterTest::~LDifConverterTest() +{ +} + +void LDifConverterTest::shouldImportEmail() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "mail: foo@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).emails().count(), 1); + QCOMPARE(lst.at(0).emails().at(0), QStringLiteral("foo@kde.org")); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportMultiEmails() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "mail: foo@kde.org\n" + "mail: foo2@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).emails().count(), 2); + QCOMPARE(lst.at(0).emails().at(0), QStringLiteral("foo@kde.org")); + QCOMPARE(lst.at(0).emails().at(1), QStringLiteral("foo2@kde.org")); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportStandardBirthday() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "birthyear: 2015\n" + "birthmonth: 3\n" + "birthday: 19\n" + "mail: foo@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QVERIFY(lst.at(0).birthday().date().isValid()); + QCOMPARE(lst.at(0).birthday().date(), QDate(2015, 3, 19)); + QVERIFY(!lst.at(0).birthdayHasTime()); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportStandardBirthdayWithoutYear() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "birthmonth: 3\n" + "birthday: 19\n" + "mail: foo@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QVERIFY(lst.at(0).birthday().date().isValid()); + QCOMPARE(lst.at(0).birthday().date(), QDate(-1, 3, 19)); + QVERIFY(!lst.at(0).birthdayHasTime()); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportTheBatsBirthday() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "xbatBirthday: 20150319\n" + "mail: foo@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QVERIFY(lst.at(0).birthday().date().isValid()); + QCOMPARE(lst.at(0).birthday().date(), QDate(2015, 3, 19)); + QVERIFY(!lst.at(0).birthdayHasTime()); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportTheBatsEmails() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "mail: foo@kde.org\n" + "othermailbox: foo2@kde.org\n" + "othermailbox: foo3@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).emails().count(), 3); + QCOMPARE(lst.at(0).emails().at(0), QStringLiteral("foo@kde.org")); + QCOMPARE(lst.at(0).emails().at(1), QStringLiteral("foo2@kde.org")); + QCOMPARE(lst.at(0).emails().at(2), QStringLiteral("foo3@kde.org")); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportTitle() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "title: foo\n" + "mail: foo@kde.org\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).title(), QStringLiteral("foo")); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportWorkStreet() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "title: foo\n" + "mail: foo@kde.org\n" + "street: work address\n" + "mozillaWorkStreet2: work address next\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).address(Address::Work).street(), QStringLiteral("work address\nwork address next")); + QCOMPARE(contactGroup.count(), 0); +} + +void LDifConverterTest::shouldImportContactGroup() +{ + QString str = QStringLiteral("dn: cn=test,mail=\n" + "cn: test\n" + "modifyTimeStamp: 20080526T234914Z\n" + "display-name: Test\n" + "objectclass: top\n" + "objectclass: groupOfNames\n" + "member: cn=Jim Doe,mail=jim.doe@foobar.com\n" + "member: cn=Jane Doe,mail=jane.doe@foobar.com\n" + "member: cn=John Doe,mail=john.doe@foobar.com\n"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 0); + QCOMPARE(contactGroup.count(), 1); + ContactGroup first = contactGroup.first(); + QCOMPARE(first.name(), QStringLiteral("Test")); + QCOMPARE((int)first.count(), 3); +} + +void LDifConverterTest::shouldImportMultiEntries() +{ + QString str = QStringLiteral("dn: cn=test1,mail=test1@test.test\n" + "sn: test1\n" + "cn: test1\n" + "uid: jpgdf2NrLQ\n" + "mail: test1@test.test\n" + "modifytimestamp: 20121219T140848Z\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "\n" + "dn: cn=test2,mail=test2@test.test\n" + "sn: test2\n" + "cn: test2\n" + "uid: ow2mwdUb6A\n" + "mail: test2@test.test\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n"); + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 2); + QCOMPARE(contactGroup.count(), 0); + QCOMPARE(lst.at(0).emails().at(0), QStringLiteral("test1@test.test")); + QCOMPARE(lst.at(1).emails().at(0), QStringLiteral("test2@test.test")); +} + +void LDifConverterTest::shouldImportGroupAndAddress() +{ + QString str = QStringLiteral("dn: cn=laurent,mail=foo@kde.org\n" + "sn: laurent\n" + "cn: laurent\n" + "uid: d1d5cdd4-7d5d-484b-828d-58864d8efe74\n" + "title: foo\n" + "mail: foo@kde.org\n" + "street: work address\n" + "mozillaWorkStreet2: work address next\n" + "objectclass: top_n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "\n" + "dn: cn=test,mail=\n" + "cn: test\n" + "modifyTimeStamp: 20080526T234914Z\n" + "display-name: Test\n" + "objectclass: top\n" + "objectclass: groupOfNames\n" + "member: cn=Jim Doe,mail=jim.doe@foobar.com\n" + "member: cn=Jane Doe,mail=jane.doe@foobar.com\n" + "member: cn=John Doe,mail=john.doe@foobar.com\n"); + + AddresseeList lst; + ContactGroup::List contactGroup; + bool result = LDIFConverter::LDIFToAddressee(str, lst, contactGroup); + QVERIFY(result); + QCOMPARE(lst.count(), 1); + QCOMPARE(contactGroup.count(), 1); +} + +void LDifConverterTest::shouldExportEmail() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n\n"); + + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportMultiEmails() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org") << QStringLiteral("foo2@kde.org") << QStringLiteral("foo3@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "mozillasecondemail: foo2@kde.org\n" + "othermailbox: foo3@kde.org\n" + "\n"); + + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportBirthday() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + Addressee addr; + QDate date(2015, 3, 3); + addr.setBirthday(date); + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "birthyear: 2015\n" + "birthmonth: 3\n" + "birthday: 3\n" + "\n"); + + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportBirthdayWithoutYear() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + Addressee addr; + QDate date(-1, 3, 3); + addr.setBirthday(date); + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "birthmonth: 3\n" + "birthday: 3\n" + "\n"); + + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportTitle() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setTitle(QStringLiteral("foo")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "title: foo\n" + "\n"); + + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportMultiEntries() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setTitle(QStringLiteral("foo")); + addr.setUid(QStringLiteral("testuid")); + lst << addr; + + Addressee addr2; + QDate date(2015, 3, 3); + addr2.setBirthday(date); + addr2.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr2.setUid(QStringLiteral("testuid")); + lst << addr2; + + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + + const QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "title: foo\n" + "\n" + "dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "birthyear: 2015\n" + "birthmonth: 3\n" + "birthday: 3\n" + "\n"); + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportGroup() +{ + AddresseeList lst; + ContactGroup::List contactGroup; + ContactGroup grp; + ContactGroup::Data data; + data.setEmail(QStringLiteral("foo@kde.org")); + data.setName(QStringLiteral("foo")); + grp.append(data); + ContactGroup::Data data2; + data2.setEmail(QStringLiteral("foo2@kde.org")); + data2.setName(QStringLiteral("foo2")); + grp.append(data2); + contactGroup.append(grp); + + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + + const QString expected = QStringLiteral("objectclass: top\n" + "objectclass: groupOfNames\n" + "member: cn=foo,mail=foo@kde.org\n" + "member: cn=foo2,mail=foo2@kde.org\n" + "\n"); + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportWorkStreet() +{ + AddresseeList lst; + Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + Address address(Address::Work); + address.setStreet(QStringLiteral("work address")); + address.setPostalCode(QStringLiteral("postal")); + addr.insertAddress(address); + lst << addr; + ContactGroup::List contactGroup; + + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + + const QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "uid: testuid\n" + "mail: foo@kde.org\n" + "postalcode: postal\n" + "streetaddress: work address\n" + "street: work address\n" + "\n"); + QCOMPARE(str, expected); +} + +void LDifConverterTest::shouldExportFullName() +{ + AddresseeList lst; + Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + addr.setName(QStringLiteral("name")); + addr.setNickName(QStringLiteral("nickname")); + addr.setFamilyName(QStringLiteral("familyname")); + lst << addr; + ContactGroup::List contactGroup; + + QString str; + bool result = LDIFConverter::addresseeAndContactGroupToLDIF(lst, contactGroup, str); + QVERIFY(result); + + const QString expected = QStringLiteral("dn: cn=,mail=foo@kde.org\n" + "objectclass: top\n" + "objectclass: person\n" + "objectclass: organizationalPerson\n" + "sn: familyname\n" + "uid: testuid\n" + "nickname: nickname\n" + "xmozillanickname: nickname\n" + "mozillanickname: nickname\n" + "mail: foo@kde.org\n" + "\n"); + + QCOMPARE(str, expected); +} + +QTEST_MAIN(LDifConverterTest) diff --git a/autotests/ldifconvertertest.h b/autotests/ldifconvertertest.h new file mode 100644 index 0000000..c39801f --- /dev/null +++ b/autotests/ldifconvertertest.h @@ -0,0 +1,59 @@ +/* + This file is part of libkabc. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LDIFCONVERTERTEST_H +#define LDIFCONVERTERTEST_H + +#include + +class LDifConverterTest : public QObject +{ + Q_OBJECT +public: + explicit LDifConverterTest(QObject *parent = nullptr); + ~LDifConverterTest(); + +private Q_SLOTS: + //Import + void shouldImportEmail(); + void shouldImportMultiEmails(); + void shouldImportStandardBirthday(); + void shouldImportStandardBirthdayWithoutYear(); + void shouldImportTheBatsBirthday(); + void shouldImportTheBatsEmails(); + void shouldImportTitle(); + void shouldImportWorkStreet(); + void shouldImportContactGroup(); + void shouldImportMultiEntries(); + void shouldImportGroupAndAddress(); + + //Export + void shouldExportEmail(); + void shouldExportBirthday(); + void shouldExportBirthdayWithoutYear(); + void shouldExportTitle(); + void shouldExportMultiEntries(); + void shouldExportGroup(); + void shouldExportWorkStreet(); + void shouldExportMultiEmails(); + void shouldExportFullName(); +}; + +#endif // LDIFCONVERTERTEST_H diff --git a/autotests/nicknametest.cpp b/autotests/nicknametest.cpp new file mode 100644 index 0000000..214d080 --- /dev/null +++ b/autotests/nicknametest.cpp @@ -0,0 +1,243 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "nicknametest.h" +#include "nickname.h" +#include "vcardtool.h" +#include + +NickNameTest::NickNameTest(QObject *parent) + : QObject(parent) +{ +} + +NickNameTest::~NickNameTest() +{ +} + +void NickNameTest::shouldHaveDefaultValue() +{ + KContacts::NickName nickname; + QVERIFY(!nickname.isValid()); + QVERIFY(nickname.nickname().isEmpty()); + QVERIFY(nickname.parameters().isEmpty()); +} + +void NickNameTest::shouldAssignValue() +{ + const QString lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::NickName nickname(lang); + nickname.setParameters(params); + QVERIFY(nickname.isValid()); + QVERIFY(!nickname.nickname().isEmpty()); + QCOMPARE(nickname.nickname(), lang); + QVERIFY(!nickname.parameters().isEmpty()); + QCOMPARE(nickname.parameters(), params); +} + +void NickNameTest::shouldAssignExternal() +{ + KContacts::NickName nickname; + const QString lang(QStringLiteral("fr")); + nickname.setNickName(lang); + QVERIFY(nickname.isValid()); + QCOMPARE(nickname.nickname(), lang); +} + +void NickNameTest::shouldSerialized() +{ + KContacts::NickName nickname; + KContacts::NickName result; + const QString lang(QStringLiteral("fr")); + nickname.setNickName(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + nickname.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << nickname; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(nickname == result); +} + +void NickNameTest::shouldEqualNickName() +{ + KContacts::NickName nickname; + KContacts::NickName result; + const QString lang(QStringLiteral("fr")); + nickname.setNickName(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + nickname.setParameters(params); + + result = nickname; + QVERIFY(nickname == result); +} + +void NickNameTest::shouldParseNickName() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "NickName:boo\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraNickNameList().count(), 1); + QCOMPARE(lst.at(0).extraNickNameList().at(0).nickname(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).nickName(), QStringLiteral("boo")); +} + +void NickNameTest::shouldParseWithoutNickName() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraNickNameList().count(), 0); + QCOMPARE(lst.at(0).nickName(), QString()); +} + +void NickNameTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::NickName::List lstNickName; + KContacts::NickName title(QStringLiteral("blo")); + lstNickName << title; + addr.setExtraNickNameList(lstNickName); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "NICKNAME:blo\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void NickNameTest::shouldCreateVCardWithTwoNickName() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::NickName::List lstNickName; + KContacts::NickName title(QStringLiteral("fr")); + KContacts::NickName title2(QStringLiteral("fr2")); + lstNickName << title << title2; + addr.setExtraNickNameList(lstNickName); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "NICKNAME:fr\r\n" + "NICKNAME:fr2\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void NickNameTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::NickName::List lstNickName; + KContacts::NickName title(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + title.setParameters(params); + lstNickName << title; + addr.setExtraNickNameList(lstNickName); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "NICKNAME;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void NickNameTest::shouldGenerateNickNameForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::NickName::List lstNickName; + KContacts::NickName title(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + title.setParameters(params); + lstNickName << title; + addr.setExtraNickNameList(lstNickName); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "NICKNAME;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(NickNameTest) diff --git a/autotests/nicknametest.h b/autotests/nicknametest.h new file mode 100644 index 0000000..02fde0a --- /dev/null +++ b/autotests/nicknametest.h @@ -0,0 +1,46 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef NICKNAMETEST_H +#define NICKNAMETEST_H + +#include + +class NickNameTest : public QObject +{ + Q_OBJECT +public: + explicit NickNameTest(QObject *parent = nullptr); + ~NickNameTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualNickName(); + void shouldParseNickName(); + void shouldParseWithoutNickName(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoNickName(); + void shouldCreateVCardWithParameters(); + void shouldGenerateNickNameForVCard3(); +}; + +#endif // NICKNAMETEST_H diff --git a/autotests/orgtest.cpp b/autotests/orgtest.cpp new file mode 100644 index 0000000..a67b223 --- /dev/null +++ b/autotests/orgtest.cpp @@ -0,0 +1,286 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "orgtest.h" +#include "org.h" +#include "vcardtool.h" +#include + +OrgTest::OrgTest(QObject *parent) + : QObject(parent) +{ +} + +OrgTest::~OrgTest() +{ +} + +void OrgTest::shouldHaveDefaultValue() +{ + KContacts::Org org; + QVERIFY(!org.isValid()); + QVERIFY(org.organization().isEmpty()); + QVERIFY(org.parameters().isEmpty()); +} + +void OrgTest::shouldAssignValue() +{ + const QString organization(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Org org(organization); + org.setParameters(params); + QVERIFY(org.isValid()); + QVERIFY(!org.organization().isEmpty()); + QCOMPARE(org.organization(), organization); + QVERIFY(!org.parameters().isEmpty()); + QCOMPARE(org.parameters(), params); +} + +void OrgTest::shouldAssignExternal() +{ + KContacts::Org org; + const QString organization(QStringLiteral("fr")); + org.setOrganization(organization); + QVERIFY(org.isValid()); + QCOMPARE(org.organization(), organization); +} + +void OrgTest::shouldSerialized() +{ + KContacts::Org org; + KContacts::Org result; + const QString organization(QStringLiteral("fr")); + org.setOrganization(organization); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + org.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << org; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(org == result); +} + +void OrgTest::shouldEqualOrg() +{ + KContacts::Org org; + KContacts::Org result; + const QString organization(QStringLiteral("fr")); + org.setOrganization(organization); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + org.setParameters(params); + + result = org; + QVERIFY(org == result); +} + +void OrgTest::shouldParseOrg() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "Org:boo\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraOrganizationList().count(), 1); + QCOMPARE(lst.at(0).organization(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).extraOrganizationList().at(0).organization(), QStringLiteral("boo")); +} + +void OrgTest::shouldParseVcardWithTwoOrg() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "Org:boo\n" + "Org:bla\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraOrganizationList().count(), 2); + QCOMPARE(lst.at(0).extraOrganizationList().at(0).organization(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).extraOrganizationList().at(1).organization(), QStringLiteral("bla")); +} + +void OrgTest::shouldCreateVCardWithSemiColon() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Org::List lstOrg; + KContacts::Org org(QStringLiteral("fr;bla")); + lstOrg << org; + addr.setExtraOrganizationList(lstOrg); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ORG:fr\\\\;bla\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void OrgTest::shouldParseWithoutOrg() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraOrganizationList().count(), 0); +} + +void OrgTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Org::List lstOrg; + KContacts::Org org(QStringLiteral("fr")); + lstOrg << org; + addr.setExtraOrganizationList(lstOrg); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ORG:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void OrgTest::shouldCreateVCardWithTwoOrg() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Org::List lstOrg; + KContacts::Org org(QStringLiteral("fr")); + KContacts::Org org2(QStringLiteral("fr2")); + lstOrg << org << org2; + addr.setExtraOrganizationList(lstOrg); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ORG:fr\r\n" + "ORG:fr2\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void OrgTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Org::List lstOrg; + KContacts::Org org(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + org.setParameters(params); + lstOrg << org; + addr.setExtraOrganizationList(lstOrg); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ORG;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void OrgTest::shouldGenerateOrgForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Org::List lstOrg; + KContacts::Org org(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + org.setParameters(params); + lstOrg << org; + addr.setExtraOrganizationList(lstOrg); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ORG;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(OrgTest) diff --git a/autotests/orgtest.h b/autotests/orgtest.h new file mode 100644 index 0000000..b622d96 --- /dev/null +++ b/autotests/orgtest.h @@ -0,0 +1,48 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ORGTEST_H +#define ORGTEST_H + +#include + +class OrgTest : public QObject +{ + Q_OBJECT +public: + explicit OrgTest(QObject *parent = nullptr); + ~OrgTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualOrg(); + void shouldParseOrg(); + void shouldParseWithoutOrg(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoOrg(); + void shouldCreateVCardWithParameters(); + void shouldGenerateOrgForVCard3(); + void shouldParseVcardWithTwoOrg(); + void shouldCreateVCardWithSemiColon(); +}; + +#endif // ORGTEST_H diff --git a/autotests/phonenumbertest.cpp b/autotests/phonenumbertest.cpp new file mode 100644 index 0000000..d7e22dd --- /dev/null +++ b/autotests/phonenumbertest.cpp @@ -0,0 +1,328 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "phonenumbertest.h" +#include "kcontacts/phonenumber.h" +#include +#include +#include +#include + +QTEST_MAIN(PhoneNumberTest) + +#ifndef Q_OS_WIN +void initLocale() +{ + qputenv("LC_ALL", "en_US.utf-8"); +} + +Q_CONSTRUCTOR_FUNCTION(initLocale) +#endif + +void PhoneNumberTest::emptyTest() +{ + KContacts::PhoneNumber number; + + QVERIFY(number.isEmpty()); +} + +void PhoneNumberTest::storeTest() +{ + KContacts::PhoneNumber number; + + number.setId(QStringLiteral("My Id")); + number.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number.setNumber(QStringLiteral("2734826345")); + + QVERIFY(number.id() == QLatin1String("My Id")); + QVERIFY(number.type() == (KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell)); + QVERIFY(number.number() == QLatin1String("2734826345")); +} + +void PhoneNumberTest::equalsTest() +{ + KContacts::PhoneNumber number1, number2; + + number1.setId(QStringLiteral("My Id")); + number1.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number1.setNumber(QStringLiteral("2734826345")); + + number2.setId(QStringLiteral("My Id")); + number2.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number2.setNumber(QStringLiteral("2734826345")); + + QVERIFY(number1 == number2); +} + +void PhoneNumberTest::differsTest() +{ + KContacts::PhoneNumber number1(QStringLiteral("123"), KContacts::PhoneNumber::Home); + KContacts::PhoneNumber number2(QStringLiteral("123"), KContacts::PhoneNumber::Work); + + QVERIFY(number1 != number2); +} + +void PhoneNumberTest::assignmentTest() +{ + KContacts::PhoneNumber number1, number2; + + number1.setId(QStringLiteral("My Id")); + number1.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number1.setNumber(QStringLiteral("2734826345")); + + number1 = number2; + + QVERIFY(number1 == number2); +} + +void PhoneNumberTest::serializeTest() +{ + KContacts::PhoneNumber number1, number2; + + number1.setId(QStringLiteral("My Id")); + number1.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number1.setNumber(QStringLiteral("2734826345")); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << number1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> number2; + + QVERIFY(number1 == number2); +} + +void PhoneNumberTest::labelTest() +{ + QMap labels; + + const KContacts::PhoneNumber::TypeList types = KContacts::PhoneNumber::typeList(); + + // check all types standalone + for (KContacts::PhoneNumber::Type type : types) { + const KContacts::PhoneNumber phone(QStringLiteral("1"), type); + QCOMPARE(phone.type(), type); + + // Pref is special cased + if (type != KContacts::PhoneNumber::Pref) { + QCOMPARE(phone.typeLabel(), KContacts::PhoneNumber::typeFlagLabel((KContacts::PhoneNumber::TypeFlag)(int)type)); + labels.insert(type, phone.typeLabel()); + } else { + labels.insert(type, KContacts::PhoneNumber::typeFlagLabel((KContacts::PhoneNumber::TypeFlag)(int)type)); + } + QCOMPARE(KContacts::PhoneNumber::typeLabel(type), phone.typeLabel()); + } + + // combine all with Pref + for (KContacts::PhoneNumber::Type type : qAsConst(types)) { + KContacts::PhoneNumber::Type combinedType = type | KContacts::PhoneNumber::Pref; + const KContacts::PhoneNumber phone(QLatin1String("1"), combinedType); + QCOMPARE(phone.type(), combinedType); + QCOMPARE(KContacts::PhoneNumber::typeLabel(combinedType), phone.typeLabel()); + + if (type < KContacts::PhoneNumber::Pref) { + const QString expectedCombinedString = QStringLiteral("%1/%2").arg(labels[type]).arg(labels[KContacts::PhoneNumber::Pref]); + QCOMPARE(phone.typeLabel(), expectedCombinedString); + } else if (type > KContacts::PhoneNumber::Pref) { + const QString expectedCombinedString = QStringLiteral("%1/%2").arg(labels[KContacts::PhoneNumber::Pref]).arg(labels[type]); + QCOMPARE(phone.typeLabel(), expectedCombinedString); + } + } + + // combine all with Fax + for (KContacts::PhoneNumber::Type type : qAsConst(types)) { + KContacts::PhoneNumber::Type combinedType = type | KContacts::PhoneNumber::Fax; + const KContacts::PhoneNumber phone(QLatin1String("1"), combinedType); + QCOMPARE(phone.type(), combinedType); + QCOMPARE(KContacts::PhoneNumber::typeLabel(combinedType), phone.typeLabel()); + + if (type == KContacts::PhoneNumber::Home + || type == KContacts::PhoneNumber::Work) { + // special cased + } else if (type < KContacts::PhoneNumber::Fax) { + const QString expectedCombinedString = QStringLiteral("%1/%2").arg(labels[type]).arg(labels[KContacts::PhoneNumber::Fax]); + QCOMPARE(phone.typeLabel(), expectedCombinedString); + } else if (type > KContacts::PhoneNumber::Fax) { + const QString expectedCombinedString = QStringLiteral("%1/%2").arg(labels[KContacts::PhoneNumber::Fax]).arg(labels[type]); + QCOMPARE(phone.typeLabel(), expectedCombinedString); + } + } + + // special cases + QCOMPARE(KContacts::PhoneNumber::typeLabel(KContacts::PhoneNumber::Pref), QLatin1String("Preferred Number")); + QCOMPARE(KContacts::PhoneNumber::typeLabel(KContacts::PhoneNumber::Home + |KContacts::PhoneNumber::Fax), + QLatin1String("Home Fax")); + QCOMPARE(KContacts::PhoneNumber::typeLabel(KContacts::PhoneNumber::Work + |KContacts::PhoneNumber::Fax), + QLatin1String("Work Fax")); + QCOMPARE(KContacts::PhoneNumber::typeLabel(KContacts::PhoneNumber::Home + |KContacts::PhoneNumber::Fax + |KContacts::PhoneNumber::Pref), + QLatin1String("Home Fax/Preferred")); + QCOMPARE(KContacts::PhoneNumber::typeLabel(KContacts::PhoneNumber::Work + |KContacts::PhoneNumber::Fax + |KContacts::PhoneNumber::Pref), + QLatin1String("Work Fax/Preferred")); +} + +void PhoneNumberTest::shouldParseVCard21() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:2.1\n" + "EMAIL:foo@kde.org\n" + "N:;;;;\n" + "TEL;CELL;WORK:+1-919-676-9564\n" + "UID:testuid\n" + "END:VCARD\n" + "\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + KContacts::Addressee addr = lst.at(0); + QCOMPARE(addr.phoneNumbers().count(), 1); + KContacts::PhoneNumber number1 = addr.phoneNumbers().at(0); + //QCOMPARE(number1.number(), QString()); +} + +void PhoneNumberTest::shouldExportVCard21() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + + KContacts::PhoneNumber number1; + + number1.setId(QStringLiteral("My Id")); + number1.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number1.setNumber(QStringLiteral("+1-919-676-9564")); + addr.setPhoneNumbers(KContacts::PhoneNumber::List() << number1); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v2_1); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:2.1\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TEL;CELL;WORK:+1-919-676-9564\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n" + "\r\n"); + QCOMPARE(ba, expected); +} + +void PhoneNumberTest::shouldExportVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + + KContacts::PhoneNumber number1; + + number1.setId(QStringLiteral("My Id")); + number1.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number1.setNumber(QStringLiteral("+1-919-676-9564")); + addr.setPhoneNumbers(KContacts::PhoneNumber::List() << number1); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TEL;TYPE=CELL,WORK:+1-919-676-9564\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n" + "\r\n"); + QCOMPARE(ba, expected); +} + +void PhoneNumberTest::shouldExportVCard4() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + + KContacts::PhoneNumber number1; + + number1.setId(QStringLiteral("My Id")); + number1.setType(KContacts::PhoneNumber::Work | KContacts::PhoneNumber::Cell); + number1.setNumber(QStringLiteral("+1-919-676-9564")); + addr.setPhoneNumbers(KContacts::PhoneNumber::List() << number1); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TEL;TYPE=\"cell,work\":+1-919-676-9564\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n" + "\r\n"); + QCOMPARE(ba, expected); +} + +void PhoneNumberTest::shouldParseVcard3() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "TEL;VALUE=uri;PREF=1;TYPE=\"voice,home\":tel:+44-555-555-5555;ext=5555\r\n" + "TEL;VALUE=uri;TYPE=\"voice,cell,text\":tel:+44-555-555-6666\r\n" + "TEL;VALUE=uri;TYPE=\"voice,work\":tel:+44-555-555-7777\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "LANG:fr\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + KContacts::Addressee addr = lst.at(0); + QCOMPARE(addr.phoneNumbers().count(), 3); +} + +void PhoneNumberTest::shouldParseVcard4() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:4.0\n" + "N:LastName;FirstName;;;\n" + "TEL;VALUE=uri;PREF=1;TYPE=\"voice,home\":tel:+44-555-555-5555;ext=5555\r\n" + "TEL;VALUE=uri;TYPE=\"voice,cell,text\":tel:+44-555-555-6666\r\n" + "TEL;VALUE=uri;TYPE=\"voice,work\":tel:+44-555-555-7777\r\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "LANG:fr\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + KContacts::Addressee addr = lst.at(0); + QCOMPARE(addr.phoneNumbers().count(), 3); +} diff --git a/autotests/phonenumbertest.h b/autotests/phonenumbertest.h new file mode 100644 index 0000000..5f62768 --- /dev/null +++ b/autotests/phonenumbertest.h @@ -0,0 +1,48 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef PHONENUMBER_TEST_H +#define PHONENUMBER_TEST_H + +#include + +class PhoneNumberTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void emptyTest(); + void storeTest(); + void equalsTest(); + void differsTest(); + void assignmentTest(); + void serializeTest(); + void labelTest(); + + void shouldExportVCard3(); + void shouldExportVCard4(); + void shouldParseVcard3(); + void shouldParseVcard4(); + + void shouldExportVCard21(); + void shouldParseVCard21(); +}; + +#endif diff --git a/autotests/picturetest.cpp b/autotests/picturetest.cpp new file mode 100644 index 0000000..8893e65 --- /dev/null +++ b/autotests/picturetest.cpp @@ -0,0 +1,267 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "picturetest.h" +#include "kcontacts/picture.h" +#include +#include +#include + +QTEST_MAIN(PictureTest) + +static QImage testImage() +{ + static QImage image; + + if (image.isNull()) { + image = QImage(200, 200, QImage::Format_RGB32); + QPainter p(&image); + p.drawRect(10, 10, 50, 50); + } + + return image; +} + +static QByteArray testImageRawPNG() +{ + static QByteArray raw; + + if (raw.isNull()) { + QBuffer buffer(&raw); + buffer.open(QIODevice::WriteOnly); + testImage().save(&buffer, "PNG"); + } + + return raw; +} + +static QByteArray testImageRawJPEG() +{ + static QByteArray raw; + + if (raw.isNull()) { + QBuffer buffer(&raw); + buffer.open(QIODevice::WriteOnly); + testImage().save(&buffer, "JPEG"); + } + + return raw; +} + +void PictureTest::emptyTest() +{ + KContacts::Picture picture; + + QVERIFY(picture.isEmpty()); +} + +void PictureTest::storeTestInternImage() +{ + KContacts::Picture picture; + + picture.setData(testImage()); + + QVERIFY(picture.isEmpty() == false); + QVERIFY(picture.isIntern() == true); + QVERIFY(picture.type() == QLatin1String("jpeg")); + QVERIFY(picture.data() == testImage()); + QVERIFY(picture.rawData() == testImageRawJPEG()); +} + +void PictureTest::storeTestInternRawData() +{ + KContacts::Picture picture; + + picture.setRawData(testImageRawPNG(), QStringLiteral("png")); + + QVERIFY(picture.isEmpty() == false); + QVERIFY(picture.isIntern() == true); + QVERIFY(picture.type() == QLatin1String("png")); + QVERIFY(picture.rawData() == testImageRawPNG()); + QVERIFY(picture.data() == testImage()); +} + +void PictureTest::storeTestExtern() +{ + KContacts::Picture picture; + + picture.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + QVERIFY(picture.isEmpty() == false); + QVERIFY(picture.isIntern() == false); + QVERIFY(picture.type() == QLatin1String("png")); + QVERIFY(picture.url() == QLatin1String("http://myhomepage.com/foto.png")); +} + +void PictureTest::equalsTestInternImage() +{ + KContacts::Picture picture1, picture2; + + picture1.setData(testImage()); + + picture2.setData(testImage()); + + QVERIFY(picture1 == picture2); + + // access rawData() so a QByteArray is created + picture1.rawData(); + QVERIFY(picture1 == picture2); +} + +void PictureTest::equalsTestInternRawData() +{ + KContacts::Picture picture1, picture2; + + picture1.setRawData(testImageRawPNG(), QStringLiteral("png")); + + picture2.setRawData(testImageRawPNG(), QStringLiteral("png")); + + QVERIFY(picture1 == picture2); + + // access data() so a QImage is created + picture1.data(); + QVERIFY(picture1 == picture2); +} + +void PictureTest::equalsTestInternImageAndRawData() +{ + KContacts::Picture picture1, picture2; + + picture1.setData(testImage()); + + picture2.setRawData(testImageRawJPEG(), QStringLiteral("jpeg")); + + QVERIFY(picture1.rawData() == picture2.rawData()); +} + +void PictureTest::equalsTestExtern() +{ + KContacts::Picture picture1, picture2; + + picture1.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + picture2.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + QVERIFY(picture1 == picture2); +} + +void PictureTest::differsTest() +{ + KContacts::Picture picture1, picture2; + + picture1.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + picture2.setData(testImage()); + + QVERIFY(picture1 != picture2); +} + +void PictureTest::differsTestInternRawData() +{ + KContacts::Picture picture1, picture2; + + picture1.setRawData(testImageRawJPEG(), QStringLiteral("jpeg")); + + picture2.setRawData(testImageRawPNG(), QStringLiteral("png")); + + QVERIFY(picture1 != picture2); + QVERIFY(picture1.rawData() != picture2.rawData()); +} + +void PictureTest::differsTestExtern() +{ + KContacts::Picture picture1, picture2; + + picture1.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + picture1.setUrl(QStringLiteral("http://myhomepage.com/foto2.png"), QStringLiteral("png")); + + QVERIFY(picture1 != picture2); +} + +void PictureTest::assignmentTestIntern() +{ + KContacts::Picture picture1, picture2; + + picture1.setData(testImage()); + + picture2 = picture1; + + QVERIFY(picture1 == picture2); +} + +void PictureTest::assignmentTestExtern() +{ + KContacts::Picture picture1, picture2; + + picture1.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + picture2 = picture1; + + QVERIFY(picture1 == picture2); +} + +void PictureTest::serializeTestInternImage() +{ + KContacts::Picture picture1, picture2; + + picture1.setData(testImage()); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << picture1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> picture2; + + QVERIFY(picture1 == picture2); +} + +void PictureTest::serializeTestInternRawData() +{ + KContacts::Picture picture1, picture2; + + picture1.setRawData(testImageRawPNG(), QStringLiteral("png")); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << picture1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> picture2; + + QVERIFY(picture1 == picture2); +} + +void PictureTest::serializeTestExtern() +{ + KContacts::Picture picture1, picture2; + + picture1.setUrl(QStringLiteral("http://myhomepage.com/foto.png"), QStringLiteral("png")); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << picture1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> picture2; + + QVERIFY(picture1 == picture2); +} diff --git a/autotests/picturetest.h b/autotests/picturetest.h new file mode 100644 index 0000000..033aea6 --- /dev/null +++ b/autotests/picturetest.h @@ -0,0 +1,49 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef PICTURE_TEST_H +#define PICTURE_TEST_H + +#include + +class PictureTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void emptyTest(); + void storeTestInternImage(); + void storeTestInternRawData(); + void storeTestExtern(); + void equalsTestInternImage(); + void equalsTestInternRawData(); + void equalsTestInternImageAndRawData(); + void equalsTestExtern(); + void differsTest(); + void differsTestInternRawData(); + void differsTestExtern(); + void assignmentTestIntern(); + void assignmentTestExtern(); + void serializeTestInternImage(); + void serializeTestInternRawData(); + void serializeTestExtern(); +}; + +#endif diff --git a/autotests/relatedtest.cpp b/autotests/relatedtest.cpp new file mode 100644 index 0000000..04c42c5 --- /dev/null +++ b/autotests/relatedtest.cpp @@ -0,0 +1,262 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "relatedtest.h" +#include "related.h" +#include "vcardtool.h" +#include + +RelatedTest::RelatedTest(QObject *parent) + : QObject(parent) +{ +} + +RelatedTest::~RelatedTest() +{ +} + +void RelatedTest::shouldHaveDefaultValue() +{ + KContacts::Related related; + QVERIFY(!related.isValid()); + QVERIFY(related.related().isEmpty()); + QVERIFY(related.parameters().isEmpty()); +} + +void RelatedTest::shouldAssignValue() +{ + const QString relatedTo(QStringLiteral("friend")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Related related(relatedTo); + related.setParameters(params); + QVERIFY(related.isValid()); + QVERIFY(!related.related().isEmpty()); + QCOMPARE(related.related(), relatedTo); + QVERIFY(!related.parameters().isEmpty()); + QCOMPARE(related.parameters(), params); +} + +void RelatedTest::shouldAssignExternal() +{ + KContacts::Related related; + const QString relatedTo(QStringLiteral("friend")); + related.setRelated(relatedTo); + QVERIFY(related.isValid()); + QCOMPARE(related.related(), relatedTo); +} + +void RelatedTest::shouldSerialized() +{ + KContacts::Related related; + KContacts::Related result; + const QString relatedTo(QStringLiteral("friend")); + related.setRelated(relatedTo); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + related.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << related; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(related == result); +} + +void RelatedTest::shouldEqualRelated() +{ + KContacts::Related related; + KContacts::Related result; + const QString relatedTo(QStringLiteral("friend")); + related.setRelated(relatedTo); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + related.setParameters(params); + + result = related; + QVERIFY(related == result); +} + +void RelatedTest::shouldParseRelated() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:4.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "RELATED:friend\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).relationShips().count(), 1); + const KContacts::Related related = lst.at(0).relationShips().at(0); + QCOMPARE(related.related(), QStringLiteral("friend")); +} + +void RelatedTest::shouldParseRelatedWithArgument() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:4.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "RELATED;FOO1=bla1,blo1;FOO2=bla2,blo2:friend\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).relationShips().count(), 1); + const KContacts::Related related = lst.at(0).relationShips().at(0); + QCOMPARE(related.related(), QStringLiteral("friend")); + QCOMPARE(related.parameters().count(), 2); +} + +void RelatedTest::shouldParseWithoutRelated() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).relationShips().count(), 0); +} + +void RelatedTest::shouldCreateVCard4() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Related::List lstRelated; + KContacts::Related related(QStringLiteral("friend")); + lstRelated << related; + addr.setRelationShips(lstRelated); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "RELATED:friend\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void RelatedTest::shouldCreateVCardWithTwoRelated() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Related::List lstRelated; + KContacts::Related related(QStringLiteral("friend")); + KContacts::Related related2(QStringLiteral("kde")); + lstRelated << related << related2; + addr.setRelationShips(lstRelated); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "RELATED:friend\r\n" + "RELATED:kde\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void RelatedTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Related::List lstRelated; + KContacts::Related related(QStringLiteral("friend")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + related.setParameters(params); + lstRelated << related; + addr.setRelationShips(lstRelated); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "RELATED;FOO1=bla1,blo1;FOO2=bla2,blo2:friend\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void RelatedTest::shouldNotExportInVcard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Related::List lstRelated; + KContacts::Related related(QStringLiteral("friend")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + related.setParameters(params); + lstRelated << related; + addr.setRelationShips(lstRelated); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "RELATED;FOO1=bla1,blo1;FOO2=bla2,blo2:friend\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(RelatedTest) diff --git a/autotests/relatedtest.h b/autotests/relatedtest.h new file mode 100644 index 0000000..62f4351 --- /dev/null +++ b/autotests/relatedtest.h @@ -0,0 +1,47 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RELATEDTEST_H +#define RELATEDTEST_H + +#include + +class RelatedTest : public QObject +{ + Q_OBJECT +public: + explicit RelatedTest(QObject *parent = nullptr); + ~RelatedTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualRelated(); + void shouldParseRelated(); + void shouldParseWithoutRelated(); + void shouldCreateVCard4(); + void shouldCreateVCardWithTwoRelated(); + void shouldCreateVCardWithParameters(); + void shouldNotExportInVcard3(); + void shouldParseRelatedWithArgument(); +}; + +#endif // RELATEDTEST_H diff --git a/autotests/resourcelocatorurltest.cpp b/autotests/resourcelocatorurltest.cpp new file mode 100644 index 0000000..3b2033b --- /dev/null +++ b/autotests/resourcelocatorurltest.cpp @@ -0,0 +1,225 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcelocatorurltest.h" + +#include "resourcelocatorurl.h" +#include "vcardtool.h" +#include + +using namespace KContacts; +ResourceLocatorUrlTest::ResourceLocatorUrlTest(QObject *parent) + : QObject(parent) +{ +} + +ResourceLocatorUrlTest::~ResourceLocatorUrlTest() +{ +} + +void ResourceLocatorUrlTest::shouldHaveDefaultValue() +{ + ResourceLocatorUrl ResourceLocatorUrl; + QVERIFY(!ResourceLocatorUrl.isValid()); + QVERIFY(ResourceLocatorUrl.url().isEmpty()); + QVERIFY(ResourceLocatorUrl.parameters().isEmpty()); +} + +void ResourceLocatorUrlTest::shouldAssignValue() +{ + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + ResourceLocatorUrl ResourceLocatorUrl; + ResourceLocatorUrl.setParameters(params); + QVERIFY(!ResourceLocatorUrl.isValid()); + QVERIFY(ResourceLocatorUrl.url().isEmpty()); + QVERIFY(!ResourceLocatorUrl.parameters().isEmpty()); + QCOMPARE(ResourceLocatorUrl.parameters(), params); +} + +void ResourceLocatorUrlTest::shouldAssignExternal() +{ + ResourceLocatorUrl resourcelocatorurl; + QUrl url = QUrl(QStringLiteral("https://www.kde.org")); + resourcelocatorurl.setUrl(url); + QVERIFY(!resourcelocatorurl.url().isEmpty()); + QCOMPARE(resourcelocatorurl.url(), url); +} + +void ResourceLocatorUrlTest::shouldSerialized() +{ + ResourceLocatorUrl resourcelocatorurl; + ResourceLocatorUrl result; + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + resourcelocatorurl.setParameters(params); + resourcelocatorurl.setUrl(QUrl(QStringLiteral("mailto:foo@kde.org"))); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << resourcelocatorurl; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(resourcelocatorurl == result); +} + +void ResourceLocatorUrlTest::shouldEqualResourceLocatorUrl() +{ + ResourceLocatorUrl resourcelocatorurl; + ResourceLocatorUrl result; + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + resourcelocatorurl.setUrl(QUrl(QStringLiteral("mailto:foo@kde.org"))); + resourcelocatorurl.setParameters(params); + + result = resourcelocatorurl; + QVERIFY(resourcelocatorurl == result); +} + +void ResourceLocatorUrlTest::shouldParseResourceLocatorUrl() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "URL;PREF=1:https://firsturl\n" + "URL;PREF=1:https://sherlockholmes.com/calendar/sherlockholmes\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraUrlList().count(), 2); + const ResourceLocatorUrl calurl = lst.at(0).extraUrlList().at(0); + QCOMPARE(calurl.url(), QUrl(QStringLiteral("https://firsturl"))); + QVERIFY(!calurl.parameters().isEmpty()); +} + +void ResourceLocatorUrlTest::shouldGenerateVCard4() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ResourceLocatorUrl webpage; + webpage.setUrl(QUrl(QStringLiteral("https://www.kde.org"))); + addr.setUrl(webpage); + ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + addr.insertExtraUrl(url); + url.setUrl(QUrl(QStringLiteral("https://foo.kde.org"))); + addr.insertExtraUrl(url); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "URL:https://www.kde.org\r\n" + "URL:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "URL:https://foo.kde.org\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void ResourceLocatorUrlTest::shouldGenerateVCardWithParameter() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ResourceLocatorUrl webpage; + webpage.setUrl(QUrl(QStringLiteral("https://www.kde.org"))); + addr.setUrl(webpage); + ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + QMap params; + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + url.setParameters(params); + addr.insertExtraUrl(url); + url.setUrl(QUrl(QStringLiteral("https://foo.kde.org"))); + QMap params2; + url.setParameters(params2); + addr.insertExtraUrl(url); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "URL:https://www.kde.org\r\n" + "URL;FOO2=bla2,blo2:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "URL:https://foo.kde.org\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void ResourceLocatorUrlTest::shouldGenerateVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::ResourceLocatorUrl webpage; + webpage.setUrl(QUrl(QStringLiteral("https://www.kde.org"))); + addr.setUrl(webpage); + ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("https://sherlockholmes.com/calendar/sherlockholmes"))); + QMap params; + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + url.setParameters(params); + addr.insertExtraUrl(url); + url.setUrl(QUrl(QStringLiteral("https://foo.kde.org"))); + QMap params2; + url.setParameters(params2); + addr.insertExtraUrl(url); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "UID:testuid\r\n" + "URL:https://www.kde.org\r\n" + "URL;FOO2=bla2,blo2:https://sherlockholmes.com/calendar/sherlockholmes\r\n" + "URL:https://foo.kde.org\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +QTEST_MAIN(ResourceLocatorUrlTest) diff --git a/autotests/resourcelocatorurltest.h b/autotests/resourcelocatorurltest.h new file mode 100644 index 0000000..6f2b0d0 --- /dev/null +++ b/autotests/resourcelocatorurltest.h @@ -0,0 +1,45 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ResourceLocatorUrlTest_H +#define ResourceLocatorUrlTest_H + +#include + +class ResourceLocatorUrlTest : public QObject +{ + Q_OBJECT +public: + explicit ResourceLocatorUrlTest(QObject *parent = nullptr); + ~ResourceLocatorUrlTest(); + +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualResourceLocatorUrl(); + void shouldParseResourceLocatorUrl(); + void shouldGenerateVCard4(); + void shouldGenerateVCardWithParameter(); + void shouldGenerateVCard3(); +}; + +#endif // ResourceLocatorUrlTest_H diff --git a/autotests/roletest.cpp b/autotests/roletest.cpp new file mode 100644 index 0000000..4bee50c --- /dev/null +++ b/autotests/roletest.cpp @@ -0,0 +1,243 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "roletest.h" +#include "role.h" +#include "vcardtool.h" +#include + +RoleTest::RoleTest(QObject *parent) + : QObject(parent) +{ +} + +RoleTest::~RoleTest() +{ +} + +void RoleTest::shouldHaveDefaultValue() +{ + KContacts::Role role; + QVERIFY(!role.isValid()); + QVERIFY(role.role().isEmpty()); + QVERIFY(role.parameters().isEmpty()); +} + +void RoleTest::shouldAssignValue() +{ + const QString lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Role role(lang); + role.setParameters(params); + QVERIFY(role.isValid()); + QVERIFY(!role.role().isEmpty()); + QCOMPARE(role.role(), lang); + QVERIFY(!role.parameters().isEmpty()); + QCOMPARE(role.parameters(), params); +} + +void RoleTest::shouldAssignExternal() +{ + KContacts::Role role; + const QString lang(QStringLiteral("fr")); + role.setRole(lang); + QVERIFY(role.isValid()); + QCOMPARE(role.role(), lang); +} + +void RoleTest::shouldSerialized() +{ + KContacts::Role role; + KContacts::Role result; + const QString lang(QStringLiteral("fr")); + role.setRole(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + role.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << role; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(role == result); +} + +void RoleTest::shouldEqualRole() +{ + KContacts::Role role; + KContacts::Role result; + const QString lang(QStringLiteral("fr")); + role.setRole(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + role.setParameters(params); + + result = role; + QVERIFY(role == result); +} + +void RoleTest::shouldParseRole() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "Role:boo\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraRoleList().count(), 1); + QCOMPARE(lst.at(0).role(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).extraRoleList().at(0).role(), QStringLiteral("boo")); +} + +void RoleTest::shouldParseWithoutRole() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraRoleList().count(), 0); + QCOMPARE(lst.at(0).role(), QString()); +} + +void RoleTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Role::List lstRole; + KContacts::Role role(QStringLiteral("fr")); + lstRole << role; + addr.setExtraRoleList(lstRole); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ROLE:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void RoleTest::shouldCreateVCardWithTwoRole() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Role::List lstRole; + KContacts::Role role(QStringLiteral("fr")); + KContacts::Role role2(QStringLiteral("fr2")); + lstRole << role << role2; + addr.setExtraRoleList(lstRole); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ROLE:fr\r\n" + "ROLE:fr2\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void RoleTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Role::List lstRole; + KContacts::Role role(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + role.setParameters(params); + lstRole << role; + addr.setExtraRoleList(lstRole); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ROLE;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void RoleTest::shouldGenerateRoleForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Role::List lstRole; + KContacts::Role role(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + role.setParameters(params); + lstRole << role; + addr.setExtraRoleList(lstRole); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "ROLE;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(RoleTest) diff --git a/autotests/roletest.h b/autotests/roletest.h new file mode 100644 index 0000000..991ae2f --- /dev/null +++ b/autotests/roletest.h @@ -0,0 +1,46 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ROLETEST_H +#define ROLETEST_H + +#include + +class RoleTest : public QObject +{ + Q_OBJECT +public: + explicit RoleTest(QObject *parent = nullptr); + ~RoleTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualRole(); + void shouldParseRole(); + void shouldParseWithoutRole(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoRole(); + void shouldCreateVCardWithParameters(); + void shouldGenerateRoleForVCard3(); +}; + +#endif // ROLETEST_H diff --git a/autotests/secrecytest.cpp b/autotests/secrecytest.cpp new file mode 100644 index 0000000..40eb81f --- /dev/null +++ b/autotests/secrecytest.cpp @@ -0,0 +1,86 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "secrecytest.h" +#include "kcontacts/secrecy.h" +#include "vcardtool.h" +#include + +QTEST_MAIN(SecrecyTest) + +void SecrecyTest::emptyTest() +{ + KContacts::Secrecy secrecy; + + QVERIFY(secrecy.type() == KContacts::Secrecy::Invalid); +} + +void SecrecyTest::storeTest() +{ + KContacts::Secrecy secrecy; + + secrecy.setType(KContacts::Secrecy::Private); + + QVERIFY(secrecy.type() == KContacts::Secrecy::Private); +} + +void SecrecyTest::equalsTest() +{ + KContacts::Secrecy secrecy1, secrecy2; + + secrecy1.setType(KContacts::Secrecy::Confidential); + secrecy2.setType(KContacts::Secrecy::Confidential); + + QVERIFY(secrecy1 == secrecy2); +} + +void SecrecyTest::differsTest() +{ + KContacts::Secrecy secrecy1(KContacts::Secrecy::Private); + KContacts::Secrecy secrecy2(KContacts::Secrecy::Confidential); + + QVERIFY(secrecy1 != secrecy2); +} + +void SecrecyTest::assignmentTest() +{ + KContacts::Secrecy secrecy1, secrecy2; + + secrecy1.setType(KContacts::Secrecy::Confidential); + secrecy1 = secrecy2; + + QVERIFY(secrecy1 == secrecy2); +} + +void SecrecyTest::serializeTest() +{ + KContacts::Secrecy secrecy1, secrecy2; + + secrecy1.setType(KContacts::Secrecy::Confidential); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << secrecy1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> secrecy2; + + QVERIFY(secrecy1 == secrecy2); +} diff --git a/autotests/secrecytest.h b/autotests/secrecytest.h new file mode 100644 index 0000000..12acd8b --- /dev/null +++ b/autotests/secrecytest.h @@ -0,0 +1,39 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef SECRECY_TEST_H +#define SECRECY_TEST_H + +#include + +class SecrecyTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void emptyTest(); + void storeTest(); + void equalsTest(); + void differsTest(); + void assignmentTest(); + void serializeTest(); +}; + +#endif diff --git a/autotests/soundtest.cpp b/autotests/soundtest.cpp new file mode 100644 index 0000000..d2df950 --- /dev/null +++ b/autotests/soundtest.cpp @@ -0,0 +1,262 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "soundtest.h" +#include "kcontacts/sound.h" +#include "addressee.h" +#include +#include "vcardtool.h" + +QTEST_MAIN(SoundTest) + +static QByteArray testData() +{ + static QByteArray data; + + if (data.isNull()) { + for (int i = 0; i < 20; ++i) { + data.append(char(i)); + } + } + + return data; +} + +void SoundTest::emptyTest() +{ + KContacts::Sound sound; + + QVERIFY(sound.isEmpty()); +} + +void SoundTest::storeTestIntern() +{ + KContacts::Sound sound; + + sound.setData(testData()); + + QVERIFY(sound.isIntern() == true); + QVERIFY(sound.data() == testData()); +} + +void SoundTest::storeTestExtern() +{ + KContacts::Sound sound; + + sound.setUrl(QLatin1String("http://myhomepage.com/sound.wav")); + + QVERIFY(sound.isIntern() == false); + QVERIFY(sound.url() == QLatin1String("http://myhomepage.com/sound.wav")); +} + +void SoundTest::equalsTestIntern() +{ + KContacts::Sound sound1, sound2; + + sound1.setData(testData()); + sound2.setData(testData()); + + QVERIFY(sound1 == sound2); +} + +void SoundTest::equalsTestExtern() +{ + KContacts::Sound sound1, sound2; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + sound2.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + + QVERIFY(sound1 == sound2); +} + +void SoundTest::differsTest() +{ + KContacts::Sound sound1, sound2; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + sound2.setData(testData()); + + QVERIFY(sound1 != sound2); +} + +void SoundTest::assignmentTestIntern() +{ + KContacts::Sound sound1, sound2; + + sound1.setData(testData()); + + sound2 = sound1; + + QVERIFY(sound1 == sound2); +} + +void SoundTest::assignmentTestExtern() +{ + KContacts::Sound sound1, sound2; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + + sound2 = sound1; + + QVERIFY(sound1 == sound2); +} + +void SoundTest::serializeTest() +{ + KContacts::Sound sound1, sound2; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + sound1.setData(testData()); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << sound1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> sound2; + + QVERIFY(sound1 == sound2); +} + +void SoundTest::shouldParseSource() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "SOUND;VALUE=URI:http://myhomepage.com/sound.wav\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QVERIFY(!lst.at(0).sound().isEmpty()); + KContacts::Sound sound = lst.at(0).sound(); + QVERIFY(!sound.isIntern()); + QCOMPARE(sound.url(), QStringLiteral("http://myhomepage.com/sound.wav")); +} + +void SoundTest::shouldGenerateVCard4WithData() +{ + KContacts::Addressee::List lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Sound sound1; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + sound1.setData(testData()); + addr.setSound(sound1); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "SOUND;ENCODING=b:AAECAwQFBgcICQoLDA0ODxAREhM=\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void SoundTest::shouldGenerateVCard4WithUrl() +{ + KContacts::Addressee::List lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Sound sound1; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + addr.setSound(sound1); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "SOUND;VALUE=URI:http://myhomepage.com/sound.wav\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void SoundTest::shouldGenerateVCard3WithData() +{ + KContacts::Addressee::List lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Sound sound1; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + sound1.setData(testData()); + addr.setSound(sound1); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "SOUND;ENCODING=b:AAECAwQFBgcICQoLDA0ODxAREhM=\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void SoundTest::shouldGenerateVCard3WithUrl() +{ + KContacts::Addressee::List lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Sound sound1; + + sound1.setUrl(QStringLiteral("http://myhomepage.com/sound.wav")); + addr.setSound(sound1); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "SOUND;VALUE=URI:http://myhomepage.com/sound.wav\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} diff --git a/autotests/soundtest.h b/autotests/soundtest.h new file mode 100644 index 0000000..a6fff09 --- /dev/null +++ b/autotests/soundtest.h @@ -0,0 +1,47 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef SOUND_TEST_H +#define SOUND_TEST_H + +#include + +class SoundTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void emptyTest(); + void storeTestIntern(); + void storeTestExtern(); + void equalsTestIntern(); + void equalsTestExtern(); + void differsTest(); + void assignmentTestIntern(); + void assignmentTestExtern(); + void serializeTest(); + void shouldParseSource(); + void shouldGenerateVCard4WithData(); + void shouldGenerateVCard4WithUrl(); + void shouldGenerateVCard3WithData(); + void shouldGenerateVCard3WithUrl(); +}; + +#endif diff --git a/autotests/testlock.h b/autotests/testlock.h new file mode 100644 index 0000000..a581f02 --- /dev/null +++ b/autotests/testlock.h @@ -0,0 +1,52 @@ +/* + This file is part of the KContacts framework. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KCONTACTS_TESTLOCK_H +#define KCONTACTS_TESTLOCK_H + +#include +#include + +#include "kcontacts/lock.h" + +class QLabel; +class QTreeWidget; + +class LockWidget : public QWidget +{ + Q_OBJECT +public: + LockWidget(const QString &identifier); + ~LockWidget(); + +protected Q_SLOTS: + void lock(); + void unlock(); + + void updateLockView(); + +private: + KContacts::Lock *mLock = nullptr; + + QLabel *mStatus = nullptr; + QTreeWidget *mLockView = nullptr; +}; + +#endif diff --git a/autotests/testroundtrip.cpp b/autotests/testroundtrip.cpp new file mode 100644 index 0000000..289309c --- /dev/null +++ b/autotests/testroundtrip.cpp @@ -0,0 +1,178 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2012 Kevin Krammer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "addressee.h" + +#include "converter/vcardconverter.h" + +#include +#include +#include +#include + +using namespace KContacts; + +class RoundtripTest : public QObject +{ + Q_OBJECT + +private: + + QDir mInputDir; + QDir mOutput2_1Dir; + QDir mOutput3_0Dir; + QDir mOutput4_0Dir; + + QStringList mInputFiles; + +private Q_SLOTS: + void initTestCase(); + void testVCardRoundtrip_data(); + void testVCardRoundtrip(); +}; + +// check the validity of our test data set +void RoundtripTest::initTestCase() +{ + // check that all resource prefixes exist + + mInputDir = QDir(QStringLiteral(":/input")); + QVERIFY(mInputDir.exists()); + QVERIFY(mInputDir.cd(QStringLiteral("data"))); + + mOutput2_1Dir = QDir(QStringLiteral(":/output2.1")); + QVERIFY(mOutput2_1Dir.exists()); + QVERIFY(mOutput2_1Dir.cd(QStringLiteral("data"))); + + mOutput3_0Dir = QDir(QStringLiteral(":/output3.0")); + QVERIFY(mOutput3_0Dir.exists()); + QVERIFY(mOutput3_0Dir.cd(QStringLiteral("data"))); + + mOutput4_0Dir = QDir(QStringLiteral(":/output4.0")); + QVERIFY(mOutput4_0Dir.exists()); + QVERIFY(mOutput4_0Dir.cd(QStringLiteral("data"))); + + // check that there are input files + + mInputFiles = mInputDir.entryList(); + + QVERIFY(!mInputFiles.isEmpty()); +} + +void RoundtripTest::testVCardRoundtrip_data() +{ + QTest::addColumn("inputFile"); + QTest::addColumn("output2_1File"); + QTest::addColumn("output3_0File"); + QTest::addColumn("output4_0File"); + + QString outFile21Pattern = QLatin1String("%1.2_1ref"); + QString outFile4Pattern = QLatin1String("v4_0.%1.ref"); + QString outFilePattern = QLatin1String("%1.ref"); + for (const QString &inputFile : qAsConst(mInputFiles)) { + const QString outFile = outFilePattern.arg(inputFile); + const QString outFileV2_1 = outFile21Pattern.arg(inputFile); + const QString outFileV4 = outFile4Pattern.arg(inputFile); + QTest::newRow(QFile::encodeName(inputFile).constData()) + << inputFile + << (mOutput2_1Dir.exists(outFileV2_1) ? outFileV2_1 : QString()) + << (mOutput3_0Dir.exists(outFile) ? outFile : QString()) + << (mOutput4_0Dir.exists(outFileV4) ? outFileV4 : QString()); + } +} + +static void compareBuffers(const char *version, const QByteArray &outputData, const QByteArray &outputRefData) +{ + if (outputData != outputRefData) { + qDebug() << " outputData " << outputData; + qDebug() << " outputRefData " << outputRefData; + } + const QList outputLines = outputData.split('\n'); + const QList outputRefLines = outputRefData.split('\n'); + for (int i = 0; i < qMin(outputLines.count(), outputRefLines.count()); ++i) { + const QByteArray actual = outputLines.at(i); + const QByteArray expect = outputRefLines.at(i); + if (actual != expect) { + qCritical() << "Mismatch in" << version << "output line" << (i + 1); + QCOMPARE(actual, expect); + QCOMPARE(actual.count(), expect.count()); + } + } + QCOMPARE(outputLines.count(), outputRefLines.count()); + QCOMPARE(outputData.size(), outputRefData.size()); +} + +void RoundtripTest::testVCardRoundtrip() +{ + QFETCH(QString, inputFile); + QFETCH(QString, output2_1File); + QFETCH(QString, output3_0File); + QFETCH(QString, output4_0File); + + QVERIFY2(!output2_1File.isEmpty() + || !output3_0File.isEmpty() + || !output4_0File.isEmpty(), + "No reference output file for either format version"); + + QFile input(QFileInfo(mInputDir, inputFile).absoluteFilePath()); + QVERIFY(input.open(QIODevice::ReadOnly)); + + const QByteArray inputData = input.readAll(); + QVERIFY(!inputData.isEmpty()); + + VCardConverter converter; + const Addressee::List list = converter.parseVCards(inputData); + QVERIFY(!list.isEmpty()); + + if (!output2_1File.isEmpty()) { + const QByteArray outputData = converter.createVCards(list, VCardConverter::v2_1); + + QFile outputFile(QFileInfo(mOutput2_1Dir, output2_1File).absoluteFilePath()); + QVERIFY(outputFile.open(QIODevice::ReadOnly)); + + const QByteArray outputRefData = outputFile.readAll(); + compareBuffers("v2.1", outputData, outputRefData); + } + + if (!output3_0File.isEmpty()) { + const QByteArray outputData = converter.createVCards(list, VCardConverter::v3_0); + + QFile outputFile(QFileInfo(mOutput3_0Dir, output3_0File).absoluteFilePath()); + QVERIFY(outputFile.open(QIODevice::ReadOnly)); + + const QByteArray outputRefData = outputFile.readAll(); + compareBuffers("v3.0", outputData, outputRefData); + } +#if 0 + if (!output4_0File.isEmpty()) { + const QByteArray outputData = converter.createVCards(list, VCardConverter::v4_0); + + QFile outputFile(QFileInfo(mOutput4_0Dir, output4_0File).absoluteFilePath()); + QVERIFY(outputFile.open(QIODevice::ReadOnly)); + + const QByteArray outputRefData = outputFile.readAll(); + compareBuffers("v4.0", outputData, outputRefData); + } +#endif +} + +QTEST_MAIN(RoundtripTest) + +#include "testroundtrip.moc" diff --git a/autotests/testroundtrip.qrc b/autotests/testroundtrip.qrc new file mode 100644 index 0000000..9fad99c --- /dev/null +++ b/autotests/testroundtrip.qrc @@ -0,0 +1,65 @@ + + + + data/vcard1.vcf + data/vcard2.vcf + data/vcard3.vcf + data/vcard4.vcf + data/vcard5.vcf + data/vcard6.vcf + data/vcard7.vcf + data/vcard8.vcf + data/vcard9.vcf + data/vcard10.vcf + data/vcard11.vcf + data/vcard12.vcf + data/vcard13.vcf + data/vcard14.vcf + data/vcard15.vcf + + + + + + data/vcard1.vcf.2_1ref + data/vcard2.vcf.2_1ref + data/vcard3.vcf.2_1ref + data/vcard6.vcf.2_1ref + data/vcard7.vcf.2_1ref + data/vcard12.vcf.2_1ref + data/vcard14.vcf.2_1ref + + + + + data/vcard1.vcf.ref + data/vcard2.vcf.ref + data/vcard3.vcf.ref + data/vcard4.vcf.ref + data/vcard5.vcf.ref + data/vcard6.vcf.ref + data/vcard7.vcf.ref + data/vcard8.vcf.ref + data/vcard9.vcf.ref + data/vcard10.vcf.ref + data/vcard11.vcf.ref + data/vcard12.vcf.ref + data/vcard13.vcf.ref + data/vcard14.vcf.ref + data/vcard15.vcf.ref + + + + + + data/v4_0.vcard1.vcf.ref + data/v4_0.vcard2.vcf.ref + data/v4_0.vcard3.vcf.ref + data/v4_0.vcard4.vcf.ref + data/v4_0.vcard5.vcf.ref + data/v4_0.vcard6.vcf.ref + data/v4_0.vcard7.vcf.ref + data/v4_0.vcard8.vcf.ref + + + diff --git a/autotests/timezonetest.cpp b/autotests/timezonetest.cpp new file mode 100644 index 0000000..ca3a47d --- /dev/null +++ b/autotests/timezonetest.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "timezonetest.h" +#include "kcontacts/timezone.h" +#include +#include "vcardtool.h" + +QTEST_MAIN(TimeZoneTest) + +void TimeZoneTest::emptyTest() +{ + KContacts::TimeZone timezone; + + QVERIFY(timezone.isValid() == false); +} + +void TimeZoneTest::storeTest() +{ + KContacts::TimeZone timezone; + + timezone.setOffset(2); + + QVERIFY(timezone.offset() == 2); +} + +void TimeZoneTest::equalsTest() +{ + KContacts::TimeZone timezone1, timezone2; + + timezone1.setOffset(2); + timezone2.setOffset(2); + + QVERIFY(timezone1 == timezone2); +} + +void TimeZoneTest::differsTest() +{ + KContacts::TimeZone timezone1(2); + KContacts::TimeZone timezone2(3); + + QVERIFY(timezone1 != timezone2); + QVERIFY(timezone1 != KContacts::TimeZone()); +} + +void TimeZoneTest::assignmentTest() +{ + KContacts::TimeZone timezone1, timezone2; + + timezone1.setOffset(2); + timezone1 = timezone2; + + QVERIFY(timezone1 == timezone2); +} + +void TimeZoneTest::serializeTest() +{ + KContacts::TimeZone timezone1, timezone2; + + timezone1.setOffset(2); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << timezone1; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> timezone2; + + QVERIFY(timezone1 == timezone2); +} + +void TimeZoneTest::shouldGenerateVCard3() +{ + KContacts::Addressee::List lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::TimeZone timezone; + + timezone.setOffset(2); + addr.setTimeZone(timezone); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected; + expected = QByteArray("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TZ:+00:02\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void TimeZoneTest::shouldGenerateVCard4() +{ + //TODO fixme. + KContacts::Addressee::List lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::TimeZone timezone; + + timezone.setOffset(2); + addr.setTimeZone(timezone); + + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + const QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TZ:+00:02\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} diff --git a/autotests/timezonetest.h b/autotests/timezonetest.h new file mode 100644 index 0000000..f2b799f --- /dev/null +++ b/autotests/timezonetest.h @@ -0,0 +1,41 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TIMEZONE_TEST_H +#define TIMEZONE_TEST_H + +#include + +class TimeZoneTest : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void emptyTest(); + void storeTest(); + void equalsTest(); + void differsTest(); + void assignmentTest(); + void serializeTest(); + void shouldGenerateVCard3(); + void shouldGenerateVCard4(); +}; + +#endif diff --git a/autotests/titletest.cpp b/autotests/titletest.cpp new file mode 100644 index 0000000..b80c34a --- /dev/null +++ b/autotests/titletest.cpp @@ -0,0 +1,264 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "titletest.h" +#include "title.h" +#include "vcardtool.h" +#include + +TitleTest::TitleTest(QObject *parent) + : QObject(parent) +{ +} + +TitleTest::~TitleTest() +{ +} + +void TitleTest::shouldHaveDefaultValue() +{ + KContacts::Title title; + QVERIFY(!title.isValid()); + QVERIFY(title.title().isEmpty()); + QVERIFY(title.parameters().isEmpty()); +} + +void TitleTest::shouldAssignValue() +{ + const QString lang(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + KContacts::Title title(lang); + title.setParameters(params); + QVERIFY(title.isValid()); + QVERIFY(!title.title().isEmpty()); + QCOMPARE(title.title(), lang); + QVERIFY(!title.parameters().isEmpty()); + QCOMPARE(title.parameters(), params); +} + +void TitleTest::shouldAssignExternal() +{ + KContacts::Title title; + const QString lang(QStringLiteral("fr")); + title.setTitle(lang); + QVERIFY(title.isValid()); + QCOMPARE(title.title(), lang); +} + +void TitleTest::shouldSerialized() +{ + KContacts::Title title; + KContacts::Title result; + const QString lang(QStringLiteral("fr")); + title.setTitle(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + title.setParameters(params); + + QByteArray data; + QDataStream s(&data, QIODevice::WriteOnly); + s << title; + + QDataStream t(&data, QIODevice::ReadOnly); + t >> result; + + QVERIFY(title == result); +} + +void TitleTest::shouldEqualTitle() +{ + KContacts::Title title; + KContacts::Title result; + const QString lang(QStringLiteral("fr")); + title.setTitle(lang); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + title.setParameters(params); + + result = title; + QVERIFY(title == result); +} + +void TitleTest::shouldParseTwoTitles() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "Title:boo\n" + "Title:bla\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraTitleList().count(), 2); + QCOMPARE(lst.at(0).title(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).extraTitleList().at(0).title(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).extraTitleList().at(1).title(), QStringLiteral("bla")); +} + +void TitleTest::shouldParseTitle() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "Title:boo\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraTitleList().count(), 1); + QCOMPARE(lst.at(0).title(), QStringLiteral("boo")); + QCOMPARE(lst.at(0).extraTitleList().at(0).title(), QStringLiteral("boo")); +} + +void TitleTest::shouldParseWithoutTitle() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + QCOMPARE(lst.at(0).extraTitleList().count(), 0); + QCOMPARE(lst.at(0).title(), QString()); +} + +void TitleTest::shouldCreateVCard() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Title::List lstTitle; + KContacts::Title title(QStringLiteral("fr")); + lstTitle << title; + addr.setExtraTitleList(lstTitle); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TITLE:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void TitleTest::shouldCreateVCardWithTwoTitle() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Title::List lstTitle; + KContacts::Title title(QStringLiteral("fr")); + KContacts::Title title2(QStringLiteral("fr2")); + lstTitle << title << title2; + addr.setExtraTitleList(lstTitle); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TITLE:fr\r\n" + "TITLE:fr2\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + + QCOMPARE(ba, expected); +} + +void TitleTest::shouldCreateVCardWithParameters() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Title::List lstTitle; + KContacts::Title title(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + title.setParameters(params); + lstTitle << title; + addr.setExtraTitleList(lstTitle); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TITLE;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +void TitleTest::shouldGenerateTitleForVCard3() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Title::List lstTitle; + KContacts::Title title(QStringLiteral("fr")); + QMap params; + params.insert(QStringLiteral("Foo1"), QStringList() << QStringLiteral("bla1") << QStringLiteral("blo1")); + params.insert(QStringLiteral("Foo2"), QStringList() << QStringLiteral("bla2") << QStringLiteral("blo2")); + title.setParameters(params); + lstTitle << title; + addr.setExtraTitleList(lstTitle); + lst << addr; + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v3_0); + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:3.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TITLE;FOO1=bla1,blo1;FOO2=bla2,blo2:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QCOMPARE(ba, expected); +} + +QTEST_MAIN(TitleTest) diff --git a/autotests/titletest.h b/autotests/titletest.h new file mode 100644 index 0000000..ea2c259 --- /dev/null +++ b/autotests/titletest.h @@ -0,0 +1,47 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TITLETEST_H +#define TITLETEST_H + +#include + +class TitleTest : public QObject +{ + Q_OBJECT +public: + explicit TitleTest(QObject *parent = nullptr); + ~TitleTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValue(); + void shouldAssignExternal(); + void shouldSerialized(); + void shouldEqualTitle(); + void shouldParseTwoTitles(); + void shouldParseTitle(); + void shouldParseWithoutTitle(); + void shouldCreateVCard(); + void shouldCreateVCardWithTwoTitle(); + void shouldCreateVCardWithParameters(); + void shouldGenerateTitleForVCard3(); +}; + +#endif // TITLETEST_H diff --git a/autotests/vcarddragtest.cpp b/autotests/vcarddragtest.cpp new file mode 100644 index 0000000..141ac90 --- /dev/null +++ b/autotests/vcarddragtest.cpp @@ -0,0 +1,182 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net + Author: Kevin Krammer, krake@kdab.com + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include "converter/kcontacts/vcardconverter.h" +#include "kcontacts/vcarddrag.h" + +#include +using namespace KContacts; + +class VCardDragTest : public QObject +{ + Q_OBJECT + +public: + VCardDragTest(); + +private: + Addressee mAddressee1; + Addressee mAddressee2; + +private Q_SLOTS: + void testPopulate(); + void testCanDecode(); + void testFromMimeData(); +}; + +QTEST_MAIN(VCardDragTest) + +VCardDragTest::VCardDragTest() + : QObject() +{ + mAddressee1.setGivenName(QStringLiteral("Kevin")); + mAddressee1.setFamilyName(QStringLiteral("Krammer")); + mAddressee1.insertEmail(QStringLiteral("kevin.krammer@gmx.at")); + + mAddressee2.setGivenName(QStringLiteral("Tobias")); + mAddressee2.setFamilyName(QStringLiteral("König")); + mAddressee2.insertEmail(QStringLiteral("tokoe@kde.org")); +} + +void VCardDragTest::testPopulate() +{ + VCardConverter converter; + const QByteArray vcard = converter.createVCard(mAddressee1); + QVERIFY(!vcard.isEmpty()); + + QMimeData *data = new QMimeData(); + bool result = VCardDrag::populateMimeData(data, vcard); + QVERIFY(result); + QVERIFY(data->hasFormat(KContacts::Addressee::mimeType())); + QCOMPARE(data->data(KContacts::Addressee::mimeType()), vcard); + delete data; + + data = new QMimeData(); + result = VCardDrag::populateMimeData(data, Addressee::List() << mAddressee1); + QVERIFY(result); + QVERIFY(data->hasFormat(KContacts::Addressee::mimeType())); + QCOMPARE(data->data(KContacts::Addressee::mimeType()), vcard); + delete data; + + const QByteArray vcards = converter.createVCards(Addressee::List() << mAddressee1 << mAddressee2); + data = new QMimeData(); + result = VCardDrag::populateMimeData(data, Addressee::List() << mAddressee1 << mAddressee2); + QVERIFY(result); + QVERIFY(data->hasFormat(KContacts::Addressee::mimeType())); + QCOMPARE(data->data(KContacts::Addressee::mimeType()), vcards); + delete data; + + data = new QMimeData(); + result = VCardDrag::populateMimeData(data, Addressee::List()); + QVERIFY(!result); + QVERIFY(!data->hasFormat(KContacts::Addressee::mimeType())); + delete data; +} + +void VCardDragTest::testCanDecode() +{ + VCardConverter converter; + const QByteArray vcard = converter.createVCard(mAddressee1); + QVERIFY(!vcard.isEmpty()); + + QMimeData *data = new QMimeData(); + data->setData(Addressee::mimeType(), vcard); + QVERIFY(VCardDrag::canDecode(data)); + delete data; + + data = new QMimeData(); + data->setData(QStringLiteral("text/x-vcard"), vcard); + QVERIFY(VCardDrag::canDecode(data)); + delete data; + + data = new QMimeData(); + data->setData(QStringLiteral("application/octetstream"), vcard); + QVERIFY(!VCardDrag::canDecode(data)); + delete data; +} + +void VCardDragTest::testFromMimeData() +{ + VCardConverter converter; + const QByteArray vcard = converter.createVCard(mAddressee1); + QVERIFY(!vcard.isEmpty()); + + QByteArray content; + + QMimeData *data = new QMimeData(); + data->setData(Addressee::mimeType(), vcard); + bool result = VCardDrag::fromMimeData(data, content); + QVERIFY(result); + QCOMPARE(content, vcard); + delete data; + + data = new QMimeData(); + data->setData(QStringLiteral("text/x-vcard"), vcard); + result = VCardDrag::fromMimeData(data, content); + QVERIFY(result); + QCOMPARE(content, vcard); + delete data; + + data = new QMimeData(); + data->setData(QStringLiteral("application/octetstream"), vcard); + result = VCardDrag::fromMimeData(data, content); + QVERIFY(!result); + delete data; + + const QByteArray vcards = converter.createVCards(Addressee::List() << mAddressee1 << mAddressee2); + QVERIFY(!vcards.isEmpty()); + + Addressee::List addresseeList; + + data = new QMimeData(); + data->setData(Addressee::mimeType(), vcards); + result = VCardDrag::fromMimeData(data, addresseeList); + QVERIFY(result); + QCOMPARE(addresseeList.count(), 2); + QCOMPARE(addresseeList[0], mAddressee1); + QCOMPARE(addresseeList[1], mAddressee2); + delete data; + + data = new QMimeData(); + data->setData(QStringLiteral("text/x-vcard"), vcards); + result = VCardDrag::fromMimeData(data, addresseeList); + QVERIFY(result); + QCOMPARE(addresseeList.count(), 2); + QCOMPARE(addresseeList[0], mAddressee1); + QCOMPARE(addresseeList[1], mAddressee2); + delete data; + + data = new QMimeData(); + data->setData(QStringLiteral("application/octetstream"), vcards); + result = VCardDrag::fromMimeData(data, addresseeList); + QVERIFY(!result); + delete data; + + data = new QMimeData(); + data->setData(Addressee::mimeType(), QByteArray()); + result = VCardDrag::fromMimeData(data, addresseeList); + QVERIFY(!result); + delete data; +} + +#include "vcarddragtest.moc" diff --git a/autotests/vcardlinetest.cpp b/autotests/vcardlinetest.cpp new file mode 100644 index 0000000..dc69658 --- /dev/null +++ b/autotests/vcardlinetest.cpp @@ -0,0 +1,127 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardlinetest.h" +#include "vcardline.h" +#include + +VCardLineTest::VCardLineTest(QObject *parent) + : QObject(parent) +{ +} + +VCardLineTest::~VCardLineTest() +{ +} + +void VCardLineTest::shouldHaveDefaultValue() +{ + KContacts::VCardLine line; + QVERIFY(line.identifier().isEmpty()); + QVERIFY(line.group().isEmpty()); + QVERIFY(line.parameterList().isEmpty()); + QVERIFY(line.value().isNull()); +} + +void VCardLineTest::shouldAssignValues() +{ + KContacts::VCardLine line; + const QString identifier(QStringLiteral("foo")); + const QString group(QStringLiteral("bla")); + line.setIdentifier(identifier); + line.setGroup(group); + QMap map; + for (int i = 0; i < 5; ++i) { + map.insert(QStringLiteral("foo%1").arg(i), QStringLiteral("bla%1").arg(i)); + line.addParameter(QStringLiteral("foo%1").arg(i), QStringLiteral("bla%1").arg(i)); + } + const QVariant valueVariant = QVariant(QStringLiteral("a")); + line.setValue(valueVariant); + + QVERIFY(!line.parameterList().isEmpty()); + QCOMPARE(line.parameterList(), QStringList() << map.keys()); + + QCOMPARE(line.identifier(), identifier); + + QCOMPARE(line.group(), group); + QCOMPARE(line.value(), valueVariant); +} + +void VCardLineTest::shouldCopyValue() +{ + KContacts::VCardLine line; + const QString identifier(QStringLiteral("foo")); + const QString group(QStringLiteral("bla")); + line.setIdentifier(identifier); + line.setGroup(group); + QMap map; + for (int i = 0; i < 5; ++i) { + map.insert(QStringLiteral("foo%1").arg(i), QStringLiteral("bla%1").arg(i)); + line.addParameter(QStringLiteral("foo%1").arg(i), QStringLiteral("bla%1").arg(i)); + } + const QVariant valueVariant = QVariant(QStringLiteral("a")); + line.setValue(valueVariant); + + QVERIFY(!line.parameterList().isEmpty()); + QCOMPARE(line.parameterList(), QStringList() << map.keys()); + + QCOMPARE(line.identifier(), identifier); + + QCOMPARE(line.group(), group); + QCOMPARE(line.value(), valueVariant); + + KContacts::VCardLine copyLine(line); + QVERIFY(!copyLine.parameterList().isEmpty()); + QCOMPARE(copyLine.parameterList(), QStringList() << map.keys()); + + QCOMPARE(copyLine.identifier(), identifier); + + QCOMPARE(copyLine.group(), group); + QCOMPARE(copyLine.value(), valueVariant); +} + +void VCardLineTest::shouldEqualValue() +{ + KContacts::VCardLine line; + const QString identifier(QStringLiteral("foo")); + const QString group(QStringLiteral("bla")); + line.setIdentifier(identifier); + line.setGroup(group); + QMap map; + for (int i = 0; i < 5; ++i) { + map.insert(QStringLiteral("foo%1").arg(i), QStringLiteral("bla%1").arg(i)); + line.addParameter(QStringLiteral("foo%1").arg(i), QStringLiteral("bla%1").arg(i)); + } + const QVariant valueVariant = QVariant(QStringLiteral("a")); + line.setValue(valueVariant); + + QVERIFY(!line.parameterList().isEmpty()); + QCOMPARE(line.parameterList(), QStringList() << map.keys()); + + QCOMPARE(line.identifier(), identifier); + + QCOMPARE(line.group(), group); + QCOMPARE(line.value(), valueVariant); + + KContacts::VCardLine copyLine(line); + QVERIFY(line == copyLine); +} + +QTEST_MAIN(VCardLineTest) diff --git a/autotests/vcardlinetest.h b/autotests/vcardlinetest.h new file mode 100644 index 0000000..73840d8 --- /dev/null +++ b/autotests/vcardlinetest.h @@ -0,0 +1,39 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDLINETEST_H +#define VCARDLINETEST_H + +#include + +class VCardLineTest : public QObject +{ + Q_OBJECT +public: + explicit VCardLineTest(QObject *parent = nullptr); + ~VCardLineTest(); +private Q_SLOTS: + void shouldHaveDefaultValue(); + void shouldAssignValues(); + void shouldCopyValue(); + void shouldEqualValue(); +}; + +#endif // VCARDLINETEST_H diff --git a/autotests/vcardtool_benchmark.cpp b/autotests/vcardtool_benchmark.cpp new file mode 100644 index 0000000..1db03c1 --- /dev/null +++ b/autotests/vcardtool_benchmark.cpp @@ -0,0 +1,78 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2016 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardtool_benchmark.h" +#include "title.h" +#include "vcardtool.h" +#include + +PerformanceTest::PerformanceTest(QObject *parent) + : QObject(parent) +{ +} + +PerformanceTest::~PerformanceTest() +{ +} + +void PerformanceTest::testParserPerformance() +{ + QByteArray vcarddata("BEGIN:VCARD\n" + "VERSION:3.0\n" + "N:LastName;FirstName;;;\n" + "UID:c80cf296-0825-4eb0-ab16-1fac1d522a33@xxxxxx.xx\n" + "Title:boo\n" + "REV:2015-03-14T09:24:45+00:00\n" + "FN:FirstName LastName\n" + "END:VCARD\n"); + + QBENCHMARK { + KContacts::VCardTool vcard; + const KContacts::AddresseeList lst = vcard.parseVCards(vcarddata); + QCOMPARE(lst.count(), 1); + } +} + +void PerformanceTest::testExportPerformance() +{ + KContacts::AddresseeList lst; + KContacts::Addressee addr; + addr.setEmails(QStringList() << QStringLiteral("foo@kde.org")); + addr.setUid(QStringLiteral("testuid")); + KContacts::Title::List lstTitle; + KContacts::Title title(QStringLiteral("fr")); + lstTitle << title; + addr.setExtraTitleList(lstTitle); + lst << addr; + QByteArray expected("BEGIN:VCARD\r\n" + "VERSION:4.0\r\n" + "EMAIL:foo@kde.org\r\n" + "N:;;;;\r\n" + "TITLE:fr\r\n" + "UID:testuid\r\n" + "END:VCARD\r\n\r\n"); + QBENCHMARK { + KContacts::VCardTool vcard; + const QByteArray ba = vcard.exportVCards(lst, KContacts::VCard::v4_0); + QCOMPARE(ba, expected); + } +} + +QTEST_GUILESS_MAIN(PerformanceTest) diff --git a/autotests/vcardtool_benchmark.h b/autotests/vcardtool_benchmark.h new file mode 100644 index 0000000..879a4d0 --- /dev/null +++ b/autotests/vcardtool_benchmark.h @@ -0,0 +1,37 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2016 David Faure + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef PERFORMANCETEST_H +#define PERFORMANCETEST_H + +#include + +class PerformanceTest : public QObject +{ + Q_OBJECT +public: + explicit PerformanceTest(QObject *parent = nullptr); + ~PerformanceTest(); +private Q_SLOTS: + void testParserPerformance(); + void testExportPerformance(); +}; + +#endif diff --git a/kcontacts.categories b/kcontacts.categories new file mode 100644 index 0000000..3a46148 --- /dev/null +++ b/kcontacts.categories @@ -0,0 +1 @@ +org.kde.pim.kcontacts kcontacts (pim lib) diff --git a/kcontacts.renamecategories b/kcontacts.renamecategories new file mode 100644 index 0000000..ec463ab --- /dev/null +++ b/kcontacts.renamecategories @@ -0,0 +1 @@ +log_kcontacts org.kde.pim.kcontacts diff --git a/metainfo.yaml b/metainfo.yaml new file mode 100644 index 0000000..3e0f377 --- /dev/null +++ b/metainfo.yaml @@ -0,0 +1,16 @@ +maintainer: mlaurent +description: Address book API for KDE +tier: 3 +type: functional +public_lib: true +group: kdepim +platforms: + - name: All +portingAid: false +deprecated: false +release: false +libraries: + - qmake: KContacts + cmake: "KF5::Contacts" +cmakename: KF5Contacts + diff --git a/po/ar/kcontacts5.po b/po/ar/kcontacts5.po new file mode 100644 index 0000000..cb35a27 --- /dev/null +++ b/po/ar/kcontacts5.po @@ -0,0 +1,745 @@ +# translation of kabc.po to Arabic +# translation of kabc.po to +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# Youssef Chahibi , 2007. +# zayed , 2009. +# Safa Alfulaij , 2018. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2018-01-31 19:03+0300\n" +"Last-Translator: Safa Alfulaij \n" +"Language-Team: Arabic \n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "صندوق البريد" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "معلومات العنوان الموسّعة" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "الشّارع" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "المحلّة" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "المنطقة" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "الرّمز البريديّ" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "الدّولة" + +#: address.cpp:512 +#, fuzzy, kde-format +msgid "Delivery Label" +msgstr "عنوان التّسليم" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "محليّ" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "عالميّ" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "بريديّ" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "للطّرود" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "المنزل" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "العمل" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "العنوان المفضّل" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "آخر" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "المعرّف الفريد" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "الاسم" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "الاسم المنسّق" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "اسم العائلة" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "الاسم المُعطى" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "أسماء إضافيّة" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "السّوابق التّشريفيّة" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "اللواحق التّشريفيّة" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "الاسم المستعار" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "عيد الميلاد" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "عنوان المنزل، الشّارع" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "عنوان المنزل، صندوق البريد" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "عنوان المنزل، المدينة" + +#: addressee.cpp:866 +#, fuzzy, kde-format +msgid "Home Address State" +msgstr "عنوان المنزل، المقاطعة" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "عنوان المنزل، الرّمز البريديّ" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "عنوان المنزل، الدّولة" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "عنوان العمل، الشّارع" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "عنوان العمل، صندوق البريد" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "عنوان العمل، المدينة" + +#: addressee.cpp:901 +#, fuzzy, kde-format +msgid "Business Address State" +msgstr "عنوان العمل، المقاطعة" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "عنوان العمل، الرّمز البريديّ" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "عنوان العمل، الدّولة" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "هاتف المنزل" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "هاتف العمل" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "الهاتف المحمول" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "فاكس المنزل" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "فاكس العمل" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "هاتف السّيارة" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "عنوان البريد الإلكترونيّ" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "عميل البريد" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "المنطقة الزمنيّة" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "الموقع الجغرافيّ" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "اللقب" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "الدّور" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "المنظّمة" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "القِسم" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "تاريخ المراجعة" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "الصّفحة الرّئيسيّة" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "الشّعار" + +#: addressee.cpp:1360 +#, fuzzy, kde-format +msgid "Photo" +msgstr "الصّورة" + +#: addressee.cpp:1380 +#, fuzzy, kde-format +msgid "Sound" +msgstr "الصّوت" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "د." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "الآنسة" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "السّيّد" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "السّيّدة" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "الفاضلة" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "البروفيسور" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "الأوّل" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "الثّاني" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "الثّالث" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "الابن" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "الأبّ" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "حقل مجهول" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "الكلّ" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "متكرّر" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "العنوان" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "البريد الإلكترونيّ" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "شخصيّ" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "مخصّص" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "غير معرّف" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "مخصّص" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "نوع مجهول" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "رقم الهاتف" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "المنزل" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "العمل" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "المرسال" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "المفضّل" + +#: phonenumber.cpp:180 +#, fuzzy, kde-format +msgid "Voice" +msgstr "الصّوت" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "الفاكس" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "المحمول" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "الڤديو" + +#: phonenumber.cpp:188 +#, fuzzy, kde-format +msgid "Mailbox" +msgstr "صندوق البريد" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "المودم" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "السّيارة" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "آخر" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "الرّقم المفضّل" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "فاكس العمل" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "عامّ" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "خاصّ" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "سرّيّ" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "نوع مجهول" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "مفضلة" + +#~ msgid "List of Emails" +#~ msgstr "قائمة بالبريد إلكتروني" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Mohamed SAAD محمد سعد, Majed Ali" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "metehyi@free.fr, GMajedli@gmail.com" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "غير قادر على تحميل المورد '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "انتقِ المرسل إليه" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "الاسم" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "البريد الإلكتروني" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "مُنتقى" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "ألغ الانتقاء" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "اضبط قوائم التوزيع" + +#~ msgid "Select Email Address" +#~ msgstr "اختر عنوان البريد الإلكتروني" + +#~ msgid "Email Addresses" +#~ msgstr "عناوين البريد الإلكتروني" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "نعم" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "لا" + +#~ msgid "New List..." +#~ msgstr "قائمة جديدة..." + +#~ msgid "Rename List..." +#~ msgstr "أعد تسمية قائمة..." + +#~ msgid "Remove List" +#~ msgstr "إحذف القائمة" + +#~ msgid "Available addresses:" +#~ msgstr "العناوين المتوفرة:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "البريد الإلكتروني المفضل" + +#~ msgid "Add Entry" +#~ msgstr "اضف خانة" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "البريد الإلكتروني" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "استخدم المفضل" + +#~ msgid "Change Email..." +#~ msgstr "غيّر البريد الإلكتروني..." + +#~ msgid "Remove Entry" +#~ msgstr "إزالة خانة" + +#~ msgid "New Distribution List" +#~ msgstr "قائمة توزيع جديدة" + +#~ msgid "Please enter &name:" +#~ msgstr "فضلا أدخل الإ&سم:" + +#~ msgid "Distribution List" +#~ msgstr "قائمة التوزيع" + +#~ msgid "Please change &name:" +#~ msgstr "فضلا غيِّر الا&سم:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "حذف قائمة التوزيع '%1' ؟" + +#~ msgid "Selected addressees:" +#~ msgstr "العناوين المنتقاة:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "العناوين المنتقاة في '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "لا" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "تنسيق vCard" + +#~ msgid "No description available." +#~ msgstr "لا يوجد وصف." + +#~ msgid "Unable to open lock file." +#~ msgstr "غير قادر على فتح ملف القفل." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "المورد '%1' مقفل بواسطة التطبيق '%2'." + +#~ msgid "Error" +#~ msgstr "خطأ" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "فشل إلغاء القفل. ملف القفل مملوك لعملية أخرى: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: نجحت جميع عمليات القفل لكن لم يحدث أي قفل حقيقي." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: فشلت جميع عمليات القفل." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "فشل في حفظ المورد '%1'." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "فشل في حفظ المورد '%1'." + +#, fuzzy +#~ msgid "Unable to open resource '%1'." +#~ msgstr "غير قادر على تحميل المورد '%1'" + +#, fuzzy +#~ msgid "Default Address Book" +#~ msgstr "دفتر العناوين الإفتراضي" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "غير قادر على حفظ المورد '%1' . لأنها مقفلة." diff --git a/po/ast/kcontacts5.po b/po/ast/kcontacts5.po new file mode 100644 index 0000000..e52b170 --- /dev/null +++ b/po/ast/kcontacts5.po @@ -0,0 +1,584 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# enolp , 2016. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-12-19 03:11+0100\n" +"Last-Translator: enolp \n" +"Language-Team: Asturian \n" +"Language: ast\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departamentu" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "" diff --git a/po/bs/kcontacts5.po b/po/bs/kcontacts5.po new file mode 100644 index 0000000..442a3b2 --- /dev/null +++ b/po/bs/kcontacts5.po @@ -0,0 +1,744 @@ +# Bosnian translation for kdepimlibs +# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010 +# This file is distributed under the same license as the kdepimlibs package. +# FIRST AUTHOR , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: kdepimlibs\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2013-10-18 20:19+0000\n" +"Last-Translator: Vedran Ljubovic \n" +"Language-Team: Bosnian \n" +"Language: bs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Launchpad (build 16807)\n" +"X-Launchpad-Export-Date: 2013-10-19 05:16+0000\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Poštanski pretinac" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Dodatne informacije o adresi" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Ulica" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Lokalitet" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Oblast" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Poštanski broj" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Zemlja:" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Dostavna oznaka" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domaći" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Međunarodno" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Poštanski" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paket" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Početak" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Posao" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Preferirana adresa" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Ostale" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Jedinstveni identifikator" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Ime" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Uobličeno ime" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Prezime" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Ime" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Dodatna imena" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Počasni prefiksi" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Počasni sufiksi" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Nadimak" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Rođendan" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Kućna adresa - Ulica" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Kućna adresa, poštanski fah" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Kućna adresa - Grad" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Kućna adresa - Kanton" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Kućna adresa - Pošt. br." + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Kućna adresa - Država" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Kućna adresa - Oznaka" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Poslovna adresa - Ulica" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Poslovna adresa, poštanski fah" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Poslovna adresa - Grad" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Poslovna adresa - Kanton" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Poslovna adresa - Pošt. br." + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Poslovna adresa - Država" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Poslovna adresa - Oznaka" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Kućni telefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon na poslu" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobilni telefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Kućni faks" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax na poslu" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefon u automobilu" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pejdžer" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-mail adresa" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Klijent pošte" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Vremenska zona" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografski položaj" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Naslov" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Uloga" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizacija" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Odjeljenje" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Bilješka" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identifikator proizvoda" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Datum revizije" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "String za sortiranje" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Početna stranica" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Sigurnosna klasa" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotip" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotografija" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Zvuk" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Gđica" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Gdin." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Gđa." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "gđica" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Ml." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "St." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Nepoznato polje" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Sve" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Često" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresa" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Lično" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Prilagođeno" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nedefinisano" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Prilagođeno" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Nepoznata vrsta" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Početak" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Posao" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Glasnik" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferirano" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Glas" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobilni" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Sandučić" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Automobil" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Ostali" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Preferirani broj" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Faks na poslu" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Javni" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privatni" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Povjerljivi" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Nepoznat tip" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferirano" + +#~ msgid "List of Emails" +#~ msgstr "Lista e-mail adresa" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Samir Ribić,Vedran Ljubovic" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "samir.ribic@etf.unsa.ba,vljubovic@smartnet.ba" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Ne mogu čitati sa resursa '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Izaberite adresanta" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Ime" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-mail" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Odabrano" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Poništi odabir" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Podesite liste distribucije" + +#~ msgid "Select Email Address" +#~ msgstr "Izaberite e-adresu" + +#~ msgid "Email Addresses" +#~ msgstr "E-adrese" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Da" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Ne" + +#~ msgid "New List..." +#~ msgstr "Nova lista..." + +#~ msgid "Rename List..." +#~ msgstr "Preimenuj listu..." + +#~ msgid "Remove List" +#~ msgstr "Ukloni listu" + +#~ msgid "Available addresses:" +#~ msgstr "Dostupne adrese:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Preferirani email" + +#~ msgid "Add Entry" +#~ msgstr "Dodaj unos" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-mail" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Koristi preferirani" + +#~ msgid "Change Email..." +#~ msgstr "Promijeni e-adresu..." + +#~ msgid "Remove Entry" +#~ msgstr "Ukloni stavku" + +#~ msgid "New Distribution List" +#~ msgstr "Nova distribuciona lista" + +#~ msgid "Please enter &name:" +#~ msgstr "Molim unesite &ime:" + +#~ msgid "Distribution List" +#~ msgstr "Lista distribucije" + +#~ msgid "Please change &name:" +#~ msgstr "Molim izmijenite &ime:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Da brišem distribucionu listu '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Izabrani adresanti:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Izabrane adrese u '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Ne" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Format vCard-a" + +#~ msgid "No description available." +#~ msgstr "Opis nije dostupan." + +#~ msgid "Unable to open lock file." +#~ msgstr "Ne mogu otvoriti lock datoteku." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Resurs '%1' je zaključan od strane aplikacije '%2'." + +#~ msgid "Error" +#~ msgstr "Greška" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Otključavanje nije uspjelo. Lock datoteku posjeduje drugi proces: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Sve brave su u funkciji ali do zaključavanja ustvari nije došlo." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Sva zaključavanja su neuspješna." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Neuspjelo učitavanje resursa '%1'." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Neuspjelo snimanje resursa '%1'." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Ne mogu da otvorim resurs '%1'." + +#~ msgid "Default Address Book" +#~ msgstr "Podrazumijevani adresar" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Ne mogu snimiti resurs '%1' zato što je zaključan." diff --git a/po/ca/kcontacts5.po b/po/ca/kcontacts5.po new file mode 100644 index 0000000..49cbcb0 --- /dev/null +++ b/po/ca/kcontacts5.po @@ -0,0 +1,741 @@ +# Translation of kcontacts5.po to Catalan +# Copyright (C) 2014-2017 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. +# +# Josep Ma. Ferrer , 2007, 2008, 2009, 2010, 2015, 2017. +# Albert Astals Cid , 2009. +# Manuel Tortosa Moreno , 2009. +# Antoni Bella Pérez , 2014, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kcontacts5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2017-12-29 18:45+0100\n" +"Last-Translator: Josep Ma. Ferrer \n" +"Language-Team: Catalan \n" +"Language: ca\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Accelerator-Marker: &\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Apartat de correus" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informació ampliada de l'adreça" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Carrer" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localitat" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Província" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Codi postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "País" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etiqueta de lliurament" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Nacional" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internacional" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paquets postals" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Llar" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Feina" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Adreça preferida" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Altra" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificador únic" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nom" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nom amb format" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Cognoms" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nom" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Noms addicionals" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixos honorífics" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufixos honorífics" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Sobrenom" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Data de naixement" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Carrer de l'adreça particular" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Apartat de correus de l'adreça particular" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Població de l'adreça particular" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Província de l'adreça particular" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Codi postal de l'adreça particular" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "País de l'adreça particular" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etiqueta de l'adreça particular" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Carrer de l'adreça professional" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Apartat de correus de l'adreça professional" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Població de l'adreça professional" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Província de l'adreça professional" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Codi postal de l'adreça professional" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "País de l'adreça professional" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etiqueta de l'adreça professional" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telèfon particular" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telèfon professional" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telèfon mòbil" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax de la llar" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax professional" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telèfon del cotxe" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "XDSI" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Cercapersones" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Adreça de correu electrònic" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Client de correu" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Zona horària" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posició geogràfica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Títol" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Funció" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organització" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departament" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificador del producte" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data de la revisió" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Text curt" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Pàgina personal" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe de seguretat" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotip" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "So" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Sra." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Sra." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Sra." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Camp desconegut" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Tot" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Freqüent" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adreça" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Correu electrònic" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalitzada" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Sense definir" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalitzada" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipus desconegut" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Número de telèfon" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Llar" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Feina" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messenger" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferit" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Veu" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mòbil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vídeo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Bústia" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Mòdem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Cotxe" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Altres" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Número preferit" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax de la feina" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Públic" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidencial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipus desconegut" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferida" + +#~ msgid "List of Emails" +#~ msgstr "Llista d'adreces electròniques" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "No s'ha pogut carregar el recurs «%1»" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Selecció del destinatari" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nom" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Adreça electrònica" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Selecciona" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Desselecciona" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configuració de les llistes de distribució" + +#~ msgid "Select Email Address" +#~ msgstr "Selecció de l'adreça de correu electrònic" + +#~ msgid "Email Addresses" +#~ msgstr "Adreces de correu electrònic" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Sí" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "New List..." +#~ msgstr "Llista nova..." + +#~ msgid "Rename List..." +#~ msgstr "Reanomena una llista..." + +#~ msgid "Remove List" +#~ msgstr "Suprimeix la llista" + +#~ msgid "Available addresses:" +#~ msgstr "Adreces disponibles:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Adreça electrònica preferida" + +#~ msgid "Add Entry" +#~ msgstr "Afegeix una entrada" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Adreça electrònica" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Usa la preferida" + +#~ msgid "Change Email..." +#~ msgstr "Canvia l'adreça de correu..." + +#~ msgid "Remove Entry" +#~ msgstr "Suprimeix una entrada" + +#~ msgid "New Distribution List" +#~ msgstr "Llista de distribució nova" + +#~ msgid "Please enter &name:" +#~ msgstr "Introduïu el &nom:" + +#~ msgid "Distribution List" +#~ msgstr "Llista de distribució" + +#~ msgid "Please change &name:" +#~ msgstr "Canvieu el &nom:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Suprimeixo la llista de distribució «%1»?" + +#~ msgid "Selected addressees:" +#~ msgstr "Destinatari seleccionat:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Adreces seleccionades en «%1»:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Format vCard" + +#~ msgid "No description available." +#~ msgstr "No hi ha disponible cap descripció." + +#~ msgid "Unable to open lock file." +#~ msgstr "No s'ha pogut obrir el fitxer de bloqueig." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "El recurs «%1» està bloquejat per l'aplicació «%2»." + +#~ msgid "Error" +#~ msgstr "Error" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "El desbloqueig ha fallat. Un altre procés té el fitxer de bloqueig: %1 " +#~ "(%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: tots els bloqueigs han funcionat, però no s'ha fet cap bloqueig " +#~ "real." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: tots els bloqueigs han fallat." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "La càrrega del recurs «%1» ha fallat." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "El desament del recurs «%1» ha fallat." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "No s'ha pogut obrir el recurs «%1»." + +#~ msgid "Default Address Book" +#~ msgstr "Llibreta d'adreces per omissió" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "No s'ha pogut desar en el recurs «%1». Està bloquejat." diff --git a/po/ca@valencia/kcontacts5.po b/po/ca@valencia/kcontacts5.po new file mode 100644 index 0000000..148158d --- /dev/null +++ b/po/ca@valencia/kcontacts5.po @@ -0,0 +1,741 @@ +# Translation of kcontacts5.po to Catalan (Valencian) +# Copyright (C) 2014-2017 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. +# +# Josep Ma. Ferrer , 2007, 2008, 2009, 2010, 2015, 2017. +# Albert Astals Cid , 2009. +# Manuel Tortosa Moreno , 2009. +# Antoni Bella Pérez , 2014, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kcontacts5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2017-12-29 18:45+0100\n" +"Last-Translator: Josep Ma. Ferrer \n" +"Language-Team: Catalan \n" +"Language: ca@valencia\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Accelerator-Marker: &\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Apartat de correus" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informació ampliada de l'adreça" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Carrer" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localitat" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Província" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Codi postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "País" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etiqueta de lliurament" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Nacional" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internacional" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paquets postals" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Llar" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Faena" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Adreça preferida" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Altra" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificador únic" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nom" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nom amb format" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Cognoms" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nom" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Noms addicionals" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixos honorífics" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufixos honorífics" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Sobrenom" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Data de naixement" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Carrer de l'adreça particular" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Apartat de correus de l'adreça particular" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Població de l'adreça particular" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Província de l'adreça particular" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Codi postal de l'adreça particular" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "País de l'adreça particular" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etiqueta de l'adreça particular" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Carrer de l'adreça professional" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Apartat de correus de l'adreça professional" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Població de l'adreça professional" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Província de l'adreça professional" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Codi postal de l'adreça professional" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "País de l'adreça professional" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etiqueta de l'adreça professional" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telèfon particular" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telèfon professional" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telèfon mòbil" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax de la llar" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax professional" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telèfon del cotxe" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "XDSI" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Cercapersones" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Adreça de correu electrònic" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Client de correu" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Zona horària" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posició geogràfica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Títol" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Funció" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organització" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departament" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificador del producte" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data de la revisió" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Text curt" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Pàgina personal" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe de seguretat" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotip" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "So" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Sra." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Sra." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Sra." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Camp desconegut" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Tot" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Freqüent" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adreça" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Correu electrònic" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalitzada" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Sense definir" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalitzada" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipus desconegut" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Número de telèfon" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Llar" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Faena" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messenger" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferit" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Veu" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mòbil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vídeo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Bústia" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Mòdem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Cotxe" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Altres" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Número preferit" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax de la faena" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Públic" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidencial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipus desconegut" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferida" + +#~ msgid "List of Emails" +#~ msgstr "Llista d'adreces electròniques" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "No s'ha pogut carregar el recurs «%1»" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Selecció del destinatari" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nom" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Adreça electrònica" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Selecciona" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Desselecciona" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configuració de les llistes de distribució" + +#~ msgid "Select Email Address" +#~ msgstr "Selecció de l'adreça de correu electrònic" + +#~ msgid "Email Addresses" +#~ msgstr "Adreces de correu electrònic" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Sí" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "New List..." +#~ msgstr "Llista nova..." + +#~ msgid "Rename List..." +#~ msgstr "Reanomena una llista..." + +#~ msgid "Remove List" +#~ msgstr "Suprimeix la llista" + +#~ msgid "Available addresses:" +#~ msgstr "Adreces disponibles:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Adreça electrònica preferida" + +#~ msgid "Add Entry" +#~ msgstr "Afegeix una entrada" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Adreça electrònica" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Usa la preferida" + +#~ msgid "Change Email..." +#~ msgstr "Canvia l'adreça de correu..." + +#~ msgid "Remove Entry" +#~ msgstr "Suprimeix una entrada" + +#~ msgid "New Distribution List" +#~ msgstr "Llista de distribució nova" + +#~ msgid "Please enter &name:" +#~ msgstr "Introduïu el &nom:" + +#~ msgid "Distribution List" +#~ msgstr "Llista de distribució" + +#~ msgid "Please change &name:" +#~ msgstr "Canvieu el &nom:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Suprimeixo la llista de distribució «%1»?" + +#~ msgid "Selected addressees:" +#~ msgstr "Destinatari seleccionat:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Adreces seleccionades en «%1»:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Format vCard" + +#~ msgid "No description available." +#~ msgstr "No hi ha disponible cap descripció." + +#~ msgid "Unable to open lock file." +#~ msgstr "No s'ha pogut obrir el fitxer de bloqueig." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "El recurs «%1» està bloquejat per l'aplicació «%2»." + +#~ msgid "Error" +#~ msgstr "Error" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "El desbloqueig ha fallat. Un altre procés té el fitxer de bloqueig: %1 " +#~ "(%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: tots els bloqueigs han funcionat, però no s'ha fet cap bloqueig " +#~ "real." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: tots els bloqueigs han fallat." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "La càrrega del recurs «%1» ha fallat." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "El desament del recurs «%1» ha fallat." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "No s'ha pogut obrir el recurs «%1»." + +#~ msgid "Default Address Book" +#~ msgstr "Llibreta d'adreces per omissió" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "No s'ha pogut desar en el recurs «%1». Està bloquejat." diff --git a/po/cs/kcontacts5.po b/po/cs/kcontacts5.po new file mode 100644 index 0000000..a3389ad --- /dev/null +++ b/po/cs/kcontacts5.po @@ -0,0 +1,585 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Lukáš Tinkl , 2010. +# Vít Pelčák , 2011, 2012, 2014, 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2017-02-27 11:18+0100\n" +"Last-Translator: Vít Pelčák \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Poštovní schránka" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Rozšířená informace o adrese" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Ulice" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Město" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Region" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "PSČ" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Země" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Štítek" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domácí" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Mezinárodní" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Poštovní" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Balík" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Domů" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Pracovní" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Preferovaná adresa" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Jiné" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unikátní identifikátor" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Jméno" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formátované jméno" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Jméno rodiny" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Jméno" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Další jména" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Před jménem" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Za jménem" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Přezdívka" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Narozeniny" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Ulice domácí adresy" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Poštovní schránka domů" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Město domácí adresy" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Stát domácí adresy" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "PSČ domácí adresy" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Země domácí adresy" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Popisek domácí adresy" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Ulice obchodní adresy" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Poštovní schránka do práce" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Město obchodní adresy" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Stát obchodní adresy" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "PSČ obchodní adresy" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Země obchodní adresy" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Popisek obchodní adresy" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefon domů" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon do práce" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobilní telefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax domů" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax do práce" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefon do auta" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-mailová adresa" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Poštovní klient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Časové pásmo" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Zeměpisná pozice" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titul" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Role" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizace" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Oddělení" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Poznámka" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identifikátor produktu" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Datum revize" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Třídící řetězec" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Domovská stránka" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Bezpečnostní třída" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotka" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Zvuk" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Slečna" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Pan" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Paní" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Pí." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Neznámé pole" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Vše" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Časté" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresa" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Osobní" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Vlastní" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nedefinovaný" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Vlastní" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Neznámý typ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefonní číslo" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Domů" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Pracovní" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Komunikátor" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferovaný" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Hlas" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobilní" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Poštovní schránka" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Auto" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Jiný" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Preferované číslo" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax do práce" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Veřejný" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Soukromý" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Důvěrný" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Neznámý typ" diff --git a/po/da/kcontacts5.po b/po/da/kcontacts5.po new file mode 100644 index 0000000..877c657 --- /dev/null +++ b/po/da/kcontacts5.po @@ -0,0 +1,742 @@ +# translation of kabc.po to dansk +# translation of kabc.po to +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Martin Schlander , 2008, 2009, 2016. +# Jan Madsen , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-07-11 21:52+0100\n" +"Last-Translator: Martin Schlander \n" +"Language-Team: Danish \n" +"Language: da\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postboks" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Udvidet adresseinformation" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Gade" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Egn" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Region" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postnummer" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Leveringsetiket" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Indenrigs" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "International" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Post" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Pakke" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Hjemme" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Arbejde" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Foretrukken adresse" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Andet" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unik identifikator" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Navn" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formateret navn" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Efternavn" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Fornavn" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Yderligere navne" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Ærestitel (før)" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Ærestitel (efter)" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Kaldenavn" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Fødselsdag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Vejnavn, hjemmeadresse" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Hjemmeadresse, postboks" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "By, hjemmeadresse" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Delstat, hjemmeadresse" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Postnummer, hjemmeadresse" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Land, hjemmeadresse" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etiket med hjemmeadresse" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Vejnavn, erhvervsadresse" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Erhvervsadresse, postboks" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "By, erhvervsadresse" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Delstat, erhvervsadresse" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Postnummer, erhvervsadresse" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Land, erhvervsadresse" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etiket med erhvervsadresse" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Hjemmetelefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Arbejdstelefon" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiltelefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Hjemmefax" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Arbejdsfax" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Biltelefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Personsøger" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-mailadresse" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Mail-klient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Tidszone" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografisk position" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Funktion" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisation" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Afdeling" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Note" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produkt-identifikator" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Ændringsdato" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorteringsstreng" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Hjemmeside" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Sikkerhedsniveau" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Lyd" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Fr." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Hr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Fr." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Fr." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Ukendt felt" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Alle" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Hyppig" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresse" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personligt" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Brugerdefineret" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Udefineret" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Brugerdefineret" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Ukendt type" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefonnummer" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Hjemme" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Arbejde" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messenger" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Foretrukket" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voice" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postkasse" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Bil" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Andet" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Foretrukket nummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Arbejdsfax" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Offentlig" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Fortrolig" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Ukendt type" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Foretrukken" + +#~ msgid "List of Emails" +#~ msgstr "Liste over e-mails" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Martin Schlander" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "mschlander@opensuse.org" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Kan ikke indlæse ressourcen '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Vælg adressat" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Navn" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-mail" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Valgt" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Fravælg" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Indstil distributionslister" + +#~ msgid "Select Email Address" +#~ msgstr "Vælg e-mailadresse" + +#~ msgid "Email Addresses" +#~ msgstr "E-mailadresser" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Ja" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nej" + +#~ msgid "New List..." +#~ msgstr "Ny liste..." + +#~ msgid "Rename List..." +#~ msgstr "Omdøb liste..." + +#~ msgid "Remove List" +#~ msgstr "Fjern liste" + +#~ msgid "Available addresses:" +#~ msgstr "Tilgængelige adresser:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Foretrukken e-mail" + +#~ msgid "Add Entry" +#~ msgstr "Tilføj indgang" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-mail" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Brug foretrukken" + +#~ msgid "Change Email..." +#~ msgstr "Ændr e-mail..." + +#~ msgid "Remove Entry" +#~ msgstr "Fjern indgang" + +#~ msgid "New Distribution List" +#~ msgstr "Ny distributionsliste" + +#~ msgid "Please enter &name:" +#~ msgstr "Indtast venligst &navn:" + +#~ msgid "Distribution List" +#~ msgstr "Distributionsliste" + +#~ msgid "Please change &name:" +#~ msgstr "Ændr venligst &navn:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Slet distributionslisten '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Valgte adresserede:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Valgte adresser i '%1'." + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nej" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard-format" + +#~ msgid "No description available." +#~ msgstr "Ingen beskrivelse tilgængelig." + +#~ msgid "Unable to open lock file." +#~ msgstr "Kan ikke åbne lock-fil." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Ressourcen '%1' er låst af programmet '%2'." + +#~ msgid "Error" +#~ msgstr "Fejl" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "Lås op fejlede. Lock-fil er ejet af en anden proces: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: Alle låse gennemføres men ingen låsning udføres faktisk." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Alle låse fejler." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Indlæsning af ressourcen '%1' fejlede." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Gemning af ressourcen '%1' fejlede." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Kan ikke åbne ressourcen \"%1\"." + +#~ msgid "Default Address Book" +#~ msgstr "Standardadressebog" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Kan ikke gemme til ressourcen '%1'. Den er låst." diff --git a/po/de/kcontacts5.po b/po/de/kcontacts5.po new file mode 100644 index 0000000..453ecca --- /dev/null +++ b/po/de/kcontacts5.po @@ -0,0 +1,744 @@ +# Stephan Johach , 2007. +# Burkhard Lück , 2008, 2009. +# Thomas Reitelbach , 2009. +# Frederik Schwarzer , 2010, 2013, 2016. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-01-12 08:17+0100\n" +"Last-Translator: Frederik Schwarzer \n" +"Language-Team: German \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postfach" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Erweiterte Adressinformationen" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Straße" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Ort" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Region" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postleitzahl" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Adressaufkleber" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Inland" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "International" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postanschrift" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paketanschrift" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Privat" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Dienstlich" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Bevorzugte Adresse" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Weitere" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Eindeutiger Bezeichner" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Name" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formatierter Name" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Nachname" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Vorname" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Zusätzliche Namen" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Titel-Abk. (vor Name)" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Titel-Abk. (nach Name)" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Spitzname" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Geburtstag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Straße (privat)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Postfach (privat)" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Stadt (privat)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Staat/Bundesland (privat)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Postleitzahl (privat)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Land (privat)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Aufkleber (Privatadresse)" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Straße (geschäftlich)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Postfach (geschäftlich)" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Stadt (geschäftlich)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Staat/Bundesland (geschäftlich)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Postleitzahl (geschäftlich)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Land (geschäftlich)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Aufkleber (Geschäftsadresse)" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefon (privat)" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon (geschäftlich)" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiltelefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax privat" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax (geschäftlich)" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Autotelefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-Mail-Adresse" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Mail-Programm" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Zeitzone" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Ort" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rolle" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisation" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Abteilung" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Notiz" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produktkennung" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Korrekturdatum" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sortierungsschlüssel" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Internetseite" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Sicherheitsklasse" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Klang" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Fräulein" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Herr" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Frau" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Frau" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jun." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sen." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Unbekanntes Feld" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Alle" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Häufig" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresse" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-Mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Persönlich" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Benutzerdefiniert" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nicht definiert" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Benutzerdefiniert" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Unbekannter Typ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefonnummer" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Privat" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Dienstlich" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messenger" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Bevorzugte" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voice" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Mailbox" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Autotelefon" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Weitere" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Bevorzugte Telefonnummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax dienstlich" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Öffentlich" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Vertraulich" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Unbekannter Typ" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Bevorzugte" + +#~ msgid "List of Emails" +#~ msgstr "E-Mail-Liste" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Stephan Johach" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "hunsum@gmx.de" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Die Ressource „%1“ kann nicht geladen werden" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Empfänger auswählen" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Name" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-Mail-Adresse" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Ausgewählt" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Auswahl aufheben" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Verteilerlisten einrichten" + +#~ msgid "Select Email Address" +#~ msgstr "E-Mail-Adresse auswählen" + +#~ msgid "Email Addresses" +#~ msgstr "E-Mail-Adressen" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Ja" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nein" + +#~ msgid "New List..." +#~ msgstr "Neue Liste ..." + +#~ msgid "Rename List..." +#~ msgstr "Liste umbenennen ..." + +#~ msgid "Remove List" +#~ msgstr "Liste löschen" + +#~ msgid "Available addresses:" +#~ msgstr "Verfügbare Adressen:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Bevorzugte E-Mail-Adresse" + +#~ msgid "Add Entry" +#~ msgstr "Eintrag hinzufügen" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-Mail-Adresse" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Bevorzugte verwenden" + +#~ msgid "Change Email..." +#~ msgstr "E-Mail bearbeiten ..." + +#~ msgid "Remove Entry" +#~ msgstr "Eintrag löschen" + +#~ msgid "New Distribution List" +#~ msgstr "Neue Verteilerliste" + +#~ msgid "Please enter &name:" +#~ msgstr "&Name:" + +#~ msgid "Distribution List" +#~ msgstr "Verteilerliste" + +#~ msgid "Please change &name:" +#~ msgstr "&Namen ändern:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Möchten Sie die Verteilerliste „%1“ löschen?" + +#~ msgid "Selected addressees:" +#~ msgstr "Ausgewählte Empfänger:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Ausgewählte Empfänger in „%1“:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nein" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard-Format" + +#~ msgid "No description available." +#~ msgstr "Keine Beschreibung verfügbar." + +#~ msgid "Unable to open lock file." +#~ msgstr "Die Sperrdatei kann nicht geöffnet werden." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Die Ressource „%1“ ist von der Anwendung „%2“ gesperrt." + +#~ msgid "Error" +#~ msgstr "Fehler" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Das Entsperren ist fehlgeschlagen. Die Sperrdatei gehört zu einem anderen " +#~ "Prozess: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Alle Sperren waren erfolgreich, es wurde aber keine echte " +#~ "Sperrung durchgeführt." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Alle Sperren sind fehlgeschlagen." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Das Laden der Ressource „%1“ ist fehlgeschlagen." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Das Speichern der Ressource „%1“ ist fehlgeschlagen." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Die Ressource „%1“ kann nicht geöffnet werden" + +#~ msgid "Default Address Book" +#~ msgstr "Standard-Adressbuch" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "" +#~ "Die Ressource „%1“ kann nicht gespeichert werden, da sie gesperrt ist." diff --git a/po/el/kcontacts5.po b/po/el/kcontacts5.po new file mode 100644 index 0000000..3104ed2 --- /dev/null +++ b/po/el/kcontacts5.po @@ -0,0 +1,746 @@ +# translation of kabc.po to greek +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Spiros Georgaras , 2007. +# Toussis Manolis , 2008, 2009. +# Dimitrios Glentadakis , 2010, 2013. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2013-01-12 09:07+0100\n" +"Last-Translator: Dimitrios Glentadakis \n" +"Language-Team: Greek \n" +"Language: el\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Ταχυδρομική θυρίδα" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Εκτεταμένες πληροφορίες διεύθυνσης" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Οδός" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Δήμος/Πόλη" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Νομός/Περιφέρεια" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Ταχυδρομικός κώδικας" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Χώρα" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Ετικέτα παράδοσης" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Εγχώρια" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Διεθνής" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Ταχυδρομική" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Δεμάτων" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Οικία" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Εργασία" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Προτιμώμενη διεύθυνση" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Άλλη" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Μοναδικό αναγνωριστικό" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Όνομα" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Μορφοποιημένο όνομα" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Όνομα οικογενείας" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Δοσμένο όνομα" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Πρόσθετα ονόματα" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Τιμητικά προθέματα" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Τιμητικά επιθέματα" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Ψευδώνυμο" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Γενέθλια" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Οδός διεύθυνσης οικίας" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Ταχυδρομική θυρίδα διεύθυνσης οικίας" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Πόλη διεύθυνσης οικίας" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Νομός/Περιφέρεια διεύθυνσης οικίας" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Ταχ. κώδ. διεύθυνσης οικίας" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Χώρα διεύθυνσης οικίας" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Ετικέτα διεύθυνσης οικίας" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Οδός διεύθυνσης επιχείρησης" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Ταχυδρομική θυρίδα διεύθυνσης επιχείρισης" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Πόλη διεύθυνσης επιχείρησης" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Νομός/Περιφέρεια διεύθυνσης επιχείρησης" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Ταχ. κώδ. διεύθυνσης επιχείρησης" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Χώρα διεύθυνσης επιχείρησης" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Ετικέτα διεύθυνσης επιχείρησης" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Τηλέφωνο οικίας" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Τηλέφωνο επιχείρησης" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Κινητό τηλέφωνο" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Φαξ οικίας" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Φαξ επιχείρησης" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Τηλέφωνο αυτοκινήτου" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Βομβητής" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Διεύθυνση ηλ. αλληλογραφίας" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Πελάτης ταχυδρομείου" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Ωρολογιακή ζώνη" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Γεωγραφική θέση" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Τίτλος" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Ρόλος" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Οργανισμός" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Τμήμα" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Σημείωση" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Αναγνωριστικό προϊόντος" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Ημερομηνία αναθεώρησης" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Συμβολοσειρά ταξινόμησης" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Προσωπική σελίδα" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Κλάση ασφαλείας" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Λογότυπο" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Φωτογραφία" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Ήχος" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Δρ." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Δις" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "κ." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "κα." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "κα." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Καθ." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Σερ" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Άγνωστο πεδίο" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Όλα" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Συχνά" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Διεύθυνση" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Ηλ. αλληλογραφία" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Προσωπικά" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Προσαρμοσμένο" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Μη ορισμένο" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Προσαρμοσμένο" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Άγνωστος τύπος" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Οικία" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Εργασία" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Αποστολέας μηνυμάτων" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Προτεινόμενο" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Φωνή" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Φαξ" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Κινητό" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Βίντεο" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Γραμματοκιβώτιο" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Μόντεμ" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Τηλέφωνο αυτοκινήτου" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Άλλο" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Προτιμώμενος αριθμός" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Φαξ εργασίας" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Δημόσιο" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Ιδιωτικό" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Εμπιστευτικό" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Άγνωστος τύπος" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Προτεινόμενο" + +#~ msgid "List of Emails" +#~ msgstr "Λίστα διευθύνσεων ηλ. αλληλογραφίας" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Σπύρος Γεωργαράς, Τούσης Μανώλης" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "sng@hellug.gr, manolis@koppermind.homelinux.org" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Δεν είναι δυνατή η φόρτωση του πόρου '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Επιλέξτε παραλήπτη" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Όνομα" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Email" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Επιλεγμένο" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Αποεπιλογή" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Ρύθμιση λιστών διανομής" + +#~ msgid "Select Email Address" +#~ msgstr "Επιλέξτε διεύθυνση ηλ. αλληλογραφίας" + +#~ msgid "Email Addresses" +#~ msgstr "Διευθύνσεις ηλ. αλληλογραφίας" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Ναι" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Όχι" + +#~ msgid "New List..." +#~ msgstr "Νέα λίστα..." + +#~ msgid "Rename List..." +#~ msgstr "Μετονομασία λίστας..." + +#~ msgid "Remove List" +#~ msgstr "Αφαίρεση λίστας" + +#~ msgid "Available addresses:" +#~ msgstr "Διαθέσιμες διευθύνσεις:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Προτιμώμενη ηλ. αλληλογραφία" + +#~ msgid "Add Entry" +#~ msgstr "Προσθήκη καταχώρησης" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Ηλ. αλληλογραφία" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Χρήση προτιμώμενου" + +#~ msgid "Change Email..." +#~ msgstr "Αλλαγή ηλ. αλληλογραφίας..." + +#~ msgid "Remove Entry" +#~ msgstr "Αφαίρεση καταχώρησης" + +#~ msgid "New Distribution List" +#~ msgstr "Νέα λίστα διανομής" + +#~ msgid "Please enter &name:" +#~ msgstr "Παρακαλώ δώστε ό&νομα:" + +#~ msgid "Distribution List" +#~ msgstr "Λίστα διανομής" + +#~ msgid "Please change &name:" +#~ msgstr "Παρακαλώ αλλάξτε ό&νομα:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Διαγραφή της λίστας διανομής '%1';" + +#~ msgid "Selected addressees:" +#~ msgstr "Επιλεγμένοι παραλήπτες:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Επιλεγμένοι παραλήπτες στο '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Όχι" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Μορφή vCard" + +#~ msgid "No description available." +#~ msgstr "Περιγραφή μη διαθέσιμη." + +#~ msgid "Unable to open lock file." +#~ msgstr "Δεν είναι δυνατό το άνοιγμα του αρχείου κλειδώματος." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Ο πόρος '%1' είναι κλειδωμένος από την εφαρμογή '%2'." + +#~ msgid "Error" +#~ msgstr "Σφάλμα" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Το ξεκλείδωμα απέτυχε. Το αρχείο κλειδώματος ανήκει σε άλλη διεργασία: %1 " +#~ "(%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Όλα τα κλειδώματα πετυχαίνουν αλλά δε γίνεται πραγματικό " +#~ "κλείδωμα." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Όλα τα κλειδώματα αποτυγχάνουν." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Η φόρτωση του πόρου '%1' απέτυχε." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Η αποθήκευση ßτου πόρου '%1' απέτυχε." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Αδύνατο το άνοιγμα του πόρου «%1»." + +#~ msgid "Default Address Book" +#~ msgstr "Προκαθορισμένο βιβλίο διευθύνσεων" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Δεν είναι δυνατή η αποθήκευση στον πόρο '%1'. Είναι κλειδωμένος." diff --git a/po/en_GB/kcontacts5.po b/po/en_GB/kcontacts5.po new file mode 100644 index 0000000..1eecf0b --- /dev/null +++ b/po/en_GB/kcontacts5.po @@ -0,0 +1,591 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Steve Allewell , 2014, 2016. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-01-10 13:55+0000\n" +"Last-Translator: Steve Allewell \n" +"Language-Team: British English \n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Post Office Box" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Extended Address Information" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Street" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Locality" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Region" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postal Code" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Country" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Delivery Label" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domestic" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "International" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Parcel" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Home" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Work" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Preferred Address" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Other" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unique Identifier" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Name" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formatted Name" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Family Name" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Given Name" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Additional Names" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Honorific Prefixes" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Honorific Suffixes" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Nick Name" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Birthday" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Home Address Street" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Home Address Post Office Box" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Home Address City" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Home Address County" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Home Address Post Code" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Home Address Country" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Home Address Label" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Business Address Street" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Business Address Post Office Box" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Business Address City" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Business Address County" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Business Address Post Code" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Business Address Country" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Business Address Label" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Home Phone" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Business Phone" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobile Phone" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Home Fax" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Business Fax" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Car Phone" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Email Address" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Mail Client" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Time Zone" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geographic Position" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Title" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Role" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisation" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Department" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Note" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Product Identifier" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Revision Date" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sort String" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Homepage" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Security Class" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Photo" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Sound" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Mr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mrs." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Unknown Field" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "All" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frequent" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Address" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Email" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Custom" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Undefined" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Custom" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Unknown type" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telephone number" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Home" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Work" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messenger" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferred" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voice" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobile" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Mailbox" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Car" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Other" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Preferred Number" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Work Fax" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Public" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Private" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidential" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Unknown type" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferred" + +#~ msgid "List of Emails" +#~ msgstr "List of Emails" diff --git a/po/eo/kcontacts5.po b/po/eo/kcontacts5.po new file mode 100644 index 0000000..1d706ca --- /dev/null +++ b/po/eo/kcontacts5.po @@ -0,0 +1,627 @@ +# Translation of kabc into esperanto. +# Axel Rousseau , 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2009-11-15 12:06+0100\n" +"Last-Translator: Axel Rousseau \n" +"Language-Team: esperanto \n" +"Language: eo\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: pology\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Strato" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Regiono" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Lando" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Preferata adreso" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nomo" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Naskiĝdato" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Mesaĝricevilo" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Retpoŝta adreso" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "" + +#: addressee.cpp:1001 +#, fuzzy, kde-format +#| msgid "Timezone Error" +msgid "Time Zone" +msgstr "Tempzona eraro" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizaĵo" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Distrikto" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Noto" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "TTT-hejmpaĝo" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, fuzzy, kde-format +#| msgctxt "Describing the sound of the character" +#| msgid "Sound: " +msgid "Sound" +msgstr "Sono:" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "D-ro" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Sinjorino" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "S-ro" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "S-ino" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "F-ino" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "P-ro" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jn" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Mjn" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Ĉiuj" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Retpoŝto" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personaj" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Propra" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nedifinita" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Poŝtkesto" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Axel Rousseau" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "axel@esperanto-jeunes.org" + +#~ msgid "Select Email Address" +#~ msgstr "Elekti retpoŝtadreson" + +#~ msgid "Email Addresses" +#~ msgstr "Retpoŝtaj adresoj" + +#~ msgid "New List..." +#~ msgstr "Nova listo..." + +#~ msgid "Rename List..." +#~ msgstr "Alinomi liston..." + +#~ msgid "Remove List" +#~ msgstr "Forigi liston" + +#~ msgid "Add Entry" +#~ msgstr "Aldoni eron" + +#~ msgid "Remove Entry" +#~ msgstr "Forigi eron" + +#~ msgid "New Distribution List" +#~ msgstr "Nova dissendolisto" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "No description available." +#~ msgstr "Neniu priskribo havebla." + +#~ msgid "Error" +#~ msgstr "Eraro" diff --git a/po/es/kcontacts5.po b/po/es/kcontacts5.po new file mode 100644 index 0000000..1d09f3e --- /dev/null +++ b/po/es/kcontacts5.po @@ -0,0 +1,590 @@ +# translation of kabc.po to Spanish +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Santiago Fernández Sancho , 2007, 2008. +# Dario Andres Rodriguez , 2008, 2009. +# Jaime Robles , 2009. +# Adrián Martínez , 2010. +# Javier Vinal , 2011, 2012, 2013, 2015. +# Cristina Yenyxe González García , 2011. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-29 12:08+0100\n" +"Last-Translator: Javier Vinal \n" +"Language-Team: Spanish \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Dirección postal" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Información extendida de la dirección" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Calle" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localidad" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Región" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Código postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "País" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etiqueta de entrega" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Nacional" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internacional" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Parcela" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Particular" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Trabajo" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Direcciones preferidas" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Otro" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificador único" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nombre" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nombre formateado" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Apellido" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nombre" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Nombres adicionales" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefijos honoríficos" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufijos honoríficos" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Apodo" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Cumpleaños" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Calle de la dirección particular" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Dirección particular de oficina de correos" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Ciudad de la dirección particular" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Estado de la dirección particular" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Código postal de la dirección particular" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "País de la dirección particular" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etiqueta de la dirección particular" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Calle de la dirección del trabajo" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Dirección del Negocio Post Office Box" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Ciudad de la dirección del trabajo" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Estado de la dirección del trabajo" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Código postal de la dirección del trabajo" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "País de la dirección del trabajo" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etiqueta de la dirección del trabajo" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Teléfono particular" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Teléfono del trabajo" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Teléfono móvil" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax particular" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax del trabajo" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Teléfono del automóvil" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "RDSI" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Paginador" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Dirección de correo electrónico" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Cliente de correo" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Zona horaria" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posición geográfica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Título" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Papel" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organización" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departamento" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificador de producto" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Fecha de revisión" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Ordenar cadena" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Página de inicio" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Clase de seguridad" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotografía" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Sonido" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Srta." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Sra." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Srta." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "D." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Campo desconocido" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Todos" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frecuente" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Dirección" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Correo electrónico" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalizado" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Indefinido" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalizado" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipo desconocido" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Número de teléfono" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Particular" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Trabajo" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Mensajería" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferido" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voz" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Móvil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vídeo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Buzón" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Módem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Coche" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Otro" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Número preferido" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax del trabajo" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Público" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privado" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidencial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipo desconocido" diff --git a/po/et/kcontacts5.po b/po/et/kcontacts5.po new file mode 100644 index 0000000..df9dbed --- /dev/null +++ b/po/et/kcontacts5.po @@ -0,0 +1,740 @@ +# translation of kabc.po to +# +# Marek Laane , 2006-2007. +# Marek Laane , 2007-2009, 2016. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-01-14 17:41+0200\n" +"Last-Translator: Marek Laane \n" +"Language-Team: Estonian \n" +"Language: et\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postkast" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Laiendatud aadressiteave" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Tänav" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Asula" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Piirkond" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postiindeks" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Riik" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Posti etikett" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Kodumaine" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Rahvusvaheline" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postiindeks" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Postipakk" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Kodu" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Töö" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Eelistatud aadress" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Muu" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unikaalne identifikaator" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nimi" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Vormindatud nimi" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Perekonnanimi" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Eesnimi" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Lisanimed" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Austavad eesliited" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Austavad järelliited" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Hüüdnimi" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Sünnipäev" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Koduse aadressi tänav" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Koduse aadressi postkast" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Koduse aadressi linn" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Koduse aadressi maakond/provints" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Koduse aadressi postiindeks" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Koduse aadressi riik" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Koduse aadressi etikett" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Tööaadressi tänav" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Tööaadressi postkast" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Tööaadressi linn" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Tööaadressi maakond/provints" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Tööaadressi postiindeks" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Tööaadressi riik" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Tööaadressi etikett" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Kodune telefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Töötelefon" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiiltelefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Kodune faks" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Tööfaks" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Autotelefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Peiler" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-posti aadress" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "E-posti klient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Ajavöönd" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geograafiline asukoht" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Tiitel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Amet" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisatsioon" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Osakond" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Märkus" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Toote identifikaator" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Versiooni kuupäev" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorteerimisalus" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Kodulehekülg" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Turbeklass" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Heli" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Preili" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Hr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Pr." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Pr." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Tundmatu väli" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Kõik" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Sagedased" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Aadress" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-post" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Isiklik" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Kohandatud" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Määramata" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Kohandatud" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tundmatu tüüp" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefoninumber" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Kodu" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Töö" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Automaatvastaja" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Eelistatud" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Hääl" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobiil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postkast" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Auto" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Muu" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Eelistatud number" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Töö faks" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Avalik" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privaatne" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Konfidentsiaalne" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tundmatu tüüp" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Eelistatud" + +#~ msgid "List of Emails" +#~ msgstr "E-kirjade nimekiri" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Marek Laane" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "bald@smail.ee" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Ressursi '%1' laadimine nurjus" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Adressaadi valik" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nimi" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-post" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Valitud" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Tühista valik" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Postiloendite seadistamine" + +#~ msgid "Select Email Address" +#~ msgstr "Vali e-posti aadress" + +#~ msgid "Email Addresses" +#~ msgstr "E-posti aadressid" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Jah" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Ei" + +#~ msgid "New List..." +#~ msgstr "Uus loend..." + +#~ msgid "Rename List..." +#~ msgstr "Nimeta loend ümber..." + +#~ msgid "Remove List" +#~ msgstr "Eemalda loend" + +#~ msgid "Available addresses:" +#~ msgstr "Saadaolevad aadressid:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Eelistatud e-posti aadress" + +#~ msgid "Add Entry" +#~ msgstr "Lisa kirje" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-post" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Eelistatud kirje" + +#~ msgid "Change Email..." +#~ msgstr "Muuda e-posti aadressi..." + +#~ msgid "Remove Entry" +#~ msgstr "Eemalda kirje" + +#~ msgid "New Distribution List" +#~ msgstr "Uus postiloend" + +#~ msgid "Please enter &name:" +#~ msgstr "Palun sisesta &nimi:" + +#~ msgid "Distribution List" +#~ msgstr "Postiloend" + +#~ msgid "Please change &name:" +#~ msgstr "Palun muuda &nime:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Kas kustutada postiloend '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Valitud adressaadid:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Valitud adressaadid nimekirjas '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Ei" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCardi vorming" + +#~ msgid "No description available." +#~ msgstr "Kirjeldus puudub." + +#~ msgid "Unable to open lock file." +#~ msgstr "Lukufaili pole võimalik avada." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Ressursi '%1' on lukustanud rakendus '%2'." + +#~ msgid "Error" +#~ msgstr "Viga" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "Luku avamine nurjus. Lukufail kuulub muule protsessile: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: kõik lukustused õnnestusid, aga tegelikult midagi ei lukustatud." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: kõik lukustused nurjusid." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Ressursi '%1' laadimine nurjus." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Ressursi '%1' salvestamine nurjus." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Ressursi '%1' avamine nurjus." + +#~ msgid "Default Address Book" +#~ msgstr "Vaikimisi aadressiraamat" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Ressursi '%1' salvestamine nurjus, sest ressurss on lukus." diff --git a/po/fi/kcontacts5.po b/po/fi/kcontacts5.po new file mode 100644 index 0000000..025b2d0 --- /dev/null +++ b/po/fi/kcontacts5.po @@ -0,0 +1,596 @@ +# Translation of kabc.po to Finnish +# Copyright © 2007, 2009, 2012 This_file_is_part_of_KDE +# This file is distributed under the same license as the kdepimlibs package. +# Mikko Piippo , 2007. +# Tommi Nieminen , 2009, 2012. +# Lasse Liehu , 2013, 2015. +# +# KDE Finnish translation sprint participants: +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-27 18:23+0200\n" +"Last-Translator: Lasse Liehu \n" +"Language-Team: Finnish \n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-POT-Import-Date: 2012-12-01 22:25:17+0000\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "PL" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Tarkemmat osoitetiedot" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Katuosoite" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Paikkakunta" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Alue" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postinumero" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Maa" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Toimitusosoite" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Kotimaan osoite" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Kansainvälinen osoite" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postiosoite" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Pakettiosoite" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Koti" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Työ" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Ensisijainen osoite" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Muu " + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Ainutkertainen tunniste" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nimi" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Muotoiltu nimi" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Sukunimi" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Etunimi" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Lisänimet" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Kunnioittavat etuliitteet" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Kunnioittavat jälkiliitteet" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Kutsumanimi" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Syntymäpäivä" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Kotiosoitteen katuosoite" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Kotiosoitteen postilokero" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Kotiosoitteen kaupunki" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Kotiosoitteen osavaltio" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Kotiosoitteen postinumero" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Kotiosoitteen maa" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Kotiosoite" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Työosoitteen katuosoite" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Työosoitteen postilokero" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Työosoitteen kaupunki" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Työosoitteen osavaltio" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Työosoitteen postinumero" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Työosoitteen maa" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Työosoite" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Kotipuhelin" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Työpuhelin" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Matkapuhelin" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Kotifaksi" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Työfaksi" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Autopuhelin" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Hakulaite" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Sähköpostiosoite" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Postiohjelma" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Aikavyöhyke" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Maantieteellinen sijainti" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Ammatti" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Työnkuva" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisaatio" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Osasto" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Huomautukset" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Tuotteen tunniste" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Tarkistuspäivä" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Lajittelujono" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Kotisivu" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Turvallisuusluokitus" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Valokuva" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Äänitiedosto" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Tri" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Neiti" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Herra" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Rouva" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Rouva" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "nuor." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "vanh." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Tuntematon kenttä" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Kaikki" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Säännöllinen" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Osoite" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Sähköposti" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Henkilökohtainen" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Oma" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Määrittämätön" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Oma" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tuntematon tyyppi" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Puhelinnumero" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Koti" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Työ" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Pikaviestin" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Ensisijainen" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Ääni" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faksi" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Matkapuhelin" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postilaatikko" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modeemi" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Auto" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Muu " + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Ensisijainen numero" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Työfaksi" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Julkinen" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Yksityinen" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Luottamuksellinen" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tuntematon tyyppi" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Ensisijainen" + +#~ msgid "List of Emails" +#~ msgstr "Luettelo sähköposteista" diff --git a/po/fr/kcontacts5.po b/po/fr/kcontacts5.po new file mode 100644 index 0000000..8e5ccaa --- /dev/null +++ b/po/fr/kcontacts5.po @@ -0,0 +1,767 @@ +# translation of kabc.po to Francais +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# Francois Grange , 2007, 2008. +# Guillaume Pujol , 2008. +# Sébastien Renard , 2008. +# Mickael Sibelle , 2008. +# Sebastien Renard , 2010, 2013. +# xavier , 2013. +# Vincent Pinon , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2017-06-07 23:52+0100\n" +"Last-Translator: Vincent Pinon \n" +"Language-Team: French \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 2.0\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Boîte postale" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informations de complément d'adresse" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Rue" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Ville" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Région" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Code postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Pays" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Étiquette de livraison" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "National" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "International" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paquet" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Domicile" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Travail" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Adresse préférée" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Autre" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identifiant unique" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nom" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nom formaté" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Nom de famille" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Prénom" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Noms additionnels" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Préfixes honorifiques" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Suffixes honorifiques" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Pseudonyme" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Date d'anniversaire" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Rue du domicile" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Code postal du domicile" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Ville du domicile" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "État du domicile" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Code postal du domicile" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Pays du domicile" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Libellé de l'adresse du domicile" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Rue du lieu de travail" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Code postal du lieu de travail" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Ville du lieu de travail" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "État du lieu de travail" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Code postal du lieu de travail" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Pays du lieu de travail" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Libellé du lieu de travail" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Téléphone du domicile" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Téléphone professionnel" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Téléphone mobile" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax personnel" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax professionnel" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Téléphone de voiture" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "RNIS" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Bipeur" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Adresse de courrier électronique" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Client de courrier électronique" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Fuseau horaire" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Position géographique" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titre" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rôle" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisation" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Département" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Note" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identifiant du produit" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Date de révision" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Chaîne de tri" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Page d'accueil" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe de sécurité" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Photo" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Son" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Mlle" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "M." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mme" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Mme" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Pr." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I " + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III " + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Champ inconnu" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Tous" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Fréquent" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresse" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Adresse de courrier électronique" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personnel" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personnalisé" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Indéfini" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personnalisé" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Type inconnu" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Numéro de téléphone" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Domicile" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Professionnel" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messagerie" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Préféré" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Boîte vocale" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Portable" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vidéo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Boîte aux lettres" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Voiture" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Autre" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Numéro préféré" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax professionnel" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Public" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privé" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidentiel" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Type inconnu" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Adresse préférée" + +#~ msgid "List of Emails" +#~ msgstr "Liste des adresses de courrier électronique" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Nicolas Ternisien" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "nicolas.ternisien@gmail.com" + +# unreviewed-context +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Impossible de charger la ressource « %1 »" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Sélectionner le destinataire" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nom" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Adresse de courrier électronique" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Sélectionné" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Dé-sélectionné" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configurer les listes de distribution" + +#~ msgid "Select Email Address" +#~ msgstr "Sélectionner l'adresse de courrier électronique" + +#~ msgid "Email Addresses" +#~ msgstr "Adresse de courrier électronique" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Oui" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Non" + +#~ msgid "New List..." +#~ msgstr "Nouvelle liste..." + +#~ msgid "Rename List..." +#~ msgstr "Renommer une liste..." + +#~ msgid "Remove List" +#~ msgstr "Supprimer une liste" + +# unreviewed-context +#~ msgid "Available addresses:" +#~ msgstr "Adresses disponibles :" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Adresse préférée de courrier électronique" + +#~ msgid "Add Entry" +#~ msgstr "Ajouter une entrée" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Adresse de courrier électronique" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Utiliser l'adresse préférée de courrier électronique " + +#~ msgid "Change Email..." +#~ msgstr "Modifier les adresses de courrier électronique..." + +#~ msgid "Remove Entry" +#~ msgstr "Supprimer une entrée" + +#~ msgid "New Distribution List" +#~ msgstr "Nouvelle liste de distribution" + +# unreviewed-context +#~ msgid "Please enter &name:" +#~ msgstr "Veuillez saisir un &nom : " + +#~ msgid "Distribution List" +#~ msgstr "Liste de distribution" + +# unreviewed-context +#~ msgid "Please change &name:" +#~ msgstr "Veuillez modifier le &nom : " + +# unreviewed-context +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Supprimer la liste de distribution « %1 » ?" + +# unreviewed-context +#~ msgid "Selected addressees:" +#~ msgstr "Destinataires sélectionnés :" + +# unreviewed-context +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Destinataires sélectionnés dans « %1 » :" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Non" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Format « vCard »" + +#~ msgid "No description available." +#~ msgstr "Aucune description disponible." + +#~ msgid "Unable to open lock file." +#~ msgstr "Impossible d'ouvrir un fichier verrouillé." + +# unreviewed-context +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "La ressource « %1 » est verrouillée par l'application « %2 »." + +#~ msgid "Error" +#~ msgstr "Erreur" + +# unreviewed-context +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Échec du déverrouillage. Le fichier verrouillé appartient à un autre " +#~ "processus : %1 (%2)" + +# unreviewed-context +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull : tous les verrouillages ont réussi mais rien n'est verrouillé." + +# unreviewed-context +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull : tous les verrouillages ont échoué." + +# unreviewed-context +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Échec du chargement de la ressource « %1 »." + +# unreviewed-context +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Échec de l'enregistrement de la ressource « %1 »." + +# unreviewed-context +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Impossible de charger la ressource « %1 »" + +#~ msgid "Default Address Book" +#~ msgstr "Carnet d'adresses par défaut" + +# unreviewed-context +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Impossible d'enregistrer la ressource « %1 ». Elle est verrouillée." diff --git a/po/ga/kcontacts5.po b/po/ga/kcontacts5.po new file mode 100644 index 0000000..80b11fb --- /dev/null +++ b/po/ga/kcontacts5.po @@ -0,0 +1,742 @@ +# Irish translation of kabc +# Copyright (C) 2009 This_file_is_part_of_KDE +# This file is distributed under the same license as the kabc package. +# Kevin Scannell , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kdepimlibs/kabc.po\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2007-06-27 10:27-0500\n" +"Last-Translator: Kevin Scannell \n" +"Language-Team: Irish \n" +"Language: ga\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : n<7 ? 2 : n < 11 ? " +"3 : 4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Bosca Oifig an Phoist" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Eolas Seolta Breisithe" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Sráid" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Ceantar" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Réigiún" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Cód Poist" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Tír" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Lipéad Seachadta" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Intíre" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Idirnáisiúnta" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Post" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Beart" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Baile" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Obair" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Seoladh de Rogha" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Eile" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Aitheantóir Sainiúil" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Ainm" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Ainm Formáidithe" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Sloinne" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Ainm" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Ainmneacha Eile" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Réimíreanna Ómóis" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Iarmhíreanna Ómóis" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Leasainm" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Lá Breithe" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Seoladh Baile - Sráid" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Bosca Oifig an Phoist - Baile" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Seoladh Baile - Cathair" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Seoladh Baile - Stát" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Seoladh Baile - Cód Poist" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Seoladh Baile - Tír" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Seoladh Baile - Lipéad" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Seoladh Gnó - Sráid" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Bosca Oifig an Phoist - Gnó" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Seoladh Gnó - Cathair" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Seoladh Gnó - Stát" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Seoladh Gnó - Cód Poist" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Seoladh Gnó - Tír" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Seoladh Gnó - Lipéad" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Fón Baile" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Fón Gnó" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Fón Póca" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Facs Baile" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Facs Gnó" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Fón Cairr" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "LDSC" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Glaoire" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Seoladh Ríomhphoist" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Cliant Ríomhphoist" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Crios Ama" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Suíomh Geografach" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Teideal" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Ról" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Eagras" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Roinn" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nóta" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Aitheantóir Táirge" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Dáta Leasaithe" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Teaghrán Sórtála" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Leathanach Baile" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Aicme Slándála" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Lógó" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Grianghraf" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Fuaim" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "An Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Iníon" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "An tUas." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Bean" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "An tOll." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Óg" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Mór" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Réimse Anaithnid" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Uile" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Go Minic" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Seoladh" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Ríomhphost" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Pearsanta" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Saincheaptha" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Neamhshainithe" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X.509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Saincheaptha" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Cineál anaithnid" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Baile" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Obair" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Teachtaire" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Molta" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Guth" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Facs" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Fón Póca" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Fón Físe" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Bosca Poist" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Móideim" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Carr" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Eile" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Uimhir de Rogha" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Facs oibre" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Poiblí" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Príobháideach" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Faoi Rún" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Cineál anaithnid" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "De Rogha" + +#~ msgid "List of Emails" +#~ msgstr "Liosta Ríomhphost" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Kevin Scannell" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "kscanne@gmail.com" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Ní féidir acmhainn '%1' a luchtú" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Roghnaigh an Seolaí" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Ainm" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Ríomhphost" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Roghnaithe" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Díroghnaigh" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Cumraigh Liostaí Dáilte" + +#~ msgid "Select Email Address" +#~ msgstr "Roghnaigh Seoladh Ríomhphoist" + +#~ msgid "Email Addresses" +#~ msgstr "Seoltaí Ríomhphoist" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Tá" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Níl" + +#~ msgid "New List..." +#~ msgstr "Liosta Nua..." + +#~ msgid "Rename List..." +#~ msgstr "Athainmnigh Liosta..." + +#~ msgid "Remove List" +#~ msgstr "Bain Liosta" + +#~ msgid "Available addresses:" +#~ msgstr "Seoltaí ar fáil:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Ríomhphost de Rogha" + +#~ msgid "Add Entry" +#~ msgstr "Cuir Iontráil Leis" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Ríomhphost" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Úsáid an ceann de rogha" + +#~ msgid "Change Email..." +#~ msgstr "Athraigh Seoladh Ríomhphoist..." + +#~ msgid "Remove Entry" +#~ msgstr "Bain Iontráil" + +#~ msgid "New Distribution List" +#~ msgstr "Liosta Dáilte Nua" + +#~ msgid "Please enter &name:" +#~ msgstr "Iontráil ai&nm:" + +#~ msgid "Distribution List" +#~ msgstr "Liosta Dáilte" + +#~ msgid "Please change &name:" +#~ msgstr "Athraigh an t-ai&nm le do thoil:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Scrios an liosta dáilte '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Seolaithe roghnaithe:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Seoltaí roghnaithe i '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Níl" + +#~ msgid "vCard" +#~ msgstr "v-Chárta" + +#~ msgid "vCard Format" +#~ msgstr "Formáid v-Chárta" + +#~ msgid "No description available." +#~ msgstr "Níl cur síos ar fáil." + +#~ msgid "Unable to open lock file." +#~ msgstr "Ní féidir comhad glais a oscailt." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Tá acmhainn '%1' faoi ghlas ag feidhmchlár '%2'." + +#~ msgid "Error" +#~ msgstr "Earráid" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Theip ar oscailt an ghlais. Is le próiseas eile an comhad ghlais: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: D'éirigh le gach glas ach níor chuir aon rud faoi ghlas i " +#~ "ndáiríre." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Theip ar gach glas." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Níorbh fhéidir acmhainn '%1' a luchtú." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Níorbh fhéidir acmhainn '%1' a shábháil." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Ní féidir acmhainn '%1' a oscailt." + +#~ msgid "Default Address Book" +#~ msgstr "Leabhar Seoltaí Réamhshocraithe" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Ní féidir acmhainn '%1' a shábháil. Tá sí faoi ghlas." diff --git a/po/gl/kcontacts5.po b/po/gl/kcontacts5.po new file mode 100644 index 0000000..339becb --- /dev/null +++ b/po/gl/kcontacts5.po @@ -0,0 +1,758 @@ +# translation of kabc.po to galician +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# mvillarino , 2007, 2008, 2009. +# Marce Villarino , 2009. +# marce villarino , 2009. +# Xosé , 2009. +# Marce Villarino , 2012, 2013. +# Adrián Chaves Fernández (Gallaecio) , 2015. +# Adrián Chaves (Gallaecio) , 2017. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2017-07-29 09:52+0100\n" +"Last-Translator: Adrián Chaves (Gallaecio) \n" +"Language-Team: Galician \n" +"Language: gl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-Language: Galician\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Apartado de correos" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Información ampliada do enderezo" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Rúa" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localidade" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Rexión" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Código postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "País" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etiqueta de envío" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Nacional" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internacional" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paquetaría" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Casa" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Traballo" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Enderezo preferido" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Outro" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificador único" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nome" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nome Formatado" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Apelido" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nome Propio" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Nomes Adicionais" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixos Honoríficos" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufixos Honoríficos" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Alcume" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Aniversario" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Rúa do enderezo particular" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Apartado de correos do enderezo particular" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Cidade do enderezo particular" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Provincia do enderezo particular" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Código postal do enderezo particular" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "País do enderezo particular" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etiqueta do enderezo particular" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Rúa do enderezo do traballo" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Caixa de correo do enderezo do traballo" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Cidade do enderezo do traballo" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Provincia do enderezo do traballo" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Código postal do enderezo do traballo" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "País do enderezo do traballo" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etiqueta do enderezo do traballo" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Teléfono privado" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Teléfono do traballo" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Móbil" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax privado" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax do traballo" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Teléfono do coche" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "RDSI" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Busca" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Enderezo de correo electrónico" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Cliente de correo" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Fuso horario" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posición xeográfica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Título" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Función" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organización" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departamento" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificador do produto" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data de revisión" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Ordenar a cadea" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Páxina web" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Clase de seguranza" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotipo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Son" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Sra." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Srta." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Sra." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Campo descoñecido" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Todos" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frecuente" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Enderezo" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Correo electrónico" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Persoal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalizado" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Non definido" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalizado" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipo descoñecido" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Número de teléfono" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Casa" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Traballo" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Mensaxaría" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferido" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voz" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Móbil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vídeo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Caixa de correo" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Módem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Coche" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Outro" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Número preferido" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax do traballo" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Público" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privado" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidencial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipo descoñecido" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferido" + +#~ msgid "List of Emails" +#~ msgstr "Lista de correos electrónicos" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "" +#~ "mvillarino, \n" +#~ "Xosé Calvo" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "" +#~ "mvillarino@users.sourceforge.net, \n" +#~ "xosecalvo@gmail.com" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Non foi posíbel cargar o recurso «%1»" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Escoller o destinatario" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nome" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Correo electrónico" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Escollidos" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Anular a selección" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configurar as listas de distribución" + +#~ msgid "Select Email Address" +#~ msgstr "Escoller o enderezo de correo electrónico" + +#~ msgid "Email Addresses" +#~ msgstr "Enderezos de correo electrónico" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Si" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Non" + +#~ msgid "New List..." +#~ msgstr "Lista nova..." + +#~ msgid "Rename List..." +#~ msgstr "Mudar o nome da lista..." + +#~ msgid "Remove List" +#~ msgstr "Eliminar a lista" + +#~ msgid "Available addresses:" +#~ msgstr "Enderezos dispoñíbeis:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Correo electrónico preferido" + +#~ msgid "Add Entry" +#~ msgstr "Engadir unha entrada" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Correo electrónico" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Utilizar o preferido" + +#~ msgid "Change Email..." +#~ msgstr "Mudar o correo electrónico..." + +#~ msgid "Remove Entry" +#~ msgstr "Eliminar a entrada" + +#~ msgid "New Distribution List" +#~ msgstr "Nova lista de distribución" + +#~ msgid "Please enter &name:" +#~ msgstr "Escriba o &nome:" + +#~ msgid "Distribution List" +#~ msgstr "Lista de distribución" + +#~ msgid "Please change &name:" +#~ msgstr "Mude o &nome:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Borrar a lista de distribución «%1»?" + +#~ msgid "Selected addressees:" +#~ msgstr "Escolla os destinatarios:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Enderezos escollidos en «%1»:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Non" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Formato vCard" + +#~ msgid "No description available." +#~ msgstr "Non hai ningunha descrición dispoñíbel." + +#~ msgid "Unable to open lock file." +#~ msgstr "Non foi posíbel abrir o ficheiro de bloqueo." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "O recurso «%1» está trancado polo programa «%2»." + +#~ msgid "Error" +#~ msgstr "Erro" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Fallou o desbloqueo. O ficheiro de bloqueo é propiedade de outros " +#~ "procesos: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Todos os bloqueos tiveron éxito pero non se trancou nada " +#~ "realmente." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Todos os bloqueos fallaron." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Fallou a carga do recurso «%1»." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Fallou o gardado do recurso «%1»." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Foi imposíbel abrir o recurso «%1»" + +#~ msgid "Default Address Book" +#~ msgstr "Caderno de enderezos predeterminado" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Non foi posíbel gardar no recurso «%1». Está trancado." diff --git a/po/hi/kcontacts5.po b/po/hi/kcontacts5.po new file mode 100644 index 0000000..ba209a6 --- /dev/null +++ b/po/hi/kcontacts5.po @@ -0,0 +1,809 @@ +# translation of kabc.po to Hindi +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Ravishankar Shrivastava , 2008. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2008-01-28 11:36+0530\n" +"Last-Translator: Ravishankar Shrivastava \n" +"Language-Team: Hindi \n" +"Language: hi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "पोस्ट बॉक्स नं." + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "पता की विस्तारित जानकारी" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "सड़क" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "जगह" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "क्षेत्र" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "पिन कोड" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "देश" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "डिलेवरी लेबल" + +#: address.cpp:530 +#, fuzzy, kde-format +#| msgid "Domestic" +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "घरेलू" + +#: address.cpp:532 +#, fuzzy, kde-format +#| msgid "International" +msgctxt "Address is not in home country" +msgid "International" +msgstr "अंतर्राष्ट्रीय" + +#: address.cpp:534 +#, fuzzy, kde-format +#| msgid "Postal" +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "पोस्टल" + +#: address.cpp:536 +#, fuzzy, kde-format +#| msgid "Parcel" +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "पार्सल" + +#: address.cpp:538 +#, fuzzy, kde-format +#| msgid "Home" +msgctxt "Home Address" +msgid "Home" +msgstr "घर" + +#: address.cpp:540 +#, fuzzy, kde-format +#| msgid "Work" +msgctxt "Work Address" +msgid "Work" +msgstr "कार्यस्थल" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "पसंदीदा पता" + +#: address.cpp:544 +#, fuzzy, kde-format +#| msgid "Other" +msgctxt "another type of address" +msgid "Other" +msgstr "अन्य" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "" + +#: addressee.cpp:459 +#, fuzzy, kde-format +#| msgid "Name" +msgid "Name" +msgstr "नाम" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "" + +#: addressee.cpp:806 +#, fuzzy, kde-format +#| msgid "Name" +msgid "Nick Name" +msgstr "नाम" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "" + +#: addressee.cpp:851 +#, fuzzy, kde-format +#| msgid "Select Addressee" +msgid "Home Address Street" +msgstr "पाने वाला चुनें" + +#: addressee.cpp:856 +#, fuzzy, kde-format +#| msgid "Post Office Box" +msgid "Home Address Post Office Box" +msgstr "पोस्ट बॉक्स नं." + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "" + +#: addressee.cpp:866 +#, fuzzy, kde-format +#| msgid "Email Addresses" +msgid "Home Address State" +msgstr "ईमेल पता" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "" + +#: addressee.cpp:881 +#, fuzzy, kde-format +#| msgid "Email Addresses" +msgid "Home Address Label" +msgstr "ईमेल पता" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "" + +#: addressee.cpp:891 +#, fuzzy, kde-format +#| msgid "Post Office Box" +msgid "Business Address Post Office Box" +msgstr "पोस्ट बॉक्स नं." + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "" + +#: addressee.cpp:931 +#, fuzzy, kde-format +#| msgid "Mobile" +msgid "Mobile Phone" +msgstr "मोबिल" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "घर का फ़ैक्स" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "आईएसडीएन" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "पेजर" + +#: addressee.cpp:961 +#, fuzzy, kde-format +#| msgid "Email Addresses" +msgid "Email Address" +msgstr "ईमेल पता" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "" + +#: addressee.cpp:1214 +#, fuzzy, kde-format +#| msgid "No" +msgid "Note" +msgstr "नहीं" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "" + +#: addressee.cpp:1300 +#, fuzzy, kde-format +#| msgid "Home" +msgid "Homepage" +msgstr "घर" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "डॉ." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "कुमारी" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "श्रीमान्" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "श्रीमती" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "सुश्री" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "प्रा." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "कनिष्ठ" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "वरिष्ठ" + +#: field.cpp:218 +#, fuzzy, kde-format +#| msgid "Unknown type" +msgid "Unknown Field" +msgstr "अज्ञात क़िस्म" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "" + +#: field.cpp:235 +#, fuzzy, kde-format +#| msgid "Email Addresses" +msgctxt "street/postal" +msgid "Address" +msgstr "ईमेल पता" + +#: field.cpp:237 +#, fuzzy, kde-format +#| msgid "Email" +msgid "Email" +msgstr "ईमेल" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "" + +#: field.cpp:243 +#, fuzzy, kde-format +#| msgid "Custom" +msgid "Custom" +msgstr "मनपसंद" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "" + +#: key.cpp:214 +#, fuzzy, kde-format +#| msgid "X509" +msgctxt "X.509 public key" +msgid "X509" +msgstr "एक्स509" + +#: key.cpp:217 +#, fuzzy, kde-format +#| msgid "PGP" +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "पीजीपी" + +#: key.cpp:220 +#, fuzzy, kde-format +#| msgid "Custom" +msgctxt "A custom key" +msgid "Custom" +msgstr "मनपसंद" + +#: key.cpp:223 +#, fuzzy, kde-format +#| msgid "Unknown type" +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "अज्ञात क़िस्म" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, fuzzy, kde-format +#| msgid "Home" +msgctxt "Home phone" +msgid "Home" +msgstr "घर" + +#: phonenumber.cpp:174 +#, fuzzy, kde-format +#| msgid "Work" +msgctxt "Work phone" +msgid "Work" +msgstr "कार्यस्थल" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "मेसेंजर " + +#: phonenumber.cpp:178 +#, fuzzy, kde-format +#| msgid "Preferred" +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "पसंदीदा" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "आवाज़" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "फ़ैक्स" + +#: phonenumber.cpp:184 +#, fuzzy, kde-format +#| msgid "Mobile" +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "मोबिल" + +#: phonenumber.cpp:186 +#, fuzzy, kde-format +#| msgid "Video" +msgctxt "Video phone" +msgid "Video" +msgstr "वीडियो" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "डाक डिब्बा" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "मॉडेम" + +#: phonenumber.cpp:192 +#, fuzzy, kde-format +#| msgid "Car" +msgctxt "Car Phone" +msgid "Car" +msgstr "कार" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "पीसीएस" + +#: phonenumber.cpp:200 +#, fuzzy, kde-format +#| msgid "Other" +msgctxt "another type of phone" +msgid "Other" +msgstr "अन्य" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "पसंदीदा संख्या" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "ऑफिस का फ़ैक्स" + +#: secrecy.cpp:111 +#, fuzzy, kde-format +#| msgid "Public" +msgctxt "access is for everyone" +msgid "Public" +msgstr "सार्वजनिक" + +#: secrecy.cpp:114 +#, fuzzy, kde-format +#| msgid "Private" +msgctxt "access is by owner only" +msgid "Private" +msgstr "निजी" + +#: secrecy.cpp:117 +#, fuzzy, kde-format +#| msgid "Confidential" +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "गोपनीय" + +#: secrecy.cpp:120 +#, fuzzy, kde-format +#| msgid "Unknown type" +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "अज्ञात क़िस्म" + +#, fuzzy +#~| msgid "Preferred" +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "पसंदीदा" + +#~ msgid "List of Emails" +#~ msgstr "ई-मेल सूची" + +#, fuzzy +#~| msgid "Your names" +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "रविशंकर श्रीवास्तव, जी. करूणाकर" + +#, fuzzy +#~| msgid "Your emails" +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "raviratlami@aol.in" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "रिसोर्स '%1' लोड करने में अक्षम." + +#, fuzzy +#~| msgid "Select Addressee" +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "पाने वाला चुनें" + +#, fuzzy +#~| msgid "Name" +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "नाम" + +#, fuzzy +#~| msgid "Email" +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "ईमेल" + +#, fuzzy +#~| msgid "Selected" +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "चुना गया" + +#, fuzzy +#~| msgid "Unselect" +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "अचयनित" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "वितरण सूचियाँ कॉन्फ़िगर करें" + +#~ msgid "Select Email Address" +#~ msgstr "ई-मेल पता चुनें" + +#~ msgid "Email Addresses" +#~ msgstr "ईमेल पता" + +#, fuzzy +#~| msgid "Yes" +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "हाँ" + +#, fuzzy +#~| msgid "No" +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "नहीं" + +#~ msgid "New List..." +#~ msgstr "नई सूची..." + +#~ msgid "Rename List..." +#~ msgstr "सूची का नया नाम..." + +#~ msgid "Remove List" +#~ msgstr "सूची मिटाएँ" + +#~ msgid "Available addresses:" +#~ msgstr "उपलब्ध पताः" + +#, fuzzy +#~| msgid "Preferred Email" +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "प्राथमिकता ईमेल " + +#~ msgid "Add Entry" +#~ msgstr "एन्ट्री जोड़ें" + +#, fuzzy +#~| msgid "Email" +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "ईमेल" + +#, fuzzy +#~| msgid "Use Preferred" +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "पसंदीदा इस्तेमाल करें" + +#~ msgid "Change Email..." +#~ msgstr "ईमेल बदलें..." + +#~ msgid "Remove Entry" +#~ msgstr "एन्ट्री हटाएँ" + +#~ msgid "New Distribution List" +#~ msgstr "नई वितरण सूची" + +#~ msgid "Please enter &name:" +#~ msgstr "कृपया नाम भरें (&n):" + +#~ msgid "Distribution List" +#~ msgstr "वितरण सूची" + +#~ msgid "Please change &name:" +#~ msgstr "कृपया नाम बदलें (&n):" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "वितरण सूची '%1' हटाएँ?" + +#~ msgid "Selected addressees:" +#~ msgstr "चुने हुए पतेः" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr " '%1' में चुने हुए पते:" + +#, fuzzy +#~| msgid "No" +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "नहीं" + +#~ msgid "vCard" +#~ msgstr "वीकार्ड " + +#~ msgid "vCard Format" +#~ msgstr "वीकार्ड फॉर्मेट" + +#~ msgid "No description available." +#~ msgstr "कोई वर्णन उपलब्ध नहीं" + +#~ msgid "Unable to open lock file." +#~ msgstr "लाक फ़ाइल खोलने में अक्षम." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "रिसोर्स '%1' अनुप्रयोग '%2' द्वारा तालाबंद है." + +#~ msgid "Error" +#~ msgstr "त्रुटि" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "ताला खोलने में असफल. लाक फ़ाइल अन्य प्रक्रम के स्वामित्व में है: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: सभी तालाबंद सफल किंतु वास्तविक ताला नहीं लगाया." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: सभी ताला असफल." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "संसाधन '%1' लोड करना असफल." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "संसाधन '%1' सहेना असफल." + +#, fuzzy +#~| msgid "Unable to load resource '%1'" +#~ msgid "Unable to open resource '%1'." +#~ msgstr "रिसोर्स '%1' लोड करने में अक्षम." + +#, fuzzy +#~| msgid "Select Addressee" +#~ msgid "Default Address Book" +#~ msgstr "पाने वाला चुनें" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "संसाधन '%1' पर सहेजने में अक्षम. यह ताला बंद है." diff --git a/po/hu/kcontacts5.po b/po/hu/kcontacts5.po new file mode 100644 index 0000000..5bc9dba --- /dev/null +++ b/po/hu/kcontacts5.po @@ -0,0 +1,742 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Tamas Szanto , 2007. +# Kristóf Kiszel , 2010, 2014. +msgid "" +msgstr "" +"Project-Id-Version: KDE 4.3\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2014-04-15 16:01+0200\n" +"Last-Translator: Kristóf Kiszel \n" +"Language-Team: Hungarian \n" +"Language: hu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postafiók" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Kibővített címadatok" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Utca" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Helység" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Megye/régió" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Irányítószám" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Ország" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Kézbesítési címke" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Belföldi" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Külföldi" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postai cím" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Csomag" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Otthoni" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Munkahelyi" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Elsődleges cím" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Egyéb" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Egyedi azonosító" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Név" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formázott név" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Családi név" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Utónév" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Egyéb nevek" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Előtagok" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Utótagok" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Becenév" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Születésnap" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Utca (otthoni)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Postafiók (otthoni)" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Helység (otthoni)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Állam (otthoni)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Irányítószám (otthoni)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Ország (otthoni)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Címke (otthoni)" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Utca (munkahelyi)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Postafiók (munkahelyi)" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Helység (munkahelyi)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Állam (munkahelyi)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Irányítószám (munkahelyi)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Ország (munkahelyi)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Címke (munkahelyi)" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefon (otthoni)" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon (munkahelyi)" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobil" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax (otthoni)" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax (munkahelyi)" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Autótelefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Csipogó" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-mail cím" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Levelezőprogram" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Időzóna" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Földrajzi pozíció" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Megszólítás" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Beosztás" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Szervezet" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Osztály" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Megjegyzés" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Termékazonosító" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Verzió" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Rendezési sztring" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Honlap" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Biztonsági osztály" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logó" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fénykép" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Hang" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Mr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mrs." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Ismeretlen mező" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Mind" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "A fontosabbak" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Cím" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail cím" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Privát" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Egyedi" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nincs megadva" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Egyedi" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Ismeretlen címtípus" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Otthoni" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Munkahelyi" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Üzenetküldő" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Elsődleges" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Hang" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Videó" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postaláda" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Autó" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Egyéb" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Elsődleges telefonszám" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Munkahelyi fax" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Nyilvános" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privát" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Bizalmas" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Ismeretlen" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Elsődleges" + +#~ msgid "List of Emails" +#~ msgstr "E-mail címek" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Szántó Tamás,Kiszel Kristóf" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "tszanto@interware.hu,ulysses@kubuntu.org" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Nem sikerült betölteni ezt az erőforrást: „%1”." + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Címzett kiválasztása" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Név" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-mail cím" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Kijelölve" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Nincs kijelölve" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Címlisták beállítása" + +#~ msgid "Select Email Address" +#~ msgstr "E-mail cím kiválasztása" + +#~ msgid "Email Addresses" +#~ msgstr "E-mail címek" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Igen" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nem" + +#~ msgid "New List..." +#~ msgstr "Új lista…" + +#~ msgid "Rename List..." +#~ msgstr "Lista átnevezése…" + +#~ msgid "Remove List" +#~ msgstr "Lista eltávolítása" + +#~ msgid "Available addresses:" +#~ msgstr "Címek:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Elsődleges e-mail cím" + +#~ msgid "Add Entry" +#~ msgstr "Új bejegyzés" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-mail cím" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Az elsődleges cím használata" + +#~ msgid "Change Email..." +#~ msgstr "E-mail cím módosítása…" + +#~ msgid "Remove Entry" +#~ msgstr "Bejegyzés törlése" + +#~ msgid "New Distribution List" +#~ msgstr "Új címlista" + +#~ msgid "Please enter &name:" +#~ msgstr "Né&v:" + +#~ msgid "Distribution List" +#~ msgstr "Címlista" + +#~ msgid "Please change &name:" +#~ msgstr "Változtassa meg a n&evet:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Törölni szeretné ezt a címlistát: „%1”?" + +#~ msgid "Selected addressees:" +#~ msgstr "Kijelölt címzettek:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Kijelölt címzettek itt: „%1”:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nem" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard formátum" + +#~ msgid "No description available." +#~ msgstr "Nincs leírás." + +#~ msgid "Unable to open lock file." +#~ msgstr "Nem sikerült megnyitni egy zárolófájlt." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "A(z) „%2” alkalmazás zárolta ezt a fájlt: „%1”." + +#~ msgid "Error" +#~ msgstr "Hiba" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "A feloldás nem sikerült, mert a zárolófájlt fogja ez a folyamat: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "A zárolások sikerültek, de nem történt tényleges zárolás." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "Egy zárolás sem sikerült." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Nem sikerült betölteni ezt az erőforrást: „%1”." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Nem sikerült elmenteni ezt az erőforrást: „%1”." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Nem sikerült megnyitni ezt az erőforrást: „%1”." + +#~ msgid "Default Address Book" +#~ msgstr "Alapértelmezett címjegyzék" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "" +#~ "A következő erőforrás zárolt, ezért nem sikerült bele menteni: „%1”." diff --git a/po/ia/kcontacts5.po b/po/ia/kcontacts5.po new file mode 100644 index 0000000..b425fbe --- /dev/null +++ b/po/ia/kcontacts5.po @@ -0,0 +1,743 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# g.sora , 2011, 2012. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2012-09-24 15:31+0200\n" +"Last-Translator: Giovanni Sora \n" +"Language-Team: Interlingua \n" +"Language: ia\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.4\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Cassa de officio de posta" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Information de adresse extendite" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Strata" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localitate" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Region" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Codice postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Pais" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etiquetta de livration" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domestic" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "International" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Parcella" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Domo" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Labor" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Adresse preferite" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Altere" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificator unic" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nomine" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nomine formatate" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Nomine de Familia" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nomine date" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Nomines additional" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixos honorific" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Suffixos honorific" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Pseudonymo" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Anniversario de nativitate" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Strata de adresse de domo" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Cassa de officio de posta de adresse de domo" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Citate de adresse de domo" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Stato de adresse de domo" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Codice postal de adresse de domo" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Pais de adresse de domo" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etiquetta de adresse de domo" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Strata de adresse de labor" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Cassa de officio de posta de adresse de labor" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Citate de adresse de labor" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Stato de adresse de labor" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Codice postal de adresse de labor" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Pais de adresse de labor" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etiquetta de adresse de labor" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telephono de domo" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telephono de affaires" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telephono mobile" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax de domo" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax de affaires" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telephono de automobile" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Adresse de E-Posta" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Cliente de e-posta" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Zona de Tempore" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Position geographic" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titulo" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rolo" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organization" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departimento" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificator de producto" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data de revision" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Ordina catena" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Pagina Domo o Principal" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe de securitate" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Photo" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Sono" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Senioretta" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Senior" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Seniora" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Seniora" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Campo incognite" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Omne" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frequente" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresse" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-posta" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalisate" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Non definite" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalisate" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Typo incognite" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Domo" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Labor" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messagero" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferite" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voce" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobile" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Cassa postal" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Automobile" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Altere" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Numero preferite" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax de labor" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Public" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Private" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidential" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Typo incognite" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferite" + +#~ msgid "List of Emails" +#~ msgstr "Lista de e-postas" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Giovanni Sora" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "g.sora@tiscali.it" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Incapace de cargar ressource: '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Selige destinatario" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nomine" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-posta" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Seligite" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "De-selige" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configura listas de distribution" + +#~ msgid "Select Email Address" +#~ msgstr "Selige adresses de e-posta" + +#~ msgid "Email Addresses" +#~ msgstr "Adresses de E-Posta" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Si" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "New List..." +#~ msgstr "Nove lista..." + +#~ msgid "Rename List..." +#~ msgstr "Renomina lista..." + +#~ msgid "Remove List" +#~ msgstr "Remove lista" + +#~ msgid "Available addresses:" +#~ msgstr "Adresses disponibile:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "E-posta preferite" + +#~ msgid "Add Entry" +#~ msgstr "Adde Entrata" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-posta" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Usa preferite" + +#~ msgid "Change Email..." +#~ msgstr "Cambia e-posta..." + +#~ msgid "Remove Entry" +#~ msgstr "Remove entrata" + +#~ msgid "New Distribution List" +#~ msgstr "Nove lista de distribution" + +#~ msgid "Please enter &name:" +#~ msgstr "Per favor inserta &nomine:" + +#~ msgid "Distribution List" +#~ msgstr "Lista de distribution" + +#~ msgid "Please change &name:" +#~ msgstr "Pro favor cambia &nomine:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Dele lista de distribution '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Destinatarios seligite:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Adresses seligite in '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Formato de vCard" + +#~ msgid "No description available." +#~ msgstr "Nulle description disponibile." + +#~ msgid "Unable to open lock file." +#~ msgstr "Incapace de aperir file de bloco." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Le ressource '%1' es blocate per application '%2'." + +#~ msgid "Error" +#~ msgstr "Error" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Il falleva a disblocar. File de bloco es de proprietate de un altere " +#~ "processo: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Tote blocos habeva successo ma nulle bloco in realitate ha " +#~ "essite facite." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Omne blocos falleva." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Il falleva a cargar ressource '%1'." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Il falleva a salveguardar ressource '%1'." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Incapace de aperir ressource '%1'." + +#~ msgid "Default Address Book" +#~ msgstr "Adressario predefinite" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Incapace de salveguardar ressource '%1'. Il es blocate." diff --git a/po/it/kcontacts5.po b/po/it/kcontacts5.po new file mode 100644 index 0000000..4a7f350 --- /dev/null +++ b/po/it/kcontacts5.po @@ -0,0 +1,746 @@ +# translation of kabc.po to Italian +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the kabc package. +# Federico Zenith , 2007. +# Pino Toscano , 2009. +# Luigi Toscano , 2015. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-28 16:57+0100\n" +"Last-Translator: Luigi Toscano \n" +"Language-Team: Italian \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Casella postale" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informazioni estese sull'indirizzo" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Via" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Località" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Regione" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Codice postale" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Nazione" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etichetta di consegna" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domestico" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internazionale" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postale" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Pacco" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Casa" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Lavoro" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Indirizzo preferito" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Altro" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificatore univoco" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nome" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nome formattato" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Cognome" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nome" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Altri nomi" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefissi onorifici" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Suffissi onorifici" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Soprannome" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Data di nascita" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Via indirizzo di casa" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Casella postale indirizzo di casa" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Città indirizzo di casa" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Stato indirizzo di casa" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "CAP indirizzo di casa" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Stato indirizzo di casa" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etichetta indirizzo di casa" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Via indirizzo di lavoro" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Casella postale indirizzo di lavoro" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Città indirizzo di lavoro" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Stato indirizzo di lavoro" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "CAP indirizzo di lavoro" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Stato indirizzo di lavoro" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etichetta indirizzo di lavoro" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefono di casa" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefono di lavoro" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telefono cellulare" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax a casa" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax di lavoro" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefono auto" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Cercapersone" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Indirizzo di posta elettronica" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Programma di posta elettronica" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Fuso orario" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posizione geografica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titolo" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Ruolo" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizzazione" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Dipartimento" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificativo prodotto" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data di revisione" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Stringa di ordinamento" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Homepage" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe di sicurezza" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Suono" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dott." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Sig.rina" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sig." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Sig.ra" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ing." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Campo sconosciuto" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Tutto" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frequente" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Indirizzo" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Posta elettronica" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personale" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalizzato" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Non definito" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalizzata" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipo sconosciuto" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Numero di telefono" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Casa" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Lavoro" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messaggistica" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferito" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voce" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Cellulare" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Casella" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Macchina" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Altro" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Numero preferito" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax al lavoro" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Pubblico" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privato" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidenziale" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipo sconosciuto" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferito" + +#~ msgid "List of Emails" +#~ msgstr "Elenco di indirizzi" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Federico Zenith" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "federico.zenith@member.fsf.org" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Impossibile caricare la risorsa «%1»" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Seleziona destinatario" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nome" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Posta elettronica" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Selezionato" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Deseleziona" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configura liste di distribuzione" + +#~ msgid "Select Email Address" +#~ msgstr "Seleziona indirizzo di posta" + +#~ msgid "Email Addresses" +#~ msgstr "Indirizzi di posta" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Sì" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "New List..." +#~ msgstr "Nuova lista..." + +#~ msgid "Rename List..." +#~ msgstr "Rinomina lista..." + +#~ msgid "Remove List" +#~ msgstr "Rimuovi lista" + +#~ msgid "Available addresses:" +#~ msgstr "Indirizzi disponibili:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Indirizzo di posta preferito" + +#~ msgid "Add Entry" +#~ msgstr "Aggiungi voce" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Posta elettronica" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Usa preferito" + +#~ msgid "Change Email..." +#~ msgstr "Cambia indirizzo di posta..." + +#~ msgid "Remove Entry" +#~ msgstr "Rimuovi voce" + +#~ msgid "New Distribution List" +#~ msgstr "Nuova lista di distribuzione" + +#~ msgid "Please enter &name:" +#~ msgstr "Inserisci il &nome:" + +#~ msgid "Distribution List" +#~ msgstr "Lista di distribuzione" + +#~ msgid "Please change &name:" +#~ msgstr "Cambia il &nome:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Eliminare la lista di distribuzione «%1»?" + +#~ msgid "Selected addressees:" +#~ msgstr "Destinatari selezionati:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Destinatari selezionati in «%1»:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "No" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Formato vCard" + +#~ msgid "No description available." +#~ msgstr "Nessuna descrizione disponibile." + +#~ msgid "Unable to open lock file." +#~ msgstr "Impossibile aprire file di blocco." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "La risorsa «%1» è bloccata dall'applicazione «%2»." + +#~ msgid "Error" +#~ msgstr "Errore" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Sblocco non riuscito. Il file di blocco è di proprietà di un altro " +#~ "processo: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "Blocco nullo: tutti i blocchi sono riusciti, ma non è stato effettuato " +#~ "nessun blocco." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "Blocco nullo: nessun blocco è riuscito." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Caricamento della risorsa «%1» non riuscito." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Salvataggio della risorsa «%1» non riuscito." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Impossibile aprire la risorsa «%1»" + +#~ msgid "Default Address Book" +#~ msgstr "Rubrica predefinita" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Impossibile salvare la risorsa «%1»: è bloccata." diff --git a/po/ja/kcontacts5.po b/po/ja/kcontacts5.po new file mode 100644 index 0000000..c44348f --- /dev/null +++ b/po/ja/kcontacts5.po @@ -0,0 +1,585 @@ +# Translation of kabc into Japanese. +# This file is distributed under the same license as the kdepimlibs package. +# Yukiko Bando , 2007, 2008, 2009, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2010-01-27 01:03+0900\n" +"Last-Translator: Yukiko Bando \n" +"Language-Team: Japanese \n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "私書箱" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "住所の詳細" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "番地" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "区市町村" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "都道府県" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "郵便番号" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "国" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "宛先ラベル" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "国内" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "国際" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "郵便" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "小包" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "自宅" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "勤務先" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "優先住所" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "その他" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "一意の識別子" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "名前" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "フォーマットされた名前" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "姓" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "名" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "付加的な名前" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "敬称 (前)" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "敬称 (後)" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "ニックネーム" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "誕生日" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "自宅住所 番地" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "自宅住所 私書箱" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "自宅住所 市" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "自宅住所 都道府県" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "自宅住所 郵便番号" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "自宅住所 国" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "自宅住所 ラベル" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "勤務先住所 番地" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "勤務先住所 私書箱" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "勤務先住所 市" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "勤務先住所 都道府県" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "勤務先住所 郵便番号" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "勤務先住所 国" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "勤務先住所 ラベル" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "自宅電話" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "勤務先電話" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "携帯電話" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "自宅のファクス" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "勤務先ファクス" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "車載電話" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "ポケットベル" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "メールアドレス" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "メールクライアント" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "タイムゾーン" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "地理的な位置" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "肩書" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "役割" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "組織" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "部署" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "備考" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "製品の識別子" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "改訂日付" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "ソート文字列" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "ホームページ" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "セキュリティクラス" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "ロゴ" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "写真" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "音声" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Mr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mrs." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "未知のフィールド" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "すべて" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "よく使う" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "住所" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "メール" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "個人的" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "カスタム" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "未定義" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X.509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "カスタム" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "未知のタイプ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "自宅" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "勤務先" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "メッセンジャー" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "優先電話番号" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "ボイスフォン" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "ファクス" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "携帯電話" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "ビデオフォン" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "メールボックス" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "モデム" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "自動車電話" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "その他" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "優先番号" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "勤務先のファクス" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "公開" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "プライベート" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "内密" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "未知のタイプ" diff --git a/po/kk/kcontacts5.po b/po/kk/kcontacts5.po new file mode 100644 index 0000000..fcd8944 --- /dev/null +++ b/po/kk/kcontacts5.po @@ -0,0 +1,741 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Sairan Kikkarin , 2011, 2013. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2013-04-19 06:20+0600\n" +"Last-Translator: Sairan Kikkarin \n" +"Language-Team: Kazakh \n" +"Language: kk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.2\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Абоненттік жәшік" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Кеңейтілген адресі" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Көше" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Елді мекен" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Өлке/Обылыс" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Пошта индексі" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Ел" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Жапсырма жарлық" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Ел ішіндегі" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Халықаралық" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Хаттарға арналған" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Дестелерге арналған" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Ұй" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Жұмыс" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Негізгі адресі" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Басқа" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Бірегей идентификаторы" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Аты-жөні" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Пішімделген атау" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Тегі" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Өз аты" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Әкесінің (қосымша) аты" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Қошеметтеу префиксі" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Қошеметтеу жұрнағы" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Бүркеншік аты" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Туған күні" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Үй адрес көшесі" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Үй адрес абоненттік жәшігі" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Үй адрес қаласы" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Үй адрес уәлаят/облысы" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Үй адрес пошта индексі" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Үй адрес Елі" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Үй адрес жапсырма жарлығы" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Жұмыс адрес көшесі" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Жұмыс адрес абоненттік жәшігі" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Жұмыс адрес қаласы" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Жұмыс адрес уәлаят/облысы" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Жұмыс адрес пошта индексі" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Жұмыс адрес Елі" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Жұмыс адрес жапсырма жарлығы" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Үй телефоны" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Жұмыс телефоны" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Қалта телефоны" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Үйдегі факсы" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Жұмыстағы факс" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Машинадағы телефоны" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr " " + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Пейджері" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Эл.пошта адресі" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Пошта клиенті" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Уақыт белдеуі" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Географиялық орны" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Атағы" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Қызметі" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Ұйымы" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Бөлімі" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Жазба" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Өнім идентификаторы" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Соңғы өзгертілген кезі" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Реттеу" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Мекен парағы" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Қауіпсіздік класы" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Логотипі" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Фотосуреті" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Дыбысы" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "д-р" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "мис." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "мистер" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "мадам" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "миссис" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "проф." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Беймәлім өріс" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Бүкілі" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Жиі қолданатын" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Адресі" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Эл.поштасы" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Дербес" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Өзге" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Анықталмаған" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Өзге" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Беймәлім түрі" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Ұй" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Жұмыс" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Хабарласу" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Негізгісі" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Дауыс" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Факс" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Қалтафон" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Бейнефон" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Дауыс поштасы" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Модем" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Машинадағы телефон" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS (GSM-1900)" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Басқа" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Негізгі тел. нөмірі" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Жұмыс факсы" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Ашық" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Жеке" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Сырлы" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Беймәлім түрі" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Негізгі адресі" + +#~ msgid "List of Emails" +#~ msgstr "Эл.пошта адрестер тізімі" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Сайран Киккарин" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "sairan@computer.org" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "'%1' дерек көздегісі жүктеуге келмейді" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Адресатты таңдау" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Аты-жөні" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Эл.поштасы" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Таңдағаны" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Таңдаудан шығару" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Тарату тізімдерін баптау" + +#~ msgid "Select Email Address" +#~ msgstr "Эл.пошта адресін таңдау" + +#~ msgid "Email Addresses" +#~ msgstr "Эл.пошта адрестері" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Иә" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Жоқ" + +#~ msgid "New List..." +#~ msgstr "Жаңа тізім..." + +#~ msgid "Rename List..." +#~ msgstr "Тізім атауын өзгерту..." + +#~ msgid "Remove List" +#~ msgstr "Тізімді өшіру" + +#~ msgid "Available addresses:" +#~ msgstr "Бар адрестері:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Негізгі эл.пошта адресі" + +#~ msgid "Add Entry" +#~ msgstr "Жазуды қосу" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Эл.пошта" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Қолданатыны" + +#~ msgid "Change Email..." +#~ msgstr "Эл.поштаны өзгерту..." + +#~ msgid "Remove Entry" +#~ msgstr "Жазуды өшіру" + +#~ msgid "New Distribution List" +#~ msgstr "Жаңа тарату тізімі" + +#~ msgid "Please enter &name:" +#~ msgstr "&Атауы:" + +#~ msgid "Distribution List" +#~ msgstr "Тарату тізімі" + +#~ msgid "Please change &name:" +#~ msgstr "Атауын өзгертіңіз:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "'%1' тарату тізімін өшірмексіз бе?" + +#~ msgid "Selected addressees:" +#~ msgstr "Таңдалған адрестері:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "'%1' дегенде таңдалғаны:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Жоқ" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "VCard пішімі" + +#~ msgid "No description available." +#~ msgstr "Сипаттамасы жоқ." + +#~ msgid "Unable to open lock file." +#~ msgstr "Бұғаттау файл ашылмады." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "'%1' деректер көзін '%2' бағдарламасы бұғаттаған." + +#~ msgid "Error" +#~ msgstr "Қате" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "Бұғаты шешу жаңылысы. Бұғат файлдың ие-процесі: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Бүкіл бұғаттаулар сәтті өтті, бірақ іс жүзінде ештеңе " +#~ "бұғатталған жоқ." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Бұкіл бұғаттаулар жаңылды." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "'%1' деген ресурс жүктелмеді." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "'%1' деген ресурс сақталмады." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "'%1' ресурсы ашылмады." + +#~ msgid "Default Address Book" +#~ msgstr "Әдетті адрестік кітапша" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "'%1' ресурсына сақталмады, себебі ол бұғатталған." diff --git a/po/km/kcontacts5.po b/po/km/kcontacts5.po new file mode 100644 index 0000000..6b70796 --- /dev/null +++ b/po/km/kcontacts5.po @@ -0,0 +1,745 @@ +# translation of kabc.po to Khmer +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Khoem Sokhem , 2008, 2009, 2010. +# Morn Met, 2009. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2010-01-25 15:44+0700\n" +"Last-Translator: Khoem Sokhem \n" +"Language-Team: Khmer \n" +"Language: km\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"\n" +"\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "ប្រអប់​សំបុត្រ" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "ព័ត៌មាន​អាសយដ្ឋាន​បន្ថែម" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "ផ្លូវ" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "មូលដ្ឋាន" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "តំបន់" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "កូដ​​ប្រៃសណីយ៍" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "ប្រទេស" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "ស្លាក​បញ្ចូន" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "ក្នុង​ប្រទេស" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "អន្តរជាតិ" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "ប្រៃសណីយ៍" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "កញ្ចប់" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "ផ្ទះ" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "ការងារ" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "អាសយដ្ឋាន​ដែល​ពេញចិត្ត" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "ផ្សេងៗ" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "ឧបករណ៍​កំណត់​អត្តសញ្ញាណ​តែ​មួយ​គត់" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "ឈ្មោះ" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "ឈ្មោះ​មានទ្រង់ទ្រាយ" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "នាម​ត្រកូល" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "នាម​ខ្លួន" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "ឈ្មោះ​បន្ថែម" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "បុព្វបទ​កិត្តិយស" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "បច្ច័យ​កិត្តិយស" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "សម្មតិនាម" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "ថ្ងៃ​កំណើត" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "ផ្លូវ​អាសយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "ប្រអប់​សំបុត្រ​នៃ​អាយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "ទីក្រុង​អាសយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "រដ្ឋ​អាសយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "កូដ​តំបន់​អាសយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "ប្រទេស​អាសយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "ស្លាក​អាសយដ្ឋាន​ផ្ទះ" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "ផ្លូវ​អាសយដ្ឋាន​ពាណិជ្ជកម្ម" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "ប្រអប់​សំបុត្រ​នៃ​អាសយដ្ឋាន​កន្លែង​ធ្វើការ" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "ទីក្រុង​អាសយដ្ឋាន​ពាណិជ្ជកម្ម" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "រដ្ឋ​អាសយដ្ឋាន​ពាណិជ្ជកម្ម" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "កូដ​តំបន់​អាសយដ្ឋាន​ពាណិជ្ជកម្ម" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "ប្រភេទ​អាសយដ្ឋាន​ពាណិជ្ជកម្ម" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "ស្លាក​អាសយដ្ឋាន​ពាណិជ្ជកម្ម" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "ទូរស័ព្ទ​ផ្ទះ" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "ទូរស័ព្ទ​ពាណិជ្ជកម្ម" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "ទូរស័ព្ទ​ចល័ត" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "ទូរសារ​នៅ​ផ្ទះ" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "ទូរសារ​ពាណិជ្ជកម្ម" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "ទូរស័ព្ទ​រថយន្ត" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "ភេកយ័រ" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "អាសយដ្ឋាន​អ៊ីមែល" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "កម្មវិធី​អ៊ីមែល" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "តំបន់​ពេលវេលា" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "ទីតាំង​ភូមិសាស្ត្រ" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "មុខងារ" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "តួនាទី" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "អង្គភាព" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "នាយកដ្ឋាន" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "ចំណាំ" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "ឧបករណ៍​កំណត់​អត្តសញ្ញាណ​ផលិតផល" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "កាលបរិច្ឆេទ​ពិនិត្យ​ឡើង​វិញ" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "តម្រៀប​ខ្សែអក្សរ" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "គេហទំព័រ" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "ថ្នាក់​សុវត្ថិភាព" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "រូបសញ្ញា" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "រូបថត" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "សំឡេង" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "វេជ្ជបណ្ឌិត" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "កញ្ញា" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "លោក" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "អ្នក​ស្រី" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "អ្នកនាង" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "សាស្ត្រាចារ្យ" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "មិនស្គាល់​វាល" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "ទាំងអស់" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "ញឹកញាប់" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "អាសយដ្ឋាន" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "អ៊ីមែល" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "ផ្ទាល់ខ្លួន" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "ផ្ទាល់ខ្លួន" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "មិន​បាន​កំណត់" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "ផ្ទាល់ខ្លួន" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "ប្រភេទ​មិន​ស្គាល់" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "ផ្ទះ" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "ការងារ" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "កម្មវិធី​ផ្ញើ​សំបុត្រ" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "បាន​ពេញចិត្ត" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "សំឡេង" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "ទូរសារ" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "ចល័ត" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "វីដេអូ" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "ប្រអប់​សំបុត្រ" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "ម៉ូដឹម" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "រថយន្ត" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "ផ្សេងៗ" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "លេខ​ពេញ​ចិត្ត" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "ទូរសារ​កន្លែង​ធ្វើការ" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "សាធារណៈ" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "ឯកជន" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "សម្ងាត់" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "ប្រភេទ​មិន​ស្គាល់" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "ពេញចិត្ត" + +#~ msgid "List of Emails" +#~ msgstr "បញ្ជី​អ៊ីមែល" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "ខឹម សុខែម, អេង វណ្ណៈ, អោក ពិសិដ្ឋ​​" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "" +#~ "khoemsokhem@khmeros.info,​​evannak@khmeros.info,piseth_dv@khmeros.info" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "មិន​អាច​ផ្ទុក​ធនធាន '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "ជ្រើស​អ្នក​ទទួ›​សំបុត្រ" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "ឈ្មោះ" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "អ៊ីមែល" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "បាន​ជ្រើស" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "ដោះ​ជ្រើស" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "កំណត់​រចនាសម្ព័ន្ធ​បញ្ជី​ចែកចាយ" + +#~ msgid "Select Email Address" +#~ msgstr "ជ្រើស​អាសយដ្ឋាន​អ៊ីមែល" + +#~ msgid "Email Addresses" +#~ msgstr "អាសយដ្ឋាន​អ៊ីមែល" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "បាទ/ចាស" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "ទេ" + +#~ msgid "New List..." +#~ msgstr "បញ្ជី​ថ្មី..." + +#~ msgid "Rename List..." +#~ msgstr "ប្ដូរ​ឈ្មោះ​បញ្ជី..." + +#~ msgid "Remove List" +#~ msgstr "យក​បញ្ជី​ចេញ" + +#~ msgid "Available addresses:" +#~ msgstr "អាសយដ្ឋាន​ដែល​មាន ៖" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "អ៊ីមែល​ដែល​ចូល​ចិត្ត" + +#~ msgid "Add Entry" +#~ msgstr "បន្ថែម​ធាតុបញ្ចូល" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "អ៊ីមែល" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "ការប្រើ​ដែល​ចូលចិត្ត" + +#~ msgid "Change Email..." +#~ msgstr "ផ្លាស់ប្ដូរ​អ៊ីមែល..." + +#~ msgid "Remove Entry" +#~ msgstr "យក​ធាតុ​ចេញ" + +#~ msgid "New Distribution List" +#~ msgstr "បញ្ជី​ចែកចាយ​ថ្មី" + +#~ msgid "Please enter &name:" +#~ msgstr "សូម​បញ្ចូល​ឈ្មោះ ៖" + +#~ msgid "Distribution List" +#~ msgstr "បញ្ជី​ចែកចាយ" + +#~ msgid "Please change &name:" +#~ msgstr "សូម​ផ្លាស់ប្ដូរ​ឈ្មោះ ៖" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "លុប​បញ្ជី​ចែកចាយ '%1' ?" + +#~ msgid "Selected addressees:" +#~ msgstr "អ្នក​ទទួល​សំបុត្រ​ដែល​បាន​ជ្រើស ៖" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "អាសយដ្ឋាន​ដែល​បាន​ជ្រើស​ក្នុង '%1' ៖" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "ទេ" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "ទ្រង់ទ្រាយ vCard" + +#~ msgid "No description available." +#~ msgstr "មិន​មាន​​ការ​ពិពណ៌នា ។" + +#~ msgid "Unable to open lock file." +#~ msgstr "មិន​អាច​បើក​ឯកសារ​ជាប់​សោ ។" + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "ធនធាន '%1' ត្រូវ​បាន​ចាក់សោ​ដោយ​កម្មវិធី '%2' ។" + +#~ msgid "Error" +#~ msgstr "កំហុស" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "បាន​បរាជ័យ​ក្នុង​ការដោះសោ ។ ឯកសារ​ជាប់សោ​ជា​កម្មសិទ្ធិ​របស់​ដំណើរការ​ផ្សេង ៖ %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull ៖ ការ​ចាក់សោ​​​ទាំងអស់​ជោគជ័យ ប៉ុន្តែ​គ្មាន​ការចាក់សោ​ពិតប្រាកដ​ត្រូវ​បាន​ធ្វើនោះ​ទេ ។" + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull ៖ ការចាក់សោ​ទាំងអស់​បាន​បរាជ័យ ។" + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "បានបរាជ័យ​ក្នុង​កា​រផ្ទុក '%1' ។" + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "បាន​បរាជ័យ​ក្នុង​កា​ររក្សាទុក​ធនធាន '%1' ។" + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "មិនអាច​បើក​ធនធាន '%1' បាន​ទេ ។" + +#~ msgid "Default Address Book" +#~ msgstr "សៀវភៅ​អាសយដ្ឋាន​លំនាំដើម" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "មិន​អាច​រក្សាទុក​ទៅ​កាន់​ធនធាន '%1' ។ វា​ជាប់​សោ ។" diff --git a/po/ko/kcontacts5.po b/po/ko/kcontacts5.po new file mode 100644 index 0000000..44da4e2 --- /dev/null +++ b/po/ko/kcontacts5.po @@ -0,0 +1,739 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# Shinjo Park , 2015, 2016. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-12-11 22:23+0100\n" +"Last-Translator: Shinjo Park \n" +"Language-Team: Korean \n" +"Language: ko\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "우편 사서함" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "확장 주소 정보" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "도로명" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "자치구" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "지역" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "우편 번호" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "국가" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "배달 정보" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "국내" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "국제" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "우편" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "소포" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "집" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "직장" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "선호 주소" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "기타" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "고유 식별자" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "이름" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "형식 있는 이름" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "성" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "성 제외 이름" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "추가 이름" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "존칭 접두사" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "존칭 접미사" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "별명" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "생일" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "집 주소 도로명" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "집 주소 사서함" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "집 주소 도시" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "집 주소 도/광역시" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "집 주소 우편 번호" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "집 주소 국가" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "집 주소 레이블" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "직장 주소 도로명" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "직장 주소 사서함" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "직장 주소 도시" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "직장 주소 도/광역시" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "직장 주소 우편 번호" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "직장 주소 국가" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "직장 주소 레이블" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "집 전화" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "직장 전화" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "휴대 전화" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "집 팩스" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "직장 팩스" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "카폰" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "호출기" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "이메일 주소" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "메일 클라이언트" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "시간대" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "지리적 위치" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "직위" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "직급" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "조직" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "부서" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "메모" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "제품 식별자" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "리비전 날짜" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "정렬 문자열" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "홈페이지" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "보안 등급" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "로고" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "사진" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "소리" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "박사" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "교수" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "1세" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "2세" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "3세" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "알 수 없는 필드" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "모두" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "자주" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "주소" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "이메일" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "개인" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "사용자 정의" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "정의되지 않음" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "사용자 정의" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "알 수 없는 형식" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "전화 번호" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "홈" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "직장" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "메신저" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "선호함" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "음성" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "팩스" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "휴대폰" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "동영상" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "사서함" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "모뎀" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "카폰" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "기타" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "선호하는 번호" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "직장 팩스" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "공공" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "개인" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "통제됨" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "알 수 없는 형식" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "선호함" + +#~ msgid "List of Emails" +#~ msgstr "이메일 목록" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Shinjo Park" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "kde@peremen.name" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "자원 '%1'을(를) 불러올 수 없음" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "주소 대상 선택" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "이름" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "이메일" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "선택됨" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "선택 해제" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "분배 목록 설정" + +#~ msgid "Select Email Address" +#~ msgstr "이메일 주소 선택" + +#~ msgid "Email Addresses" +#~ msgstr "이메일 주소" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "예" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "아니요" + +#~ msgid "New List..." +#~ msgstr "새 목록..." + +#~ msgid "Rename List..." +#~ msgstr "목록 이름 변경..." + +#~ msgid "Remove List" +#~ msgstr "목록 삭제" + +#~ msgid "Available addresses:" +#~ msgstr "사용 가능한 주소:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "선호하는 이메일" + +#~ msgid "Add Entry" +#~ msgstr "항목 추가" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "이메일" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "선호 사용" + +#~ msgid "Change Email..." +#~ msgstr "이메일 변경..." + +#~ msgid "Remove Entry" +#~ msgstr "항목 삭제" + +#~ msgid "New Distribution List" +#~ msgstr "새 분배 목록" + +#~ msgid "Please enter &name:" +#~ msgstr "이름 입력(&N):" + +#~ msgid "Distribution List" +#~ msgstr "분배 목록" + +#~ msgid "Please change &name:" +#~ msgstr "이름 변경(&N):" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "분배 목록 '%1'을(를) 삭제하시겠습니까?" + +#~ msgid "Selected addressees:" +#~ msgstr "주소 선택:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "'%1'의 주소 선택:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "아니요" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard 형식" + +#~ msgid "No description available." +#~ msgstr "설명 없음." + +#~ msgid "Unable to open lock file." +#~ msgstr "잠금 파일을 열 수 없습니다." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "자원 '%1'을(를) 프로그램 '%2'에서 잠갔습니다." + +#~ msgid "Error" +#~ msgstr "오류" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "잠금 실패. 다른 프로세스에서 잠금 파일을 소유하고 있습니다: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: 모든 잠금이 성공하였지만 실제로 잠기지 않았습니다." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: 모든 잠금이 실패하였습니다." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "자원 '%1'을(를) 불러올 수 없습니다." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "자원 '%1'을(를) 저장할 수 없습니다." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "자원 '%1'을(를) 열 수 없습니다." + +#~ msgid "Default Address Book" +#~ msgstr "기본 주소록" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "자원 '%1'을(를) 저장할 수 없습니다. 잠겼습니다." diff --git a/po/lt/kcontacts5.po b/po/lt/kcontacts5.po new file mode 100644 index 0000000..d7ba34b --- /dev/null +++ b/po/lt/kcontacts5.po @@ -0,0 +1,593 @@ +# translation of kabc.po to Lithuanian +# This file is distributed under the same license as the kabc package. +# Donatas Glodenis , 2007-2009. +# Tomas Straupis , 2011. +# Remigijus Jarmalavičius , 2011. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2011-09-25 12:30+0300\n" +"Last-Translator: Remigijus Jarmalavičius \n" +"Language-Team: Lithuanian \n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n%10>=2 && (n%100<10 || n" +"%100>=20) ? 1 : n%10==0 || (n%100>10 && n%100<20) ? 2 : 3);\n" +"X-Generator: Lokalize 1.2\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Pašto dėžutė" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Papildoma adreso informacija" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Gatvė" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Vietovė" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Regionas" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Pašto indeksas" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Šalis" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Pristatymo etiketė" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Šalies viduje" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Tarptautinis" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Pašto" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Siuntinys" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Namų" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Darbo" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Pageidautinas adresas" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Kita" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unikalus identifikatorius" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Vardas" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formatuotas vardas" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Pavardė" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Vardas" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Kiti vardai" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Garbės priešdėliai" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Garbės priesagos" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Slapyvardis" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Gimimo diena" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Namų adreso gatvė" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Namų adreso pašto dėžutė" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Namų adreso miestas" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Namų adreso valstija" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Namų adreso pašto kodas" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Namų adreso šalis" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Namų adreso etiketė" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Darbo adreso gatvė" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Darbo adreso pašto dėžutė" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Darbo adreso miestas" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Darbo adreso valstija" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Darbo adreso pašto kodas" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Darbo adreso šalis" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Darbo adreso etiketė" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Namų telefonas" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Verslo telefonas" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobilus telefonas" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Namų faksas" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Darbo faksas" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Automobilio telefonas" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pranešimų gaviklis" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "El. pašto adresas" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Pašto klientas" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Laiko zona" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografinė vieta" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Antraštė" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Vaidmuo" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizacija" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Skyrius" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Pastaba" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produkto identifikatorius" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Keitimo data" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Rikiavimo eilutė" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Namų puslapis" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Saugumo klasė" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Nuotrauka" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Garsas" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Panelė" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Ponas" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Ponia" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "P." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jaun." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Vyr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Nežinomas laukas" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Visi" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Dažnus" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresas" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "El. paštas" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Asmeninis" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Pasirinktas" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Neapibrėžtas" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Pasirinktas" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Nežinomas tipas" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Namų" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Darbo" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Pranešėjas" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Pagrindinis" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Balsas" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faksas" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobilus" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Pašto dėžutė" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modemas" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Automobilinis" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Kita" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Pageidautinas numeris" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Darbo faksas" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Vieša" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Asmeninė" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Konfidenciali" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Nežinomas tipas" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Pageidautinas" + +#~ msgid "List of Emails" +#~ msgstr "El. pašto sąrašas" diff --git a/po/lv/kcontacts5.po b/po/lv/kcontacts5.po new file mode 100644 index 0000000..9701149 --- /dev/null +++ b/po/lv/kcontacts5.po @@ -0,0 +1,745 @@ +# translation of kabc.po to Latvian +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Viesturs Zarins , 2007, 2008, 2010. +# Maris Nartiss , 2008. +# Viesturs Zariņš , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2010-01-01 14:26+0200\n" +"Last-Translator: Viesturs Zarins \n" +"Language-Team: Latvian \n" +"Language: lv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : " +"2);\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Pasta kastīte" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Paplašināta adreses informācija" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Iela" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Apvidus" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Reģions" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Pasta indekss" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Valsts" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Piegādes uzlīme" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Iekšzemes" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Starptautisks" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Pastam" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paciņām" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Mājas" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Darbs" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Vēlamā adrese" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Cita" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unikāls identifikators" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Vārds" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formatēts vārds" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Uzvārds" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Vārds" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Papildus vārdi" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Goda prefiksi" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Goda sufiksi" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Iesauka" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Dzimšanas diena" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Mājas adreses iela" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Mājas adreses pasta nodaļas kastīte" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Mājas adreses pilsēta" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Mājas adreses štats" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Mājas adreses pasta indekss" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Mājas adreses valsts" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Mājas adreses birka" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Darba adreses iela" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Darba adrese pasta nodaļas kastīte" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Darba adreses pilsēta" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Darba adreses štats" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Darba adreses pasta indekss" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Darba adreses valsts" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Darba adreses birka" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Mājas tālrunis" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Darba tālrunis" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobīlais tālrunis" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Mājas fakss" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Darba fakss" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Automašīnas tālrunis" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Peidžers" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-pasta adrese" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Pasta klients" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Laika zona" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Ģeogrāfiskais novietojums" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Amats" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Loma" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizācija" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departaments" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Piezīme" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produkta identifikators" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Revīzijas datums" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Kārtošanas virkne" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Mājaslapa" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Drošības klase" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Skaņa" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Kungs" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Kundze" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Misiz" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jun." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sers" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Nezināms lauks" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Visi" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Biežs" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adrese" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-pasts" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personīgs" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Pielāgots" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nenodefinēts" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Pielāgota" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Nezināma tipa" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Mājas" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Darbs" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Ziņojumprogramma" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Vēlamais" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Balss" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fakss" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobīlais" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Pastkastīte" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modēms" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Mašīna" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Cits" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Vēlamais numurs" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fakss darbā" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Publisks" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privāts" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Konfidenciāls" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Nezināms tips" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Vēlamais" + +#~ msgid "List of Emails" +#~ msgstr "E-pastu saraksts" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Viesturs Zarins" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "viesturs.zarins@mi.lu.lv" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Neizdevās ielādēt resursu '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Izvēlieties adresātu" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Vārds" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-pasts" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Izvēlēts" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Noņemt izvēli" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Konfigurēt adresātu sarakstus" + +#~ msgid "Select Email Address" +#~ msgstr "Izvēlēties epasta adresi" + +#~ msgid "Email Addresses" +#~ msgstr "Epasta adreses" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Jā" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nē" + +#~ msgid "New List..." +#~ msgstr "Jauns saraksts..." + +#~ msgid "Rename List..." +#~ msgstr "Pārdēvēt sarakstu..." + +#~ msgid "Remove List" +#~ msgstr "Izmest sarakstu" + +#~ msgid "Available addresses:" +#~ msgstr "Pieejamās adreses:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Vēlamais e-pasts" + +#~ msgid "Add Entry" +#~ msgstr "Pievienot vienību" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-pasts" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Izmantot vēlamo" + +#~ msgid "Change Email..." +#~ msgstr "Mainīt epastu..." + +#~ msgid "Remove Entry" +#~ msgstr "Izņemt ierakstu" + +#~ msgid "New Distribution List" +#~ msgstr "Jauns adresātu saraksts" + +#~ msgid "Please enter &name:" +#~ msgstr "Lūdzu ievadiet &nosaukumu:" + +#~ msgid "Distribution List" +#~ msgstr "Adresātu saraksts" + +#~ msgid "Please change &name:" +#~ msgstr "Lūdzu mainiet &nosaukumu:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Dzēst adresātu sarakstu '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Izvēlētās adreses:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Izvēlētās adreses no '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nē" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard formāts" + +#~ msgid "No description available." +#~ msgstr "Apraksts nav piejams." + +#~ msgid "Unable to open lock file." +#~ msgstr "Neizdevās atvērt slēgšanas failu." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Resursu '%1' jau ir slēgusi programma '%2'." + +#~ msgid "Error" +#~ msgstr "Kļūda" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "Neizdevās atslēgt. Slēgšanas fails pieder procesam: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Visas slēgšanas operācijas veiksmīgas, bet reāli neviena " +#~ "slēgšana nenotika." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Visas slēgšanas operācijas neveiksmīgas." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Resursa '%1' ielāde neveiksmīga." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Resursa '%1' saglabāšana neveiksmīga." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Neizdevās atvērt resursu '%1'." + +#~ msgid "Default Address Book" +#~ msgstr "Noklusētā adrešu grāmata" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Neizdevās saglabāt '%1', šis resurss ir slēgts." diff --git a/po/mr/kcontacts5.po b/po/mr/kcontacts5.po new file mode 100644 index 0000000..9c22f89 --- /dev/null +++ b/po/mr/kcontacts5.po @@ -0,0 +1,642 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Chetan Khona , 2013. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2013-03-07 18:21+0530\n" +"Last-Translator: Chetan Khona \n" +"Language-Team: Marathi \n" +"Language: mr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "विभाग" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "देश" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "" + +#: address.cpp:538 +#, fuzzy, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "मुख्य" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "इतर" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "नाव" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "वाढदिवस" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, fuzzy, kde-format +msgid "Home Phone" +msgstr "घरचा फोन (&M):" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "पेजर" + +#: addressee.cpp:961 +#, fuzzy, kde-format +msgid "Email Address" +msgstr "इमेल पत्ता :" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "मेल ग्राहक" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "वेळ क्षेत्र" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "शिर्षक" + +#: addressee.cpp:1123 +#, fuzzy, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "भूमीका :" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "संस्था" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "नोंद" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "मुख्यपान" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "" + +#: addressee.cpp:1340 +#, fuzzy, kde-format +msgid "Logo" +msgstr "प्रतिकचिन्ह (&L):" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "ध्वनी" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Mr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mrs." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "सर्व" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "पत्ता" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "इमेल" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "खाजगी" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "ऐच्छिक" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "व्याख्यारहित" + +#: key.cpp:214 +#, fuzzy, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "x" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "ऐच्छिक" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, fuzzy, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "मुख्य" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "पसंतीचे" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "" + +#: phonenumber.cpp:184 +#, fuzzy, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "मोबाईल" + +#: phonenumber.cpp:186 +#, fuzzy, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "दृश्य" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "मोडेम" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "इतर" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "सार्वजनिक" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "वैयक्तिक" + +#: secrecy.cpp:117 +#, fuzzy, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "गुप्त" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "पसंतीचे" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "चेतन खोना" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "chetan@kompkin.com" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "नाव" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "इमेल" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "निवडलेले" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "निवड काढून टाका" + +#, fuzzy +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "हो" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "नाही" + +#~ msgid "Add Entry" +#~ msgstr "नोंद जोडा" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "इमेल" + +#~ msgid "Remove Entry" +#~ msgstr "नोंद काढून टाका" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "नाही" + +#, fuzzy +#~ msgid "No description available." +#~ msgstr "वर्णन उपलब्ध नाही." + +#~ msgid "Error" +#~ msgstr "त्रुटी" diff --git a/po/nb/kcontacts5.po b/po/nb/kcontacts5.po new file mode 100644 index 0000000..228c5fe --- /dev/null +++ b/po/nb/kcontacts5.po @@ -0,0 +1,587 @@ +# Translation of kcontacts5 to Norwegian Bokmål +# +# Nils Kristian Tomren , 2007. +# Bjørn Steensrud , 2008, 2009. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2009-11-22 10:26+0100\n" +"Last-Translator: Bjørn Steensrud \n" +"Language-Team: Norwegian Bokmål \n" +"Language: nb\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postboks" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Utvidet adresseinformasjon" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Gate" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Sted" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Område" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postnummer" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Leveringsetikett" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Innenlands" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internasjonalt" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Post" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Pakke" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Hjem" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Arbeid" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Foretrukket adresse" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Andre" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Entydig identifikasjon" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Navn" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formattert navn" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Etternavn" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Fornavn" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Flere navn" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Høflige prefikser" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Høflige suffikser" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Kallenavn" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Fødselsdag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Hjemmeadresse,gate" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Hjemmeadresse, postboks" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Hjemmeadresse, by" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Hjemmeadresse, stat" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Hjemmeadresse, postnummer" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Hjemmeadresse, land" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Hjemmeadresse, merkelapp" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Firmaadresse, gate" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Firmaadresse, postboks" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Firmaadresse, by" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Firmaadresse, stat" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Firmaadresse, postnummer" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Firmaadresse, land" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Firmaadresse, merkelapp" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Hjemmetelefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon arbeid" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiltelefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Hjemmefaks" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Faks arbeid" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefon i bil" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Personsøker" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-postadresse" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "E-postklient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Tidssone" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografisk plassering" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Tittel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rolle" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisasjon" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Avdeling" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Merknad" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produkt-identifikator" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Revidert dato" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorteringsstreng" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Hjemmeside" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Sikkerhetsklasse" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Lyd" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Frøken" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Herr" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Fru" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Fr." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Ukjent felt" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Alle" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Ofte" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresse" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-post" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Privat" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Tilpasset" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Udefinert" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Tilpasset" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Ukjent type" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Hjem" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Arbeid" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Meldingstjeneste" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Foretrukket" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Stemme" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postkasse" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Bil" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Andre" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Foretrukket nummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Arbeidsfaks" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Offentlig" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Konfidensiell" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Ukjent type" diff --git a/po/nds/kcontacts5.po b/po/nds/kcontacts5.po new file mode 100644 index 0000000..c254e5d --- /dev/null +++ b/po/nds/kcontacts5.po @@ -0,0 +1,594 @@ +# Translation of kabc.po to Low Saxon +# translation of kabc.po to Low Saxon +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# Sönke Dibbern , 2007, 2008. +# Manfred Wiese , 2009, 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2010-01-25 07:37+0100\n" +"Last-Translator: Manfred Wiese \n" +"Language-Team: Low Saxon \n" +"Language: nds\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postfach" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Verwiedert Adressinformatschonen" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Straat" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Oort" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Regioon" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postleddtall" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Leveropbacker" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Binnenlannsch" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Butenlannsch" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postadress" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paketadress" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Tohuus" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Arbeit" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Vörtrocken Adress" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Annerswat" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Eenkennig Beteker" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Naam" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formateert Naam" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Familiennaam" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Vörnaam" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Naams bito" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Höflichkeits-Prefixen" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Höflichkeits-Suffixen" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Ökelnaam" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Geboortsdag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Straat (Tohuus)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Postfach (Tohuus)" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Stadt (Tohuus)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Bunnsland (Tohuus)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Postleddtall (Tohuus)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Land (Tohuus)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Adressopbacker (Tohuus)" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Straat (Arbeit)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Postfach (Arbeit)" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Stadt (Arbeit)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Land (Arbeit)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Postleddtall (Arbeit)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Land (Arbeit)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Adressopbacker (Arbeit)" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefoon (Tohuus)" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefoon (Arbeit)" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiltelefoon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax (Tohuus)" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax (Arbeit)" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Autotelefoon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Nettpostadress" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Nettpostprogramm" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Tietrebeet" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geograafsch Steed" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rull" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisatschoon" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Afdelen" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Notiz" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produktbeteker" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Revischoondatum" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorteer-Tekenkeed" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Tohuussiet" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Sekerheitklass" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Klang" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Fru" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Herr" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Fru" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Fru" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Perf." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jun." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sen." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Nich begäng Feld" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "All" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Faken" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adress" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Nettpost" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Persöönlich" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Anner" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nich fastleggt" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Anner" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Typ nich begäng" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Tohuus" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Arbeit" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Kortnarichten" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Vörtrocken" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Stimm" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobiltelefoon" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Antermaschien" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Auto" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Annerswat" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Vörtrocken Nummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax (Arbeit)" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Apen" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privaat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Vertrolich" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Typ nich begäng" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Vörtrocken" + +#~ msgid "List of Emails" +#~ msgstr "Nettbreven-List" diff --git a/po/nl/kcontacts5.po b/po/nl/kcontacts5.po new file mode 100644 index 0000000..a95e2a7 --- /dev/null +++ b/po/nl/kcontacts5.po @@ -0,0 +1,748 @@ +# translation of kabc.po to Nederlands +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Bram Schoenmakers , 2007. +# Antoon Tolboom , 2008. +# Kristof Bal , 2009. +# Freek de Kruijf , 2010, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-25 14:31+0100\n" +"Last-Translator: Freek de Kruijf \n" +"Language-Team: Dutch \n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postbus" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Uitgebreide adresinformatie" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Straat" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Plaats" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Regio" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postcode" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Bezorglabel" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Binnenlands" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internationaal" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postadres" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Perceel" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Thuis" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Werk" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Voorkeuradres" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Overige" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unieke identifier" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Naam" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Opgemaakte naam" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Achternaam" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Voornaam" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Extra namen" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Titel voorvoegsel" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Titel achtervoegsel" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Bijnaam" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Verjaardag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Straat privé" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Postbus van huisadres" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Plaats privé" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Provincie privé" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Postcode privé" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Land privé" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Label privé" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Straat zakelijk" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Postbus van zakelijke adres" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Plaats zakelijk" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Provincie zakelijk" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Postcode zakelijk" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Land zakelijk" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Label zakelijk" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefoon privé" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefoon zakelijk" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiele telefoon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax privé" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax zakelijk" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Autotelefoon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Semafoon" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-mailadres" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "E-mailprogramma" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Tijdzone" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografische positie" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Functie" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisatie" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Afdeling" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Notitie" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Product-identifier" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Revisiedatum" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorteertekst" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Webpagina" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Beveiligingsklasse" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Geluid" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Mej." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Men." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mevr." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Mevr." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Onbekend veld" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Alles" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Vaak" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adres" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mailadres" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Persoonlijk" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Aangepast" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Ongedefinieerd" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Aangepast" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Onbekend type" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefoonnummer" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Thuis" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Werk" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Messenger" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Voorkeur" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Stem" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobiel" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postbus" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Auto" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Overige" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Voorkeurnummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax zakelijk" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Publiek" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privé" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Vertrouwelijk" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Onbekend type" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Voorkeur" + +#~ msgid "List of Emails" +#~ msgstr "Lijst met e-mailberichten" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Bram Schoenmakers,Antoon Tolboom" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "bramschoenmakers@kde.nl,atolboo@casema.nl" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "De hulpbron '%1' kon niet worden geladen" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Geadresseerde selecteren" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Naam" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-mail" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Geselecteerd" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Deselecteren" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Distributielijsten instellen" + +#~ msgid "Select Email Address" +#~ msgstr "E-mailadressen selecteren" + +#~ msgid "Email Addresses" +#~ msgstr "E-mailadressen" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Ja" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nee" + +#~ msgid "New List..." +#~ msgstr "Nieuwe lijst..." + +#~ msgid "Rename List..." +#~ msgstr "Lijst hernoemen..." + +#~ msgid "Remove List" +#~ msgstr "Lijst verwijderen" + +#~ msgid "Available addresses:" +#~ msgstr "Beschikbare adressen:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Voorkeur e-mail" + +#~ msgid "Add Entry" +#~ msgstr "Item toevoegen" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-mail" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Voorkeur gebruiken" + +#~ msgid "Change Email..." +#~ msgstr "E-mail wijzigen..." + +#~ msgid "Remove Entry" +#~ msgstr "Ingang verwijderen" + +#~ msgid "New Distribution List" +#~ msgstr "Nieuwe distributielijst" + +#~ msgid "Please enter &name:" +#~ msgstr "Voer een &naam in:" + +#~ msgid "Distribution List" +#~ msgstr "Distributielijst" + +#~ msgid "Please change &name:" +#~ msgstr "Wijzig de &naam:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Distributielijst '%1' verwijderen?" + +#~ msgid "Selected addressees:" +#~ msgstr "Geselecteerde adressen:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Geselecteerde adressen in '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nee" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard-opmaak" + +#~ msgid "No description available." +#~ msgstr "Geen beschrijving beschikbaar." + +#~ msgid "Unable to open lock file." +#~ msgstr "Lock-bestand kon niet worden geopend." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "De hulpbron '%1' is vergrendeld door toepassing '%2'." + +#~ msgid "Error" +#~ msgstr "Fout" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Het ontgrendelen is niet gelukt. Het Lock-bestand is eigendom van een " +#~ "ander proces: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Alle vergrendelingen zijn gelukt, maar vonden niet werkelijk " +#~ "plaats." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Alle vergrendelingen mislukken." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Laden van hulpbron '%1' is mislukt." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Het opslaan van hulpbron '%1' is mislukt." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "De hulpbron '%1' kon niet worden geopend." + +#~ msgid "Default Address Book" +#~ msgstr "Standaard adresboek" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "" +#~ "Er kon niet worden opgeslagen naar hulpbron '%1'. Deze is vergrendeld." diff --git a/po/nn/kcontacts5.po b/po/nn/kcontacts5.po new file mode 100644 index 0000000..bb4a88c --- /dev/null +++ b/po/nn/kcontacts5.po @@ -0,0 +1,587 @@ +# Translation of kcontacts5 to Norwegian Nynorsk +# +# Eirik U. Birkeland , 2008, 2009. +# Karl Ove Hufthammer , 2008, 2010. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2010-03-15 20:25+0100\n" +"Last-Translator: Karl Ove Hufthammer \n" +"Language-Team: Norwegian Nynorsk \n" +"Language: nn\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postboks" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Utvida adresseinformasjon" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Adresse" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Stad" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Område" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postnummer" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Leveringsetikett" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Lokal" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internasjonal" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Post" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Pakke" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Heime" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Arbeid" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Føretrekt adresse" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Anna" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unik identifikator" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Namn" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formatert namn" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Etternamn" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Fornamn" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Andre namn" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Titlar før namnet" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Titlar etter namnet" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Kallenamn" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Fødselsdag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Adresse, heime" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Postboks, heime" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Poststad, heime" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Delstat/region, heime" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Postnummer, heime" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Land, heime" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Merkelapp, heime" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Adresse, firma" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Postboks, firma" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Poststad, firma" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Delstat/region, firma" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Postnummer, firma" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Land, firma" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Merkelapp, firma" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Heimetelefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Jobbtelefon" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiltelefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Heimefaks" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Firmafaks" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Biltelefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Personsøkjar" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-postadresse" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "E-postklient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Tidssone" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografisk plassering" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Tittel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rolle" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisasjon" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Avdeling" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Notat" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produktidentifikasjon" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Revisjonsdato" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorter streng" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Heimeside" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Tryggleiksklasse" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Lyd" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Frøken" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Herr" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Fru" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Fr." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Ukjent felt" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Alle" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Vanleg" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresse" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-post" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personleg" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Tilpassa" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Udefinert" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Tilpassa" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Ukjend type" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Heime" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Arbeid" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Meldingsteneste" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Føretrekt" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Stemme" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Postkasse" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Bil" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Anna" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Føretrekt nummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Faks, arbeid" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Offentleg" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Konfidensiell" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Ukjend type" diff --git a/po/pa/kcontacts5.po b/po/pa/kcontacts5.po new file mode 100644 index 0000000..55b9467 --- /dev/null +++ b/po/pa/kcontacts5.po @@ -0,0 +1,741 @@ +# translation of kabc.po to Punjabi +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# AP S Alam , 2007. +# A S Alam , 2007, 2009, 2010. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2010-02-01 08:16+0530\n" +"Last-Translator: A S Alam \n" +"Language-Team: ਪੰਜਾਬੀ \n" +"Language: pa\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "ਪੋਸਟ ਆਫਿਸ ਬਾਕਸ" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "ਹੋਰ ਸਿਰਨਾਵਾਂ ਜਾਣਕਾਰੀ" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "ਗਲੀ" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "ਟਿਕਾਣਾ" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "ਖੇਤਰ" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "ਪੋਸਟ ਕੋਡ" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "ਦੇਸ਼" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "ਪਚਾਉਣਯੋਗ ਲੇਬਲ" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "ਘਰੇਲੂ" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "ਅੰਤਰਰਾਸ਼ਟਰੀ" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "ਪੋਸਟ" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "ਪਾਰਸਲ" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "ਘਰ" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "ਕੰਮ" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "ਪਸੰਦੀਦਾ ਸਿਰਨਾਵਾਂ" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "ਹੋਰ" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "ਵਿਲੱਖਣ ਪਛਾਣਕਰਤਾ" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "ਨਾਂ" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "ਫਾਰਮੈਟ ਕੀਤਾ ਨਾਂ" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "ਪਰਵਾਰਿਕ ਨਾਂ" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "ਦਿੱਤਾ ਨਾਂ" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "ਹੋਰ ਨਾਂ" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "ਛੋਟਾ ਨਾਂ" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "ਜਨਮਦਿਨ" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "ਘਰ ਐਡਰੈੱਸ ਗਲੀ" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "ਘਰ ਐਡਰੈੱਸ ਪੋਸਟ ਆਫਿਸ ਬਾਕਸ" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "ਘਰ ਐਡਰੈੱਸ ਸ਼ਹਿਰ" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "ਘਰ ਐਡਰੈੱਸ ਸੂਬਾ" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "ਘਰ ਐਡਰੈੱਸ ਜ਼ਿਪਕੋਡ" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "ਘਰ ਐਡਰੈੱਸ ਦੇਸ਼" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "ਘਰ ਐਡਰੈੱਸ ਲੇਬਲ" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਗਲੀ" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਪੋਸਟ ਆਫਿਸ ਬਾਕਸ" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਸ਼ਹਿਰ" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਸੂਬਾ" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਜ਼ਿੱਪਕੋਡ" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਦੇਸ਼" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "ਵਪਾਰਕ ਐਡਰੈਸ ਲੇਬਲ" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "ਘਰ ਫੋਨ" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "ਵਪਾਰਕ ਫੋਨ" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "ਮੋਬਾਇਲ ਫੋਨ" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "ਫੈਕਸ ਘਰ" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "ਵਪਾਰਕ ਫੈਕਸ" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "ਕਾਰ ਫੋਨ" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "ਪੇਜ਼ਰ" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "ਈਮੇਲ ਐਡਰੈਸ" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "ਮੇਲ ਕਲਾਇਟ" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "ਟਾਈਮ ਜ਼ੋਨ" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "ਭੂਗੋਲਿਕ ਸਥਿਤੀ" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "ਟਾਈਟਲ" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "ਰੋਲ" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "ਸੰਗਠਨ" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "ਵਿਭਾਗ" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "ਨੋਟ" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "ਪਰੋਡੱਕਟ ਪਛਾਣਕਰਤਾ" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "ਰੀਵਿਜ਼ਨ ਮਿਤੀ" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "ਲੜੀਬੱਧ ਲਾਈਨ" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "ਮੁੱਖ ਪੇਜ਼" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "ਸੁਰੱਖਿਆ ਕਲਾਸ" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "ਲੋਗੋ" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "ਫੋਟੋ" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "ਸਾਊਂਡ" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "ਡਾ." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "ਕੁਮਾਰੀ" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "ਸ੍ਰੀਮਾਨ" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "ਸ੍ਰੀਮਤੀ" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "ਸ੍ਰੀਮਤੀ" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "ਪ੍ਰੋ:" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "ਜੂਨੀ" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "ਸੀਨੀ" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "ਅਣਜਾਣ ਖੇਤਰ" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "ਸਭ" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "ਅਕਸਰ" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "ਐਡਰੈੱਸ" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "ਈਮੇਲ" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "ਨਿੱਜੀ" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "ਕਸਟਮ" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "ਅਣ-ਪਰਭਾਸ਼ਿਤ" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "ਕਸਟਮ" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "ਅਣਜਾਣ ਕਿਸਮ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "ਘਰ" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "ਕੰਮ" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "ਮੈਸੰਜਰ" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "ਪਸੰਦੀਦਾ" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "ਅਵਾਜ਼" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "ਫੈਕਸ" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "ਮੋਬਾਇਲ" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "ਵੀਡਿਓ" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "ਪੱਤਰ-ਬਕਸਾ" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "ਮਾਡਮ" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "ਕਾਰ" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "ਹੋਰ" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "ਪਸੰਦੀਦਾ ਨੰਬਰ" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "ਫੈਕਸ ਕੰਮ" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "ਪਬਲਿਕ" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "ਪ੍ਰਾਈਵੇਟ" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "ਗੁਪਤ" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "ਅਣਜਾਣ ਕਿਸਮ" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "ਪਸੰਦੀਦਾ" + +#~ msgid "List of Emails" +#~ msgstr "ਈਮੇਲਾਂ ਦੀ ਲਿਸਟ" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "ਅਮਨਪਰੀਤ ਸਿੰਘ ਆਲਮ" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "aalam@users.sf.net" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "ਸਰੋਤ '%1' ਲੋਡ ਕਰਨ ਲਈ ਅਸਮਰੱਥ" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "ਐਡਰੈੱਸ ਚੁਣੋ" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "ਨਾਂ" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "ਈਮੇਲ" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "ਚੁਣੇ" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "ਅਣ-ਚੁਣੇ" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "ਵੰਡ ਲਿਸਟ ਸੰਰਚਨਾ" + +#~ msgid "Select Email Address" +#~ msgstr "ਈਮੇਲ ਸਿਰਨਾਵਾਂ ਚੁਣੋ" + +#~ msgid "Email Addresses" +#~ msgstr "ਈਮੇਲ ਸਿਰਨਾਵਾਂ" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "ਹਾਂ" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "ਨਹੀਂ" + +#~ msgid "New List..." +#~ msgstr "ਨਵੀਂ ਲਿਸਟ..." + +#~ msgid "Rename List..." +#~ msgstr "ਲਿਸਟ ਨਾਂ ਬਦਲੋ" + +#~ msgid "Remove List" +#~ msgstr "ਲਿਸਟ ਹਟਾਓ" + +#~ msgid "Available addresses:" +#~ msgstr "ਉਪਲੱਬਧ ਸਿਰਨਾਵੀਂ:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "ਪਸੰਦੀਦਾ ਈ-ਮੇਲ" + +#~ msgid "Add Entry" +#~ msgstr "ਇੰਦਰਾਜ਼ ਸ਼ਾਮਲ" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "ਈਮੇਲ" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "ਪਸੰਦੀਦਾ ਵਰਤੋਂ" + +#~ msgid "Change Email..." +#~ msgstr "ਈਮੇਲ ਬਦਲੋ" + +#~ msgid "Remove Entry" +#~ msgstr "ਇੰਦਰਾਜ਼ ਹਟਾਓ" + +#~ msgid "New Distribution List" +#~ msgstr "ਨਵੀਂ ਵੰਡ ਲਿਸਟ" + +#~ msgid "Please enter &name:" +#~ msgstr "ਨਾਂ ਦਿਓ ਜੀ(&n):" + +#~ msgid "Distribution List" +#~ msgstr "ਵੰਡ ਲਿਸਟ" + +#~ msgid "Please change &name:" +#~ msgstr "ਆਪਣਾ ਨਾਂ ਬਦਲੋ ਜੀ(&n):" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "ਕੀ ਵੰਡ ਲਿਸਟ '%1' ਹਟਾਉਣੀ ਹੈ?" + +#~ msgid "Selected addressees:" +#~ msgstr "ਚੁਣੇ ਸਿਰਨਾਵੀਂ:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "'%1' ਵਿੱਚ ਚੁਣੇ ਐਡਰੈੱਸ:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "ਨਹੀਂ" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard ਫਾਰਮੈਟ" + +#~ msgid "No description available." +#~ msgstr "ਕੋਈ ਵੇਰਵਾ ਨਹੀਂ ਹੈ।" + +#~ msgid "Unable to open lock file." +#~ msgstr "ਲਾਕ ਫਾਇਲ ਖੋਲ੍ਹਣ ਤੋਂ ਅਸਮਰੱਥ ਹੈ।" + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "ਕਾਰਜ '%2' ਨੇ ਸਰੋਤ '%1' ਤੇ ਲਾਕ ਲਗਾਇਆ ਹੈ।" + +#~ msgid "Error" +#~ msgstr "ਗਲਤੀ" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "ਅਣ-ਲਾਕ ਅਸਫਲ, ਲਾਕ ਫਾਇਲ਼ ਹੋਰ ਕਾਰਜ ਨੇ ਸੰਭਾਲ ਹੈ: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: ਸਾਰੇ ਲਾਕ ਸਫਲ ਰਹੇ ਹਨ, ਪਰ ਅਸਲ ਵਿੱਚ ਅਸਲੀ ਲਾਕਿੰਗ ਅਸਫਲ ਹੈ।" + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: ਸਾਰੇ ਲਾਕ ਅਸਫਲ।" + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "ਸਰੋਤ '%1' ਲੋਡ ਕਰਨ ਲਈ ਅਸਫ਼ਲ ਹੈ।" + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "ਸਰੋਤ '%1' ਸੰਭਾਲਣ ਲਈ ਫੇਲ੍ਹ ਹੈ।" + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "ਸਰੋਤ '%1' ਖੋਲ੍ਹਣ ਲਈ ਅਸਮਰੱਥ" + +#~ msgid "Default Address Book" +#~ msgstr "ਡਿਫਾਲਟ ਐਡਰੈਸ ਬੁੱਕ" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "ਸਰੋਤ '%1' ਸੰਭਾਲਣ ਲਈ ਅਸਮਰੱਥ। ਇਹ ਲਾਕ ਹੈ।" diff --git a/po/pl/kcontacts5.po b/po/pl/kcontacts5.po new file mode 100644 index 0000000..3bda7f1 --- /dev/null +++ b/po/pl/kcontacts5.po @@ -0,0 +1,592 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Łukasz Wojniłowicz , 2014, 2015, 2016. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-12-04 10:12+0100\n" +"Last-Translator: Łukasz Wojniłowicz \n" +"Language-Team: Polish \n" +"Language: pl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " +"|| n%100>=20) ? 1 : 2);\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Skrytka pocztowa" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Rozszerzone informacje adresowe" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Ulica" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Miejscowość" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Region" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Kod pocztowy" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Kraj" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etykieta dostarczania" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Krajowy" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Międzynarodowy" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Poczta" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Parcela" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Dom" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Praca" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Domyślny adres" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Inny" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Niepowtarzalny identyfikator" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nazwa" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Sformatowana nazwa" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Nazwisko" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Imię" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Dodatkowe imiona" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Tytuły (przedrostki)" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Tytuły (przyrostki)" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Pseudonim" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Urodziny" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Adres (ulica)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Skrytka pocztowa adresu domowego" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Adres (miasto)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Adres (województwo, prowincja, stan)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Adres (kod pocztowy)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Adres (kraj)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Etykieta adresowa" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Adres do pracy (ulica)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Skrytka pocztowa adresu w pracy" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Adres do pracy (miasto)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Adres do pracy (województwo, prowincja, stan)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Adres do pracy (kod pocztowy)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Adres do pracy (kraj)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Etykieta adresowa do pracy" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefon domowy" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon do pracy" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telefon komórkowy" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Domowy fax" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax w pracy" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefon w samochodzie" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Adres e-mail" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Program pocztowy" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Strefa czasowa" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Położenie geograficzne" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Tytuł" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rola" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizacja" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Dział" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Notatka" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identyfikator produktu" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data wydania" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Ciąg sortujący" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Strona domowa" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Klasa bezpieczeństwa" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Zdjęcie" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Dźwięk" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Panna" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Pan" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Pani" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Pani" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Junior" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Senior" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Nieznany rodzaj pola" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Wszystkie" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Częsty" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adres" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Osobiste" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Własny" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nieokreślony" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Własny" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Nieznany rodzaj" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Numer telefonu" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Dom" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Praca" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Komunikator" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferowane" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Głosowy" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Telefon komórkowy" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Wideo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Skrzynka pocztowa" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Samochód" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Inny" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Numer preferowany" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Faks w pracy" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Publiczny" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Prywatny" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Poufny" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Nieznany rodzaj" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferowany" + +#~ msgid "List of Emails" +#~ msgstr "Lista adresów e-mail" diff --git a/po/pt/kcontacts5.po b/po/pt/kcontacts5.po new file mode 100644 index 0000000..2356797 --- /dev/null +++ b/po/pt/kcontacts5.po @@ -0,0 +1,584 @@ +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-25 12:52+0000\n" +"Last-Translator: José Nuno Coelho Pires \n" +"Language-Team: pt \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-POFile-SpellExtra: Mails Pager LockNull Jr PCS\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Caixa de Correio" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informação Estendida do Endereço" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Rua" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localidade" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Região" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Código Postal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "País" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Legenda de Entrega" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Doméstico" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internacional" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Parcela" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Residência" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Emprego" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Endereço Preferido" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Outro" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificador Único" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nome" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nome Formatado" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Apelido" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Nome Próprio" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Nomes Adicionais" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixos Honoríficos" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufixos Honoríficos" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Alcunha" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Data de Nascimento" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Endereço da Residência" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Caixa de Correio da Residência" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Cidade do Endereço da Residência" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Província do Endereço da Residência" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Código Postal do Endereço da Residência" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "País do Endereço da Residência" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Legenda do Endereço da Residência" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Rua do Endereço de Trabalho" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Caixa de Correio do Endereço de Trabalho" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Cidade do Endereço de Trabalho" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Província do Endereço de Trabalho" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Código Postal do Endereço de Trabalho" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "País do Endereço de Trabalho" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Legenda do Endereço de Trabalho" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefone da Residência" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefone do Trabalho" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telemóvel" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax de Casa" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax do Trabalho" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefone do Carro" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "RDIS" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "'Pager'" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Endereço de E-mail" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Cliente de E-mail" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Fuso-Horário" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posição Geográfica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Título" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Papel" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organização" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departamento" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Nota" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificador do Produto" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data de Revisão" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Texto de Ordenação" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Página Web" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe de Segurança" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logótipo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotografia" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Som" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Menina" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Srª." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Srª." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Campo Desconhecido" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Tudo" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frequente" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Endereço" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Pessoal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalizado" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Indefinido" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalizada" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipo desconhecido" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Número de telefone" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Residência" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Emprego" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Mensageiro" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferido" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voz" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Telemóvel" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vídeo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Caixa do correio" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "vCard" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Outro" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Número Preferido" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax do Emprego" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Público" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privado" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidencial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipo desconhecido" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferido" diff --git a/po/pt_BR/kcontacts5.po b/po/pt_BR/kcontacts5.po new file mode 100644 index 0000000..d10860e --- /dev/null +++ b/po/pt_BR/kcontacts5.po @@ -0,0 +1,590 @@ +# Translation of kcontacts5.po to Brazilian Portuguese +# Copyright (C) 2014-2015 This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# André Marcelo Alvarenga , 2014, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kcontacts5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-25 09:21-0200\n" +"Last-Translator: André Marcelo Alvarenga \n" +"Language-Team: Brazilian Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Caixa Postal" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informação estendida do endereço" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Rua" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localidade" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Região" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "CEP" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "País" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etiqueta de entrega" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Nacional" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internacional" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Postal" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Encomenda" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Residencial" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Comercial" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Endereço preferido" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Outro" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificador único" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nome" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nome formatado" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Sobrenome" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Primeiro nome" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Nomes adicionais" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixos honoríficos" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufixos honoríficos" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Nome de exibição" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Aniversário" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Endereço residencial" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Caixa de correio do endereço residencial" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Cidade do endereço residencial" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Estado do endereço residencial" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "CEP do endereço residencial" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "País do endereço residencial" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Legenda do endereço residencial" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Endereço comercial" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Caixa de correio do endereço comercial" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Cidade do endereço comercial" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Estado do endereço comercial" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "CEP do endereço comercial" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "País do endereço comercial" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Legenda do endereço comercial" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefone residencial" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefone comercial" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telefone celular" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax residencial" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax comercial" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefone do carro" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +# Dispositivo eletrônico "Bip". (Alvarenga) +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Endereço de e-mail" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Cliente de e-mail" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Fuso horário" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Posição geográfica" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Título" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Função" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Empresa" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departamento" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Observação" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificador do produto" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Data de revisão" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "String de ordenação" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Página Web" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Classe de segurança" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotipo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Som" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr(a)." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Srta." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Sr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Srª." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Srª." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof(a)." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Campo desconhecido" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Todos" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frequente" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Endereço" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Pessoal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalizado" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Não definido" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalizada" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tipo desconhecido" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Número do telefone" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Residencial" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Comercial" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Mensageiro" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferido" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voz" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Celular" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Vídeo" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Caixa de e-mail" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Carro" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Outro" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Número preferido" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax comercial" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Público" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privado" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidencial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tipo desconhecido" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferido" diff --git a/po/ro/kcontacts5.po b/po/ro/kcontacts5.po new file mode 100644 index 0000000..c0493a6 --- /dev/null +++ b/po/ro/kcontacts5.po @@ -0,0 +1,746 @@ +# translation of kabc to Romanian +# Copyright (C) 2008 This_file_is_part_of_KDE +# This file is distributed under the same license as the kabc package. +# +# Laurenţiu Buzdugan , 2008". +# Sergiu Bivol , 2008, 2009, 2013. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2013-05-25 09:10+0300\n" +"Last-Translator: Sergiu Bivol \n" +"Language-Team: Romanian \n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Căsuță poștală" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Informații adresă extinse" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Strada" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Localitate" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Regiune" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Cod poștal" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Țară" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Etichetă livrare" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domiciliu" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internațională" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Poștală" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Acasă" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Serviciu" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Adresa preferată" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Alta" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Identificator unic" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Nume" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Nume formatat" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Nume de familie" + +#: addressee.cpp:695 +#, fuzzy, kde-format +msgid "Given Name" +msgstr "Nume dat" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Nume suplimentare" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Prefixe onorifice" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Sufixe onorifice" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Poreclă" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Zi de naștere" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "" + +#: addressee.cpp:856 +#, fuzzy, kde-format +#| msgid "Post Office Box" +msgid "Home Address Post Office Box" +msgstr "Căsuță poștală" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "" + +#: addressee.cpp:891 +#, fuzzy, kde-format +#| msgid "Post Office Box" +msgid "Business Address Post Office Box" +msgstr "Căsuță poștală" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefon la domiciliu" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon de afaceri" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Telefon mobil" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax acasă" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefon în mașină" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Adresă de e-mail" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Program de poștă electronică" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Fus orar" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Poziție geografică" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titlu" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Rol" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizație" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Departament" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Notă" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identificator produs" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Dată revizie" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sortează șirul" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Pagină WEB" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Clasă de securitate" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotografie" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Sunet" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Domnișoara" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Dl." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "D-na." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "D-șoara." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Câmp necunoscut" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Toate" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Frecvent" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresă" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Email" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personal" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Personalizat" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nedefinit" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Personalizat" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Tip necunoscut" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Acasă" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Serviciu" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Mesager" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Preferat" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Voce" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Cutie poștală" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Mașină" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Alta" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Număr preferat" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax serviciu" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Public" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Confidențial" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Tip necunoscut" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferată" + +#~ msgid "List of Emails" +#~ msgstr "Lista adreselor" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Sergiu Bivol" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "sergiu@ase.md" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Imposibil de încărcat resursa „%1”" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Alege destinatar" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Nume" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Email" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Selectat" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Deselectează" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Configurează liste de disctribuție" + +#~ msgid "Select Email Address" +#~ msgstr "Alege adresa de email" + +#~ msgid "Email Addresses" +#~ msgstr "Adrese e-mail" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Da" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nu" + +#~ msgid "New List..." +#~ msgstr "Listă nouă..." + +#~ msgid "Rename List..." +#~ msgstr "Redenumire listă..." + +#~ msgid "Remove List" +#~ msgstr "Elimină lista" + +#~ msgid "Available addresses:" +#~ msgstr "Adrese disponibile:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Email preferat" + +#~ msgid "Add Entry" +#~ msgstr "Adaugă înregistrare" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Email" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Utilizează preferat" + +#~ msgid "Change Email..." +#~ msgstr "Schimbare email..." + +#~ msgid "Remove Entry" +#~ msgstr "Elimină înregistrarea" + +#~ msgid "New Distribution List" +#~ msgstr "Listă de distribuție nouă" + +#~ msgid "Please enter &name:" +#~ msgstr "Introduceți de&numirea:" + +#~ msgid "Distribution List" +#~ msgstr "Listă de distribuție" + +#~ msgid "Please change &name:" +#~ msgstr "Schimbați de&numirea:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Ștergeți lista de distribuție „%1”?" + +#~ msgid "Selected addressees:" +#~ msgstr "Destinatari aleși:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nu" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Format vCard" + +#~ msgid "No description available." +#~ msgstr "Nicio descriere disponibilă." + +#~ msgid "Unable to open lock file." +#~ msgstr "Imposibil de deschis fișierul de blocare." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Resursa „%1” este blocată de aplicația „%2”." + +#~ msgid "Error" +#~ msgstr "Eroare" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Deblocarea a eșuat. Fișierul de blocare este deținut de alt proces: %1 " +#~ "(%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Toate blocările reușesc dar nu are loc blocarea propriu-zisă." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Toate blocările eșuează." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Încărcarea resursei „%1” a eșuat." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Salvarea resursei „%1” a eșuat." + +#, fuzzy +#~| msgid "Unable to load resource '%1'" +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Imposibil de încărcat resursa „%1”" + +#~ msgid "Default Address Book" +#~ msgstr "Carte de adrese implicită" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Imposibil de salvat în resursa „%1”. Este blocată." diff --git a/po/ru/kcontacts5.po b/po/ru/kcontacts5.po new file mode 100644 index 0000000..be4d2d4 --- /dev/null +++ b/po/ru/kcontacts5.po @@ -0,0 +1,750 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Чуплыгин Сергей , 2007. +# Nick Shaforostoff , 2007, 2008. +# Andrey Cherepanov , 2009. +# Alexander Potashev , 2010, 2011, 2016. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-01-10 02:27+0300\n" +"Last-Translator: Alexander Potashev \n" +"Language-Team: Russian \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Environment: kde\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Абонентский ящик" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Расширенная информация об адресе" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Улица" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Населённый пункт" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Область" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Почтовый индекс" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Страна" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Наклейка на конверт" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Внутренний" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Международный" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Почтовый" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Для посылок" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Домашний адрес" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Служебный адрес" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Основной адрес" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Другой адрес" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Уникальный идентификатор" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Имя" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Полное имя" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Фамилия" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Имя" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Дополнительные имена" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Почтительное обращение (в начале)" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Почтительное обращение (в конце)" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Ник" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "День рождения" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Домашний адрес: улица" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Домашний адрес: а/я" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Домашний адрес: город" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Домашний адрес: область/край" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Домашний адрес: индекс" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Домашний адрес: страна" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Домашний адрес: наклейка" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Служебный адрес: улица" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Служебный адрес: а/я" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Служебный адрес: город" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Служебный адрес: область/край" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Служебный адрес: индекс" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Служебный адрес: страна" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Служебный адрес: наклейка" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Домашний телефон" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Служебный телефон" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Мобильный телефон" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Домашний факс" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Служебный факс" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Телефон в автомобиле" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Пейджер" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Адрес электронной почты" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Почтовый клиент" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Часовой пояс" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Географическое местоположение" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Обращение" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Должность" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Организация" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Отдел" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Заметка" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Идентификатор продукта" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Дата изменения" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Сортировка" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Веб-сайт" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Класс безопасности" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Логотип" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Фотография" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Звуковой файл" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Д-р" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Г-жа" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Г-н" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Г-жа" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Г-жа" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Проф." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "мл." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "ст." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Неизвестное поле" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Все" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Часто используемые" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Адрес" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Адрес электронной почты" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Персональный" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Другой" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Не определён" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Другой" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Неизвестный тип" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Номер телефона" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Домашний телефон" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Служебный телефон" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Мгновенные сообщения" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Основной телефон" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Обычный" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Факс" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Мобильный" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Видеофон" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Голосовая почта" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Модем" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Телефон в автомобиле" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Другой тип" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Основной номер" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Служебный факс" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Доступен всем" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Приватный доступ" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Конфиденциальный доступ" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Неизвестный доступ" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Основной адрес" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Чуплыгин Сергей, Николай Шафоростов" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "chapay_s@list.ru, shaforostoff@kde.ru" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Невозможно открыть источник «%1»" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Выбор адресата" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Имя" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "Адрес электронной почты" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Выбрано" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Отменить выбор" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Настройка списков рассылки" + +#~ msgid "Select Email Address" +#~ msgstr "Выбор адресов электронной почты" + +#~ msgid "Email Addresses" +#~ msgstr "Адреса электронной почты" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Да" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Нет" + +#~ msgid "New List..." +#~ msgstr "Новый список..." + +#~ msgid "Rename List..." +#~ msgstr "Переименовать список..." + +#~ msgid "Remove List" +#~ msgstr "Удалить список..." + +#~ msgid "Available addresses:" +#~ msgstr "Доступные адреса:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Основной адрес" + +#~ msgid "Add Entry" +#~ msgstr "Добавить адрес" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "Адрес электронной почты" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Использовать основной" + +#~ msgid "Change Email..." +#~ msgstr "Изменить адрес..." + +#~ msgid "Remove Entry" +#~ msgstr "Удалить адрес" + +#~ msgid "New Distribution List" +#~ msgstr "Новый список рассылки" + +#~ msgid "Please enter &name:" +#~ msgstr "Введите &имя:" + +#~ msgid "Distribution List" +#~ msgstr "Список рассылки" + +#~ msgid "Please change &name:" +#~ msgstr "Измените &имя:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Удалить список рассылки «%1»?" + +#~ msgid "Selected addressees:" +#~ msgstr "Выбранные адреса:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Выбранные адреса в «%1»:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Не основной" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Формат vCard" + +#~ msgid "No description available." +#~ msgstr "Описание отсутствует." + +#~ msgid "Unable to open lock file." +#~ msgstr "Невозможно открыть файл блокировки." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Источник «%1» заблокирован приложением «%2»." + +#~ msgid "Error" +#~ msgstr "Ошибка" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Ошибка разблокирования. Файл блокировки принадлежит другому процессу: %1 " +#~ "(%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: все операции блокировки выполнены успешно, но никаких " +#~ "блокировок не установлено." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: блокировки не выполнены." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Невозможно открыть источник «%1»." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Невозможно сохранить в источнике «%1»." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Не удалось открыть источник «%1»." + +#~ msgid "Default Address Book" +#~ msgstr "Адресная книга по умолчанию" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Невозможно сохранить в источнике «%1»: источник заблокирован." + +#~ msgid "List of Emails" +#~ msgstr "Список адресов" diff --git a/po/sk/kcontacts5.po b/po/sk/kcontacts5.po new file mode 100644 index 0000000..2f5e897 --- /dev/null +++ b/po/sk/kcontacts5.po @@ -0,0 +1,589 @@ +# translation of kabc5.po to Slovak +# Roman Paholík , 2014, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kabc5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-26 14:17+0100\n" +"Last-Translator: Roman Paholik \n" +"Language-Team: Slovak \n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Poštová schránka" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Rozšírené adresové informácie" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Ulica" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Lokalita" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Región" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "PSČ" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Krajina" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Návestie doručenia" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Domáci" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Medzinárodný" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Poštový" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Balík" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Doma" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Práca" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Preferovaná adresa" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Ostatné" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Jedinečný identifikátor" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Názov" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formátované meno" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Priezvisko" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Krstné meno" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Ďalšie mená" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Titul pred menom" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Titul za menom" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Prezývka" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Narodeniny" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Adresa domov - ulica" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Poštová schránka domácej adresy" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Adresa domov - mesto" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Adresa domov - štát" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Adresa domov - PSČ" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Adresa domov - krajina" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Návestie adresy domov" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Adresa - ulica" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Poštová schránka pracovnej adresy" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Adresa do zamestnania - mesto" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Adresa do zamestnania - štát" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Adresa do zamestnania - PSČ" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Adresa do zamestnania - krajina" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Návestie adresy do zamestnania" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Telefón domov" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefón do práce" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobilný telefón" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Fax domov" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Fax do práce" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Telefón v aute" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pager" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-mailová adresa" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Poštový klient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Časové pásmo" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografická pozícia" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titul" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Funkcia" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizácia" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Oddelenie" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Poznámka" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Identifikátor produktu" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Dátum revízie" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Zoradiť reťazec" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Domovská stránka" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Trieda bezpečnosti" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotka" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Zvuk" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Slečna" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Pán" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Pani" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Slečna" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Neznáme pole" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Všetko" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Častý" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adresa" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-mail" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Osobné" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Vlastné" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nedefinované" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Vlastné" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Neznámy typ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefóne číslo" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Domov" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Práca" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Doručovateľ" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Uprednostňovaný" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Hlas" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Mailbox" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Auto" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Ostatné" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Uprednostňované číslo" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Fax do práce" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Verejný" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Súkromný" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Dôverné" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Neznámy typ" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Preferovaný" + +#~ msgid "List of Emails" +#~ msgstr "Zoznam emailov" diff --git a/po/sl/kcontacts5.po b/po/sl/kcontacts5.po new file mode 100644 index 0000000..29b85ba --- /dev/null +++ b/po/sl/kcontacts5.po @@ -0,0 +1,746 @@ +# translation of kabc.po to Slovenian +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Andrej Vernekar , 2007, 2008, 2010. +# Jure Repinc , 2009, 2012. +# Andrej Mernik , 2014, 2016. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2016-01-03 14:55+0100\n" +"Last-Translator: Andrej Mernik \n" +"Language-Team: Slovenian \n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.5\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n" +"%100==4 ? 3 : 0);\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Poštni predal" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Razširjeni podatki o naslovu" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Ulica" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Krajevnost" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Območje" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Poštna številka" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Država" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Oznaka za dostavo" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Notranji" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Mednarodni" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Poštni" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Parcelni" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Domači" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Službeni" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Prednostni naslov" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Drugi" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Edinstven določilnik" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Ime" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Oblikovano ime" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Priimek" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Dano ime" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Dodatna imena" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Častne predpone" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Častne pripone" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Vzdevek" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Rojstni dan" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Ulica domačega naslova" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Poštni predal domačega naslova" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Mesto domačega naslova" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Zvezna država domačega naslova" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Poštna številka domačega naslova" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Država domačega naslova" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Oznaka domačega naslova" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Ulica poslovnega naslova" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Poštni predal poslovnega naslova" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Mesto poslovnega naslova" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Zvezna država poslovnega naslova" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Poštna številka poslovnega naslova" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Država poslovnega naslova" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Oznaka poslovnega naslova" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Domači telefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Poslovni telefon" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Prenosni telefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Domači faks" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Poslovni faks" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Avtomobilski telefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Pozivnik" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-poštni naslov" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Poštni odjemalec" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Časovni pas" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografski položaj" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Naziv" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Vloga" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organizacija" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Oddelek" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Opomba" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Določilnik izdelka" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Datum predelave" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Niz za razvrščanje" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Domača stran" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Varnostni razred" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotip" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotografija" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Zvok" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Gdč." + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "G." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Ga." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ga./Gdč." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "ml." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "st." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Neznano polje" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Vse" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Pogosto" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Naslov" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-pošta" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Osebno" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Po meri" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Nedoločeno" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Po meri" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Neznana vrsta" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefonska številka" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Domač" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Službeni" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Sporočilnik" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Prednostni" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Glasovna pošta" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Prenosni" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Poštni predal" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Avtomobilski" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Drugo" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Prednostna številka" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Službeni faks" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Javen" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Zaseben" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Zaupen" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Neznana vrsta" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Prednostni" + +#~ msgid "List of Emails" +#~ msgstr "Seznam e-pošt" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Jure Repinc,Andrej Vernekar,Gregor Rakar" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "jlp@holodeck1.com,andrej.vernekar@gmail.com,gregor.rakar@kiss.si" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Ni moč naložiti vira »%1«" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Izberite naslovnika" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Ime" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-pošta" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Izbrano" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Odizberi" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Nastavi sezname za razpošiljanje" + +#~ msgid "Select Email Address" +#~ msgstr "Izberite e-poštni naslov" + +#~ msgid "Email Addresses" +#~ msgstr "E-poštni naslovi" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Da" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Ne" + +#~ msgid "New List..." +#~ msgstr "Nov seznam ..." + +#~ msgid "Rename List..." +#~ msgstr "Preimenuj seznam ..." + +#~ msgid "Remove List" +#~ msgstr "Odstrani seznam" + +#~ msgid "Available addresses:" +#~ msgstr "Razpoložljivi naslovi:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Prednostna e-pošta" + +#~ msgid "Add Entry" +#~ msgstr "Dodaj vnos" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-pošta" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Uporabi prednostno" + +#~ msgid "Change Email..." +#~ msgstr "Spremeni e-pošto ..." + +#~ msgid "Remove Entry" +#~ msgstr "Odstrani vnos" + +#~ msgid "New Distribution List" +#~ msgstr "Nov seznam za razpošiljanje" + +#~ msgid "Please enter &name:" +#~ msgstr "V&nesite ime:" + +#~ msgid "Distribution List" +#~ msgstr "Seznam za razpošiljanje" + +#~ msgid "Please change &name:" +#~ msgstr "Spreme&nite ime:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Ali izbrišem seznam za razpošiljanje »%1«?" + +#~ msgid "Selected addressees:" +#~ msgstr "Izbrani naslovniki:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Izbrani naslovi v »%1«:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Ne" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "Oblika vCard" + +#~ msgid "No description available." +#~ msgstr "Opis ni na voljo." + +#~ msgid "Unable to open lock file." +#~ msgstr "Ni moč odpreti zaklepne datoteke." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Program »%2« je zaklenil vir »%1«." + +#~ msgid "Error" +#~ msgstr "Napaka" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Odklepanje ni uspelo. Zaklepno datoteko si lasti drug proces: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "" +#~ "LockNull: Vsa zaklepanja so uspela, vendar noben dejansko ni bil " +#~ "opravljen." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Vsa zaklepanja odpovedo." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Nalaganje vira »%1« ni uspelo." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Shranjevanje vira »%1« ni uspelo." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Ni moč odpreti vira »%1«" + +#~ msgid "Default Address Book" +#~ msgstr "Privzeti imenik" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Ni moč shraniti v vir »%1«, je zaklenjen." diff --git a/po/sr/kcontacts5.po b/po/sr/kcontacts5.po new file mode 100644 index 0000000..d29de90 --- /dev/null +++ b/po/sr/kcontacts5.po @@ -0,0 +1,606 @@ +# Translation of kcontacts5.po into Serbian. +# Chusslove Illich , 2007, 2009, 2015, 2017. +# Dalibor Djuric , 2009. +msgid "" +msgstr "" +"Project-Id-Version: kcontacts5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-26 22:15+0100\n" +"Last-Translator: Chusslove Illich \n" +"Language-Team: Serbian \n" +"Language: sr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Accelerator-Marker: &\n" +"X-Text-Markup: kde4\n" +"X-Environment: kde\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Поштански фах" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Додатни адресни подаци" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Улица" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Локалитет" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Регија" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Поштански број" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Држава" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Етикета испоруке" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Домаћа" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Међународна" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Поштанска" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Пакетна" + +# >> @label Address type +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Кућна" + +# >> @label Address type +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Пословна" + +# >> @label Address type +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Пожељна адреса" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Друга" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "јединствени идентификатор" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "име и презиме" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "форматирано име" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "презиме" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "име" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "додатна имена" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "титуларни префикси" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "титуларни суфикси" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "надимак" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "рођендан" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "кућна адреса, улица" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "кућна адреса, поштански фах" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "кућна адреса, град" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "кућна адреса, република" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "кућна адреса, поштански број" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "кућна адреса, држава" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "кућна адреса, етикета" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "пословна адреса, улица" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "пословна адреса, поштански фах" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "пословна адреса, град" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "пословна адреса, република" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "пословна адреса, поштански број" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "пословна адреса, држава" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "пословна адреса, етикета" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "кућни телефон" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "пословни телефон" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "мобилни телефон" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Кућни факс" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "пословни факс" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "телефон у колима" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ИСДН" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Пејџер" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "адреса е‑поште" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "поштански клијент" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "временска зона" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "географски положај" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "титула" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "положај" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "организација" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "одељење" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "напомена" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "идентификатор производа" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "датум ревизије" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "ниска за ређање" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "домаћа страница" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "безбедносна класа" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "логотип" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "фотографија" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "звук" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "др" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "гђица" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "гдин" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "гђа" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "гђица" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "проф." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "млађи" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "старији" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "непознато поље" + +# >> @item category of fields +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "сва" + +# >> @item category of fields +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "честа" + +# >> @item category of fields +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "адреса" + +# >> @item category of fields +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "е‑пошта" + +# >> @item category of fields +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "лична" + +# >> @item category of fields +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "посебна" + +# >> @item category of fields +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "недефинисана" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "Икс.509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "ПГП" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "посебан" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "непознат" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Број телефона" + +# >> @label Communication resource: home phone +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Кућни" + +# >> @label Communication resource: work phone +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Пословни" + +# >> @label Communication resource +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Гласник" + +# >> @label Communication resource: preferred phone +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Пожељни" + +# >> @label Communication resource +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Гласовни" + +# >> @label Communication resource +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Факс" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Мобилни" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Видео" + +# >> @label Communication resource +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Сандуче" + +# >> @label Communication resource +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Модем" + +# >> @label Communication resource +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "У колима" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "ПЦС" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Други" + +# >> @label Communication resource +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Пожељни број" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Пословни факс" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "јавно" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "приватно" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "поверљиво" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "непознато" diff --git a/po/sv/kcontacts5.po b/po/sv/kcontacts5.po new file mode 100644 index 0000000..378b3ee --- /dev/null +++ b/po/sv/kcontacts5.po @@ -0,0 +1,740 @@ +# translation of kabc.po to Swedish +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Stefan Asserhäll , 2007, 2008, 2009, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-28 20:14+0100\n" +"Last-Translator: Stefan Asserhäll \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Postbox" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Utökad adressinformation" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Gata" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Plats" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Område" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Postnummer" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Land" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Leveransetikett" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Inrikes" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Internationell" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Post" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paket" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Hem" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Arbete" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Önskad adress" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Övriga" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Unik identifiering" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Namn" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Formaterat namn" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Efternamn" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Tilltalsnamn" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Andra namn" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Inledande titlar" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Efterföljande titlar" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Smeknamn" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Födelsedag" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Gatuadress hem" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Postboxadress hem" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Stadsadress hem" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Stat hem" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Postnummer hem" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Landsadress hem" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Adressetikett hem" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Gatuadress arbete" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Postboxadress arbete" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Stadsadress arbete" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Stat arbete" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Postnummer arbete" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Landsadress arbete" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Adressetikett arbete" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Hemtelefon" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Telefon arbete" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Mobiltelefon" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Hemtelefax" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Arbetsfax" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Biltelefon" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Personsökare" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-postadress" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "E-postklient" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Tidszon" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Geografisk plats" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Titel" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Roll" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Organisation" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Avdelning" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Anteckning" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Produktidentifiering" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Ändringsdatum" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sorteringsbegrepp" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Hemsida" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Säkerhetsklass" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logotyp" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Foto" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Ljud" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Fröken" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Herr" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Fru" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Professor" + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Okänt fält" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Alla" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Vanlig" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adress" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-post" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Personligt" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Egen" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Odefinierad" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Egen" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Okänd typ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefonnummer" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Hem" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Arbete" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Meddelandetjänst" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Önskat" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Röst" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Fax" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Mobil" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Brevlåda" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Bil" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Övriga" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Önskat nummer" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Arbetstelefax" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Öppen" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Privat" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Konfidentiell" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Okänd typ" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Föredragen" + +#~ msgid "List of Emails" +#~ msgstr "Lista med e-post" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Stefan Asserhäll" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "stefan.asserhall@bredband.net" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "Kan inte ladda resursen '%1'" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Välj adressat" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "Namn" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-post" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Markerad" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Avmarkera" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Anpassa distributionslistor" + +#~ msgid "Select Email Address" +#~ msgstr "Välj e-postadress" + +#~ msgid "Email Addresses" +#~ msgstr "E-postadresser" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Ja" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Nej" + +#~ msgid "New List..." +#~ msgstr "Ny lista..." + +#~ msgid "Rename List..." +#~ msgstr "Byt namn på lista..." + +#~ msgid "Remove List" +#~ msgstr "Ta bort lista" + +#~ msgid "Available addresses:" +#~ msgstr "Tillgängliga adresser:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Önskad e-post" + +#~ msgid "Add Entry" +#~ msgstr "Lägg till post" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-post" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Använd önskad" + +#~ msgid "Change Email..." +#~ msgstr "Ändra e-post..." + +#~ msgid "Remove Entry" +#~ msgstr "Ta bort post" + +#~ msgid "New Distribution List" +#~ msgstr "Ny distributionslista" + +#~ msgid "Please enter &name:" +#~ msgstr "Ange &namn:" + +#~ msgid "Distribution List" +#~ msgstr "Distributionslista" + +#~ msgid "Please change &name:" +#~ msgstr "Ändra &namn:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "Ta bort distributionslistan '%1'?" + +#~ msgid "Selected addressees:" +#~ msgstr "Valda adressater:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "Valda adresser i '%1':" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Nej" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard-format" + +#~ msgid "No description available." +#~ msgstr "Ingen beskrivning tillgänglig." + +#~ msgid "Unable to open lock file." +#~ msgstr "Kan inte öppna låsfil." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "Resursen '%1' är låst av programmet '%2'." + +#~ msgid "Error" +#~ msgstr "Fel" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "Upplåsning misslyckades. Låsfilen ägs av en annan process: %1 (%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: Alla lås lyckas, men ingen verklig låsning görs." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Alla lås misslyckas." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "Misslyckades ladda resursen '%1'." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "Misslyckades spara resursen '%1'." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "Kan inte öppna resursen '%1'." + +#~ msgid "Default Address Book" +#~ msgstr "Förvald adressbok" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "Kan inte spara till resursen '%1' eftersom den är låst." diff --git a/po/tr/kcontacts5.po b/po/tr/kcontacts5.po new file mode 100644 index 0000000..7e97962 --- /dev/null +++ b/po/tr/kcontacts5.po @@ -0,0 +1,745 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Translators: +# H. İbrahim Güngör , 2010. +# obsoleteman , 2008-2009. +# Volkan Gezer , 2013-2014, 2017. +# Kaan Ozdincer , 2014. +msgid "" +msgstr "" +"Project-Id-Version: kdepimlibs-kde4\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2017-04-12 15:44+0100\n" +"Last-Translator: Volkan Gezer \n" +"Language-Team: Turkish \n" +"Language: tr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 2.0\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Posta Kutusu" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Genişletilmiş Adres Bilgileri" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Cadde" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Semt" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Bölge" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Posta Kodu" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Ülke" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Dağıtım Etiketi" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Yerel" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Uluslararası" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Posta" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Paket" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Ev" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "İş" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Tercih Edilen Adres" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Diğer" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Özgün Tanımlayıcı" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "İsim" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Biçimlendirilmiş Ad" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Soyadı" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Verilen Ad" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Ek Adlar" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Unvan Önekleri" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Unvan Sonekleri" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Takma Ad" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "Doğum Günü" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Ev Adresi Cadde" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Ev Adresi Posta Kutusu" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Ev Adresi Şehir" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Ev Adresi Eyalet" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Ev Adresi Posta Kodu" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Ev Adresi Ülke" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Ev Adresi Etiketi" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "İş Adresi Cadde" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "İş Adresi Posta Kutusu" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "İş Adresi Şehir" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "İş Adresi Eyalet" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "İş Adresi Posta Kodu" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "İş Adresi Ülke" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "İş Adresi Etiketi" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Ev Telefonu" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "İş Telefonu" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Cep Telefonu" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Ev Faksı" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "İş Faks Numarası" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Araç Telefonu" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Çağrı Cihazı" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "E-posta Adresi" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "E-Posta İstemcisi" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Zaman Dilimi" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Coğrafi Konum" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Başlık" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Unvan" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Kurum" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Bölüm" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Not" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Ürün Tanımlayıcı" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Değiştirilme Tarihi" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Sıralama İfadesi" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Ev Sayfası" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Güvenlik Sınıfı" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Logo" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Fotoğraf" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Ses" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Bayan" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Bay" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Bayan" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Byn." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Bilinmeyen Alan" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Tümü" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Sık Sık" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Adres" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "E-posta" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Kişisel" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Özel" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Tanımlanmamış" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Özel" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Bilinmeyen tip" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Telefon numarası" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Ev" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "İş" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Anında Mesajlaşma" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Tercih Edilen" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Ses" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Faks" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Cep" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Video" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Posta Kutusu" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Araba" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Diğer" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Tercih Edilen Numara" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "İş Faksı" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Genel" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Özel" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Güvenilir" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Bilinmeyen tip" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Tercih Edilen" + +#~ msgid "List of Emails" +#~ msgstr "E-postaların Listesi" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "Serdar Soytetir" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "tulliana@gmail.com" + +#~ msgid "Unable to load resource '%1'" +#~ msgstr "'%1' kaynağı yüklenemedi" + +#~ msgctxt "@title:window" +#~ msgid "Select Addressee" +#~ msgstr "Adres Seç" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "İsim" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "E-posta" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "Seç" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "Seçme" + +#~ msgid "Configure Distribution Lists" +#~ msgstr "Dağıtım Listesini Yapılandır" + +#~ msgid "Select Email Address" +#~ msgstr "E-posta Adresini Seç" + +#~ msgid "Email Addresses" +#~ msgstr "E-posta Adresleri" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "Evet" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "Hayır" + +#~ msgid "New List..." +#~ msgstr "Yeni Liste..." + +#~ msgid "Rename List..." +#~ msgstr "Listeyi Yeniden Adlandır..." + +#~ msgid "Remove List" +#~ msgstr "Listeyi Kaldır" + +#~ msgid "Available addresses:" +#~ msgstr "Kullanılabilir adresler:" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Preferred Email" +#~ msgstr "Tercih Edilen E-posta" + +#~ msgid "Add Entry" +#~ msgstr "Girdi Ekle" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "E-posta" + +#~ msgctxt "@title:column use preferred email" +#~ msgid "Use Preferred" +#~ msgstr "Tercih Edileni Kullan" + +#~ msgid "Change Email..." +#~ msgstr "E-postayı Değiştir..." + +#~ msgid "Remove Entry" +#~ msgstr "Girdiyi Kaldır" + +#~ msgid "New Distribution List" +#~ msgstr "Yeni Dağıtım Listesi" + +#~ msgid "Please enter &name:" +#~ msgstr "Lütfen ismi giri&n:" + +#~ msgid "Distribution List" +#~ msgstr "Dağıtım Listesi" + +#~ msgid "Please change &name:" +#~ msgstr "Lütfen ismi değiştiri&n:" + +#~ msgid "Delete distribution list '%1'?" +#~ msgstr "'%1' dağıtım listesi silinsin mi?" + +#~ msgid "Selected addressees:" +#~ msgstr "Seçilen adresler:" + +#~ msgid "Selected addresses in '%1':" +#~ msgstr "'%1' içerisinden seçilen adresler:" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "Hayır" + +#~ msgid "vCard" +#~ msgstr "vCard" + +#~ msgid "vCard Format" +#~ msgstr "vCard Biçimi" + +#~ msgid "No description available." +#~ msgstr "Açıklama yok." + +#~ msgid "Unable to open lock file." +#~ msgstr "Kilit dosyası açılamadı." + +#~ msgid "The resource '%1' is locked by application '%2'." +#~ msgstr "'%1' kaynağı '%2' uygulaması tarafından kilitlenmiş." + +#~ msgid "Error" +#~ msgstr "Hata" + +#~ msgid "Unlock failed. Lock file is owned by other process: %1 (%2)" +#~ msgstr "" +#~ "Kilidi açma işlemi başarısız oldu. Kilit dosyası başka bir sürece ait: %1 " +#~ "(%2)" + +#~ msgid "LockNull: All locks succeed but no actual locking is done." +#~ msgstr "LockNull: Tüm kilitler başarılı hiç gerçek kilitleme yapılamadı." + +#~ msgid "LockNull: All locks fail." +#~ msgstr "LockNull: Tüm kilitler başarısız." + +#~ msgid "Loading resource '%1' failed." +#~ msgstr "'%1' kaynağı yüklenemedi." + +#~ msgid "Saving resource '%1' failed." +#~ msgstr "'%1' kaynağı kaydedilemedi." + +#~ msgid "Unable to open resource '%1'." +#~ msgstr "'%1' kaynağı açılamadı." + +#~ msgid "Default Address Book" +#~ msgstr "Öntanımlı Adres Defteri" + +#~ msgid "Unable to save to resource '%1'. It is locked." +#~ msgstr "'%1' kaynağı kaydedilemedi. Kilitli." diff --git a/po/ug/kcontacts5.po b/po/ug/kcontacts5.po new file mode 100644 index 0000000..efc31c1 --- /dev/null +++ b/po/ug/kcontacts5.po @@ -0,0 +1,652 @@ +# Uyghur translation for kabc. +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# Sahran , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2013-09-08 07:05+0900\n" +"Last-Translator: Gheyret Kenji \n" +"Language-Team: Uyghur Computer Science Association \n" +"Language: ug\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Post Office Box" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "كوچا" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "ئورۇن" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "رايون" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "دۆلەت" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "خەلقئارا" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "ماكان" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "ئىش" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "ئامراق ئادرېس" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "باشقا" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "ئاتى" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "تەگات" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "بېرىلگەن ئاتى" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "لەقىمى" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "تۇغۇلغان كۈن" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "ئوي ئادرېسى ئەنى" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "ئۆي تېلېفون" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "شىركەت تېلېفون" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "يانفون" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "ئوي فاكىسى" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "خىزمەت فاكىس" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "ماشىنا تېلېفونى" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "چاقىرغۇ" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "ئېلخەت ئادرېسلىرى" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "خەت خېرىدارى" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "ۋاقىت رايونى" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "ماۋزۇ" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "رول" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "ئورگان" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "تارماق" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "ئىزاھات" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "باش بەت" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "تۇغ" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "سۈرەت" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "ئاۋاز" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "دوكتور" + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "خانقىز" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "ئەپەندى" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "خانىم" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "خانىم" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "ئەۋلاد" + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "ئەجداد" + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "ھەممىسى" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "دائىم" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "ئادرېس" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "ئېلخەت" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "شەخسىي" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "ئىختىيارى" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "ئېنىقلىمىسىز" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "ئىختىيارى" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "نامەلۇم تىپ" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "ماكان" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "ئىش" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "مۇڭداشقۇ" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "1-تاللاش تۈرى" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "ئاۋاز" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "فاكىس" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "يانفون" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "سىن" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "خەت ساندۇقى" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "مودېم" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "ماشىنا" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "باشقا" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "خىزمەتتىكى فاكىس" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "ئاممىۋى" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "شەخسىي" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "مەخپىي" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "نامەلۇم تىپ" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "1-تاللاش تۈرى" + +#~ msgctxt "NAME OF TRANSLATORS" +#~ msgid "Your names" +#~ msgstr "ئابدۇقادىر ئابلىز, غەيرەت كەنجى" + +#~ msgctxt "EMAIL OF TRANSLATORS" +#~ msgid "Your emails" +#~ msgstr "sahran.ug@gmail.com, gheyret@gmail.com" + +#~ msgctxt "@title:column addressee name" +#~ msgid "Name" +#~ msgstr "ئاتى" + +#~ msgctxt "@title:column addressee email" +#~ msgid "Email" +#~ msgstr "ئېلخەت" + +#~ msgctxt "@title:group selected addressees" +#~ msgid "Selected" +#~ msgstr "تاللانغان" + +#~ msgctxt "@action:button unselect addressee" +#~ msgid "Unselect" +#~ msgstr "تاللىما" + +#~ msgid "Email Addresses" +#~ msgstr "ئېلخەت ئادرېسلىرى" + +#~ msgctxt "this the preferred email address" +#~ msgid "Yes" +#~ msgstr "ھەئە" + +#~ msgctxt "this is not the preferred email address" +#~ msgid "No" +#~ msgstr "ياق" + +#~ msgid "New List..." +#~ msgstr "يېڭى تىزىم…" + +#~ msgid "Remove List" +#~ msgstr "تىزىمنى چىقىرىۋېتىش" + +#~ msgid "Add Entry" +#~ msgstr "كىرگۈ قوش" + +#~ msgctxt "@title:column addressee preferred email" +#~ msgid "Email" +#~ msgstr "ئېلخەت" + +#~ msgid "Remove Entry" +#~ msgstr "تۈرنى چىقىرىۋەت" + +#~ msgid "New Distribution List" +#~ msgstr "يېڭى تارقىتىلما تىزىمى" + +#~ msgctxt "this is not preferred email address" +#~ msgid "No" +#~ msgstr "ياق" + +#~ msgid "No description available." +#~ msgstr "چۈشەندۈرۈشى يوق." + +#~ msgid "Error" +#~ msgstr "خاتالىق" diff --git a/po/uk/kcontacts5.po b/po/uk/kcontacts5.po new file mode 100644 index 0000000..ea92e31 --- /dev/null +++ b/po/uk/kcontacts5.po @@ -0,0 +1,594 @@ +# Translation of kcontacts5.po to Ukrainian +# Copyright (C) 2014-2015 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. +# +# Yuri Chornoivan , 2014, 2015. +msgid "" +msgstr "" +"Project-Id-Version: kcontacts5\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2015-12-25 16:12+0200\n" +"Last-Translator: Yuri Chornoivan \n" +"Language-Team: Ukrainian \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n==1 ? 3 : n%10==1 && n%100!=11 ? 0 : n" +"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Lokalize 1.5\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "Абонентська скринька" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "Додаткова інформація про адресу" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "Вулиця" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "Район" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "Область" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "Поштовий код" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "Країна" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "Надпис доставки" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "Домашня" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "Міжнародна" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "Поштова" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "Для посилок" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "Домашня" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "Робоча" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "Головна адреса" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "Інша" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "Унікальний ідентифікатор" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "Ім’я" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "Форматоване ім’я" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "Прізвище" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "Ім'я" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "Додаткові імена" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "Почесні префікси" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "Почесні суфікси" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "Псевдонім" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "День народження" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "Домашня адреса (вулиця)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "Абонентська скринька домашньої адреси" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "Домашня адреса (місто)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "Домашня адреса (область)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "Домашня адреса (поштовий код)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "Домашня адреса (країна)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "Домашня адреса (мітка)" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "Робоча адреса (вулиця)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "Абонентська скринька робочої адреси" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "Робоча адреса (місто)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "Робоча адреса (область)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "Робоча адреса (поштовий код)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "Робоча адреса (країна)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "Робоча адреса (мітка)" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "Домашній телефон" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "Робочий телефон" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "Мобільний телефон" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "Домашній факс" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "Робочий факс" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "Автомобільний телефон" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "Пейджер" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "Адреса ел. пошти" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "Поштовий клієнт" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "Часовий пояс" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "Географічне розташування" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "Титул" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "Посада" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "Установа" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "Відділ" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "Примітка" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "Ідентифікатор продукту" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "Дата модифікації" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "Рядок сорту" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "Домашня сторінка" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "Клас безпеки" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "Логотип" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "Фото" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "Звук" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Др." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "панна" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "пан" + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "пані" + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "пані" + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Проф." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Мол." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Ст." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "Невідоме поле" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "Всі" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "Часті" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "Адреса" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "Ел. пошта" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "Особисті" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "Нетипові" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "Не визначено" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "Нетиповий" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "Невідомий тип" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "Номер телефону" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "Домашній" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "Робочий" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "Кур'єр" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "Головний" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "Голос" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "Факс" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "Мобільний" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "Відео" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "Поштова скринька" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Модем" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "Автомобільний" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "Інший" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "Головний номер" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "Робочий факс" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "Публічний" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "Особистий" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "Конфіденційний" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "Невідомий тип" + +#~ msgctxt "Preferred address" +#~ msgid "Preferred" +#~ msgstr "Головна" + +#~ msgid "List of Emails" +#~ msgstr "Список адрес ел. пошти" diff --git a/po/zh_CN/kcontacts5.po b/po/zh_CN/kcontacts5.po new file mode 100644 index 0000000..9e5bf71 --- /dev/null +++ b/po/zh_CN/kcontacts5.po @@ -0,0 +1,588 @@ +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Xuetian Weng , 2014. +# Weng Xuetian , 2016. +msgid "" +msgstr "" +"Project-Id-Version: kdeorg\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2018-11-01 23:17\n" +"Last-Translator: guoyunhe \n" +"Language-Team: Chinese Simplified\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: crowdin.com\n" +"X-Crowdin-Project: kdeorg\n" +"X-Crowdin-Language: zh-CN\n" +"X-Crowdin-File: /kf5-stable/messages/pim/kcontacts5.pot\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "邮局邮箱" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "扩展地址信息" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "街道" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "位置" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "地域" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "邮政编码" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "国家" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "邮递标签" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "国内" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "国际" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "邮局" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "包裹" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "家庭" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "办公" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "首选地址" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "其它" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "唯一标识符" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "名字" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "格式化姓名" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "姓氏" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "姓名" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "其它姓名" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "敬称前缀" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "敬称后缀" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "昵名" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "生日" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "居住地址(街道)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "住宅邮局邮箱" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "居住地址(城市)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "居住地址(区域)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "居住地址(邮编)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "居住地址(国家)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "居住地址(标志)" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "办公地址(街道)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "办公地址邮局信箱" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "办公地址(城市)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "办公地址(地区)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "办公地址(邮编)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "办公地址(城市)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "办公地址(标签)" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "宅电" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "办公电话" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "移动电话" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "家庭传真" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "办公传真" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "汽车电话" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "寻呼机" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "电子邮件地址" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "邮件客户端" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "时区" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "地理位置" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "头衔" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "职务" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "组织" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "部门" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "备注" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "产品标识符" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "修订日期" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "排序字符串" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "主页" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "安全类别" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "徽标" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "照片" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "声音" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr." + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Mr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mrs." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "未知字段" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "全部" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "频繁" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "地址" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "电子邮件" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "个人" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "自定义" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "未定义" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "自定义" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "未知类型" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "电话号码" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "家庭" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "办公" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "信使" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "首选" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "语音" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "传真" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "手机" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "视频" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "邮箱" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "调制解调器" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "车载" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "其它" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "首选号码" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "办公传真" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "公共" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "个人" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "机密" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "未知类型" diff --git a/po/zh_TW/kcontacts5.po b/po/zh_TW/kcontacts5.po new file mode 100644 index 0000000..7bd8fc2 --- /dev/null +++ b/po/zh_TW/kcontacts5.po @@ -0,0 +1,587 @@ +# translation of kabc.po to Chinese Traditional +# Copyright (C) YEAR This_file_is_part_of_KDE +# This file is distributed under the same license as the PACKAGE package. +# +# Franklin Weng , 2007, 2008. +# Frank Weng (a.k.a. Franklin) , 2008, 2009. +# pan93412 , 2018. +msgid "" +msgstr "" +"Project-Id-Version: kabc\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2018-02-12 03:21+0100\n" +"PO-Revision-Date: 2018-04-05 20:16+0800\n" +"Last-Translator: pan93412 \n" +"Language-Team: Chinese \n" +"Language: zh_TW\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 2.0\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#: address.cpp:400 +#, kde-format +msgid "Post Office Box" +msgstr "郵政信箱" + +#: address.cpp:416 +#, kde-format +msgid "Extended Address Information" +msgstr "延伸位址資訊" + +#: address.cpp:432 +#, kde-format +msgid "Street" +msgstr "街道" + +#: address.cpp:448 +#, kde-format +msgid "Locality" +msgstr "位置" + +#: address.cpp:464 +#, kde-format +msgid "Region" +msgstr "區域" + +#: address.cpp:480 +#, kde-format +msgid "Postal Code" +msgstr "郵遞區號" + +#: address.cpp:496 +#, kde-format +msgid "Country" +msgstr "國家" + +#: address.cpp:512 +#, kde-format +msgid "Delivery Label" +msgstr "傳送標籤" + +#: address.cpp:530 +#, kde-format +msgctxt "Address is in home country" +msgid "Domestic" +msgstr "家庭" + +#: address.cpp:532 +#, kde-format +msgctxt "Address is not in home country" +msgid "International" +msgstr "國際" + +#: address.cpp:534 +#, kde-format +msgctxt "Address for delivering letters" +msgid "Postal" +msgstr "郵局" + +#: address.cpp:536 +#, kde-format +msgctxt "Address for delivering packages" +msgid "Parcel" +msgstr "包裹" + +#: address.cpp:538 +#, kde-format +msgctxt "Home Address" +msgid "Home" +msgstr "住家" + +#: address.cpp:540 +#, kde-format +msgctxt "Work Address" +msgid "Work" +msgstr "工作" + +#: address.cpp:542 +#, kde-format +msgid "Preferred Address" +msgstr "預設位址" + +#: address.cpp:544 +#, kde-format +msgctxt "another type of address" +msgid "Other" +msgstr "其他" + +#: addressee.cpp:439 +#, kde-format +msgid "Unique Identifier" +msgstr "唯一身份" + +#: addressee.cpp:459 +#, kde-format +msgid "Name" +msgstr "名稱" + +#: addressee.cpp:655 +#, kde-format +msgid "Formatted Name" +msgstr "格式化名稱" + +#: addressee.cpp:675 +#, kde-format +msgid "Family Name" +msgstr "姓氏" + +#: addressee.cpp:695 +#, kde-format +msgid "Given Name" +msgstr "指定名稱" + +#: addressee.cpp:715 +#, kde-format +msgid "Additional Names" +msgstr "額外名稱" + +#: addressee.cpp:735 +#, kde-format +msgid "Honorific Prefixes" +msgstr "前置敬語" + +#: addressee.cpp:755 +#, kde-format +msgid "Honorific Suffixes" +msgstr "後置敬語" + +#: addressee.cpp:806 +#, kde-format +msgid "Nick Name" +msgstr "暱稱" + +#: addressee.cpp:846 +#, kde-format +msgid "Birthday" +msgstr "生日" + +#: addressee.cpp:851 +#, kde-format +msgid "Home Address Street" +msgstr "住家地址(街道)" + +#: addressee.cpp:856 +#, kde-format +msgid "Home Address Post Office Box" +msgstr "住家地址郵政信箱" + +#: addressee.cpp:861 +#, kde-format +msgid "Home Address City" +msgstr "住家地址(城市)" + +#: addressee.cpp:866 +#, kde-format +msgid "Home Address State" +msgstr "住家地址(省、州)" + +#: addressee.cpp:871 +#, kde-format +msgid "Home Address Zip Code" +msgstr "住家地址(郵遞區號)" + +#: addressee.cpp:876 +#, kde-format +msgid "Home Address Country" +msgstr "住家地址(國家)" + +#: addressee.cpp:881 +#, kde-format +msgid "Home Address Label" +msgstr "住家地址標籤" + +#: addressee.cpp:886 +#, kde-format +msgid "Business Address Street" +msgstr "辦公室地址(街道)" + +#: addressee.cpp:891 +#, kde-format +msgid "Business Address Post Office Box" +msgstr "辦公室地址郵政信箱" + +#: addressee.cpp:896 +#, kde-format +msgid "Business Address City" +msgstr "辦公室地址(城市)" + +#: addressee.cpp:901 +#, kde-format +msgid "Business Address State" +msgstr "辦公室地址(省、州)" + +#: addressee.cpp:906 +#, kde-format +msgid "Business Address Zip Code" +msgstr "辦公室地址(郵遞區號)" + +#: addressee.cpp:911 +#, kde-format +msgid "Business Address Country" +msgstr "辦公室地址(國家)" + +#: addressee.cpp:916 +#, kde-format +msgid "Business Address Label" +msgstr "辦公室地址標籤" + +#: addressee.cpp:921 +#, kde-format +msgid "Home Phone" +msgstr "住家電話" + +#: addressee.cpp:926 +#, kde-format +msgid "Business Phone" +msgstr "辦公室電話" + +#: addressee.cpp:931 +#, kde-format +msgid "Mobile Phone" +msgstr "行動電話" + +#: addressee.cpp:936 phonenumber.cpp:218 +#, kde-format +msgid "Home Fax" +msgstr "家用傳真" + +#: addressee.cpp:941 +#, kde-format +msgid "Business Fax" +msgstr "辦公室傳真" + +#: addressee.cpp:946 +#, kde-format +msgid "Car Phone" +msgstr "車上電話" + +#: addressee.cpp:951 phonenumber.cpp:194 +#, kde-format +msgid "ISDN" +msgstr "ISDN" + +#: addressee.cpp:956 phonenumber.cpp:198 +#, kde-format +msgid "Pager" +msgstr "呼叫器" + +#: addressee.cpp:961 +#, kde-format +msgid "Email Address" +msgstr "電子郵件地址" + +#: addressee.cpp:981 +#, kde-format +msgid "Mail Client" +msgstr "郵件處理程式" + +#: addressee.cpp:1001 +#, kde-format +msgid "Time Zone" +msgstr "時區" + +#: addressee.cpp:1021 +#, kde-format +msgid "Geographic Position" +msgstr "地理位置" + +#: addressee.cpp:1072 +#, kde-format +msgctxt "a person's title" +msgid "Title" +msgstr "職稱" + +#: addressee.cpp:1123 +#, kde-format +msgctxt "of a person in an organization" +msgid "Role" +msgstr "角色" + +#: addressee.cpp:1174 field.cpp:241 +#, kde-format +msgid "Organization" +msgstr "組織" + +#: addressee.cpp:1194 +#, kde-format +msgid "Department" +msgstr "部門" + +#: addressee.cpp:1214 +#, kde-format +msgid "Note" +msgstr "附註" + +#: addressee.cpp:1234 +#, kde-format +msgid "Product Identifier" +msgstr "產品識別" + +#: addressee.cpp:1254 +#, kde-format +msgid "Revision Date" +msgstr "版本日期" + +#: addressee.cpp:1274 +#, kde-format +msgid "Sort String" +msgstr "排序字串" + +#: addressee.cpp:1300 +#, kde-format +msgid "Homepage" +msgstr "首頁" + +#: addressee.cpp:1320 +#, kde-format +msgid "Security Class" +msgstr "安全類別" + +#: addressee.cpp:1340 +#, kde-format +msgid "Logo" +msgstr "圖標" + +#: addressee.cpp:1360 +#, kde-format +msgid "Photo" +msgstr "相片" + +#: addressee.cpp:1380 +#, kde-format +msgid "Sound" +msgstr "音效" + +#: addresseehelper.cpp:75 +#, kde-format +msgid "Dr." +msgstr "Dr. " + +#: addresseehelper.cpp:76 +#, kde-format +msgid "Miss" +msgstr "Miss" + +#: addresseehelper.cpp:77 +#, kde-format +msgid "Mr." +msgstr "Mr." + +#: addresseehelper.cpp:78 +#, kde-format +msgid "Mrs." +msgstr "Mrs." + +#: addresseehelper.cpp:79 +#, kde-format +msgid "Ms." +msgstr "Ms." + +#: addresseehelper.cpp:80 +#, kde-format +msgid "Prof." +msgstr "Prof." + +#: addresseehelper.cpp:82 +#, kde-format +msgid "I" +msgstr "I" + +#: addresseehelper.cpp:83 +#, kde-format +msgid "II" +msgstr "II" + +#: addresseehelper.cpp:84 +#, kde-format +msgid "III" +msgstr "III" + +#: addresseehelper.cpp:85 +#, kde-format +msgid "Jr." +msgstr "Jr." + +#: addresseehelper.cpp:86 +#, kde-format +msgid "Sr." +msgstr "Sr." + +#: field.cpp:218 +#, kde-format +msgid "Unknown Field" +msgstr "未知的欄位" + +#: field.cpp:231 +#, kde-format +msgid "All" +msgstr "全部" + +#: field.cpp:233 +#, kde-format +msgid "Frequent" +msgstr "頻繁" + +#: field.cpp:235 +#, kde-format +msgctxt "street/postal" +msgid "Address" +msgstr "地址" + +#: field.cpp:237 +#, kde-format +msgid "Email" +msgstr "電子郵件" + +#: field.cpp:239 +#, kde-format +msgid "Personal" +msgstr "個人" + +#: field.cpp:243 +#, kde-format +msgid "Custom" +msgstr "自訂" + +#: field.cpp:245 +#, kde-format +msgid "Undefined" +msgstr "未定義" + +#: key.cpp:214 +#, kde-format +msgctxt "X.509 public key" +msgid "X509" +msgstr "X509" + +#: key.cpp:217 +#, kde-format +msgctxt "Pretty Good Privacy key" +msgid "PGP" +msgstr "PGP" + +#: key.cpp:220 +#, kde-format +msgctxt "A custom key" +msgid "Custom" +msgstr "自訂" + +#: key.cpp:223 +#, kde-format +msgctxt "another type of encryption key" +msgid "Unknown type" +msgstr "未知的型態" + +#: phonenumber.cpp:170 +#, kde-format +msgctxt "Undefined phone type" +msgid "Telephone number" +msgstr "電話號碼" + +#: phonenumber.cpp:172 +#, kde-format +msgctxt "Home phone" +msgid "Home" +msgstr "住家" + +#: phonenumber.cpp:174 +#, kde-format +msgctxt "Work phone" +msgid "Work" +msgstr "工作" + +#: phonenumber.cpp:176 +#, kde-format +msgid "Messenger" +msgstr "即時訊息" + +#: phonenumber.cpp:178 +#, kde-format +msgctxt "Preferred phone" +msgid "Preferred" +msgstr "預設" + +#: phonenumber.cpp:180 +#, kde-format +msgid "Voice" +msgstr "語音" + +#: phonenumber.cpp:182 +#, kde-format +msgid "Fax" +msgstr "傳真" + +#: phonenumber.cpp:184 +#, kde-format +msgctxt "Mobile Phone" +msgid "Mobile" +msgstr "行動電話" + +#: phonenumber.cpp:186 +#, kde-format +msgctxt "Video phone" +msgid "Video" +msgstr "影像" + +#: phonenumber.cpp:188 +#, kde-format +msgid "Mailbox" +msgstr "郵政信箱" + +#: phonenumber.cpp:190 +#, kde-format +msgid "Modem" +msgstr "Modem" + +#: phonenumber.cpp:192 +#, kde-format +msgctxt "Car Phone" +msgid "Car" +msgstr "車用電話" + +#: phonenumber.cpp:196 +#, kde-format +msgid "PCS" +msgstr "PCS" + +#: phonenumber.cpp:200 +#, kde-format +msgctxt "another type of phone" +msgid "Other" +msgstr "其他" + +#: phonenumber.cpp:213 +#, kde-format +msgid "Preferred Number" +msgstr "預設號碼" + +#: phonenumber.cpp:223 +#, kde-format +msgid "Work Fax" +msgstr "工作傳真" + +#: secrecy.cpp:111 +#, kde-format +msgctxt "access is for everyone" +msgid "Public" +msgstr "公開" + +#: secrecy.cpp:114 +#, kde-format +msgctxt "access is by owner only" +msgid "Private" +msgstr "私人" + +#: secrecy.cpp:117 +#, kde-format +msgctxt "access is by owner and a controlled group" +msgid "Confidential" +msgstr "機密" + +#: secrecy.cpp:120 +#, kde-format +msgctxt "unknown secrecy type" +msgid "Unknown type" +msgstr "未知的型態" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..debe818 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,131 @@ +set(vcardparser_SRCS + vcardparser/vcard.cpp + vcardparser/vcardline.cpp + vcardparser/vcardparser.cpp +) + +set(kcontacts_SRCS + address.cpp + addressee.cpp + addresseehelper.cpp + addresseelist.cpp + calendarurl.cpp + contactgroup.cpp + contactgrouptool.cpp + email.cpp + field.cpp + geo.cpp + gender.cpp + impp.cpp + key.cpp + lang.cpp + ldapdn.cpp + ldif.cpp + phonenumber.cpp + picture.cpp + related.cpp + resourcelocatorurl.cpp + secrecy.cpp + sortmode.cpp + sound.cpp + timezone.cpp + vcarddrag.cpp + vcardtool.cpp + fieldgroup.cpp + title.cpp + nickname.cpp + role.cpp + note.cpp + org.cpp + clientpidmap.cpp + ${vcardparser_SRCS} + kcontacts.qrc +) + +set(kcontacts_converter_SRCS + converter/vcardconverter.cpp + converter/ldifconverter.cpp +) + +ecm_qt_declare_logging_category(kcontacts_converter_SRCS HEADER kcontacts_debug.h IDENTIFIER KCONTACTS_LOG CATEGORY_NAME org.kde.pim.kcontacts) + +add_library(KF5Contacts ${kcontacts_SRCS} ${kcontacts_converter_SRCS}) + +generate_export_header(KF5Contacts BASE_NAME kcontacts) + +add_library(KF5::Contacts ALIAS KF5Contacts) + +target_include_directories(KF5Contacts INTERFACE "$") +target_include_directories(KF5Contacts PUBLIC "$") +target_include_directories(KF5Contacts PUBLIC "$") + +target_link_libraries(KF5Contacts +PUBLIC + KF5::CoreAddons +PRIVATE + Qt5::Gui + KF5::ConfigCore + KF5::I18n + KF5::Codecs # for the vcard parser +) + +set_target_properties(KF5Contacts PROPERTIES + VERSION ${KContacts_VERSION_STRING} + SOVERSION ${KContacts_SOVERSION} + EXPORT_NAME Contacts +) + +install(TARGETS KF5Contacts EXPORT KF5ContactsTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) + +ecm_generate_headers(KContacts_CamelCase_HEADERS + HEADER_NAMES + Address + Addressee + AddresseeList + CalendarUrl + ContactGroup + ContactGroupTool + Email + Field + Geo + Gender + Key + Lang + Impp + PhoneNumber + Picture + Related + ResourceLocatorUrl + Secrecy + SortMode + Sound + TimeZone + Title + Role + Note + Org + NickName + VCardDrag + FieldGroup + ClientPidMap + PREFIX KContacts + REQUIRED_HEADERS KContacts_HEADERS +) + +add_subdirectory(converter) + +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/kcontacts_export.h + ${KContacts_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KContacts/kcontacts + COMPONENT Devel +) + +install(FILES + ${KContacts_CamelCase_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KContacts/KContacts + COMPONENT Devel +) + +ecm_generate_pri_file(BASE_NAME KContacts LIB_NAME KF5Contacts DEPS "CoreAddons" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KContacts) +install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR}) diff --git a/src/Messages.sh b/src/Messages.sh new file mode 100644 index 0000000..98e3c3c --- /dev/null +++ b/src/Messages.sh @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +$XGETTEXT *.cpp -o $podir/kcontacts5.pot diff --git a/src/address.cpp b/src/address.cpp new file mode 100644 index 0000000..10d2219 --- /dev/null +++ b/src/address.cpp @@ -0,0 +1,737 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "address.h" +#include "geo.h" + +#include "kcontacts_debug.h" +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +using namespace KContacts; + +// template tags for address formatting localization +#define KCONTACTS_FMTTAG_realname QStringLiteral("%n") +#define KCONTACTS_FMTTAG_REALNAME QStringLiteral("%N") +#define KCONTACTS_FMTTAG_company QStringLiteral("%cm") +#define KCONTACTS_FMTTAG_COMPANY QStringLiteral("%CM") +#define KCONTACTS_FMTTAG_pobox QStringLiteral("%p") +#define KCONTACTS_FMTTAG_street QStringLiteral("%s") +#define KCONTACTS_FMTTAG_STREET QStringLiteral("%S") +#define KCONTACTS_FMTTAG_zipcode QStringLiteral("%z") +#define KCONTACTS_FMTTAG_location QStringLiteral("%l") +#define KCONTACTS_FMTTAG_LOCATION QStringLiteral("%L") +#define KCONTACTS_FMTTAG_region QStringLiteral("%r") +#define KCONTACTS_FMTTAG_REGION QStringLiteral("%R") +#define KCONTACTS_FMTTAG_newline QStringLiteral("\\n") +#define KCONTACTS_FMTTAG_condcomma QStringLiteral("%,") +#define KCONTACTS_FMTTAG_condwhite QStringLiteral("%w") +#define KCONTACTS_FMTTAG_purgeempty QStringLiteral("%0") + +/** + Finds the balanced closing bracket starting from the opening bracket at + pos in tsection. + @return position of closing bracket, -1 for unbalanced brackets +*/ +static int findBalancedBracket(const QString &tsection, int pos) +{ + int balancecounter = 0; + for (int i = pos + 1; i < tsection.length(); ++i) { + if (QLatin1Char(')') == tsection[i] && 0 == balancecounter) { + // found end of brackets + return i; + } else { + if (QLatin1Char('(') == tsection[i]) { + // nested brackets + balancecounter++; + } + } + } + return -1; +} + +/** + Parses a snippet of an address template + @param tsection the template string to be parsed + @param result QString reference in which the result will be stored + @return true if at least one tag evaluated positively, else false +*/ +static bool parseAddressTemplateSection(const QString &tsection, QString &result, const QString &realName, const QString &orgaName, const KContacts::Address &address) +{ + // This method first parses and substitutes any bracketed sections and + // after that replaces any tags with their values. If a bracketed section + // or a tag evaluate to zero, they are not just removed but replaced + // with a placeholder. This is because in the last step conditionals are + // resolved which depend on information about zero-evaluations. + result = tsection; + int stpos = 0; + bool ret = false; + + // first check for brackets that have to be evaluated first + int fpos = result.indexOf(KCONTACTS_FMTTAG_purgeempty, stpos); + while (-1 != fpos) { + int bpos1 = fpos + KCONTACTS_FMTTAG_purgeempty.length(); + // expect opening bracket and find next balanced closing bracket. If + // next char is no opening bracket, continue parsing (no valid tag) + if (QLatin1Char('(') == result[bpos1]) { + int bpos2 = findBalancedBracket(result, bpos1); + if (-1 != bpos2) { + // we have balanced brackets, recursively parse: + QString rplstr; + bool purge = !parseAddressTemplateSection(result.mid(bpos1 + 1, + bpos2 - bpos1 - 1), rplstr, + realName, orgaName, address); + if (purge) { + // purge -> remove all + // replace with !_P_!, so conditional tags work later + result.replace(fpos, bpos2 - fpos + 1, QStringLiteral("!_P_!")); + // leave stpos as it is + } else { + // no purge -> replace with recursively parsed string + result.replace(fpos, bpos2 - fpos + 1, rplstr); + ret = true; + stpos = fpos + rplstr.length(); + } + } else { + // unbalanced brackets: keep on parsing (should not happen + // and will result in bad formatting) + stpos = bpos1; + } + } + fpos = result.indexOf(KCONTACTS_FMTTAG_purgeempty, stpos); + } + + // after sorting out all purge tags, we just search'n'replace the rest, + // keeping track of whether at least one tag evaluates to something. + // The following macro needs QString for R_FIELD + // It substitutes !_P_! for empty fields so conditional tags work later +#define REPLTAG(R_TAG, R_FIELD) \ + if (result.contains(R_TAG)) { \ + QString rpl = R_FIELD.isEmpty() ? QStringLiteral("!_P_!") : R_FIELD; \ + result.replace(R_TAG, rpl); \ + if (!R_FIELD.isEmpty()) { \ + ret = true; \ + } \ + } + REPLTAG(KCONTACTS_FMTTAG_realname, realName); + REPLTAG(KCONTACTS_FMTTAG_REALNAME, realName.toUpper()); + REPLTAG(KCONTACTS_FMTTAG_company, orgaName); + REPLTAG(KCONTACTS_FMTTAG_COMPANY, orgaName.toUpper()); + REPLTAG(KCONTACTS_FMTTAG_pobox, address.postOfficeBox()); + REPLTAG(KCONTACTS_FMTTAG_street, address.street()); + REPLTAG(KCONTACTS_FMTTAG_STREET, address.street().toUpper()); + REPLTAG(KCONTACTS_FMTTAG_zipcode, address.postalCode()); + REPLTAG(KCONTACTS_FMTTAG_location, address.locality()); + REPLTAG(KCONTACTS_FMTTAG_LOCATION, address.locality().toUpper()); + REPLTAG(KCONTACTS_FMTTAG_region, address.region()); + REPLTAG(KCONTACTS_FMTTAG_REGION, address.region().toUpper()); + result.replace(KCONTACTS_FMTTAG_newline, QLatin1String("\n")); +#undef REPLTAG + + // conditional comma + fpos = result.indexOf(KCONTACTS_FMTTAG_condcomma, 0); + while (-1 != fpos) { + const QString str1 = result.mid(fpos - 5, 5); + const QString str2 = result.mid(fpos + 2, 5); + if (str1 != QLatin1String("!_P_!") && str2 != QLatin1String("!_P_!")) { + result.replace(fpos, 2, QStringLiteral(", ")); + } else { + result.remove(fpos, 2); + } + fpos = result.indexOf(KCONTACTS_FMTTAG_condcomma, fpos); + } + // conditional whitespace + fpos = result.indexOf(KCONTACTS_FMTTAG_condwhite, 0); + while (-1 != fpos) { + const QString str1 = result.mid(fpos - 5, 5); + const QString str2 = result.mid(fpos + 2, 5); + if (str1 != QLatin1String("!_P_!") && str2 != QLatin1String("!_P_!")) { + result.replace(fpos, 2, QLatin1Char(' ')); + } else { + result.remove(fpos, 2); + } + fpos = result.indexOf(KCONTACTS_FMTTAG_condwhite, fpos); + } + + // remove purged: + result.remove(QStringLiteral("!_P_!")); + + return ret; +} + +class Q_DECL_HIDDEN Address::Private : public QSharedData +{ +public: + Private() + : mEmpty(true) + , mType(nullptr) + { + mId = KRandom::randomString(10); + } + + Private(const Private &other) + : QSharedData(other) + { + mEmpty = other.mEmpty; + mId = other.mId; + mType = other.mType; + + mPostOfficeBox = other.mPostOfficeBox; + mExtended = other.mExtended; + mStreet = other.mStreet; + mLocality = other.mLocality; + mRegion = other.mRegion; + mPostalCode = other.mPostalCode; + mCountry = other.mCountry; + mLabel = other.mLabel; + } + + bool mEmpty; + QString mId; + Type mType; + Geo mGeo; + + QString mPostOfficeBox; + QString mExtended; + QString mStreet; + QString mLocality; + QString mRegion; + QString mPostalCode; + QString mCountry; + QString mLabel; +}; + +Address::Address() + : d(new Private) +{ +} + +Address::Address(Type type) + : d(new Private) +{ + d->mType = type; +} + +Address::Address(const Address &other) + : d(other.d) +{ +} + +Address::~Address() +{ +} + +Address &Address::operator=(const Address &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool Address::operator==(const Address &other) const +{ + if (d->mId != other.d->mId) { + return false; + } + if (d->mType != other.d->mType) { + return false; + } + if (d->mPostOfficeBox != other.d->mPostOfficeBox) { + return false; + } + if (d->mExtended != other.d->mExtended) { + return false; + } + if (d->mStreet != other.d->mStreet) { + return false; + } + if (d->mLocality != other.d->mLocality) { + return false; + } + if (d->mRegion != other.d->mRegion) { + return false; + } + if (d->mPostalCode != other.d->mPostalCode) { + return false; + } + if (d->mCountry != other.d->mCountry) { + return false; + } + if (d->mLabel != other.d->mLabel) { + return false; + } + + if (d->mGeo != other.d->mGeo) { + return false; + } + + return true; +} + +bool Address::operator!=(const Address &a) const +{ + return !(a == *this); +} + +bool Address::isEmpty() const +{ + return d->mEmpty; +} + +void Address::clear() +{ + *this = Address(); +} + +void Address::setId(const QString &id) +{ + d->mEmpty = false; + d->mId = id; +} + +QString Address::id() const +{ + return d->mId; +} + +void Address::setType(Type type) +{ + d->mEmpty = false; + d->mType = type; +} + +Address::Type Address::type() const +{ + return d->mType; +} + +QString Address::typeLabel(Type type) +{ + QString label; + bool first = true; + const TypeList list = typeList(); + + TypeList::ConstIterator it; + TypeList::ConstIterator end(list.end()); + for (it = list.begin(); it != end; ++it) { + // these are actually flags + const TypeFlag flag = static_cast(static_cast(*it)); + if (type & flag) { + if (!first) { + label.append(QLatin1Char('/')); + } + + label.append(typeFlagLabel(flag)); + + if (first) { + first = false; + } + } + } + return label; +} + +QString Address::typeLabel() const +{ + QString label; + bool first = true; + + const TypeList list = typeList(); + + TypeList::ConstIterator it; + for (it = list.begin(); it != list.end(); ++it) { + if ((type() & (*it)) && ((*it) != Pref)) { + if (!first) { + label.append(QLatin1Char('/')); + } + label.append(typeLabel(*it)); + if (first) { + first = false; + } + } + } + + return label; +} + +void Address::setPostOfficeBox(const QString &postOfficeBox) +{ + d->mEmpty = false; + d->mPostOfficeBox = postOfficeBox; +} + +QString Address::postOfficeBox() const +{ + return d->mPostOfficeBox; +} + +QString Address::postOfficeBoxLabel() +{ + return i18n("Post Office Box"); +} + +void Address::setExtended(const QString &extended) +{ + d->mEmpty = false; + d->mExtended = extended; +} + +QString Address::extended() const +{ + return d->mExtended; +} + +QString Address::extendedLabel() +{ + return i18n("Extended Address Information"); +} + +void Address::setStreet(const QString &street) +{ + d->mEmpty = false; + d->mStreet = street; +} + +QString Address::street() const +{ + return d->mStreet; +} + +QString Address::streetLabel() +{ + return i18n("Street"); +} + +void Address::setLocality(const QString &locality) +{ + d->mEmpty = false; + d->mLocality = locality; +} + +QString Address::locality() const +{ + return d->mLocality; +} + +QString Address::localityLabel() +{ + return i18n("Locality"); +} + +void Address::setRegion(const QString ®ion) +{ + d->mEmpty = false; + d->mRegion = region; +} + +QString Address::region() const +{ + return d->mRegion; +} + +QString Address::regionLabel() +{ + return i18n("Region"); +} + +void Address::setPostalCode(const QString &postalCode) +{ + d->mEmpty = false; + d->mPostalCode = postalCode; +} + +QString Address::postalCode() const +{ + return d->mPostalCode; +} + +QString Address::postalCodeLabel() +{ + return i18n("Postal Code"); +} + +void Address::setCountry(const QString &country) +{ + d->mEmpty = false; + d->mCountry = country; +} + +QString Address::country() const +{ + return d->mCountry; +} + +QString Address::countryLabel() +{ + return i18n("Country"); +} + +void Address::setLabel(const QString &label) +{ + d->mEmpty = false; + d->mLabel = label; +} + +QString Address::label() const +{ + return d->mLabel; +} + +QString Address::labelLabel() +{ + return i18n("Delivery Label"); +} + +Address::TypeList Address::typeList() +{ + static TypeList list; + + if (list.isEmpty()) { + list << Dom << Intl << Postal << Parcel << Home << Work << Pref; + } + + return list; +} + +QString Address::typeFlagLabel(TypeFlag type) +{ + switch (type) { + case Dom: + return i18nc("Address is in home country", "Domestic"); + case Intl: + return i18nc("Address is not in home country", "International"); + case Postal: + return i18nc("Address for delivering letters", "Postal"); + case Parcel: + return i18nc("Address for delivering packages", "Parcel"); + case Home: + return i18nc("Home Address", "Home"); + case Work: + return i18nc("Work Address", "Work"); + case Pref: + return i18n("Preferred Address"); + } + return i18nc("another type of address", "Other"); +} + +void Address::setGeo(const Geo &geo) +{ + d->mEmpty = false; + d->mGeo = geo; +} + +Geo Address::geo() const +{ + return d->mGeo; +} + +QString Address::toString() const +{ + QString str = QLatin1String("Address {\n"); + str += QStringLiteral(" IsEmpty: %1\n"). + arg(d->mEmpty ? QStringLiteral("true") : QStringLiteral("false")); + str += QStringLiteral(" Id: %1\n").arg(d->mId); + str += QStringLiteral(" Type: %1\n").arg(typeLabel(d->mType)); + str += QStringLiteral(" Post office box: %1\n").arg(d->mPostOfficeBox); + str += QStringLiteral(" Extended: %1\n").arg(d->mExtended); + str += QStringLiteral(" Street: %1\n").arg(d->mStreet); + str += QStringLiteral(" Locality: %1\n").arg(d->mLocality); + str += QStringLiteral(" Region: %1\n").arg(d->mRegion); + str += QStringLiteral(" Postal code: %1\n").arg(d->mPostalCode); + str += QStringLiteral(" Country: %1\n").arg(d->mCountry); + str += QStringLiteral(" Label: %1\n").arg(d->mLabel); + str += QStringLiteral(" Geo: %1\n").arg(d->mGeo.toString()); + str += QLatin1String("}\n"); + + return str; +} + +static QString countryCodeFromLocale() +{ + const auto n = QLocale().name(); // this is in the form _, with the exception of 'C' + const auto idx = n.indexOf(QLatin1Char('_')); + if (idx > 0) { + return n.mid(idx + 1).toLower(); + } + return {}; +} + +QString Address::formattedAddress(const QString &realName, const QString &orgaName) const +{ + QString ciso; + QString addrTemplate; + QString ret; + + // FIXME: first check for iso-country-field and prefer that one + if (!country().isEmpty()) { + ciso = countryToISO(country()); + } else { + // fall back to our own country + ciso = countryCodeFromLocale(); + } + static KConfig entry(QStringLiteral(":/org.kde.kcontacts/addressformatrc")); + + KConfigGroup group = entry.group(ciso); + // decide whether this needs special business address formatting + if (orgaName.isEmpty()) { + addrTemplate = group.readEntry("AddressFormat"); + } else { + addrTemplate = group.readEntry("BusinessAddressFormat"); + if (addrTemplate.isEmpty()) { + addrTemplate = group.readEntry("AddressFormat"); + } + } + + // in the case there's no format found at all, default to what we've always + // used: + if (addrTemplate.isEmpty()) { + qCWarning(KCONTACTS_LOG) << "address format database incomplete" + << "(no format for locale" << ciso + << "found). Using default address formatting."; + addrTemplate = QStringLiteral("%0(%n\\n)%0(%cm\\n)%0(%s\\n)%0(PO BOX %p\\n)%0(%l%w%r)%,%z"); + } + + // scan + parseAddressTemplateSection(addrTemplate, ret, realName, orgaName, *this); + + // now add the country line if needed (formatting this time according to + // the rules of our own system country ) + if (!country().isEmpty()) { + KConfigGroup group = entry.group(countryCodeFromLocale()); + QString cpos = group.readEntry("AddressCountryPosition"); + if (QLatin1String("BELOW") == cpos || cpos.isEmpty()) { + ret = ret + QLatin1String("\n\n") + country().toUpper(); + } else if (QLatin1String("below") == cpos) { + ret = ret + QLatin1String("\n\n") + country(); + } else if (QLatin1String("ABOVE") == cpos) { + ret = country().toUpper() + QLatin1String("\n\n") + ret; + } else if (QLatin1String("above") == cpos) { + ret = country() + QLatin1String("\n\n") + ret; + } + } + + return ret; +} + +struct IsoCache { + QHash countryToIso; + QHash isoToCountry; +}; +Q_GLOBAL_STATIC(IsoCache, sIsoCache) + +QString Address::countryToISO(const QString &cname) +{ + // we search a map file for translations from country names to + // iso codes, storing caching things in a QHash for faster future + // access. + + const auto it = sIsoCache->countryToIso.constFind(cname); + if (it != sIsoCache->countryToIso.constEnd()) { + return it.value(); + } + + QFile file(QStringLiteral(":/org.kde.kcontacts/countrytransl.map")); + if (file.open(QIODevice::ReadOnly)) { + QTextStream s(&file); + QString strbuf = s.readLine(); + while (!strbuf.isEmpty()) { + const auto countryInfo = strbuf.splitRef(QLatin1Char('\t'), QString::KeepEmptyParts); + if (countryInfo[0] == cname) { + file.close(); + const auto iso = countryInfo[1].toString(); + sIsoCache->countryToIso.insert(cname, iso); + return iso; + } + strbuf = s.readLine(); + } + file.close(); + } + + return {}; +} + +QString Address::ISOtoCountry(const QString &ISOname) +{ + // get country name from ISO country code (e.g. "no" -> i18n("Norway")) + const auto iso = ISOname.simplified().toLower(); + if (iso.simplified().isEmpty()) { + return QString(); + } + + const auto it = sIsoCache->isoToCountry.constFind(iso); + if (it != sIsoCache->isoToCountry.constEnd()) { + return it.value(); + } + + QFile file(QStringLiteral(":/org.kde.kcontacts/countrytransl.map")); + if (file.open(QIODevice::ReadOnly)) { + QTextStream s(&file); + QString searchStr = QLatin1Char('\t') + iso; + QString strbuf = s.readLine(); + while (!strbuf.isEmpty()) { + int pos; + if ((pos = strbuf.indexOf(searchStr)) != -1) { + file.close(); + const auto country = i18n(strbuf.leftRef(pos).toUtf8().constData()); + sIsoCache->isoToCountry.insert(iso, country); + sIsoCache->countryToIso.insert(country, iso); + return country; + } + strbuf = s.readLine(); + } + file.close(); + } + + return ISOname; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Address &addr) +{ + return s << addr.d->mId << (uint)addr.d->mType << addr.d->mPostOfficeBox + << addr.d->mExtended << addr.d->mStreet << addr.d->mLocality + << addr.d->mRegion << addr.d->mPostalCode << addr.d->mCountry + << addr.d->mLabel << addr.d->mEmpty << addr.d->mGeo; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Address &addr) +{ + uint type; + s >> addr.d->mId >> type >> addr.d->mPostOfficeBox >> addr.d->mExtended + >> addr.d->mStreet >> addr.d->mLocality >> addr.d->mRegion + >> addr.d->mPostalCode >> addr.d->mCountry >> addr.d->mLabel + >> addr.d->mEmpty >> addr.d->mGeo; + + addr.d->mType = Address::Type(type); + + return s; +} diff --git a/src/address.h b/src/address.h new file mode 100644 index 0000000..4778e1a --- /dev/null +++ b/src/address.h @@ -0,0 +1,351 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_ADDRESS_H +#define KCONTACTS_ADDRESS_H + +#include +#include +#include + +#include "kcontacts_export.h" + +namespace KContacts { +class Geo; +/** + @brief + Postal address information. + + This class represents information about a postal address. +*/ +class KCONTACTS_EXPORT Address +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &s, const Address &addr); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &s, Address &addr); + +public: + /** + List of addresses. + */ + typedef QVector
List; + + /** + Address types: + */ + enum TypeFlag { + Dom = 1, /**< domestic */ + Intl = 2, /**< international */ + Postal = 4, /**< postal */ + Parcel = 8, /**< parcel */ + Home = 16, /**< home address */ + Work = 32, /**< address at work */ + Pref = 64 /**< preferred address */ + }; + + Q_DECLARE_FLAGS(Type, TypeFlag) + + /** + List of address types. + */ + typedef QList TypeList; + + /** + Creates an empty address. + */ + Address(); + + /** + Creates an address of the given @p type. + */ + Address(Type type); + + /** + Copy constructor. + */ + Address(const Address &address); + + /** + Destroys the address. + */ + ~Address(); + + /** + Equality operator. + + @param addr the address to compare to + @return @c true if @c this and @p addr are equal, otherwise @c false + */ + Q_REQUIRED_RESULT bool operator==(const Address &other) const; + + /** + Not-equal operator. + + @param addr the address to compare to + @return @c true if @c this and @p addr are not equal, otherwise @c false + */ + Q_REQUIRED_RESULT bool operator!=(const Address &other) const; + + /** + Assignment operator. + + @param addr the address data to assign to @c this + @return a reference to @c this + */ + Address &operator=(const Address &other); + + /** + Returns true, if the address is empty. + */ + Q_REQUIRED_RESULT bool isEmpty() const; + + /** + Clears all entries of the address. + */ + void clear(); + + /** + Sets the unique @p identifier. + */ + void setId(const QString &identifier); + + /** + Returns the unique identifier. + */ + Q_REQUIRED_RESULT QString id() const; + + /** + Sets the type of address. See enum for definiton of types. + + @param type type, can be a bitwise or of multiple types. + */ + void setType(Type type); + + /** + Returns the type of address. Can be a bitwise or of multiple types. + */ + Q_REQUIRED_RESULT Type type() const; + + /** + Returns a translated string of all types the address has. + */ + Q_REQUIRED_RESULT QString typeLabel() const; + + /** + Sets the post office box. + */ + void setPostOfficeBox(const QString &postOfficeBox); + + /** + Returns the post office box. + */ + Q_REQUIRED_RESULT QString postOfficeBox() const; + + /** + Returns the translated label for post office box field. + */ + static QString postOfficeBoxLabel(); + + /** + Sets the @p extended address information. + */ + void setExtended(const QString &extended); + + /** + Returns the extended address information. + */ + Q_REQUIRED_RESULT QString extended() const; + + /** + Returns the translated label for extended field. + */ + static QString extendedLabel(); + + /** + Sets the @p street (including house number). + */ + void setStreet(const QString &street); + + /** + Returns the street. + */ + Q_REQUIRED_RESULT QString street() const; + + /** + Returns the translated label for street field. + */ + static QString streetLabel(); + + /** + Sets the @p locality, e.g. city. + + @param locality the locality of the address, e.g. city + */ + void setLocality(const QString &locality); + + /** + Returns the locality. + */ + Q_REQUIRED_RESULT QString locality() const; + + /** + Returns the translated label for locality field. + */ + static QString localityLabel(); + + /** + Sets the @p region, e.g. state. + + @param region the region the address falls into, e.g. state + */ + void setRegion(const QString ®ion); + + /** + Returns the region. + */ + Q_REQUIRED_RESULT QString region() const; + + /** + Returns the translated label for region field. + */ + static QString regionLabel(); + + /** + Sets the postal @p code. + */ + void setPostalCode(const QString &code); + + /** + Returns the postal code. + */ + Q_REQUIRED_RESULT QString postalCode() const; + + /** + Returns the translated label for postal code field. + */ + static QString postalCodeLabel(); + + /** + Sets the @p country. + */ + void setCountry(const QString &country); + + /** + Returns the country. + */ + Q_REQUIRED_RESULT QString country() const; + + /** + Returns the translated label for country field. + */ + static QString countryLabel(); + + /** + Sets the delivery @p label. This is the literal text to be used as label. + + @param label the string to use for delivery labels + */ + void setLabel(const QString &label); + + /** + Returns the delivery label. + */ + Q_REQUIRED_RESULT QString label() const; + + /** + Returns the translated label for delivery label field. + */ + static QString labelLabel(); + + /** + Returns the list of available types. + */ + static TypeList typeList(); + + /** + Returns the translated label for the given @p type. + */ + static QString typeLabel(Type type); + + /** + Returns a string representation of the address. + */ + Q_REQUIRED_RESULT QString toString() const; + + /** + Returns this address formatted according to the country-specific + address formatting rules. The formatting rules applied depend on + either the addresses {@link #country country} field, or (if the + latter is empty) on the system country setting. If companyName is + provided, an available business address format will be preferred. + + @param realName the formatted name of the contact + @param orgaName the name of the organization or company + @return the formatted address (containing newline characters) + */ + Q_REQUIRED_RESULT QString formattedAddress(const QString &realName = QString(), const QString &orgaName = QString()) const; + + /** + Returns ISO code for a localized country name. Only localized country + names will be understood. + @param cname name of the country + @return two digit ISO code, empty string if the country was not + recognized + */ + static QString countryToISO(const QString &cname); + + /** + Returns a localized country name for a ISO code. + This might be replaced by a KLocale method in the future. + @param ISOname two digit ISO code + @return localized name of the country + */ + static QString ISOtoCountry(const QString &ISOname); + + static QString typeFlagLabel(TypeFlag type); + + /** + Set geographic position. + */ + void setGeo(const Geo &geo); + + /** + Return geographic position. + */ + Q_REQUIRED_RESULT Geo geo() const; + +private: + class Private; + QSharedDataPointer d; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(Address::Type) + +/** + Serializes the @p address object into the @p stream. +*/ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Address &address); + +/** + Initializes the @p address object from the @p stream. +*/ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Address &address); +} + +#endif diff --git a/src/addressee.cpp b/src/addressee.cpp new file mode 100644 index 0000000..1b71f92 --- /dev/null +++ b/src/addressee.cpp @@ -0,0 +1,2575 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + Copyright (c) 2003 Carsten Pfeiffer + Copyright (c) 2005 Ingo Kloecker + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include + +#include "kcontacts_debug.h" +#include + +#include "addresseehelper.h" +#include "field.h" +#include "sortmode.h" + +#include "addressee.h" + +using namespace KContacts; + +static bool matchBinaryPattern(int value, int pattern); + +template +static bool listEquals(const QVector &list, const QVector &pattern); +static bool listEquals(const QStringList &list, const QStringList &pattern); + +class Q_DECL_HIDDEN Addressee::Private : public QSharedData +{ +public: + Private() + : mUid(QUuid::createUuid().toString().mid(1, 36)) + , mEmpty(true) + , mChanged(false) + , mBirthdayWithTime(false) + { + //We avoid the curly braces so the string is RFC4122 compliant and can be used as urn + } + + Private(const Private &other) + : QSharedData(other) + { + mUid = other.mUid; + mName = other.mName; + mFormattedName = other.mFormattedName; + mFamilyName = other.mFamilyName; + mGivenName = other.mGivenName; + mAdditionalName = other.mAdditionalName; + mPrefix = other.mPrefix; + mSuffix = other.mSuffix; + mBirthday = other.mBirthday; + mBirthdayWithTime = other.mBirthdayWithTime; + mMailer = other.mMailer; + mTimeZone = other.mTimeZone; + mGeo = other.mGeo; + mDepartment = other.mDepartment; + mNote = other.mNote; + mProductId = other.mProductId; + mRevision = other.mRevision; + mSortString = other.mSortString; + mSecrecy = other.mSecrecy; + mLogo = other.mLogo; + mPhoto = other.mPhoto; + mSound = other.mSound; + + mPhoneNumbers = other.mPhoneNumbers; + mAddresses = other.mAddresses; + mKeys = other.mKeys; + mLangs = other.mLangs; + mGender = other.mGender; + mEmails = other.mEmails; + mCategories = other.mCategories; + mCustomFields = other.mCustomFields; + mCalendarUrl = other.mCalendarUrl; + mSoundListExtra = other.mSoundListExtra; + mPhotoExtraList = other.mPhotoExtraList; + mLogoExtraList = other.mLogoExtraList; + mUrlExtraList = other.mUrlExtraList; + mMembers = other.mMembers; + mRelationShips = other.mRelationShips; + mSources = other.mSources; + mEmpty = other.mEmpty; + mImpps = other.mImpps; + mChanged = other.mChanged; + mTitleExtraList = other.mTitleExtraList; + mRoleExtraList = other.mRoleExtraList; + mOrgExtraList = other.mOrgExtraList; + } + + ~Private() + { + } + + QString mUid; + QString mName; + QString mFormattedName; + QString mFamilyName; + QString mGivenName; + QString mAdditionalName; + QString mPrefix; + QString mSuffix; + QDateTime mBirthday; + QString mMailer; + TimeZone mTimeZone; + Geo mGeo; + QString mDepartment; + QString mNote; + QString mProductId; + QDateTime mRevision; + QString mSortString; + Secrecy mSecrecy; + Picture mLogo; + Picture mPhoto; + Sound mSound; + + PhoneNumber::List mPhoneNumbers; + Address::List mAddresses; + Key::List mKeys; + Email::List mEmails; + Lang::List mLangs; + Impp::List mImpps; + Gender mGender; + QString mKind; + QStringList mCategories; + QHash mCustomFields; + CalendarUrl::List mCalendarUrl; + Sound::List mSoundListExtra; + Picture::List mPhotoExtraList; + Picture::List mLogoExtraList; + ResourceLocatorUrl::List mUrlExtraList; + QVector mSources; + QStringList mMembers; + Related::List mRelationShips; + FieldGroup::List mFieldGroupList; + Title::List mTitleExtraList; + Role::List mRoleExtraList; + Org::List mOrgExtraList; + NickName::List mNickNameExtraList; + ClientPidMap::List mClientPidMapList; + bool mEmpty : 1; + bool mChanged : 1; + bool mBirthdayWithTime; + + static KContacts::SortMode *mSortMode; +}; + +KContacts::SortMode *Addressee::Private::mSortMode = nullptr; + +Addressee::Addressee() + : d(new Private) +{ +} + +Addressee::~Addressee() +{ +} + +Addressee::Addressee(const Addressee &other) + : d(other.d) +{ +} + +Addressee &Addressee::operator=(const Addressee &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool Addressee::operator==(const Addressee &addressee) const +{ + if (d->mUid != addressee.d->mUid) { + qCDebug(KCONTACTS_LOG) << "uid differs"; + return false; + } + + if (d->mName != addressee.d->mName + && !(d->mName.isEmpty() && addressee.d->mName.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "name differs"; + return false; + } + + if (d->mFormattedName != addressee.d->mFormattedName + && !(d->mFormattedName.isEmpty() && addressee.d->mFormattedName.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "formattedName differs"; + return false; + } + + if (d->mFamilyName != addressee.d->mFamilyName + && !(d->mFamilyName.isEmpty() && addressee.d->mFamilyName.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "familyName differs"; + return false; + } + + if (d->mGivenName != addressee.d->mGivenName + && !(d->mGivenName.isEmpty() && addressee.d->mGivenName.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "givenName differs"; + return false; + } + + if (d->mAdditionalName != addressee.d->mAdditionalName + && !(d->mAdditionalName.isEmpty() && addressee.d->mAdditionalName.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "additionalName differs"; + return false; + } + + if (d->mPrefix != addressee.d->mPrefix + && !(d->mPrefix.isEmpty() && addressee.d->mPrefix.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "prefix differs"; + return false; + } + + if (d->mSuffix != addressee.d->mSuffix + && !(d->mSuffix.isEmpty() && addressee.d->mSuffix.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "suffix differs"; + return false; + } + + if (d->mBirthday != addressee.d->mBirthday || d->mBirthdayWithTime != addressee.d->mBirthdayWithTime) { + qCDebug(KCONTACTS_LOG) << "birthday differs"; + return false; + } + + if (d->mMailer != addressee.d->mMailer + && !(d->mMailer.isEmpty() && addressee.d->mMailer.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "mailer differs"; + return false; + } + + if (d->mTimeZone != addressee.d->mTimeZone) { + qCDebug(KCONTACTS_LOG) << "timeZone differs"; + return false; + } + + if (d->mGeo != addressee.d->mGeo) { + qCDebug(KCONTACTS_LOG) << "geo differs"; + return false; + } + + if (d->mDepartment != addressee.d->mDepartment + && !(d->mDepartment.isEmpty() && addressee.d->mDepartment.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "department differs"; + return false; + } + + if (d->mNote != addressee.d->mNote + && !(d->mNote.isEmpty() && addressee.d->mNote.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "note differs"; + return false; + } + + if (d->mProductId != addressee.d->mProductId + && !(d->mProductId.isEmpty() && addressee.d->mProductId.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "productId differs"; + return false; + } + + if (d->mSortString != addressee.d->mSortString + && !(d->mSortString.isEmpty() && addressee.d->mSortString.isEmpty())) { + qCDebug(KCONTACTS_LOG) << "sortString differs"; + return false; + } + + if (d->mSecrecy != addressee.d->mSecrecy) { + qCDebug(KCONTACTS_LOG) << "secrecy differs"; + return false; + } + + if (d->mLogo != addressee.d->mLogo) { + qCDebug(KCONTACTS_LOG) << "logo differs"; + return false; + } + + if (d->mPhoto != addressee.d->mPhoto) { + qCDebug(KCONTACTS_LOG) << "photo differs"; + return false; + } + + if (d->mSound != addressee.d->mSound) { + qCDebug(KCONTACTS_LOG) << "sound differs"; + return false; + } + + if (!listEquals(d->mPhoneNumbers, addressee.d->mPhoneNumbers)) { + qCDebug(KCONTACTS_LOG) << "phoneNumbers differs"; + return false; + } + + if (!listEquals(d->mAddresses, addressee.d->mAddresses)) { + qCDebug(KCONTACTS_LOG) << "addresses differs"; + return false; + } + + if (!listEquals(d->mKeys, addressee.d->mKeys)) { + qCDebug(KCONTACTS_LOG) << "keys differs"; + return false; + } + if (!listEquals(d->mEmails, addressee.d->mEmails)) { + qCDebug(KCONTACTS_LOG) << "emails differs"; + return false; + } + + if (!listEquals(d->mCategories, addressee.d->mCategories)) { + qCDebug(KCONTACTS_LOG) << "categories differs"; + return false; + } + + if (d->mCustomFields != addressee.d->mCustomFields) { + qCDebug(KCONTACTS_LOG) << "custom differs"; + return false; + } + if (d->mLangs != addressee.d->mLangs) { + qCDebug(KCONTACTS_LOG) << "langs differs"; + return false; + } + if (d->mImpps != addressee.d->mImpps) { + qCDebug(KCONTACTS_LOG) << "impps differs"; + return false; + } + if (d->mGender != addressee.d->mGender) { + qCDebug(KCONTACTS_LOG) << "gender differs"; + return false; + } + if (d->mKind != addressee.d->mKind) { + qCDebug(KCONTACTS_LOG) << "kind differs"; + return false; + } + if (!listEquals(d->mCalendarUrl, addressee.d->mCalendarUrl)) { + qCDebug(KCONTACTS_LOG) << "calendarUrl differs"; + return false; + } + if (!listEquals(d->mSoundListExtra, addressee.d->mSoundListExtra)) { + qCDebug(KCONTACTS_LOG) << "Extra sound differs"; + return false; + } + if (!listEquals(d->mPhotoExtraList, addressee.d->mPhotoExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra photo differs"; + return false; + } + if (!listEquals(d->mLogoExtraList, addressee.d->mLogoExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra logo differs"; + return false; + } + if (!listEquals(d->mUrlExtraList, addressee.d->mUrlExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra url differs"; + return false; + } + if (!listEquals(d->mMembers, addressee.d->mMembers)) { + qCDebug(KCONTACTS_LOG) << "Extra url differs"; + return false; + } + if (!listEquals(d->mRelationShips, addressee.d->mRelationShips)) { + qCDebug(KCONTACTS_LOG) << "RelationShips differs"; + return false; + } + if (!listEquals(d->mSources, addressee.d->mSources)) { + qCDebug(KCONTACTS_LOG) << "Sources differs"; + return false; + } + + if (!listEquals(d->mFieldGroupList, addressee.d->mFieldGroupList)) { + qCDebug(KCONTACTS_LOG) << "Field Groups differs"; + return false; + } + + if (!listEquals(d->mTitleExtraList, addressee.d->mTitleExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra TitleList differs"; + return false; + } + + if (!listEquals(d->mRoleExtraList, addressee.d->mRoleExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra RoleList differs"; + return false; + } + + if (!listEquals(d->mOrgExtraList, addressee.d->mOrgExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra Organization List differs"; + return false; + } + + if (!listEquals(d->mNickNameExtraList, addressee.d->mNickNameExtraList)) { + qCDebug(KCONTACTS_LOG) << "Extra NickName List differs"; + return false; + } + + if (!listEquals(d->mClientPidMapList, addressee.d->mClientPidMapList)) { + qCDebug(KCONTACTS_LOG) << "ClientPidMap List differs"; + return false; + } + return true; +} + +bool Addressee::operator!=(const Addressee &a) const +{ + return !(a == *this); +} + +bool Addressee::isEmpty() const +{ + return d->mEmpty; +} + +void Addressee::setUid(const QString &id) +{ + if (id == d->mUid) { + return; + } + + d->mEmpty = false; + d->mUid = id; +} + +QString Addressee::uid() const +{ + return d->mUid; +} + +QString Addressee::uidLabel() +{ + return i18n("Unique Identifier"); +} + +void Addressee::setName(const QString &name) +{ + if (name == d->mName) { + return; + } + + d->mEmpty = false; + d->mName = name; +} + +QString Addressee::name() const +{ + return d->mName; +} + +QString Addressee::nameLabel() +{ + return i18n("Name"); +} + +void Addressee::setKind(const QString &kind) +{ + if (kind == d->mKind) { + return; + } + + d->mEmpty = false; + d->mKind = kind; +} + +QString Addressee::kind() const +{ + return d->mKind; +} + +void Addressee::insertExtraSound(const Sound &sound) +{ + d->mEmpty = false; + d->mSoundListExtra.append(sound); +} + +Sound::List Addressee::extraSoundList() const +{ + return d->mSoundListExtra; +} + +void Addressee::insertExtraPhoto(const Picture &picture) +{ + d->mEmpty = false; + d->mPhotoExtraList.append(picture); +} + +Picture::List Addressee::extraPhotoList() const +{ + return d->mPhotoExtraList; +} + +void Addressee::insertExtraLogo(const Picture &logo) +{ + d->mEmpty = false; + d->mLogoExtraList.append(logo); +} + +Picture::List Addressee::extraLogoList() const +{ + return d->mLogoExtraList; +} + +void Addressee::setExtraSoundList(const Sound::List &soundList) +{ + d->mEmpty = false; + d->mSoundListExtra = soundList; +} + +void Addressee::setExtraPhotoList(const Picture::List &pictureList) +{ + d->mEmpty = false; + d->mPhotoExtraList = pictureList; +} + +void Addressee::setExtraLogoList(const Picture::List &logoList) +{ + d->mEmpty = false; + d->mLogoExtraList = logoList; +} + +void Addressee::insertExtraUrl(const ResourceLocatorUrl &url) +{ + if (url.isValid()) { + d->mEmpty = false; + d->mUrlExtraList.append(url); + } +} + +void Addressee::setExtraUrlList(const ResourceLocatorUrl::List &urlList) +{ + d->mEmpty = false; + d->mUrlExtraList = urlList; +} + +ResourceLocatorUrl::List Addressee::extraUrlList() const +{ + return d->mUrlExtraList; +} + +void Addressee::insertSourceUrl(const QUrl &url) +{ + d->mEmpty = false; + d->mSources.append(url); +} + +void Addressee::setSourcesUrlList(const QVector &urlList) +{ + d->mEmpty = false; + d->mSources = urlList; +} + +QVector Addressee::sourcesUrlList() const +{ + return d->mSources; +} + +FieldGroup::List Addressee::fieldGroupList() const +{ + return d->mFieldGroupList; +} + +void Addressee::setFieldGroupList(const FieldGroup::List &fieldGroupList) +{ + d->mEmpty = false; + d->mFieldGroupList = fieldGroupList; +} + +void Addressee::insertFieldGroup(const FieldGroup &fieldGroup) +{ + if (fieldGroup.isValid()) { + d->mEmpty = false; + //TODO don't duplicate ? + d->mFieldGroupList.append(fieldGroup); + } +} + +ClientPidMap::List Addressee::clientPidMapList() const +{ + return d->mClientPidMapList; +} + +void Addressee::setClientPidMapList(const ClientPidMap::List &clientpidmaplist) +{ + d->mEmpty = false; + d->mClientPidMapList = clientpidmaplist; +} + +void Addressee::insertClientPidMap(const ClientPidMap &clientpidmap) +{ + if (clientpidmap.isValid()) { + d->mEmpty = false; + //TODO don't duplicate ? + d->mClientPidMapList.append(clientpidmap); + } +} + +void Addressee::insertImpp(const Impp &impp) +{ + if (impp.isValid()) { + d->mEmpty = false; + //Don't duplicate ? + d->mImpps.append(impp); + } +} + +void Addressee::setImppList(const Impp::List &imppList) +{ + d->mEmpty = false; + d->mImpps = imppList; +} + +Impp::List Addressee::imppList() const +{ + return d->mImpps; +} + +void Addressee::insertCalendarUrl(const CalendarUrl &calendarUrl) +{ + d->mEmpty = false; + //TODO verify that there is not same calendarurl + if (calendarUrl.isValid()) { + d->mCalendarUrl.append(calendarUrl); + } +} + +CalendarUrl::List Addressee::calendarUrlList() const +{ + return d->mCalendarUrl; +} + +void Addressee::setFormattedName(const QString &formattedName) +{ + if (formattedName == d->mFormattedName) { + return; + } + + d->mEmpty = false; + d->mFormattedName = formattedName; +} + +QString Addressee::formattedName() const +{ + return d->mFormattedName; +} + +QString Addressee::formattedNameLabel() +{ + return i18n("Formatted Name"); +} + +void Addressee::setFamilyName(const QString &familyName) +{ + if (familyName == d->mFamilyName) { + return; + } + + d->mEmpty = false; + d->mFamilyName = familyName; +} + +QString Addressee::familyName() const +{ + return d->mFamilyName; +} + +QString Addressee::familyNameLabel() +{ + return i18n("Family Name"); +} + +void Addressee::setGivenName(const QString &givenName) +{ + if (givenName == d->mGivenName) { + return; + } + + d->mEmpty = false; + d->mGivenName = givenName; +} + +QString Addressee::givenName() const +{ + return d->mGivenName; +} + +QString Addressee::givenNameLabel() +{ + return i18n("Given Name"); +} + +void Addressee::setAdditionalName(const QString &additionalName) +{ + if (additionalName == d->mAdditionalName) { + return; + } + + d->mEmpty = false; + d->mAdditionalName = additionalName; +} + +QString Addressee::additionalName() const +{ + return d->mAdditionalName; +} + +QString Addressee::additionalNameLabel() +{ + return i18n("Additional Names"); +} + +void Addressee::setPrefix(const QString &prefix) +{ + if (prefix == d->mPrefix) { + return; + } + + d->mEmpty = false; + d->mPrefix = prefix; +} + +QString Addressee::prefix() const +{ + return d->mPrefix; +} + +QString Addressee::prefixLabel() +{ + return i18n("Honorific Prefixes"); +} + +void Addressee::setSuffix(const QString &suffix) +{ + if (suffix == d->mSuffix) { + return; + } + + d->mEmpty = false; + d->mSuffix = suffix; +} + +QString Addressee::suffix() const +{ + return d->mSuffix; +} + +QString Addressee::suffixLabel() +{ + return i18n("Honorific Suffixes"); +} + +void Addressee::setNickName(const QString &nickName) +{ + NickName t(nickName); + if (!d->mNickNameExtraList.isEmpty()) { + t = d->mNickNameExtraList.takeFirst(); + t.setNickName(nickName); + d->mNickNameExtraList.prepend(t); + d->mEmpty = false; + } else { + insertExtraNickName(t); + } +} + +void Addressee::setNickName(const NickName &nickName) +{ + insertExtraNickName(nickName); +} + +void Addressee::insertExtraNickName(const NickName &nickName) +{ + if (nickName.isValid()) { + d->mEmpty = false; + d->mNickNameExtraList.append(nickName); + } +} + +void Addressee::setExtraNickNameList(const NickName::List &nickNameList) +{ + d->mEmpty = false; + d->mNickNameExtraList = nickNameList; +} + +NickName::List Addressee::extraNickNameList() const +{ + return d->mNickNameExtraList; +} + +QString Addressee::nickName() const +{ + if (d->mNickNameExtraList.isEmpty()) { + return {}; + } else { + return d->mNickNameExtraList.at(0).nickname(); + } +} + +QString Addressee::nickNameLabel() +{ + return i18n("Nick Name"); +} + +void Addressee::setBirthday(const QDateTime &birthday, bool withTime) +{ + if (birthday == d->mBirthday && d->mBirthdayWithTime == withTime) { + return; + } + + d->mEmpty = false; + d->mBirthday = birthday; + if (!withTime) { + d->mBirthday.setTime(QTime()); + } + d->mBirthdayWithTime = withTime; +} + +void Addressee::setBirthday(const QDate &birthday) +{ + if (birthday == d->mBirthday.date() && !d->mBirthdayWithTime) { + return; + } + + d->mEmpty = false; + d->mBirthday = QDateTime(birthday, QTime()); + d->mBirthdayWithTime = false; +} + +QDateTime Addressee::birthday() const +{ + return d->mBirthday; +} + +bool Addressee::birthdayHasTime() const +{ + return d->mBirthdayWithTime; +} + +QString Addressee::birthdayLabel() +{ + return i18n("Birthday"); +} + +QString Addressee::homeAddressStreetLabel() +{ + return i18n("Home Address Street"); +} + +QString Addressee::homeAddressPostOfficeBoxLabel() +{ + return i18n("Home Address Post Office Box"); +} + +QString Addressee::homeAddressLocalityLabel() +{ + return i18n("Home Address City"); +} + +QString Addressee::homeAddressRegionLabel() +{ + return i18n("Home Address State"); +} + +QString Addressee::homeAddressPostalCodeLabel() +{ + return i18n("Home Address Zip Code"); +} + +QString Addressee::homeAddressCountryLabel() +{ + return i18n("Home Address Country"); +} + +QString Addressee::homeAddressLabelLabel() +{ + return i18n("Home Address Label"); +} + +QString Addressee::businessAddressStreetLabel() +{ + return i18n("Business Address Street"); +} + +QString Addressee::businessAddressPostOfficeBoxLabel() +{ + return i18n("Business Address Post Office Box"); +} + +QString Addressee::businessAddressLocalityLabel() +{ + return i18n("Business Address City"); +} + +QString Addressee::businessAddressRegionLabel() +{ + return i18n("Business Address State"); +} + +QString Addressee::businessAddressPostalCodeLabel() +{ + return i18n("Business Address Zip Code"); +} + +QString Addressee::businessAddressCountryLabel() +{ + return i18n("Business Address Country"); +} + +QString Addressee::businessAddressLabelLabel() +{ + return i18n("Business Address Label"); +} + +QString Addressee::homePhoneLabel() +{ + return i18n("Home Phone"); +} + +QString Addressee::businessPhoneLabel() +{ + return i18n("Business Phone"); +} + +QString Addressee::mobilePhoneLabel() +{ + return i18n("Mobile Phone"); +} + +QString Addressee::homeFaxLabel() +{ + return i18n("Home Fax"); +} + +QString Addressee::businessFaxLabel() +{ + return i18n("Business Fax"); +} + +QString Addressee::carPhoneLabel() +{ + return i18n("Car Phone"); +} + +QString Addressee::isdnLabel() +{ + return i18n("ISDN"); +} + +QString Addressee::pagerLabel() +{ + return i18n("Pager"); +} + +QString Addressee::emailLabel() +{ + return i18n("Email Address"); +} + +void Addressee::setMailer(const QString &mailer) +{ + if (mailer == d->mMailer) { + return; + } + + d->mEmpty = false; + d->mMailer = mailer; +} + +QString Addressee::mailer() const +{ + return d->mMailer; +} + +QString Addressee::mailerLabel() +{ + return i18n("Mail Client"); +} + +void Addressee::setTimeZone(const TimeZone &timeZone) +{ + if (timeZone == d->mTimeZone) { + return; + } + + d->mEmpty = false; + d->mTimeZone = timeZone; +} + +TimeZone Addressee::timeZone() const +{ + return d->mTimeZone; +} + +QString Addressee::timeZoneLabel() +{ + return i18n("Time Zone"); +} + +void Addressee::setGeo(const Geo &geo) +{ + if (geo == d->mGeo) { + return; + } + + d->mEmpty = false; + d->mGeo = geo; +} + +Geo Addressee::geo() const +{ + return d->mGeo; +} + +QString Addressee::geoLabel() +{ + return i18n("Geographic Position"); +} + +void Addressee::setTitle(const QString &title) +{ + Title t(title); + if (!d->mTitleExtraList.isEmpty()) { + t = d->mTitleExtraList.takeFirst(); + t.setTitle(title); + d->mTitleExtraList.prepend(t); + d->mEmpty = false; + } else { + insertExtraTitle(title); + } +} + +void Addressee::setTitle(const Title &title) +{ + insertExtraTitle(title); +} + +void Addressee::insertExtraTitle(const Title &title) +{ + if (title.isValid()) { + d->mEmpty = false; + d->mTitleExtraList.append(title); + } +} + +QString Addressee::title() const +{ + if (d->mTitleExtraList.isEmpty()) { + return {}; + } else { + return d->mTitleExtraList.at(0).title(); + } +} + +Title::List Addressee::extraTitleList() const +{ + return d->mTitleExtraList; +} + +void Addressee::setExtraTitleList(const Title::List &urltitle) +{ + d->mEmpty = false; + d->mTitleExtraList = urltitle; +} + +QString Addressee::titleLabel() +{ + return i18nc("a person's title", "Title"); +} + +void Addressee::setRole(const QString &role) +{ + Role t(role); + if (!d->mRoleExtraList.isEmpty()) { + t = d->mRoleExtraList.takeFirst(); + t.setRole(role); + d->mRoleExtraList.prepend(t); + d->mEmpty = false; + } else { + insertExtraRole(t); + } +} + +void Addressee::setRole(const Role &role) +{ + insertExtraRole(role); +} + +void Addressee::insertExtraRole(const Role &role) +{ + if (role.isValid()) { + d->mEmpty = false; + d->mRoleExtraList.append(role); + } +} + +void Addressee::setExtraRoleList(const Role::List &roleList) +{ + d->mEmpty = false; + d->mRoleExtraList = roleList; +} + +Role::List Addressee::extraRoleList() const +{ + return d->mRoleExtraList; +} + +QString Addressee::role() const +{ + if (d->mRoleExtraList.isEmpty()) { + return {}; + } else { + return d->mRoleExtraList.at(0).role(); + } +} + +QString Addressee::roleLabel() +{ + return i18nc("of a person in an organization", "Role"); +} + +void Addressee::setOrganization(const QString &organization) +{ + Org t(organization); + if (!d->mOrgExtraList.isEmpty()) { + t = d->mOrgExtraList.takeFirst(); + t.setOrganization(organization); + d->mOrgExtraList.prepend(t); + d->mEmpty = false; + } else { + insertExtraOrganization(t); + } +} + +void Addressee::setOrganization(const Org &organization) +{ + insertExtraOrganization(organization); +} + +void Addressee::insertExtraOrganization(const Org &organization) +{ + if (organization.isValid()) { + d->mEmpty = false; + d->mOrgExtraList.append(organization); + } +} + +void Addressee::setExtraOrganizationList(const Org::List &orgList) +{ + d->mEmpty = false; + d->mOrgExtraList = orgList; +} + +Org::List Addressee::extraOrganizationList() const +{ + return d->mOrgExtraList; +} + +QString Addressee::organization() const +{ + if (d->mOrgExtraList.isEmpty()) { + return {}; + } else { + return d->mOrgExtraList.at(0).organization(); + } +} + +QString Addressee::organizationLabel() +{ + return i18n("Organization"); +} + +void Addressee::setDepartment(const QString &department) +{ + if (department == d->mDepartment) { + return; + } + + d->mEmpty = false; + d->mDepartment = department; +} + +QString Addressee::department() const +{ + return d->mDepartment; +} + +QString Addressee::departmentLabel() +{ + return i18n("Department"); +} + +void Addressee::setNote(const QString ¬e) +{ + if (note == d->mNote) { + return; + } + + d->mEmpty = false; + d->mNote = note; +} + +QString Addressee::note() const +{ + return d->mNote; +} + +QString Addressee::noteLabel() +{ + return i18n("Note"); +} + +void Addressee::setProductId(const QString &productId) +{ + if (productId == d->mProductId) { + return; + } + + d->mEmpty = false; + d->mProductId = productId; +} + +QString Addressee::productId() const +{ + return d->mProductId; +} + +QString Addressee::productIdLabel() +{ + return i18n("Product Identifier"); +} + +void Addressee::setRevision(const QDateTime &revision) +{ + if (revision == d->mRevision) { + return; + } + + d->mEmpty = false; + d->mRevision = revision; +} + +QDateTime Addressee::revision() const +{ + return d->mRevision; +} + +QString Addressee::revisionLabel() +{ + return i18n("Revision Date"); +} + +void Addressee::setSortString(const QString &sortString) +{ + if (sortString == d->mSortString) { + return; + } + + d->mEmpty = false; + d->mSortString = sortString; +} + +QString Addressee::sortString() const +{ + return d->mSortString; +} + +QString Addressee::sortStringLabel() +{ + return i18n("Sort String"); +} + +void Addressee::setUrl(const QUrl &url) +{ + KContacts::ResourceLocatorUrl resourceLocator; + resourceLocator.setUrl(url); + insertExtraUrl(resourceLocator); +} + +void Addressee::setUrl(const ResourceLocatorUrl &url) +{ + insertExtraUrl(url); +} + +ResourceLocatorUrl Addressee::url() const +{ + if (d->mUrlExtraList.isEmpty()) { + return ResourceLocatorUrl(); + } else { + return d->mUrlExtraList.at(0); + } +} + +QString Addressee::urlLabel() +{ + return i18n("Homepage"); +} + +void Addressee::setSecrecy(const Secrecy &secrecy) +{ + if (secrecy == d->mSecrecy) { + return; + } + + d->mEmpty = false; + d->mSecrecy = secrecy; +} + +Secrecy Addressee::secrecy() const +{ + return d->mSecrecy; +} + +QString Addressee::secrecyLabel() +{ + return i18n("Security Class"); +} + +void Addressee::setLogo(const Picture &logo) +{ + if (logo == d->mLogo) { + return; + } + + d->mEmpty = false; + d->mLogo = logo; +} + +Picture Addressee::logo() const +{ + return d->mLogo; +} + +QString Addressee::logoLabel() +{ + return i18n("Logo"); +} + +void Addressee::setPhoto(const Picture &photo) +{ + if (photo == d->mPhoto) { + return; + } + + d->mEmpty = false; + d->mPhoto = photo; +} + +Picture Addressee::photo() const +{ + return d->mPhoto; +} + +QString Addressee::photoLabel() +{ + return i18n("Photo"); +} + +void Addressee::setSound(const Sound &sound) +{ + if (sound == d->mSound) { + return; + } + + d->mEmpty = false; + d->mSound = sound; +} + +Sound Addressee::sound() const +{ + return d->mSound; +} + +QString Addressee::soundLabel() +{ + return i18n("Sound"); +} + +void Addressee::setNameFromString(const QString &s) +{ + QString str = s; + //remove enclosing quotes from string + if (str.length() > 1 + && s[0] == QLatin1Char('"') + && s[s.length() - 1] == QLatin1Char('"')) { + str = s.mid(1, s.length() - 2); + } + + setFormattedName(str); + setName(str); + + // clear all name parts + setPrefix(QString()); + setGivenName(QString()); + setAdditionalName(QString()); + setFamilyName(QString()); + setSuffix(QString()); + + if (str.isEmpty()) { + return; + } + + static QString spaceStr = QStringLiteral(" "); + static QString emptyStr = QStringLiteral(""); + AddresseeHelper *helper = AddresseeHelper::self(); + + int i = str.indexOf(QLatin1Char(',')); + if (i < 0) { + QStringList parts = str.split(spaceStr); + int leftOffset = 0; + int rightOffset = parts.count() - 1; + + QString suffix; + while (rightOffset >= 0) { + if (helper->containsSuffix(parts[rightOffset])) { + suffix.prepend(parts[rightOffset] + (suffix.isEmpty() ? emptyStr : spaceStr)); + rightOffset--; + } else { + break; + } + } + setSuffix(suffix); + + if (rightOffset < 0) { + return; + } + + if (rightOffset - 1 >= 0 && helper->containsPrefix(parts[rightOffset - 1].toLower())) { + setFamilyName(parts[rightOffset - 1] + spaceStr + parts[rightOffset]); + rightOffset--; + } else { + if (helper->tradeAsFamilyName()) { + setFamilyName(parts[rightOffset]); + } else { + setGivenName(parts[rightOffset]); + } + } + + QString prefix; + while (leftOffset < rightOffset) { + if (helper->containsTitle(parts[leftOffset])) { + prefix.append((prefix.isEmpty() ? emptyStr : spaceStr) + parts[leftOffset]); + leftOffset++; + } else { + break; + } + } + setPrefix(prefix); + + if (leftOffset < rightOffset) { + setGivenName(parts[leftOffset]); + leftOffset++; + } + + QString additionalName; + while (leftOffset < rightOffset) { + additionalName.append((additionalName.isEmpty() ? emptyStr : spaceStr) + parts[leftOffset]); + leftOffset++; + } + setAdditionalName(additionalName); + } else { + QString part1 = str.left(i); + QString part2 = str.mid(i + 1); + + QStringList parts = part1.split(spaceStr); + int leftOffset = 0; + int rightOffset = parts.count() - 1; + + if (!parts.isEmpty()) { + QString suffix; + while (rightOffset >= 0) { + if (helper->containsSuffix(parts[rightOffset])) { + suffix.prepend(parts[rightOffset] + (suffix.isEmpty() ? emptyStr : spaceStr)); + rightOffset--; + } else { + break; + } + } + setSuffix(suffix); + + if (rightOffset - 1 >= 0 && helper->containsPrefix(parts[rightOffset - 1].toLower())) { + setFamilyName(parts[rightOffset - 1] + spaceStr + parts[rightOffset]); + rightOffset--; + } else { + setFamilyName(parts[rightOffset]); + } + + QString prefix; + while (leftOffset < rightOffset) { + if (helper->containsTitle(parts[leftOffset])) { + prefix.append((prefix.isEmpty() ? emptyStr : spaceStr) + parts[leftOffset]); + leftOffset++; + } else { + break; + } + } + } else { + setPrefix(QString()); + setFamilyName(QString()); + setSuffix(QString()); + } + + parts = part2.split(spaceStr); + + leftOffset = 0; + rightOffset = parts.count(); + + if (!parts.isEmpty()) { + QString prefix; + while (leftOffset < rightOffset) { + if (helper->containsTitle(parts[leftOffset])) { + prefix.append((prefix.isEmpty() ? emptyStr : spaceStr) + parts[leftOffset]); + leftOffset++; + } else { + break; + } + } + setPrefix(prefix); + + if (leftOffset < rightOffset) { + setGivenName(parts[leftOffset]); + leftOffset++; + } + + QString additionalName; + while (leftOffset < rightOffset) { + additionalName.append((additionalName.isEmpty() ? emptyStr : spaceStr) + parts[leftOffset]); + leftOffset++; + } + setAdditionalName(additionalName); + } else { + setGivenName(QString()); + setAdditionalName(QString()); + } + } +} + +QString Addressee::realName() const +{ + QString n(formattedName()); + if (!n.isEmpty()) { + return n; + } + + n = assembledName(); + if (!n.isEmpty()) { + return n; + } + + n = name(); + if (!n.isEmpty()) { + return n; + } + + return organization(); +} + +QString Addressee::assembledName() const +{ + const QString name = prefix() + QLatin1Char(' ') + +givenName() + QLatin1Char(' ') + +additionalName() + QLatin1Char(' ') + +familyName() + QLatin1Char(' ') + +suffix(); + + return name.simplified(); +} + +QString Addressee::fullEmail(const QString &email) const +{ + QString e; + if (email.isNull()) { + e = preferredEmail(); + } else { + e = email; + } + if (e.isEmpty()) { + return QString(); + } + + QString text; + if (realName().isEmpty()) { + text = e; + } else { + QRegExp needQuotes(QStringLiteral("[^ 0-9A-Za-z\\x0080-\\xFFFF]")); + if (realName().indexOf(needQuotes) != -1) { + QString name = realName(); + name.replace(QLatin1String("\""), QLatin1String("\\\"")); + text = QLatin1String("\"") + name + QLatin1String("\" <") + e + QLatin1Char('>'); + } else { + text = realName() + QLatin1String(" <") + e + QLatin1Char('>'); + } + } + + return text; +} + +void Addressee::insertEmail(const QString &email, bool preferred, const QMap ¶m) +{ + if (email.simplified().isEmpty()) { + return; + } + + for (int i = 0; i < d->mEmails.size(); ++i) { + if (d->mEmails.at(i).mail() == email) { + if (!preferred || i == 0) { + return; + } + Email tempMail = d->mEmails.takeAt(i); + d->mEmails.prepend(tempMail); + return; + } + } + + Email mail(email); + mail.setParameters(param); + d->mEmpty = false; + if (preferred) { + d->mEmails.prepend(mail); + } else { + d->mEmails.append(mail); + } +} + +void Addressee::removeEmail(const QString &email) +{ + for (int i = 0; i < d->mEmails.size(); ++i) { + if (d->mEmails.at(i).mail() == email) { + d->mEmails.removeAt(i); + } + } +} + +QString Addressee::preferredEmail() const +{ + if (d->mEmails.isEmpty()) { + return QString(); + } else { + return d->mEmails.first().mail(); + } +} + +QStringList Addressee::emails() const +{ + QStringList list; + const int numberOfEmail = d->mEmails.size(); + list.reserve(numberOfEmail); + for (int i = 0; i < numberOfEmail; ++i) { + list << d->mEmails.at(i).mail(); + } + + return list; +} + +Email::List Addressee::emailList() const +{ + return d->mEmails; +} + +void Addressee::setEmails(const QStringList &emails) +{ + d->mEmails.clear(); + const int numEmails = emails.size(); + d->mEmails.reserve(numEmails); + for (int i = 0; i < numEmails; ++i) { + d->mEmails.append(Email(emails.at(i))); + } + d->mEmpty = false; +} + +void Addressee::setEmailList(const Email::List &list) +{ + d->mEmails = list; + d->mEmpty = false; +} + +void Addressee::removeLang(const QString &language) +{ + for (int i = 0; i < d->mLangs.size(); ++i) { + if (d->mLangs.at(i).language() == language) { + d->mLangs.removeAt(i); + } + } +} + +void Addressee::setLangs(const Lang::List &langs) +{ + d->mLangs = langs; + d->mEmpty = false; +} + +void Addressee::insertLang(const Lang &language) +{ + const QString languageStr = language.language(); + if (languageStr.simplified().isEmpty()) { + return; + } + d->mEmpty = false; + + Lang::List::Iterator it; + Lang::List::Iterator end(d->mLangs.end()); + for (it = d->mLangs.begin(); it != end; ++it) { + if ((*it).language() == languageStr) { + (*it).setParameters(language.parameters()); + return; + } + } + d->mLangs.append(language); +} + +Lang::List Addressee::langs() const +{ + return d->mLangs; +} + +void Addressee::setGender(const Gender &gender) +{ + if (gender == d->mGender) { + return; + } + + d->mEmpty = false; + d->mGender = gender; +} + +Gender Addressee::gender() const +{ + return d->mGender; +} + +void Addressee::insertPhoneNumber(const PhoneNumber &phoneNumber) +{ + d->mEmpty = false; + + PhoneNumber::List::Iterator it; + PhoneNumber::List::Iterator end(d->mPhoneNumbers.end()); + for (it = d->mPhoneNumbers.begin(); it != end; ++it) { + if ((*it).id() == phoneNumber.id()) { + *it = phoneNumber; + return; + } + } + if (!phoneNumber.number().simplified().isEmpty()) { + d->mPhoneNumbers.append(phoneNumber); + } +} + +void Addressee::removePhoneNumber(const PhoneNumber &phoneNumber) +{ + PhoneNumber::List::Iterator it; + for (it = d->mPhoneNumbers.begin(); it != d->mPhoneNumbers.end(); ++it) { + if ((*it).id() == phoneNumber.id()) { + d->mPhoneNumbers.erase(it); + return; + } + } +} + +PhoneNumber Addressee::phoneNumber(PhoneNumber::Type type) const +{ + PhoneNumber phoneNumber(QString(), type); + PhoneNumber::List::ConstIterator it; + for (it = d->mPhoneNumbers.constBegin(); it != d->mPhoneNumbers.constEnd(); ++it) { + if (matchBinaryPattern((*it).type(), type)) { + if ((*it).type() & PhoneNumber::Pref) { + return *it; + } else if (phoneNumber.number().isEmpty()) { + phoneNumber = (*it); + } + } + } + + return phoneNumber; +} + +PhoneNumber::List Addressee::phoneNumbers() const +{ + return d->mPhoneNumbers; +} + +void Addressee::setPhoneNumbers(const PhoneNumber::List &phoneNumbers) +{ + d->mEmpty = false; + d->mPhoneNumbers.clear(); + d->mPhoneNumbers = phoneNumbers; +} + +PhoneNumber::List Addressee::phoneNumbers(PhoneNumber::Type type) const +{ + PhoneNumber::List list; + + PhoneNumber::List::ConstIterator it; + const PhoneNumber::List::ConstIterator end(d->mPhoneNumbers.constEnd()); + for (it = d->mPhoneNumbers.constBegin(); it != end; ++it) { + if (matchBinaryPattern((*it).type(), type)) { + list.append(*it); + } + } + return list; +} + +PhoneNumber Addressee::findPhoneNumber(const QString &id) const +{ + PhoneNumber::List::ConstIterator it; + const PhoneNumber::List::ConstIterator end(d->mPhoneNumbers.constEnd()); + for (it = d->mPhoneNumbers.constBegin(); it != end; ++it) { + if ((*it).id() == id) { + return *it; + } + } + return PhoneNumber(); +} + +void Addressee::insertKey(const Key &key) +{ + d->mEmpty = false; + + Key::List::Iterator it; + Key::List::Iterator end(d->mKeys.end()); + for (it = d->mKeys.begin(); it != end; ++it) { + if ((*it).id() == key.id()) { + *it = key; + return; + } + } + d->mKeys.append(key); +} + +void vectorRemoveAll(Key::List &t, const Key &key) +{ + t.removeAll(key); +} + +void Addressee::removeKey(const Key &key) +{ + Key::List::Iterator it; + for (it = d->mKeys.begin(); it != d->mKeys.end(); ++it) { + if ((*it).id() == key.id()) { + d->mKeys.removeAll(key); + return; + } + } +} + +Key Addressee::key(Key::Type type, const QString &customTypeString) const +{ + Key::List::ConstIterator it; + Key::List::ConstIterator end(d->mKeys.constEnd()); + for (it = d->mKeys.constBegin(); it != end; ++it) { + if ((*it).type() == type) { + if (type == Key::Custom) { + if (customTypeString.isEmpty()) { + return *it; + } else { + if ((*it).customTypeString() == customTypeString) { + return *it; + } + } + } else { + return *it; + } + } + } + return Key(QString(), type); +} + +void Addressee::setKeys(const Key::List &list) +{ + d->mKeys = list; + d->mEmpty = false; +} + +Key::List Addressee::keys() const +{ + return d->mKeys; +} + +Key::List Addressee::keys(Key::Type type, const QString &customTypeString) const +{ + Key::List list; + + Key::List::ConstIterator it; + Key::List::ConstIterator end(d->mKeys.constEnd()); + for (it = d->mKeys.constBegin(); it != end; ++it) { + if ((*it).type() == type) { + if (type == Key::Custom) { + if (customTypeString.isEmpty()) { + list.append(*it); + } else { + if ((*it).customTypeString() == customTypeString) { + list.append(*it); + } + } + } else { + list.append(*it); + } + } + } + return list; +} + +Key Addressee::findKey(const QString &id) const +{ + Key::List::ConstIterator it; + Key::List::ConstIterator end(d->mKeys.constEnd()); + for (it = d->mKeys.constBegin(); it != end; ++it) { + if ((*it).id() == id) { + return *it; + } + } + return Key(); +} + +QString Addressee::toString() const +{ + QString str = QLatin1String("Addressee {\n"); + str += QStringLiteral(" Uid: %1\n").arg(uid()); + + str += QStringLiteral(" Name: %1\n").arg(name()); + str += QStringLiteral(" FormattedName: %1\n").arg(formattedName()); + str += QStringLiteral(" FamilyName: %1\n").arg(familyName()); + str += QStringLiteral(" GivenName: %1\n").arg(givenName()); + str += QStringLiteral(" AdditionalName: %1\n").arg(additionalName()); + str += QStringLiteral(" Prefix: %1\n").arg(prefix()); + str += QStringLiteral(" Suffix: %1\n").arg(suffix()); + str += QStringLiteral(" NickName: %1\n").arg(nickName()); + str += QStringLiteral(" Birthday: %1\n").arg(birthday().toString()); + str += QStringLiteral(" Mailer: %1\n").arg(mailer()); + str += QStringLiteral(" TimeZone: %1\n").arg(timeZone().toString()); + str += QStringLiteral(" Geo: %1\n").arg(geo().toString()); + str += QStringLiteral(" Title: %1\n").arg(title()); + str += QStringLiteral(" Role: %1\n").arg(role()); + str += QStringLiteral(" Organization: %1\n").arg(organization()); + str += QStringLiteral(" Department: %1\n").arg(department()); + str += QStringLiteral(" Note: %1\n").arg(note()); + str += QStringLiteral(" ProductId: %1\n").arg(productId()); + str += QStringLiteral(" Revision: %1\n").arg(revision().toString()); + str += QStringLiteral(" SortString: %1\n").arg(sortString()); + str += QStringLiteral(" Url: %1\n").arg(url().url().url()); + str += QStringLiteral(" Secrecy: %1\n").arg(secrecy().toString()); + str += QStringLiteral(" Logo: %1\n").arg(logo().toString()); + str += QStringLiteral(" Photo: %1\n").arg(photo().toString()); + str += QStringLiteral(" Sound: %1\n").arg(sound().toString()); + str += QStringLiteral(" Gender: %1\n").arg(gender().toString()); + str += QStringLiteral(" Kind: %1\n").arg(kind()); + + str += QLatin1String(" Emails {\n"); + const Email::List listEmail = d->mEmails; + Email::List::ConstIterator it5; + for (it5 = listEmail.begin(); it5 != listEmail.end(); ++it5) { + str += (*it5).toString(); + } + str += QLatin1String(" }\n"); + + str += QLatin1String(" Langs {\n"); + const Lang::List listLang = d->mLangs; + Lang::List::ConstIterator it6; + for (it6 = listLang.begin(); it6 != listLang.end(); ++it6) { + str += (*it6).toString(); + } + str += QLatin1String(" }\n"); + + str += QLatin1String(" PhoneNumbers {\n"); + const PhoneNumber::List p = phoneNumbers(); + PhoneNumber::List::ConstIterator it2; + for (it2 = p.begin(); it2 != p.end(); ++it2) { + str += (*it2).toString(); + } + str += QLatin1String(" }\n"); + + str += QLatin1String(" Addresses {\n"); + const Address::List a = addresses(); + Address::List::ConstIterator it3; + for (it3 = a.begin(); it3 != a.end(); ++it3) { + str += (*it3).toString(); + } + str += QLatin1String(" }\n"); + + str += QLatin1String(" Keys {\n"); + const Key::List k = keys(); + Key::List::ConstIterator it4; + for (it4 = k.begin(); it4 != k.end(); ++it4) { + str += (*it4).toString(); + } + str += QLatin1String(" }\n"); + + str += QLatin1String("}\n"); + + return str; +} + +void Addressee::insertAddress(const Address &address) +{ + if (address.isEmpty()) { + return; + } + + d->mEmpty = false; + + Address::List::Iterator it; + Address::List::Iterator end(d->mAddresses.end()); + for (it = d->mAddresses.begin(); it != end; ++it) { + if ((*it).id() == address.id()) { + *it = address; + return; + } + } + + d->mAddresses.append(address); +} + +void Addressee::removeAddress(const Address &address) +{ + Address::List::Iterator it; + for (it = d->mAddresses.begin(); it != d->mAddresses.end(); ++it) { + if ((*it).id() == address.id()) { + d->mAddresses.erase(it); + return; + } + } +} + +Address Addressee::address(Address::Type type) const +{ + Address address(type); + Address::List::ConstIterator it; + Address::List::ConstIterator end(d->mAddresses.constEnd()); + for (it = d->mAddresses.constBegin(); it != end; ++it) { + if (matchBinaryPattern((*it).type(), type)) { + if ((*it).type() & Address::Pref) { + return *it; + } else if (address.isEmpty()) { + address = (*it); + } + } + } + + return address; +} + +Address::List Addressee::addresses() const +{ + return d->mAddresses; +} + +Address::List Addressee::addresses(Address::Type type) const +{ + Address::List list; + + Address::List::ConstIterator it; + Address::List::ConstIterator end(d->mAddresses.constEnd()); + for (it = d->mAddresses.constBegin(); it != end; ++it) { + if (matchBinaryPattern((*it).type(), type)) { + list.append(*it); + } + } + + return list; +} + +Address Addressee::findAddress(const QString &id) const +{ + Address::List::ConstIterator it; + Address::List::ConstIterator end(d->mAddresses.constEnd()); + for (it = d->mAddresses.constBegin(); it != end; ++it) { + if ((*it).id() == id) { + return *it; + } + } + return Address(); +} + +void Addressee::insertCategory(const QString &c) +{ + d->mEmpty = false; + + if (d->mCategories.contains(c)) { + return; + } + + d->mCategories.append(c); +} + +void Addressee::removeCategory(const QString &category) +{ + if (d->mCategories.contains(category)) { + d->mCategories.removeAll(category); + } +} + +bool Addressee::hasCategory(const QString &category) const +{ + return d->mCategories.contains(category); +} + +void Addressee::setCategories(const QStringList &c) +{ + d->mEmpty = false; + + d->mCategories = c; +} + +QStringList Addressee::categories() const +{ + return d->mCategories; +} + +void Addressee::insertMember(const QString &member) +{ + d->mEmpty = false; + + if (d->mMembers.contains(member)) { + return; + } + + d->mMembers.append(member); +} + +void Addressee::setMembers(const QStringList &m) +{ + d->mEmpty = false; + d->mMembers = m; +} + +QStringList Addressee::members() const +{ + return d->mMembers; +} + +void Addressee::insertRelationShip(const Related &relation) +{ + d->mEmpty = false; + + if (d->mRelationShips.contains(relation)) { + return; + } + + d->mRelationShips.append(relation); +} + +void Addressee::setRelationShips(const Related::List &c) +{ + d->mEmpty = false; + d->mRelationShips = c; +} + +Related::List Addressee::relationShips() const +{ + return d->mRelationShips; +} + +void Addressee::insertCustom(const QString &app, const QString &name, const QString &value) +{ + if (value.isEmpty() || name.isEmpty() || app.isEmpty()) { + return; + } + + d->mEmpty = false; + + const QString qualifiedName = app + QLatin1Char('-') + name; + + d->mCustomFields.insert(qualifiedName, value); +} + +void Addressee::removeCustom(const QString &app, const QString &name) +{ + const QString qualifiedName = app + QLatin1Char('-') + name; + + d->mCustomFields.remove(qualifiedName); +} + +QString Addressee::custom(const QString &app, const QString &name) const +{ + const QString qualifiedName = app + QLatin1Char('-') + name; + + return d->mCustomFields.value(qualifiedName); +} + +void Addressee::setCustoms(const QStringList &customs) +{ + d->mEmpty = false; + + d->mCustomFields.clear(); + + for (const QString &custom : customs) { + const int index = custom.indexOf(QLatin1Char(':')); + if (index == -1) { + continue; + } + + const QString qualifiedName = custom.left(index); + const QString value = custom.mid(index + 1); + + d->mCustomFields.insert(qualifiedName, value); + } +} + +QStringList Addressee::customs() const +{ + QStringList result; + + QHash::const_iterator it = d->mCustomFields.constBegin(); + const QHash::const_iterator end = d->mCustomFields.constEnd(); + result.reserve(d->mCustomFields.count()); + while (it != end) { + result << it.key() + QLatin1Char(':') + it.value(); + ++it; + } + + return result; +} + +void Addressee::parseEmailAddress(const QString &rawEmail, QString &fullName, QString &email) +{ + // This is a simplified version of KPIM::splitAddress(). + + fullName.clear(); + email.clear(); + if (rawEmail.isEmpty()) { + return; // KPIM::AddressEmpty; + } + + // The code works on 8-bit strings, so convert the input to UTF-8. + QByteArray address = rawEmail.toUtf8(); + + QByteArray displayName; + QByteArray addrSpec; + QByteArray comment; + + // The following is a primitive parser for a mailbox-list (cf. RFC 2822). + // The purpose is to extract a displayable string from the mailboxes. + // Comments in the addr-spec are not handled. No error checking is done. + + enum sourceLevel { + TopLevel, + InComment, + InAngleAddress + }; + sourceLevel context = TopLevel; + bool inQuotedString = false; + int commentLevel = 0; + bool stop = false; + + for (char *p = address.data(); *p && !stop; ++p) { + switch (context) { + case TopLevel: + switch (*p) { + case '"': + inQuotedString = !inQuotedString; + displayName += *p; + break; + case '(': + if (!inQuotedString) { + context = InComment; + commentLevel = 1; + } else { + displayName += *p; + } + break; + case '<': + if (!inQuotedString) { + context = InAngleAddress; + } else { + displayName += *p; + } + break; + case '\\': // quoted character + displayName += *p; + ++p; // skip the '\' + if (*p) { + displayName += *p; + } else { + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + } + break; + case ',': + if (!inQuotedString) { + //if ( allowMultipleAddresses ) + // stop = true; + //else + // return KPIM::UnexpectedComma; + goto ABORT_PARSING; + } else { + displayName += *p; + } + break; + default: + displayName += *p; + } + break; + case InComment: + switch (*p) { + case '(': + ++commentLevel; + comment += *p; + break; + case ')': + --commentLevel; + if (commentLevel == 0) { + context = TopLevel; + comment += ' '; // separate the text of several comments + } else { + comment += *p; + } + break; + case '\\': // quoted character + comment += *p; + ++p; // skip the '\' + if (*p) { + comment += *p; + } else { + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + } + break; + default: + comment += *p; + } + break; + case InAngleAddress: + switch (*p) { + case '"': + inQuotedString = !inQuotedString; + addrSpec += *p; + break; + case '>': + if (!inQuotedString) { + context = TopLevel; + } else { + addrSpec += *p; + } + break; + case '\\': // quoted character + addrSpec += *p; + ++p; // skip the '\' + if (*p) { + addrSpec += *p; + } else { + //return KPIM::UnexpectedEnd; + goto ABORT_PARSING; + } + break; + default: + addrSpec += *p; + } + break; + } // switch ( context ) + } + +ABORT_PARSING: + displayName = displayName.trimmed(); + comment = comment.trimmed(); + addrSpec = addrSpec.trimmed(); + fullName = QString::fromUtf8(displayName); + email = QString::fromUtf8(addrSpec); // check for errors + if (inQuotedString) { + return; // KPIM::UnbalancedQuote; + } + if (context == InComment) { + return; // KPIM::UnbalancedParens; + } + if (context == InAngleAddress) { + return; // KPIM::UnclosedAngleAddr; + } + + if (addrSpec.isEmpty()) { + if (displayName.isEmpty()) { + return; // KPIM::NoAddressSpec; + } else { + //addrSpec = displayName; + //displayName.truncate( 0 ); + // Address of the form "foo@bar" or "foo@bar (Name)". + email = fullName; + fullName = QString::fromUtf8(comment); + } + } + + email = email.toLower(); + // Check that we do not have any extra characters on the end of the + // strings + unsigned int len = fullName.length(); + if (fullName[0] == QLatin1Char('"') && fullName[len - 1] == QLatin1Char('"')) { + fullName = fullName.mid(1, len - 2); + } +} + +void Addressee::setChanged(bool value) +{ + d->mChanged = value; +} + +bool Addressee::changed() const +{ + return d->mChanged; +} + +void Addressee::setSortMode(KContacts::SortMode *mode) +{ + Private::mSortMode = mode; +} + +bool Addressee::operator<(const Addressee &addr) const +{ + if (!Private::mSortMode) { + return false; + } else { + return Private::mSortMode->lesser(*this, addr); + } +} + +QString Addressee::mimeType() +{ + return QStringLiteral("text/directory"); +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Addressee &a) +{ + s << a.d->mUid; + + s << a.d->mName; + s << a.d->mFormattedName; + s << a.d->mFamilyName; + s << a.d->mGivenName; + s << a.d->mAdditionalName; + s << a.d->mPrefix; + s << a.d->mSuffix; + s << a.d->mBirthday; + s << a.d->mBirthdayWithTime; + s << a.d->mMailer; + s << a.d->mTimeZone; + s << a.d->mGeo; + s << a.d->mDepartment; + s << a.d->mNote; + s << a.d->mProductId; + s << a.d->mRevision; + s << a.d->mSortString; + s << a.d->mSecrecy; + s << a.d->mLogo; + s << a.d->mPhoto; + s << a.d->mSound; + s << a.d->mPhoneNumbers; + s << a.d->mAddresses; + s << a.d->mEmails; + s << a.d->mCategories; + s << a.customs(); + s << a.d->mKeys; + s << a.d->mLangs; + s << a.d->mGender; + s << a.d->mKind; + s << a.d->mCalendarUrl; + s << a.d->mSoundListExtra; + s << a.d->mPhotoExtraList; + s << a.d->mLogoExtraList; + s << a.d->mUrlExtraList; + s << a.d->mMembers; + s << a.d->mRelationShips; + s << a.d->mSources; + s << a.d->mImpps; + s << a.d->mFieldGroupList; + s << a.d->mTitleExtraList; + s << a.d->mRoleExtraList; + s << a.d->mOrgExtraList; + s << a.d->mNickNameExtraList; + s << a.d->mClientPidMapList; + + return s; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Addressee &a) +{ + s >> a.d->mUid; + + s >> a.d->mName; + s >> a.d->mFormattedName; + s >> a.d->mFamilyName; + s >> a.d->mGivenName; + s >> a.d->mAdditionalName; + s >> a.d->mPrefix; + s >> a.d->mSuffix; + s >> a.d->mBirthday; + s >> a.d->mBirthdayWithTime; + s >> a.d->mMailer; + s >> a.d->mTimeZone; + s >> a.d->mGeo; + s >> a.d->mDepartment; + s >> a.d->mNote; + s >> a.d->mProductId; + s >> a.d->mRevision; + s >> a.d->mSortString; + s >> a.d->mSecrecy; + s >> a.d->mLogo; + s >> a.d->mPhoto; + s >> a.d->mSound; + s >> a.d->mPhoneNumbers; + s >> a.d->mAddresses; + s >> a.d->mEmails; + s >> a.d->mCategories; + QStringList customFields; + s >> customFields; + a.setCustoms(customFields); + s >> a.d->mKeys; + s >> a.d->mLangs; + s >> a.d->mGender; + s >> a.d->mKind; + s >> a.d->mCalendarUrl; + s >> a.d->mSoundListExtra; + s >> a.d->mPhotoExtraList; + s >> a.d->mLogoExtraList; + s >> a.d->mUrlExtraList; + s >> a.d->mMembers; + s >> a.d->mRelationShips; + s >> a.d->mSources; + s >> a.d->mImpps; + s >> a.d->mFieldGroupList; + s >> a.d->mTitleExtraList; + s >> a.d->mRoleExtraList; + s >> a.d->mOrgExtraList; + s >> a.d->mNickNameExtraList; + s >> a.d->mClientPidMapList; + a.d->mEmpty = false; + + return s; +} + +bool matchBinaryPattern(int value, int pattern) +{ + /** + We want to match all telephonnumbers/addresses which have the bits in the + pattern set. More are allowed. + if pattern == 0 we have a special handling, then we want only those with + exactly no bit set. + */ + if (pattern == 0) { + return value == 0; + } else { + return pattern == (pattern & value); + } +} + +template +bool listEquals(const QVector &list, const QVector &pattern) +{ + if (list.count() != pattern.count()) { + return false; + } + const int numberOfElement(list.count()); + for (int i = 0; i < numberOfElement; ++i) { + if (!pattern.contains(list[i])) { + return false; + } + } + + return true; +} + +bool listEquals(const QStringList &list, const QStringList &pattern) +{ + if (list.count() != pattern.count()) { + return false; + } + + const int numberOfElement(list.count()); + for (int i = 0; i < numberOfElement; ++i) { + if (!pattern.contains(list[i])) { + return false; + } + } + + return true; +} diff --git a/src/addressee.h b/src/addressee.h new file mode 100644 index 0000000..b1006e3 --- /dev/null +++ b/src/addressee.h @@ -0,0 +1,1095 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + 2013 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_ADDRESSEE_H +#define KCONTACTS_ADDRESSEE_H + +#include +#include +#include +#include +#include + +#include "address.h" +#include "geo.h" +#include "key.h" +#include "email.h" +#include "lang.h" +#include "gender.h" +#include "phonenumber.h" +#include "picture.h" +#include "secrecy.h" +#include "sound.h" +#include "impp.h" +#include "timezone.h" +#include "calendarurl.h" +#include "related.h" +#include "addresseelist.h" +#include "resourcelocatorurl.h" +#include "fieldgroup.h" +#include "title.h" +#include "nickname.h" +#include "role.h" +#include "org.h" +#include "clientpidmap.h" + +namespace KContacts { +class SortMode; + +/** + @short address book entry + + This class represents an entry in the address book. + + The data of this class is implicitly shared. You can pass this class by value. + + If you need the name of a field for presenting it to the user you should use + the functions ending in Label(). They return a translated string which can be + used as label for the corresponding field. + + About the name fields: + + givenName() is the first name and familyName() the last name. In some + countries the family name comes first, that's the reason for the + naming. formattedName() is the full name with the correct formatting. + It is used as an override, when the correct formatting can't be generated + from the other name fields automatically. + + realName() returns a fully formatted name(). It uses formattedName, if set, + otherwise it constucts the name from the name fields. As fallback, if + nothing else is set it uses name(). + + name() is the NAME type of RFC2426. It can be used as internal name for the + data enty, but shouldn't be used for displaying the data to the user. + */ +class KCONTACTS_EXPORT Addressee +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Addressee &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Addressee &); + +public: + /** + A list of addressee objects + */ + typedef AddresseeList List; + /** + A map from unique identifier to addressee. + + @see uid() + */ + typedef QHash Map; + + /** + Construct an empty address book entry. + */ + Addressee(); + + /** + Destroys the address book entry. + */ + ~Addressee(); + + /** + Copy constructor. + */ + Addressee(const Addressee &other); + + /** + Assignment operator. + + @return a reference to @c this + */ + Addressee &operator=(const Addressee &other); + + /** + Equality operator. + + @return @c true if @c this and the given addressee are equal, + otherwise @c false + */ + bool operator==(const Addressee &other) const; + + /** + Not-equal operator. + + @return @c true if @c this and the given addressee are not equal, + otherwise @c false + */ + bool operator!=(const Addressee &other) const; + + /** + Return if the address book entry is empty. + */ + bool isEmpty() const; + + /** + Set unique identifier. + + @param uid the KABC unique identifier + */ + void setUid(const QString &uid); + + /** + Return unique identifier. + */ + QString uid() const; + + /** + Return translated label for uid field. + */ + static QString uidLabel(); + + /** + Set name. + */ + void setName(const QString &name); + + /** + Return name. + */ + QString name() const; + + /** + Return translated label for name field. + */ + static QString nameLabel(); + + /** + Set formatted name. + */ + void setFormattedName(const QString &formattedName); + + /** + Return formatted name. + */ + QString formattedName() const; + + /** + Return translated label for formattedName field. + */ + static QString formattedNameLabel(); + + /** + Set family name. + */ + void setFamilyName(const QString &familyName); + + /** + Return family name. + */ + QString familyName() const; + + /** + Return translated label for familyName field. + */ + static QString familyNameLabel(); + + /** + Set given name. + */ + void setGivenName(const QString &givenName); + + /** + Return given name. + */ + QString givenName() const; + + /** + Return translated label for givenName field. + */ + static QString givenNameLabel(); + + /** + Set additional names. + */ + void setAdditionalName(const QString &additionalName); + + /** + Return additional names. + */ + QString additionalName() const; + + /** + Return translated label for additionalName field. + */ + static QString additionalNameLabel(); + + /** + Set honorific prefixes. + */ + void setPrefix(const QString &prefix); + + /** + Return honorific prefixes. + */ + QString prefix() const; + + /** + Return translated label for prefix field. + */ + static QString prefixLabel(); + + /** + Set honorific suffixes. + */ + void setSuffix(const QString &suffix); + + /** + Return honorific suffixes. + */ + QString suffix() const; + + /** + Return translated label for suffix field. + */ + static QString suffixLabel(); + + /** + Set nick name. + */ + void setNickName(const QString &nickName); + void setNickName(const NickName &nickName); + void insertExtraNickName(const NickName &nickName); + void setExtraNickNameList(const NickName::List &nickNameList); + NickName::List extraNickNameList() const; + + /** + Return nick name. + */ + QString nickName() const; + + /** + Return translated label for nickName field. + */ + static QString nickNameLabel(); + + /** + Set birthday (date and time). If withTime is false the time will be set + to midnight and birthdayHasTime() will return false afterwards. + @since 5.4 + */ + void setBirthday(const QDateTime &birthday, bool withTime = true); + + /** + Set birthday (date only). birthdayHasTime() will return false afterwards. + */ + void setBirthday(const QDate &birthday); + + /** + Return birthday. (If a valid date has been set, birthday().time() will + always return a valid QTime!) + */ + QDateTime birthday() const; + + /** + Returns true if birthday has been set with a time. Returns false otherwise. + */ + bool birthdayHasTime() const; + + /** + Return translated label for birthday field. + */ + static QString birthdayLabel(); + + /** + Return translated label for homeAddressStreet field. + */ + static QString homeAddressStreetLabel(); + + /** + Return translated label for homeAddressPostOfficeBox field. + */ + static QString homeAddressPostOfficeBoxLabel(); + + /** + Return translated label for homeAddressLocality field. + */ + static QString homeAddressLocalityLabel(); + + /** + Return translated label for homeAddressRegion field. + */ + static QString homeAddressRegionLabel(); + + /** + Return translated label for homeAddressPostalCode field. + */ + static QString homeAddressPostalCodeLabel(); + + /** + Return translated label for homeAddressCountry field. + */ + static QString homeAddressCountryLabel(); + + /** + Return translated label for homeAddressLabel field. + */ + static QString homeAddressLabelLabel(); + + /** + Return translated label for businessAddressStreet field. + */ + static QString businessAddressStreetLabel(); + + /** + Return translated label for businessAddressPostOfficeBox field. + */ + static QString businessAddressPostOfficeBoxLabel(); + + /** + Return translated label for businessAddressLocality field. + */ + static QString businessAddressLocalityLabel(); + + /** + Return translated label for businessAddressRegion field. + */ + static QString businessAddressRegionLabel(); + + /** + Return translated label for businessAddressPostalCode field. + */ + static QString businessAddressPostalCodeLabel(); + + /** + Return translated label for businessAddressCountry field. + */ + static QString businessAddressCountryLabel(); + + /** + Return translated label for businessAddressLabel field. + */ + static QString businessAddressLabelLabel(); + + /** + Return translated label for homePhone field. + */ + static QString homePhoneLabel(); + + /** + Return translated label for businessPhone field. + */ + static QString businessPhoneLabel(); + + /** + Return translated label for mobilePhone field. + */ + static QString mobilePhoneLabel(); + + /** + Return translated label for homeFax field. + */ + static QString homeFaxLabel(); + + /** + Return translated label for businessFax field. + */ + static QString businessFaxLabel(); + + /** + Return translated label for carPhone field. + */ + static QString carPhoneLabel(); + + /** + Return translated label for isdn field. + */ + static QString isdnLabel(); + + /** + Return translated label for pager field. + */ + static QString pagerLabel(); + + /** + Return translated label for email field. + */ + static QString emailLabel(); + + /** + Set mail client. + */ + void setMailer(const QString &mailer); + + /** + Return mail client. + */ + QString mailer() const; + + /** + Return translated label for mailer field. + */ + static QString mailerLabel(); + + /** + Set time zone. + */ + void setTimeZone(const TimeZone &timeZone); + + /** + Return time zone. + */ + TimeZone timeZone() const; + + /** + Return translated label for timeZone field. + */ + static QString timeZoneLabel(); + + /** + Set geographic position. + */ + void setGeo(const Geo &geo); + + /** + Return geographic position. + */ + Geo geo() const; + + /** + Return translated label for geo field. + */ + static QString geoLabel(); + + /** + Set title. + */ + //Remove in kf6 + void setTitle(const QString &title); + void setTitle(const Title &title); + void insertExtraTitle(const Title &title); + void setExtraTitleList(const Title::List &urltitle); + Title::List extraTitleList() const; + /** + Return title. + */ + QString title() const; + + /** + Return translated label for title field. + */ + static QString titleLabel(); + + /** + Set role. + */ + void setRole(const QString &role); + void setRole(const Role &role); + void insertExtraRole(const Role &role); + void setExtraRoleList(const Role::List &roleList); + Role::List extraRoleList() const; + + /** + Return role. + */ + QString role() const; + + /** + Return translated label for role field. + */ + static QString roleLabel(); + + /** + Set organization. + */ + //Remove in kf6 + void setOrganization(const QString &organization); + void setOrganization(const Org &organization); + void insertExtraOrganization(const Org &organization); + void setExtraOrganizationList(const Org::List &orgList); + Org::List extraOrganizationList() const; + + /** + Return organization. + */ + QString organization() const; + + /** + Return translated label for organization field. + */ + static QString organizationLabel(); + + /** + Set department. + */ + void setDepartment(const QString &department); + + /** + Return department. + */ + QString department() const; + + /** + Return translated label for department field. + */ + static QString departmentLabel(); + + /** + Set note. + */ + void setNote(const QString ¬e); + + /** + Return note. + */ + QString note() const; + + /** + Return translated label for note field. + */ + static QString noteLabel(); + + /** + Set product identifier. + */ + void setProductId(const QString &productId); + + /** + Return product identifier. + */ + QString productId() const; + + /** + Return translated label for productId field. + */ + static QString productIdLabel(); + + /** + Set revision date. + */ + void setRevision(const QDateTime &revision); + + /** + Return revision date. + */ + QDateTime revision() const; + + /** + Return translated label for revision field. + */ + static QString revisionLabel(); + + /** + Set sort string. + */ + void setSortString(const QString &sortString); + + /** + Return sort string. + */ + QString sortString() const; + + /** + Return translated label for sortString field. + */ + static QString sortStringLabel(); + + /** + Set homepage. + */ + void setUrl(const ResourceLocatorUrl &url); + //kf6: remove it + void setUrl(const QUrl &url); + + /** + Return homepage. + */ + ResourceLocatorUrl url() const; + + /** + Return translated label for url field. + */ + static QString urlLabel(); + + /** + Set security class. + */ + void setSecrecy(const Secrecy &secrecy); + + /** + Return security class. + */ + Secrecy secrecy() const; + + /** + Return translated label for secrecy field. + */ + static QString secrecyLabel(); + + /** + Set logo. + */ + void setLogo(const Picture &logo); + + /** + Return logo. + */ + Picture logo() const; + + /** + Return translated label for logo field. + */ + static QString logoLabel(); + + /** + Set photo. + */ + void setPhoto(const Picture &photo); + + /** + Return photo. + */ + Picture photo() const; + + /** + Return translated label for photo field. + */ + static QString photoLabel(); + + /** + Set sound. + */ + void setSound(const Sound &sound); + + /** + Return sound. + */ + Sound sound() const; + + /** + Return translated label for sound field. + */ + static QString soundLabel(); + + /** + Set name fields by parsing the given string and trying to associate the + parts of the string with according fields. This function should probably + be a bit more clever. + */ + void setNameFromString(const QString &s); + + /** + Return the name of the addressee. This is calculated from all the name + fields. + */ + QString realName() const; + + /** + Return the name that consists of all name parts. + */ + QString assembledName() const; + + /** + Return email address including real name. + + @param email Email address to be used to construct the full email string. + If this is QString() the preferred email address is used. + */ + QString fullEmail(const QString &email = QString()) const; + + /** + Insert an email address. If the email address already exists in this + addressee it is not duplicated. + + @param email Email address + @param preferred Set to true, if this is the preferred email address of + the addressee. + */ + void insertEmail(const QString &email, bool preferred = false, const QMap ¶m = QMap()); + + /** + Remove email address. If the email address doesn't exist, nothing happens. + + @param email Email address to remove + */ + void removeEmail(const QString &email); + + /** + Return preferred email address. This is the first email address or the + last one added with insertEmail() with a set preferred parameter. + */ + QString preferredEmail() const; + + /** + Return list of all email addresses. + */ + QStringList emails() const; + + /** + Set the emails to @p list. + The first email address gets the preferred one! + @param list The list of email addresses. + */ + void setEmails(const QStringList &list); + + /** + Insert a phone number. If a phone number with the same id already exists + in this addressee it is not duplicated. + + @param phoneNumber The telephone number to insert to the addressee + */ + void insertPhoneNumber(const PhoneNumber &phoneNumber); + + /** + Remove phone number. If no phone number with the given id exists for this + addresse nothing happens. + + @param phoneNumber The telephone number to remove from the addressee + */ + void removePhoneNumber(const PhoneNumber &phoneNumber); + + /** + Return phone number, which matches the given type. + + @param type The type of phone number to get + */ + PhoneNumber phoneNumber(PhoneNumber::Type type) const; + + /** + Return list of all phone numbers. + */ + PhoneNumber::List phoneNumbers() const; + + void setPhoneNumbers(const PhoneNumber::List &phoneNumbers); + + /** + Return list of phone numbers with a special type. + + @param type The type of phone number to get + */ + PhoneNumber::List phoneNumbers(PhoneNumber::Type type) const; + + /** + Return phone number with the given id. + + @param id The identifier of the phone number to look for. + See PhoneNumber::id() + */ + PhoneNumber findPhoneNumber(const QString &id) const; + + /** + Insert a key. If a key with the same id already exists + in this addressee it is not duplicated. + + @param key The key to insert + */ + void insertKey(const Key &key); + + /** + Remove a key. If no key with the given id exists for this + addresse nothing happens. + + @param key The key to remove + */ + void removeKey(const Key &key); + + /** + Return key, which matches the given type. + If @p type == Key::Custom you can specify a string + that should match. If you leave the string empty, the first + key with a custom value is returned. + + @param type The type of key to look for + @param customTypeString A string to match custom keys against when + @p type is @c Key::Custom + */ + Key key(Key::Type type, const QString &customTypeString = QString()) const; + + /** + Return list of all keys. + */ + Key::List keys() const; + + /** + Set the list of keys + @param keys The keys to be set. + */ + void setKeys(const Key::List &keys); + + /** + Return list of keys with a special type. + If @p type == Key::Custom you can specify a string + that should match. If you leave the string empty, all custom + keys will be returned. + + @param type The type of key to look for + @param customTypeString A string to match custom keys against when + @p type is @c Key::Custom + */ + Key::List keys(Key::Type type, const QString &customTypeString = QString()) const; + + /** + Return key with the given id. + + @param id The identifier of the key to look for. See Key::id() + */ + Key findKey(const QString &id) const; + + /** + Insert an address. If an address with the same id already exists + in this addressee it is not duplicated. + + @param address The address to insert + */ + void insertAddress(const Address &address); + + /** + Remove address. If no address with the given id exists for this + addresse nothing happens. + + @param address The address to remove + */ + void removeAddress(const Address &address); + + /** + Return address, which matches the given type. + + @param type The type of address to look for + */ + Address address(Address::Type type) const; + + /** + Return list of all addresses. + */ + Address::List addresses() const; + + /** + Return list of addresses with a special type. + + @param type The type of addresses to look for + */ + Address::List addresses(Address::Type type) const; + + /** + Return address with the given id. + + @param id The identifier of the address to look for. See Address::id() + */ + Address findAddress(const QString &id) const; + + /** + Insert category. If the category already exists it is not duplicated. + */ + void insertCategory(const QString &category); + + /** + Remove category. + */ + void removeCategory(const QString &category); + + /** + Return, if addressee has the given category. + */ + bool hasCategory(const QString &category) const; + + /** + Set categories to given value. + */ + void setCategories(const QStringList &category); + + /** + Return list of all set categories. + */ + QStringList categories() const; + + /** + Insert custom entry. The entry is identified by the name of the inserting + application and a unique name. If an entry with the given app and name + already exists its value is replaced with the new given value. + + An empty value isn't allowed (nothing happens if this is called with + any of the three arguments being empty) + + @param app Name of the application inserting this custom entry + @param name Name of this application specific custom entry + @param value Value of this application specific custom entry + */ + void insertCustom(const QString &app, const QString &name, const QString &value); + + /** + Remove custom entry. + + @param app Name of the application which has inserted this custom entry + @param name Name of this application specific custom entry + */ + void removeCustom(const QString &app, const QString &name); + + /** + Return value of custom entry, identified by app and entry name. + + @param app Name of the application which has inserted this custom entry + @param name Name of this application specific custom entry + */ + QString custom(const QString &app, const QString &name) const; + + /** + Set all custom entries. + */ + void setCustoms(const QStringList &customs); + + /** + Return list of all custom entries. + + The format of the custom entries is 'app-key:value' and the list is sorted + alphabetically by 'app-key'. + */ + QStringList customs() const; + + /** + Parse full email address. The result is given back in fullName and email. + + @param rawEmail The input string to parse for name and email + @param fullName The name part of the @p rawEmail input, if it contained one + @param email The email part of the @p rawEmail input, if it contained one + */ + static void parseEmailAddress(const QString &rawEmail, QString &fullName, QString &email); + + /** + Returns string representation of the addressee. + */ + QString toString() const; + + /** + Mark addressee as changed. + + @param value Sets the status indicating changed data + */ + void setChanged(bool value); + + /** + Return whether the addressee is changed. + */ + bool changed() const; + + /** + Sets the sort mode implementation. + + Comparing to addressee objects is delegated to an instance + of a subclass of KContacts::SortMode. + + @param mode The sort mode implementator to use + */ + static void setSortMode(KContacts::SortMode *mode); + + /** + Return whether this addressee is "less-than" a given one + + @param addr The addressee object to compare with + + @see setSortMode() + */ + bool operator<(const Addressee &addr) const; + + /** + Returns the MIME type used for Addressees + */ + static QString mimeType(); + + KContacts::Email::List emailList() const; + void setEmailList(const Email::List &list); + + /** + * Remove Language + * @brief removeLang + * @param language + */ + void removeLang(const QString &language); + /** + * Insert Language + * @brief insertLang + * @param language + */ + void insertLang(const Lang &language); + /** + * @brief langs + * @return List of lang + */ + Lang::List langs() const; + void setLangs(const Lang::List &langs); + + void setGender(const Gender &gender); + Gender gender() const; + + QString kind() const; + void setKind(const QString &kind); + + void insertCalendarUrl(const CalendarUrl &calendarUrl); + CalendarUrl::List calendarUrlList() const; + + void insertExtraSound(const Sound &sound); + void setExtraSoundList(const Sound::List &soundList); + Sound::List extraSoundList() const; + + void insertExtraPhoto(const Picture &picture); + void setExtraPhotoList(const Picture::List &pictureList); + Picture::List extraPhotoList() const; + + void insertExtraLogo(const Picture &logo); + void setExtraLogoList(const Picture::List &logoList); + Picture::List extraLogoList() const; + + ResourceLocatorUrl::List extraUrlList() const; + void setExtraUrlList(const ResourceLocatorUrl::List &urlList); + void insertExtraUrl(const ResourceLocatorUrl &url); + + //Member + void insertMember(const QString &member); + void setMembers(const QStringList &c); + QStringList members() const; + + //Relation + void insertRelationShip(const Related &related); + void setRelationShips(const Related::List &c); + Related::List relationShips() const; + + //Source + void insertSourceUrl(const QUrl &url); + void setSourcesUrlList(const QVector &urlList); + QVector sourcesUrlList() const; + + //Impp + Impp::List imppList() const; + void setImppList(const Impp::List &imppList); + void insertImpp(const Impp &impp); + + //FieldGroup + FieldGroup::List fieldGroupList() const; + void setFieldGroupList(const FieldGroup::List &fieldGroupList); + void insertFieldGroup(const FieldGroup &fieldGroup); + + //ClientPidMap + ClientPidMap::List clientPidMapList() const; + void setClientPidMapList(const ClientPidMap::List &clientpidmaplist); + void insertClientPidMap(const ClientPidMap &clientpidmap); + +private: + class Private; + QSharedDataPointer d; +}; + +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Addressee &); +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Addressee &); +} + +#define KCONTACTS_ADDRESSEE_METATYPE_DEFINED 1 +Q_DECLARE_METATYPE(KContacts::Addressee) + +#endif diff --git a/src/addresseehelper.cpp b/src/addresseehelper.cpp new file mode 100644 index 0000000..d695d08 --- /dev/null +++ b/src/addresseehelper.cpp @@ -0,0 +1,119 @@ +/* + This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "addresseehelper.h" + +#include +#include +#include + +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN KContacts::AddresseeHelperPrivate +{ +public: + QSet mTitles; + QSet mPrefixes; + QSet mSuffixes; + bool mTradeAsFamilyName; +}; + +Q_GLOBAL_STATIC(AddresseeHelper, s_self) + +// static +AddresseeHelper *AddresseeHelper::self() +{ + return s_self; +} + +AddresseeHelper::AddresseeHelper() + : QObject() + , d(new AddresseeHelperPrivate) +{ + initSettings(); +} + +AddresseeHelper::~AddresseeHelper() +{ +} + +static void addToSet(const QStringList &list, QSet &container) +{ + QStringList::ConstIterator it; + QStringList::ConstIterator end(list.end()); + for (it = list.begin(); it != end; ++it) { + if (!(*it).isEmpty()) { + container.insert(*it); + } + } +} + +void AddresseeHelper::initSettings() +{ + d->mTitles.clear(); + d->mSuffixes.clear(); + d->mPrefixes.clear(); + + d->mTitles.insert(i18n("Dr.")); + d->mTitles.insert(i18n("Miss")); + d->mTitles.insert(i18n("Mr.")); + d->mTitles.insert(i18n("Mrs.")); + d->mTitles.insert(i18n("Ms.")); + d->mTitles.insert(i18n("Prof.")); + + d->mSuffixes.insert(i18n("I")); + d->mSuffixes.insert(i18n("II")); + d->mSuffixes.insert(i18n("III")); + d->mSuffixes.insert(i18n("Jr.")); + d->mSuffixes.insert(i18n("Sr.")); + + d->mPrefixes.insert(QStringLiteral("van")); + d->mPrefixes.insert(QStringLiteral("von")); + d->mPrefixes.insert(QStringLiteral("de")); + + KConfig _config(QStringLiteral("kabcrc"), KConfig::NoGlobals); + KConfigGroup config(&_config, "General"); + + addToSet(config.readEntry("Prefixes", QStringList()), d->mTitles); + addToSet(config.readEntry("Inclusions", QStringList()), d->mPrefixes); + addToSet(config.readEntry("Suffixes", QStringList()), d->mSuffixes); + d->mTradeAsFamilyName = config.readEntry("TradeAsFamilyName", true); +} + +bool AddresseeHelper::containsTitle(const QString &title) const +{ + return d->mTitles.contains(title); +} + +bool AddresseeHelper::containsPrefix(const QString &prefix) const +{ + return d->mPrefixes.contains(prefix); +} + +bool AddresseeHelper::containsSuffix(const QString &suffix) const +{ + return d->mSuffixes.contains(suffix); +} + +bool AddresseeHelper::tradeAsFamilyName() const +{ + return d->mTradeAsFamilyName; +} diff --git a/src/addresseehelper.h b/src/addresseehelper.h new file mode 100644 index 0000000..5d0c2e4 --- /dev/null +++ b/src/addresseehelper.h @@ -0,0 +1,119 @@ +/* + This file is part of the KDE libraries + Copyright (C) 2003 Carsten Pfeiffer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation, version 2. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_ADDRESSEEHELPER_H +#define KCONTACTS_ADDRESSEEHELPER_H + +#include "kcontacts_export.h" + +#include +#include +#include + +namespace KContacts { +class AddresseeHelperPrivate; + +/** + * This singleton class stores static data, which is shared + * by all Addressee objects. It maintains three lists of + * strings, which can be queried using this class: + * + * - a list of honoric prefixes, like "Mrs.", "Prof." etc, + * see containsTitle() + * - a list of inclusions, such as "van" or "de", see + * containsPrefix() + * - a list of honoric suffixes, such as "I" or "Jr.", see + * containsSuffix() + * + * All of these lists have a hardcoded and a configurable + * part. The configurable part is found in @c kabcrc, group + * @c General, fields @c Prefixes, @c Inclusions, and + * @c Suffixes. + * + * In addition to the above, this class stores one conveniece + * setting: it stores whether or not a single name component + * should be interpreted as a family name (see + * tradeAsFamilyName()). The corresponding configuration + * field is @c TradeAsFamilyName. + */ +class KCONTACTS_EXPORT AddresseeHelper : public QObject +{ + Q_OBJECT + +public: + /** + * Singleton interface to this class + * + * @return a pointer to the unique instance of this class. + */ + static AddresseeHelper *self(); + + /** + * Queries the list of honoric prefixes. + * + * @param title the honoric prefix to search for + * @return @c true, if @p title was found in the list, + * @c false otherwise + */ + Q_REQUIRED_RESULT bool containsTitle(const QString &title) const; + + /** + * Queries the list of inclusions. + * + * @param prefix the inclusion to search for + * @return @c true, if @p prefix was found in the list, + * @c false otherwise + */ + Q_REQUIRED_RESULT bool containsPrefix(const QString &prefix) const; + + /** + * Queries the list of honoric suffixes. + * + * @param suffix the honoric suffix to search for + * @return @c true, if @p suffix was found in the list, + * @c false otherwise + */ + Q_REQUIRED_RESULT bool containsSuffix(const QString &suffix) const; + + /** + * Returns whether or not a single name component should + * be interpreted as a family name. + * + * @return @c true if single name component is a family name, + * @c false otherwise. + */ + Q_REQUIRED_RESULT bool tradeAsFamilyName() const; + + /** @internal */ + AddresseeHelper(); + + ~AddresseeHelper(); + +public Q_SLOTS: + /** + * Recreates the static data and reparses the configuration. + */ + void initSettings(); + +private: + QScopedPointer d; +}; +} + +#endif diff --git a/src/addresseelist.cpp b/src/addresseelist.cpp new file mode 100644 index 0000000..f854000 --- /dev/null +++ b/src/addresseelist.cpp @@ -0,0 +1,361 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Jost Schenck + 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "addresseelist.h" +#include "field.h" +#include "sortmode.h" +#include "kcontacts_debug.h" + +#include + +using namespace KContacts; + +// +// +// Traits +// +// + +SortingTraits::Uid::Uid() + : d(nullptr) +{ +} + +SortingTraits::Uid::~Uid() +{ +} + +bool SortingTraits::Uid::eq(const Addressee &a1, const Addressee &a2) +{ + // locale awareness doesn't make sense sorting ids + return QString::compare(a1.uid(), a2.uid()) == 0; +} + +bool SortingTraits::Uid::lt(const Addressee &a1, const Addressee &a2) +{ + // locale awareness doesn't make sense sorting ids + return QString::compare(a1.uid(), a2.uid()) < 0; +} + +SortingTraits::Name::Name() + : d(nullptr) +{ +} + +SortingTraits::Name::~Name() +{ +} + +bool SortingTraits::Name::eq(const Addressee &a1, const Addressee &a2) +{ + return QString::localeAwareCompare(a1.name(), a2.name()) == 0; +} + +bool SortingTraits::Name::lt(const Addressee &a1, const Addressee &a2) +{ + return QString::localeAwareCompare(a1.name(), a2.name()) < 0; +} + +SortingTraits::FormattedName::FormattedName() + : d(nullptr) +{ +} + +SortingTraits::FormattedName::~FormattedName() +{ +} + +bool SortingTraits::FormattedName::eq(const Addressee &a1, const Addressee &a2) +{ + return QString::localeAwareCompare(a1.formattedName(), a2.formattedName()) == 0; +} + +bool SortingTraits::FormattedName::lt(const Addressee &a1, const Addressee &a2) +{ + return QString::localeAwareCompare(a1.formattedName(), a2.formattedName()) < 0; +} + +SortingTraits::FamilyName::FamilyName() + : d(nullptr) +{ +} + +SortingTraits::FamilyName::~FamilyName() +{ +} + +bool SortingTraits::FamilyName::eq(const Addressee &a1, const Addressee &a2) +{ + return + QString::localeAwareCompare(a1.familyName(), a2.familyName()) == 0 + && QString::localeAwareCompare(a1.givenName(), a2.givenName()) == 0; +} + +bool SortingTraits::FamilyName::lt(const Addressee &a1, const Addressee &a2) +{ + int family = QString::localeAwareCompare(a1.familyName(), a2.familyName()); + if (0 == family) { + return QString::localeAwareCompare(a1.givenName(), a2.givenName()) < 0; + } else { + return family < 0; + } +} + +SortingTraits::GivenName::GivenName() + : d(nullptr) +{ +} + +SortingTraits::GivenName::~GivenName() +{ +} + +bool SortingTraits::GivenName::eq(const Addressee &a1, const Addressee &a2) +{ + return + QString::localeAwareCompare(a1.givenName(), a2.givenName()) == 0 + && QString::localeAwareCompare(a1.familyName(), a2.familyName()) == 0; +} + +bool SortingTraits::GivenName::lt(const Addressee &a1, const Addressee &a2) +{ + int given = QString::localeAwareCompare(a1.givenName(), a2.givenName()); + if (0 == given) { + return QString::localeAwareCompare(a1.familyName(), a2.familyName()) < 0; + } else { + return given < 0; + } +} + +// +// +// AddresseeList +// +// + +static Field *sActiveField = nullptr; + +class Q_DECL_HIDDEN AddresseeList::Private : public QSharedData +{ +public: + Private() + : mActiveSortingCriterion(FormattedName) + , mReverseSorting(false) + { + } + + Private(const Private &other) + : QSharedData(other) + { + mReverseSorting = other.mReverseSorting; + mActiveSortingCriterion = other.mActiveSortingCriterion; + } + + SortingCriterion mActiveSortingCriterion; + bool mReverseSorting; +}; + +AddresseeList::AddresseeList() + : QVector() + , d(new Private) +{ +} + +AddresseeList::~AddresseeList() +{ +} + +AddresseeList::AddresseeList(const AddresseeList &other) + : QVector(other) + , d(other.d) +{ +} + +AddresseeList::AddresseeList(const QVector &list) + : QVector(list) + , d(new Private) +{ +} + +AddresseeList &AddresseeList::operator=(const AddresseeList &other) +{ + if (this != &other) { + QVector::operator=(other); + d = other.d; + } + + return *this; +} + +QString AddresseeList::toString() const +{ + QString str = QLatin1String("AddresseeList {\n"); + str += QStringLiteral(" Reverse Order: %1\n").arg(d->mReverseSorting + ? QStringLiteral("true") + : QStringLiteral("false")); + + QString crit; + switch (d->mActiveSortingCriterion) { + case Uid: + crit = QStringLiteral("Uid"); + break; + case Name: + crit = QStringLiteral("Name"); + break; + case FormattedName: + crit = QStringLiteral("FormattedName"); + break; + case FamilyName: + crit = QStringLiteral("FamilyName"); + break; + case GivenName: + crit = QStringLiteral("GivenName"); + break; + default: + crit = QStringLiteral("unknown -- update dump method"); + break; + } + + str += QStringLiteral(" Sorting criterion: %1\n").arg(crit); +#if 0 //code commented in loop => comment it too + for (const_iterator it = begin(); it != end(); ++it) { +// str += (*it).toString(); + } +#endif + + str += QLatin1String("}\n"); + + return str; +} + +void AddresseeList::setReverseSorting(bool reverseSorting) +{ + d->mReverseSorting = reverseSorting; +} + +bool AddresseeList::reverseSorting() const +{ + return d->mReverseSorting; +} + +void AddresseeList::sortBy(SortingCriterion c) +{ + d->mActiveSortingCriterion = c; + if (Uid == c) { + sortByTrait(); + } else if (Name == c) { + sortByTrait(); + } else if (FormattedName == c) { + sortByTrait(); + } else if (FamilyName == c) { + sortByTrait(); + } else if (GivenName == c) { + sortByTrait(); + } else { + qCCritical(KCONTACTS_LOG) << "AddresseeList sorting criterion passed for which a trait is not known." + << "No sorting done."; + } +} + +void AddresseeList::sort() +{ + sortBy(d->mActiveSortingCriterion); +} + +template +void AddresseeList::sortByTrait() +{ + // FIXME: better sorting algorithm, bubblesort is not acceptable for larger lists. + // + // for i := 1 to n - 1 + // do for j := 1 to n - i + // do if A[j] > A[j+1] + // then temp := A[j] + // A[j] := A[j + 1] + // A[j + 1 ] := temp + + iterator i1 = begin(); + iterator endIt = end(); + --endIt; + if (i1 == endIt) { // don't need sorting + return; + } + + iterator i2 = endIt; + while (i1 != endIt) { + iterator j1 = begin(); + iterator j2 = j1; + ++j2; + while (j1 != i2) { + if ((!d->mReverseSorting && Trait::lt(*j2, *j1)) + || (d->mReverseSorting && Trait::lt(*j1, *j2))) { + qSwap(*j1, *j2); + } + ++j1; + ++j2; + } + ++i1; + --i2; + } +} + +void AddresseeList::sortByField(Field *field) +{ + if (!field) { + qCWarning(KCONTACTS_LOG) << "sortByField called with no active sort field"; + return; + } + + sActiveField = field; + + if (isEmpty()) { + return; + } + + KContacts::FieldSortMode *mode = new KContacts::FieldSortMode(sActiveField, !d->mReverseSorting); + + KContacts::Addressee::setSortMode(mode); + std::sort((*this).begin(), (*this).end()); + KContacts::Addressee::setSortMode(nullptr); + + delete mode; +} + +void AddresseeList::sortByMode(SortMode *mode) +{ + if (isEmpty()) { + return; + } + + KContacts::Addressee::setSortMode(mode); + std::sort((*this).begin(), (*this).end()); + KContacts::Addressee::setSortMode(nullptr); +} + +SortingCriterion AddresseeList::sortingCriterion() const +{ + return d->mActiveSortingCriterion; +} + +Field *AddresseeList::sortingField() const +{ + return sActiveField; +} diff --git a/src/addresseelist.h b/src/addresseelist.h new file mode 100644 index 0000000..64d91f0 --- /dev/null +++ b/src/addresseelist.h @@ -0,0 +1,420 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Jost Schenck + 2003 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_ADDRESSEELIST_H +#define KCONTACTS_ADDRESSEELIST_H + +#include "kcontacts_export.h" +#include +#include + +namespace KContacts { +class Field; +class SortMode; +class Addressee; + +/** + * Each trait must implement one static function for equality, one for "less + * than". Class name should be the field name. A trait does not necessarily + * have to stick to just one field: a trait sorting by family name can e.g. + * sort addressees with equal family name by given name. + * + * If you want to implement reverse sorting, you do not have to write another + * trait, as AddresseeList takes care of that. + */ +namespace SortingTraits { +class KCONTACTS_EXPORT Uid +{ +public: + /** + * Creates an instance. + */ + Uid(); + + /** + * Destroys the instance. + */ + ~Uid(); + + /** + * "Equal" compare method + * + * @return @c true if the first parameter is equal to the second + * when comparing the uid attribute. + * + * @see Addressee::uid() + * @see QString::compare() + */ + static bool eq(const Addressee &a1, const Addressee &a2); + + /** + * "Less-Than" compare method + * + * @return @c true if the first parameter is "less-than" the second + * when comparing the uid attribute. + * + * @see Addressee::uid() + * @see QString::compare() + */ + static bool lt(const Addressee &a1, const Addressee &a2); + +private: + Q_DISABLE_COPY(Uid) + class Private; + Private *const d; +}; + +class KCONTACTS_EXPORT Name +{ +public: + /** + * Creates an instance. + */ + Name(); + + /** + * Destroys the instance. + */ + ~Name(); + + /** + * "Equal" compare method + * + * @return @c true if the first parameter is equal to the second + * when comparing the name attribute. + * + * @see Addressee::name() + * @see QString::localeAwareCompare() + */ + static bool eq(const Addressee &a1, const Addressee &a2); + + /** + * "Less-Than" compare method + * + * @return @c true if the first parameter is "less-than" the second + * when comparing the name attribute. + * + * @see Addressee::name() + * @see QString::localeAwareCompare() + */ + static bool lt(const Addressee &a1, const Addressee &a2); + +private: + Q_DISABLE_COPY(Name) + class Private; + Private *const d; +}; + +class KCONTACTS_EXPORT FormattedName +{ +public: + /** + * Creates an instance. + */ + FormattedName(); + + /** + * Destroys the instance. + */ + ~FormattedName(); + + /** + * "Equal" compare method + * + * @return @c true if the first parameter is equal to the second + * when comparing the formatted name attribute. + * + * @see Addressee::formattedName() + * @see QString::localeAwareCompare() + */ + static bool eq(const Addressee &a1, const Addressee &a2); + + /** + * "Less-Than" compare method + * + * @return @c true if the first parameter is "less-than" the second + * when comparing the formatted name attribute. + * + * @see Addressee::formattedName() + * @see QString::localeAwareCompare() + */ + static bool lt(const Addressee &a1, const Addressee &a2); + +private: + Q_DISABLE_COPY(FormattedName) + class Private; + Private *const d; +}; + +class KCONTACTS_EXPORT FamilyName // fallback to given name +{ +public: + /** + * Creates an instance. + */ + FamilyName(); + + /** + * Destroys the instance. + */ + ~FamilyName(); + + /** + * "Equal" compare method + * + * @return @c true if the first parameter is equal to the second + * when comparing the family name and given name attributes. + * + * @see Addressee::familyName() + * @see Addressee::givenName() + * @see QString::localeAwareCompare() + */ + static bool eq(const Addressee &a1, const Addressee &a2); + + /** + * "Less-Than" compare method + * + * Falls back to comparing given name if equal + * + * @return @c true if the first parameter is "less-than" the second + * when comparing the family name attribute. + * + * @see Addressee::familyName() + * @see QString::localeAwareCompare() + */ + static bool lt(const Addressee &a1, const Addressee &a2); + +private: + Q_DISABLE_COPY(FamilyName) + class Private; + Private *const d; +}; + +class KCONTACTS_EXPORT GivenName // fallback to family name +{ +public: + /** + * Creates an instance. + */ + GivenName(); + + /** + * Destroys the instance. + */ + ~GivenName(); + + /** + * "Equal" compare method + * + * @return @c true if the first parameter is equal to the second + * when comparing the given name and family name attributes. + * + * @see Addressee::givenName() + * @see Addressee::familyName() + * @see QString::localeAwareCompare() + */ + static bool eq(const Addressee &a1, const Addressee &a2); + + /** + * "Less-Than" compare method + * + * Falls back to comparing family name if equal + * + * @return @c true if the first parameter is "less-than" the second + * when comparing the given name attribute. + * + * @see Addressee::givenName() + * @see QString::localeAwareCompare() + */ + static bool lt(const Addressee &a1, const Addressee &a2); + +private: + Q_DISABLE_COPY(GivenName) + class Private; + Private *const d; +}; +} + +/** + * Addressee attribute used for sorting. + */ +typedef enum { + Uid, + Name, + FormattedName, + FamilyName, + GivenName +} SortingCriterion; + +/** + * @short a QValueList of Addressee, with sorting functionality + * + * This class extends the functionality of QValueList with + * sorting methods specific to the Addressee class. It can be used + * just like any other QValueList but is no template class. + * + * An AddresseeList does not automatically keep sorted when addressees + * are added or removed or the sorting order is changed, as this would + * slow down larger operations by sorting after every step. So after + * such operations you have to call {@link #sort} or {@link #sortBy} to + * create a defined order again. + * + * Iterator usage is inherited from QVector and extensively documented + * there. Please remember that the state of an iterator is undefined + * after any sorting operation. + * + * For the enumeration Type SortingCriterion, which specifies the + * field by the collection will be sorted, the following values exist: + * Uid, Name, FormattedName, FamilyName, GivenName. + * + * @author Jost Schenck jost@schenck.de + */ +class KCONTACTS_EXPORT AddresseeList : public QVector +{ +public: + /** + * Creates a new addressee list. + */ + AddresseeList(); + + /** + * Creates a new addressee list. + */ + AddresseeList(const AddresseeList &other); + + /** + * Creates a new addressee list. + */ + AddresseeList(const QVector &list); + + /** + * Destroys the addressee list. + */ + ~AddresseeList(); + + /** + * Assignment operator. + * + * @param other the list to assign from + * @return a reference to @c this + */ + AddresseeList &operator=(const AddresseeList &other); + + /** + * Determines the direction of sorting. On change, the list + * will not automatically be resorted. + * @param reverseSorting true if sorting should be done reverse, + * false otherwise + */ + void setReverseSorting(bool reverseSorting = true); + + /** + * Returns the direction of sorting. + * @return true if sorting is done reverse, false otherwise + */ + bool reverseSorting() const; + + /** + * Sorts this list by a specific criterion. + * @param c the criterion by which should be sorted + */ + void sortBy(SortingCriterion c); + + /** + * Sorts this list by a specific field. If no parameter is given, the + * last used Field object will be used. + * @param field pointer to the Field object to be sorted by + */ + void sortByField(Field *field = nullptr); + + /** + * Sorts this list by a specific sorting mode. + * @param mode pointer to the sorting mode object to be sorted by + */ + void sortByMode(SortMode *mode = nullptr); + + /** + * Sorts this list by its active sorting criterion. This normally is the + * criterion of the last sortBy operation or FormattedName if up + * to now there has been no sortBy operation. + * + * Please note that the sorting trait of the last {@link #sortByTrait} + * method call is not remembered and thus the action can not be repeated + * by this method. + */ + void sort(); + + /** + * Templated sort function. You normally will not want to use this but + * {@link #sortBy} and {@link #sort} instead as the existing sorting + * criteria completely suffice for most cases. + * + * However, if you do want to use some special sorting criterion, you can + * write a trait class that will be provided to this templated method. + * This trait class has to have a class declaration like the following: + * \code + * class MySortingTrait { + * public: + * // eq returns true if a1 and a2 are equal + * static bool eq(KContacts::Addressee a1, KContacts::Addressee a2); + * // lt returns true is a1 is "less than" a2 + * static bool lt(KContacts::Addressee a1, KContacts::Addressee a2); + * }; + * \endcode + * You can then pass this class to the sortByTrait method like this: + * \code + * myAddresseelist.sortByTrait<MySortingTrait>(); + * \endcode + * Please note that the {@link #sort} method can not be used to repeat the + * sorting of the last sortByTrait action. + * + * Right now this method uses the bubble sort algorithm. This should be + * replaced for a better one when I have time. + */ + template void sortByTrait(); + + /** + * Returns the active sorting criterion, ie the sorting criterion that + * will be used by a {@link #sort} call. + */ + SortingCriterion sortingCriterion() const; + + /** + * Returns the active sorting field, ie a pointer to the Field object + * which was used for the last {@link #sortByField} operation. + * This function returns the last GLOBAL sorting field, not + * the class specific one. + * You're a lot better off by keeping track of this locally. + */ + Field *sortingField() const; + + /** + * Returns a string representation of the addressee list. + */ + QString toString() const; + +private: + class Private; + QSharedDataPointer d; +}; +} + +#endif diff --git a/src/addressformatrc b/src/addressformatrc new file mode 100644 index 0000000..407be3d --- /dev/null +++ b/src/addressformatrc @@ -0,0 +1,149 @@ +[ar] +AddressFormat=%0(%cm\n)%0(%n\n)%0(Casilla de Correo %p\n)%0(%s\n)%z%w%l +AddressCountryPosition=below + +[at] +AddressFormat=%0(%n\n)%0(%cm\n)%0(Postfach %p\n)%0(%s\n)%0(%z)%w%l +BusinessAddressFormat=%0(%cm\n)%0(z.Hd. %n\n)%0(Postfach %p\n)%0(%s\n)%0(%z)%w%l +AddressCountryPosition=below + +[au] +AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(PO BOX %p\n)%0(%L%w%w%R%w%w)%z +AddressCountryPosition=BELOW + +[ax] +AddressFormat=%0(%cm\n)%0(%n\n)%0(PB %p\n)%0(%s\n)%z%w%L +AddressCountryPosition=BELOW + +[be] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(PO Box %p\n)%z%w%L +AddressFormat[fr]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L +AddressFormat[de]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(Postfach %p\n)%z%w%L +AddressFormat[nl]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(Postbus %p\n)%z%w%L +AddressCountryPosition=BELOW + +[bl] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L +AddressCountryPosition=BELOW + +[br] +AddressFormat=%0(%cm\n)%0(%n\n)%0(Caixa Postal %p\n)%0(%s\n)%l%0( - %r)%0(\n%z) + +[ca] +AddressFormat=%0(%N\n)%0(%CM\n)%0(%S\n)%0(PO BOX %p\n)%0(%L%w%R)%,%z +AddressCountryPosition=BELOW + +[ch] +AddressFormat=%0(%cm\n)%0(%n\n)%0(P.O. Box %p\n)%0(%s\n)%z%w%l +AddressFormat[de]=%0(%cm\n)%0(%n\n)%0(Postfach %p\n)%0(%s\n)%z%w%l +AddressFormat[fr]=%0(%cm\n)%0(%n\n)%0(Case postale %p\n)%0(%s\n)%z%w%l +AddressFormat[it]=%0(%cm\n)%0(%n\n)%0(Casella postale %p\n)%0(%s\n)%z%w%l +AddressCountryPosition=BELOW + +[cz] +AddressFormat=%0(%cm\n)%0(%n\n)%0(p. p. %p\n)%0(%s\n)%z%w%w%l +AddressCountryPosition=BELOW + +[de] +AddressFormat=%0(%cm\n)%0(%n\n)%0(Postfach %p\n)%0(%s\n)%z%w%l +AddressFormat[nds]=%0(%n\n)%0(- %cm -\n)%0(Postfach %p\n)%0(%s\n)%z%w%l +AddressCountryPosition=BELOW + +[dk] +AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(Postboks %p\n)%z%w%l +AddressCountryPosition=below + +[es] +AddressFormat=%0(%cm\n)%0(%n\n)%0(Apartado Postal %p\n)%0(%s\n)%z%w%l%0(\n%r) + +[fi] +AddressFormat=%0(%cm\n)%0(%n\n)%0(PB %p\n)%0(%s\n)%z%w%L +AddressCountryPosition=BELOW + +[fr] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L +AddressCountryPosition=BELOW + +[gb] +AddressFormat=%0(%n\n)%0(%cm\n)%0(PO Box %p\n)%0(%s\n)%0(%L\n)%0(%r\n)%0(%z\n) +AddressCountryPosition=BELOW + +[gl] +AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(Postboks %p\n)%z%w%l +AddressCountryPosition=below + +[gr] +AddressFormat=%0(%n\n)%0(%cm\n)%0(%S\n)%0(P.O. BOX %p\n)%z%w%L +AddressCountryPosition=BELOW + +[hu] +AddressFormat=%0(%n\n)%0(\n%l)%0(\n%s)%0(\nPF. %p)%0(\n%z)%0(\n%r) +BusinessAddressFormat=%0(%n\n)%cm\n%z%w%l%0(\n%s)%0(\nPF. %p)%0(\n%r) +AddressCountryPosition=below + +[il] +AddressFormat=%0(%n\n)%0(%cm\n)%0(ת.ד. %p\n)%0(%s\n)%0(%l%w%z) +AddressCountryPosition=BELOW + +[it] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%S\n)%0(CASELLA POSTALE %p\n)%0(%z%w%L)%w%R +AddressCountryPosition=BELOW + +[jp] +AddressFormat=%0(%z%w%r)%w%l%0(\n%s)%0(\n%cm)%0(\n%n) +AddressCountryPosition=ABOVE + +[kh] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(P.O. Box %p\n)%z%w%L%0(\n%r) +AddressCountryPosition=BELOW + +[lu] +AddressFormat=%0(%n\n)%0(%cm\n)%0(PO Box %p\n)%0(%s\n)%z%w%L +AddressFormat[fr]=%0(%n\n)%0(%cm\n)%0(BP %p\n)%0(%s\n)%z%w%L +AddressFormat[de]=%0(%n\n)%0(%cm\n)%0(Postfach %p\n)%0(%s\n)%z%w%L +AddressCountryPosition=BELOW + +[me] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(poÅ¡tanski fah %p\n)%z%w%l +AddressFormat[sr]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(поштански фах %p\n)%z%w%l +AddressCountryPosition=BELOW + +[mf] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L +AddressCountryPosition=BELOW + +[mp] +AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(PO BOX %p\n)%0(%l%,%w%r)%w%z +AddressCountryPosition=BELOW + +[na] +AddressFormat=%0(%cm\n)%0(%n\n)%0(P.O. Box %p\n)%l +AddressCountrzPosition=below + +[nl] +AddressFormat=%n\n%0(%cm\n)%0(Postbus %p\n)%0(%s\n)%z%w%l +AddressCountryPosition=below + +[no] +AddressFormat=%0(%cm\n)%0(%n\n)%0(Postboks %p\n)%0(%s\n)%z%w%w%L +AddressCountryPosition=BELOW + +[nz] +AddressFormat=%0(%n\n)%0(%cm\n)%0(PO Box %p\n)%0(%s\n)%L%w%z +AddressCountryPosition=BELOW + +[rs] +AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(поштански фах %p\n)%z%w%l +AddressFormat[sr@latin]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(poÅ¡tanski fah %p\n)%z%w%l +AddressCountryPosition=BELOW + +[se] +AddressFormat=%n\n%0(%cm\n)%0(Box %p\n)%0(%s\n)%z%w%w%L +AddressCountryPosition=below + +[si] +AddressFormat=%n\n%s\n%0(p.p. %p\n)%z %l + +[us] +AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(PO BOX %p\n)%0(%l%,%w%r)%w%z +AddressCountryPosition=BELOW diff --git a/src/calendarurl.cpp b/src/calendarurl.cpp new file mode 100644 index 0000000..ba8e2a6 --- /dev/null +++ b/src/calendarurl.cpp @@ -0,0 +1,177 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "calendarurl.h" + +#include +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN CalendarUrl::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + type = other.type; + url = other.url; + } + + static QString typeToString(CalendarUrl::CalendarType type); + QMap parameters; + QUrl url; + CalendarUrl::CalendarType type; +}; + +QString CalendarUrl::Private::typeToString(CalendarUrl::CalendarType type) +{ + QString ret; + switch (type) { + case Unknown: + case EndCalendarType: + ret = QStringLiteral("Unknown"); + break; + case FBUrl: + ret = QStringLiteral("FreeBusy"); + break; + case CALUri: + ret = QStringLiteral("CalUri"); + break; + case CALADRUri: + ret = QStringLiteral("Caladruri"); + break; + } + return ret; +} + +CalendarUrl::CalendarUrl() + : d(new Private) +{ + d->type = Unknown; +} + +CalendarUrl::CalendarUrl(CalendarUrl::CalendarType type) + : d(new Private) +{ + d->type = type; +} + +CalendarUrl::CalendarUrl(const CalendarUrl &other) + : d(other.d) +{ +} + +CalendarUrl::~CalendarUrl() +{ +} + +QMap CalendarUrl::parameters() const +{ + return d->parameters; +} + +bool CalendarUrl::operator==(const CalendarUrl &other) const +{ + return (d->parameters == other.parameters()) && (d->type == other.type()) && (d->url == other.url()); +} + +bool CalendarUrl::operator!=(const CalendarUrl &other) const +{ + return !(other == *this); +} + +CalendarUrl &CalendarUrl::operator=(const CalendarUrl &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString CalendarUrl::toString() const +{ + QString str = QLatin1String("CalendarUrl {\n"); + str += QStringLiteral(" url: %1\n").arg(d->url.toString()); + str += QStringLiteral(" type: %1\n").arg(CalendarUrl::Private::typeToString(d->type)); + if (!d->parameters.isEmpty()) { + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + QString param; + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +void CalendarUrl::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +bool CalendarUrl::isValid() const +{ + return (d->type != Unknown) && (d->url.isValid()); +} + +void CalendarUrl::setType(CalendarUrl::CalendarType type) +{ + d->type = type; +} + +CalendarUrl::CalendarType CalendarUrl::type() const +{ + return d->type; +} + +void CalendarUrl::setUrl(const QUrl &url) +{ + d->url = url; +} + +QUrl CalendarUrl::url() const +{ + return d->url; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const CalendarUrl &calUrl) +{ + return s << calUrl.d->parameters << static_cast(calUrl.d->type) << calUrl.d->url; +} + +QDataStream &KContacts::operator>>(QDataStream &s, CalendarUrl &calUrl) +{ + uint type; + s >> calUrl.d->parameters >> type >> calUrl.d->url; + calUrl.d->type = static_cast(type); + return s; +} diff --git a/src/calendarurl.h b/src/calendarurl.h new file mode 100644 index 0000000..ad92327 --- /dev/null +++ b/src/calendarurl.h @@ -0,0 +1,82 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef CALENDARURL_H +#define CALENDARURL_H +#include "kcontacts_export.h" + +#include +#include +#include +class QUrl; +/** @short Class that holds a Calendar Url (FBURL/CALADRURI/CALURI) + * @since 4.14.6 + */ + +namespace KContacts { +class KCONTACTS_EXPORT CalendarUrl +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const CalendarUrl &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, CalendarUrl &); +public: + enum CalendarType { + Unknown = 0, + FBUrl, + CALUri, + CALADRUri, + EndCalendarType + }; + + CalendarUrl(); + CalendarUrl(CalendarUrl::CalendarType type); + CalendarUrl(const CalendarUrl &other); + + ~CalendarUrl(); + + typedef QVector List; + + Q_REQUIRED_RESULT bool isValid() const; + + void setType(CalendarUrl::CalendarType type); + Q_REQUIRED_RESULT CalendarUrl::CalendarType type() const; + + void setUrl(const QUrl &url); + QUrl url() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const CalendarUrl &other) const; + Q_REQUIRED_RESULT bool operator!=(const CalendarUrl &other) const; + + CalendarUrl &operator=(const CalendarUrl &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; + +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const CalendarUrl &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, CalendarUrl &object); +} +Q_DECLARE_TYPEINFO(KContacts::CalendarUrl, Q_MOVABLE_TYPE); +#endif // CALENDARURL_H diff --git a/src/clientpidmap.cpp b/src/clientpidmap.cpp new file mode 100644 index 0000000..cdbda0a --- /dev/null +++ b/src/clientpidmap.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "clientpidmap.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN ClientPidMap::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + clientpidmap = other.clientpidmap; + } + + QMap parameters; + QString clientpidmap; +}; + +ClientPidMap::ClientPidMap() + : d(new Private) +{ +} + +ClientPidMap::ClientPidMap(const ClientPidMap &other) + : d(other.d) +{ +} + +ClientPidMap::ClientPidMap(const QString &clientpidmap) + : d(new Private) +{ + d->clientpidmap = clientpidmap; +} + +ClientPidMap::~ClientPidMap() +{ +} + +void ClientPidMap::setClientPidMap(const QString &clientpidmap) +{ + d->clientpidmap = clientpidmap; +} + +QString ClientPidMap::clientPidMap() const +{ + return d->clientpidmap; +} + +bool ClientPidMap::isValid() const +{ + return !d->clientpidmap.isEmpty(); +} + +void ClientPidMap::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap ClientPidMap::parameters() const +{ + return d->parameters; +} + +bool ClientPidMap::operator==(const ClientPidMap &other) const +{ + return (d->parameters == other.parameters()) && (d->clientpidmap == other.clientPidMap()); +} + +bool ClientPidMap::operator!=(const ClientPidMap &other) const +{ + return !(other == *this); +} + +ClientPidMap &ClientPidMap::operator=(const ClientPidMap &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString ClientPidMap::toString() const +{ + QString str = QLatin1String("ClientPidMap {\n"); + str += QStringLiteral(" clientpidmap: %1\n").arg(d->clientpidmap); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const ClientPidMap &clientpidmap) +{ + return s << clientpidmap.d->parameters << clientpidmap.d->clientpidmap; +} + +QDataStream &KContacts::operator>>(QDataStream &s, ClientPidMap &clientpidmap) +{ + s >> clientpidmap.d->parameters >> clientpidmap.d->clientpidmap; + return s; +} diff --git a/src/clientpidmap.h b/src/clientpidmap.h new file mode 100644 index 0000000..2558359 --- /dev/null +++ b/src/clientpidmap.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef CLIENTPIDMAP_H +#define CLIENTPIDMAP_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a ClientPidMap for a contact. + * @since 5.4 + */ +namespace KContacts { +class KCONTACTS_EXPORT ClientPidMap +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const ClientPidMap &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, ClientPidMap &); +public: + ClientPidMap(); + ClientPidMap(const ClientPidMap &other); + ClientPidMap(const QString &clientpidmap); + + ~ClientPidMap(); + + typedef QVector List; + + void setClientPidMap(const QString &clientpidmap); + Q_REQUIRED_RESULT QString clientPidMap() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const ClientPidMap &other) const; + Q_REQUIRED_RESULT bool operator!=(const ClientPidMap &other) const; + + ClientPidMap &operator=(const ClientPidMap &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const ClientPidMap &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, ClientPidMap &object); +} +Q_DECLARE_TYPEINFO(KContacts::ClientPidMap, Q_MOVABLE_TYPE); +#endif // CLIENTPIDMAP_H diff --git a/src/contactgroup.cpp b/src/contactgroup.cpp new file mode 100644 index 0000000..ad46360 --- /dev/null +++ b/src/contactgroup.cpp @@ -0,0 +1,507 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2008 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + + Boston, MA 02110-1301, USA. +*/ + +#include "contactgroup.h" + +#include +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN ContactGroup::ContactReference::ContactReferencePrivate : public QSharedData +{ +public: + ContactReferencePrivate() + : QSharedData() + { + } + + ContactReferencePrivate(const ContactReferencePrivate &other) + : QSharedData(other) + { + mUid = other.mUid; + mPreferredEmail = other.mPreferredEmail; + mCustoms = other.mCustoms; + } + + QString mUid; + QString mGid; + QString mPreferredEmail; + QMap mCustoms; +}; + +ContactGroup::ContactReference::ContactReference() + : d(new ContactReferencePrivate) +{ +} + +ContactGroup::ContactReference::ContactReference(const ContactReference &other) + : d(other.d) +{ +} + +ContactGroup::ContactReference::ContactReference(const QString &uid) + : d(new ContactReferencePrivate) +{ + d->mUid = uid; +} + +ContactGroup::ContactReference::~ContactReference() +{ +} + +void ContactGroup::ContactReference::setUid(const QString &uid) +{ + d->mUid = uid; +} + +QString ContactGroup::ContactReference::uid() const +{ + return d->mUid; +} + +void ContactGroup::ContactReference::setGid(const QString &gid) +{ + d->mGid = gid; +} + +QString ContactGroup::ContactReference::gid() const +{ + return d->mGid; +} + +void ContactGroup::ContactReference::setPreferredEmail(const QString &email) +{ + d->mPreferredEmail = email; +} + +QString ContactGroup::ContactReference::preferredEmail() const +{ + return d->mPreferredEmail; +} + +void ContactGroup::ContactReference::insertCustom(const QString &key, const QString &value) +{ + d->mCustoms.insert(key, value); +} + +void ContactGroup::ContactReference::removeCustom(const QString &key) +{ + d->mCustoms.remove(key); +} + +QString ContactGroup::ContactReference::custom(const QString &key) const +{ + return d->mCustoms.value(key); +} + +ContactGroup::ContactReference &ContactGroup::ContactReference::operator=( + const ContactGroup::ContactReference &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool ContactGroup::ContactReference::operator==(const ContactReference &other) const +{ + return d->mUid == other.d->mUid + && d->mPreferredEmail == other.d->mPreferredEmail + && d->mCustoms == other.d->mCustoms; +} + +class Q_DECL_HIDDEN ContactGroup::ContactGroupReference::ContactGroupReferencePrivate : public QSharedData +{ +public: + ContactGroupReferencePrivate() + : QSharedData() + { + } + + ContactGroupReferencePrivate(const ContactGroupReferencePrivate &other) + : QSharedData(other) + { + mUid = other.mUid; + mCustoms = other.mCustoms; + } + + QString mUid; + QMap mCustoms; +}; + +ContactGroup::ContactGroupReference::ContactGroupReference() + : d(new ContactGroupReferencePrivate) +{ +} + +ContactGroup::ContactGroupReference::ContactGroupReference(const ContactGroupReference &other) + : d(other.d) +{ +} + +ContactGroup::ContactGroupReference::ContactGroupReference(const QString &uid) + : d(new ContactGroupReferencePrivate) +{ + d->mUid = uid; +} + +ContactGroup::ContactGroupReference::~ContactGroupReference() +{ +} + +void ContactGroup::ContactGroupReference::setUid(const QString &uid) +{ + d->mUid = uid; +} + +QString ContactGroup::ContactGroupReference::uid() const +{ + return d->mUid; +} + +void ContactGroup::ContactGroupReference::insertCustom(const QString &key, const QString &value) +{ + d->mCustoms.insert(key, value); +} + +void ContactGroup::ContactGroupReference::removeCustom(const QString &key) +{ + d->mCustoms.remove(key); +} + +QString ContactGroup::ContactGroupReference::custom(const QString &key) const +{ + return d->mCustoms.value(key); +} + +ContactGroup::ContactGroupReference &ContactGroup::ContactGroupReference::operator=( + const ContactGroup::ContactGroupReference &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool ContactGroup::ContactGroupReference::operator==(const ContactGroupReference &other) const +{ + return d->mUid == other.d->mUid + && d->mCustoms == other.d->mCustoms; +} + +class Q_DECL_HIDDEN ContactGroup::Data::DataPrivate : public QSharedData +{ +public: + DataPrivate() + : QSharedData() + { + } + + DataPrivate(const DataPrivate &other) + : QSharedData(other) + { + mName = other.mName; + mEmail = other.mEmail; + mCustoms = other.mCustoms; + } + + QString mName; + QString mEmail; + QMap mCustoms; +}; + +ContactGroup::Data::Data() + : d(new DataPrivate) +{ +} + +ContactGroup::Data::Data(const Data &other) + : d(other.d) +{ +} + +ContactGroup::Data::Data(const QString &name, const QString &email) + : d(new DataPrivate) +{ + d->mName = name; + d->mEmail = email; +} + +ContactGroup::Data::~Data() +{ +} + +void ContactGroup::Data::setName(const QString &name) +{ + d->mName = name; +} + +QString ContactGroup::Data::name() const +{ + return d->mName; +} + +void ContactGroup::Data::setEmail(const QString &email) +{ + d->mEmail = email; +} + +QString ContactGroup::Data::email() const +{ + return d->mEmail; +} + +void ContactGroup::Data::insertCustom(const QString &key, const QString &value) +{ + d->mCustoms.insert(key, value); +} + +void ContactGroup::Data::removeCustom(const QString &key) +{ + d->mCustoms.remove(key); +} + +QString ContactGroup::Data::custom(const QString &key) const +{ + return d->mCustoms.value(key); +} + +ContactGroup::Data &ContactGroup::Data::operator=(const ContactGroup::Data &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool ContactGroup::Data::operator==(const Data &other) const +{ + return d->mName == other.d->mName + && d->mEmail == other.d->mEmail + && d->mCustoms == other.d->mCustoms; +} + +class Q_DECL_HIDDEN ContactGroup::Private : public QSharedData +{ +public: + Private() + : QSharedData() + , mIdentifier(QUuid::createUuid().toString().mid(1, 36)) //We avoid the curly braces so the string is RFC4122 compliant and can be used as urn + { + } + + Private(const Private &other) + : QSharedData(other) + { + mIdentifier = other.mIdentifier; + mName = other.mName; + mContactReferences = other.mContactReferences; + mContactGroupReferences = other.mContactGroupReferences; + mDataObjects = other.mDataObjects; + } + + QString mIdentifier; + QString mName; + ContactGroup::ContactReference::List mContactReferences; + ContactGroup::ContactGroupReference::List mContactGroupReferences; + ContactGroup::Data::List mDataObjects; +}; + +ContactGroup::ContactGroup() + : d(new Private) +{ +} + +ContactGroup::ContactGroup(const ContactGroup &other) + : d(other.d) +{ +} + +ContactGroup::ContactGroup(const QString &name) + : d(new Private) +{ + d->mName = name; +} + +ContactGroup::~ContactGroup() +{ +} + +void ContactGroup::setName(const QString &name) +{ + d->mName = name; +} + +QString ContactGroup::name() const +{ + return d->mName; +} + +void ContactGroup::setId(const QString &id) +{ + d->mIdentifier = id; +} + +QString ContactGroup::id() const +{ + return d->mIdentifier; +} + +unsigned int ContactGroup::count() const +{ + return d->mContactReferences.count() + d->mDataObjects.count(); +} + +unsigned int ContactGroup::contactReferenceCount() const +{ + return d->mContactReferences.count(); +} + +unsigned int ContactGroup::contactGroupReferenceCount() const +{ + return d->mContactGroupReferences.count(); +} + +unsigned int ContactGroup::dataCount() const +{ + return d->mDataObjects.count(); +} + +ContactGroup::ContactReference &ContactGroup::contactReference(unsigned int index) +{ + Q_ASSERT_X(index < (unsigned int)d->mContactReferences.count(), + "contactReference()", "index out of range"); + + return d->mContactReferences[index]; +} + +const ContactGroup::ContactReference &ContactGroup::contactReference(unsigned int index) const +{ + Q_ASSERT_X(index < (unsigned int)d->mContactReferences.count(), + "contactReference()", "index out of range"); + + return d->mContactReferences[index]; +} + +ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference(unsigned int index) +{ + Q_ASSERT_X(index < (unsigned int)d->mContactGroupReferences.count(), + "contactGroupReference()", "index out of range"); + + return d->mContactGroupReferences[index]; +} + +const ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference( + unsigned int index) const +{ + Q_ASSERT_X(index < (unsigned int)d->mContactGroupReferences.count(), + "contactGroupReference()", "index out of range"); + + return d->mContactGroupReferences[index]; +} + +ContactGroup::Data &ContactGroup::data(unsigned int index) +{ + Q_ASSERT_X(index < (unsigned int)d->mDataObjects.count(), "data()", "index out of range"); + + return d->mDataObjects[index]; +} + +const ContactGroup::Data &ContactGroup::data(unsigned int index) const +{ + Q_ASSERT_X(index < (unsigned int)d->mDataObjects.count(), "data()", "index out of range"); + + return d->mDataObjects[index]; +} + +void ContactGroup::append(const ContactReference &reference) +{ + d->mContactReferences.append(reference); +} + +void ContactGroup::append(const ContactGroupReference &reference) +{ + d->mContactGroupReferences.append(reference); +} + +void ContactGroup::append(const Data &data) +{ + d->mDataObjects.append(data); +} + +void ContactGroup::remove(const ContactReference &reference) +{ + d->mContactReferences.removeOne(reference); +} + +void ContactGroup::remove(const ContactGroupReference &reference) +{ + d->mContactGroupReferences.removeOne(reference); +} + +void ContactGroup::remove(const Data &data) +{ + d->mDataObjects.removeOne(data); +} + +void ContactGroup::removeAllContactReferences() +{ + d->mContactReferences.clear(); +} + +void ContactGroup::removeAllContactGroupReferences() +{ + d->mContactGroupReferences.clear(); +} + +void ContactGroup::removeAllContactData() +{ + d->mDataObjects.clear(); +} + +ContactGroup &ContactGroup::operator=(const ContactGroup &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool ContactGroup::operator==(const ContactGroup &other) const +{ + return d->mIdentifier == other.d->mIdentifier + && d->mName == other.d->mName + && d->mContactReferences == other.d->mContactReferences + && d->mContactGroupReferences == other.d->mContactGroupReferences + && d->mDataObjects == other.d->mDataObjects; +} + +QString ContactGroup::mimeType() +{ + return QStringLiteral("application/x-vnd.kde.contactgroup"); +} diff --git a/src/contactgroup.h b/src/contactgroup.h new file mode 100644 index 0000000..155d2fb --- /dev/null +++ b/src/contactgroup.h @@ -0,0 +1,487 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2008 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_CONTACTGROUP_H +#define KCONTACTS_CONTACTGROUP_H + +#include +#include +#include + +#include "kcontacts_export.h" + +class QString; + +namespace KContacts { +/** + * @short This class represents a group of contacts. + * + * It can contain two types of contacts, either a reference + * or data. + * The reference entry is just an unique identifier which + * identifies the real contact in the system. + * The data entry contains a name and an email address. + * + * @author Tobias Koenig + * @since 4.3 + */ +class KCONTACTS_EXPORT ContactGroup +{ +public: + + /** + * This class represents a contact reference + */ + class KCONTACTS_EXPORT ContactReference + { + public: + /** + * A list of contact references. + */ + typedef QVector List; + + /** + * Creates an empty contact reference. + */ + ContactReference(); + + /** + * Creates a contact reference from an @p other reference. + */ + ContactReference(const ContactReference &other); + + /** + * Creates a contact reference for the given contact @p uid. + */ + ContactReference(const QString &uid); + + /** + * Destroys the contact reference. + */ + ~ContactReference(); + + /** + * Sets the contact uid of the contact reference. + * @param uid identifier of the contact to reference + * @note That is the Akonadi Item ID of the contact that + * is referenced here. + */ + void setUid(const QString &uid); + + /** + * Returns the contact uid of the contact reference. + * + * @note That is the Akonadi Item ID of the contact that + * is referenced here. + */ + Q_REQUIRED_RESULT QString uid() const; + + /** + * Sets the contact gid of the contact reference. + * @param gid globally unique identifier of the contact to reference + * @since 4.12 + */ + void setGid(const QString &gid); + + /** + * Returns the contact GID of the contact reference. + * @since 4.12 + */ + Q_REQUIRED_RESULT QString gid() const; + + /** + * Sets the preferred email address. + */ + void setPreferredEmail(const QString &email); + + /** + * Returns the preferred email address, or an empty string + * if no preferred email address is set. + */ + Q_REQUIRED_RESULT QString preferredEmail() const; + + /** + * Inserts a custom entry. + * If an entry with the same @p key already exists, it is + * overwritten. + * + * @param key The unique key. + * @param value The value. + */ + void insertCustom(const QString &key, const QString &value); + + /** + * Removes the custom entry with the given @p key. + */ + void removeCustom(const QString &key); + + /** + * Returns the value for the given @p key, or an empty string + * if the entry for that key does not exists. + */ + Q_REQUIRED_RESULT QString custom(const QString &key) const; + + /** + * @internal + */ + ContactReference &operator=(const ContactReference &other); + + /** + * @internal + */ + Q_REQUIRED_RESULT bool operator==(const ContactReference &other) const; + + private: + class ContactReferencePrivate; + QSharedDataPointer d; + }; + + /** + * This class represents a contact group reference + */ + class KCONTACTS_EXPORT ContactGroupReference + { + public: + /** + * A list of contact group references. + */ + typedef QVector List; + + /** + * Creates an empty contact group reference. + */ + ContactGroupReference(); + + /** + * Creates a contact group reference from an @p other reference. + */ + ContactGroupReference(const ContactGroupReference &other); + + /** + * Creates a contact group reference for the given contact group @p uid. + */ + ContactGroupReference(const QString &uid); + + /** + * Destroys the contact group reference. + */ + ~ContactGroupReference(); + + /** + * Sets the contact group uid of the contact group reference. + */ + void setUid(const QString &uid); + + /** + * Returns the contact group uid of the contact group reference. + */ + QString uid() const; + + /** + * Inserts a custom entry. + * If an entry with the same @p key already exists, it is + * overwritten. + * + * @param key The unique key. + * @param value The value. + */ + void insertCustom(const QString &key, const QString &value); + + /** + * Removes the custom entry with the given @p key. + */ + void removeCustom(const QString &key); + + /** + * Returns the value for the given @p key, or an empty string + * if the entry for that key does not exists. + */ + QString custom(const QString &key) const; + + /** + * @internal + */ + ContactGroupReference &operator=(const ContactGroupReference &other); + + /** + * @internal + */ + bool operator==(const ContactGroupReference &other) const; + + private: + class ContactGroupReferencePrivate; + QSharedDataPointer d; + }; + + /** + * This class represents a contact data object + */ + class KCONTACTS_EXPORT Data + { + public: + /** + * A list of contact data. + */ + typedef QVector List; + + /** + * Creates an empty contact data object. + */ + Data(); + + /** + * Creates a contact data object from an @p other data object. + */ + Data(const Data &other); + + /** + * Creates a contact data object with the given @p name and @p email address. + */ + Data(const QString &name, const QString &email); + + /** + * Destroys the contact data object. + */ + ~Data(); + + /** + * Sets the @p name of the contact data object. + */ + void setName(const QString &name); + + /** + * Returns the name of the contact data object. + */ + Q_REQUIRED_RESULT QString name() const; + + /** + * Sets the @p email address of the contact data object. + */ + void setEmail(const QString &email); + + /** + * Returns the email address of the contact data object. + */ + Q_REQUIRED_RESULT QString email() const; + + /** + * Inserts a custom entry. + * If an entry with the same @p key already exists, it is + * overwritten. + * + * @param key The unique key. + * @param value The value. + */ + void insertCustom(const QString &key, const QString &value); + + /** + * Removes the custom entry with the given @p key. + */ + void removeCustom(const QString &key); + + /** + * Returns the value for the given @p key, or an empty string + * if the entry for that key does not exists. + */ + Q_REQUIRED_RESULT QString custom(const QString &key) const; + + /** + * @internal + */ + Data &operator=(const Data &other); + + /** + * @internal + */ + Q_REQUIRED_RESULT bool operator==(const Data &other) const; + + private: + class DataPrivate; + QSharedDataPointer d; + }; + + /** + * A list of contact groups. + */ + typedef QVector List; + + /** + * Creates an empty contact group. + */ + ContactGroup(); + + /** + * Creates a contact group from an @p other group. + */ + ContactGroup(const ContactGroup &other); + + /** + * Creates a contact group with the given name. + */ + ContactGroup(const QString &name); + + /** + * Destroys the contact group. + */ + ~ContactGroup(); + + /** + * Sets the unique @p id of the contact group. + */ + void setId(const QString &id); + + /** + * Returns the unique id of the contact group. + */ + Q_REQUIRED_RESULT QString id() const; + + /** + * Sets the i18n'd @p name of the contact group. + */ + void setName(const QString &name); + + /** + * Returns the i18n'd name of the contact group. + */ + Q_REQUIRED_RESULT QString name() const; + + /** + * Returns the number of contacts in this group. + * That includes the contact references and contact data. + */ + Q_REQUIRED_RESULT unsigned int count() const; + + /** + * Returns the number of contact references in this group. + */ + Q_REQUIRED_RESULT unsigned int contactReferenceCount() const; + + /** + * Returns the number of group references in this group. + */ + Q_REQUIRED_RESULT unsigned int contactGroupReferenceCount() const; + + /** + * Returns the number of contact data objects in this group. + */ + Q_REQUIRED_RESULT unsigned int dataCount() const; + + /** + * Returns the contact reference at the given @p index. + */ + Q_REQUIRED_RESULT ContactReference &contactReference(unsigned int index); + + /** + * Returns the contact reference at the given @p index. + */ + const ContactReference &contactReference(unsigned int index) const; + + /** + * Returns the contact group reference at the given @p index. + */ + ContactGroupReference &contactGroupReference(unsigned int index); + + /** + * Returns the contact group reference at the given @p index. + */ + const ContactGroupReference &contactGroupReference(unsigned int index) const; + + /** + * Returns the contact data object at the given @p index. + */ + Data &data(unsigned int index); + + /** + * Returns the contact data object at the given @p index. + */ + const Data &data(unsigned int index) const; + + /** + * Appends a new contact @p reference to the contact group. + */ + void append(const ContactReference &reference); + + /** + * Appends a new contact group @p reference to the contact group. + */ + void append(const ContactGroupReference &reference); + + /** + * Appends a new contact @p data object to the contact group. + */ + void append(const Data &data); + + /** + * Removes the given contact @p reference from the contact group. + */ + void remove(const ContactReference &reference); + + /** + * Removes the given contact group @p reference from the contact group. + */ + void remove(const ContactGroupReference &reference); + + /** + * Removes the given contact @p data object from the contact group. + */ + void remove(const Data &data); + + /** + * Removes all contact references from the contact group. + */ + void removeAllContactReferences(); + + /** + * Removes all contact group references from the contact group. + */ + void removeAllContactGroupReferences(); + + /** + * Removes all contact data from the contact group. + */ + void removeAllContactData(); + + /** + * @internal + */ + ContactGroup &operator=(const ContactGroup &other); + + /** + * @internal + */ + Q_REQUIRED_RESULT bool operator==(const ContactGroup &other) const; + + /** + * Returns the MIME type used for Contact Groups + */ + static QString mimeType(); + +private: + class Private; + QSharedDataPointer d; +}; +} +Q_DECLARE_TYPEINFO(KContacts::ContactGroup::ContactGroupReference, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(KContacts::ContactGroup::ContactReference, Q_MOVABLE_TYPE); + +#define KCONTACTS_CONTACTGROUP_METATYPE_DEFINED +Q_DECLARE_METATYPE(KContacts::ContactGroup) + +#endif diff --git a/src/contactgroup.xsd b/src/contactgroup.xsd new file mode 100644 index 0000000..ba486b6 --- /dev/null +++ b/src/contactgroup.xsd @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/contactgrouptool.cpp b/src/contactgrouptool.cpp new file mode 100644 index 0000000..f7b3c01 --- /dev/null +++ b/src/contactgrouptool.cpp @@ -0,0 +1,369 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2008 Tobias Koenig + Copyright (c) 2008 Kevin Krammer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "contactgrouptool.h" +#include "contactgroup.h" + +#include +#include +#include + +#include +#include + +using namespace KContacts; + +class XmlContactGroupWriter : public QXmlStreamWriter +{ +public: + XmlContactGroupWriter(); + + void write(const ContactGroup &group, QIODevice *device); + void write(const QVector &groupLis, QIODevice *device); + +private: + void writeGroup(const ContactGroup &group); + void writeContactReference(const ContactGroup::ContactReference &reference); + void writeContactGroupReference(const ContactGroup::ContactGroupReference &reference); + void writeData(const ContactGroup::Data &data); +}; + +XmlContactGroupWriter::XmlContactGroupWriter() +{ + setAutoFormatting(true); +} + +void XmlContactGroupWriter::write(const ContactGroup &group, QIODevice *device) +{ + setDevice(device); + + writeStartDocument(); + + writeGroup(group); + + writeEndDocument(); +} + +void XmlContactGroupWriter::write(const QVector &groupList, QIODevice *device) +{ + setDevice(device); + + writeStartDocument(); + + writeStartElement(QStringLiteral("contactGroupList")); + + for (const ContactGroup &group : groupList) { + writeGroup(group); + } + + writeEndElement(); + + writeEndDocument(); +} + +void XmlContactGroupWriter::writeGroup(const ContactGroup &group) +{ + writeStartElement(QStringLiteral("contactGroup")); + writeAttribute(QStringLiteral("uid"), group.id()); + writeAttribute(QStringLiteral("name"), group.name()); + + const uint contactCount(group.contactReferenceCount()); + for (uint i = 0; i < contactCount; ++i) { + writeContactReference(group.contactReference(i)); + } + + const uint contactGroupReference(group.contactGroupReferenceCount()); + for (uint i = 0; i < contactGroupReference; ++i) { + writeContactGroupReference(group.contactGroupReference(i)); + } + + const uint dataCount(group.dataCount()); + for (uint i = 0; i < dataCount; ++i) { + writeData(group.data(i)); + } + + writeEndElement(); +} + +void XmlContactGroupWriter::writeContactReference(const ContactGroup::ContactReference &reference) +{ + writeStartElement(QStringLiteral("contactReference")); + writeAttribute(QStringLiteral("uid"), reference.uid()); + writeAttribute(QStringLiteral("gid"), reference.gid()); + if (!reference.preferredEmail().isEmpty()) { + writeAttribute(QStringLiteral("preferredEmail"), reference.preferredEmail()); + } + + // TODO: customs + + writeEndElement(); +} + +void XmlContactGroupWriter::writeContactGroupReference( + const ContactGroup::ContactGroupReference &reference) +{ + writeStartElement(QStringLiteral("contactGroupReference")); + writeAttribute(QStringLiteral("uid"), reference.uid()); + + // TODO: customs + + writeEndElement(); +} + +void XmlContactGroupWriter::writeData(const ContactGroup::Data &data) +{ + writeStartElement(QStringLiteral("contactData")); + writeAttribute(QStringLiteral("name"), data.name()); + writeAttribute(QStringLiteral("email"), data.email()); + + // TODO: customs + + writeEndElement(); +} + +class XmlContactGroupReader : public QXmlStreamReader +{ +public: + XmlContactGroupReader(); + + bool read(QIODevice *device, ContactGroup &group); + bool read(QIODevice *device, QVector &groupList); + +private: + bool readGroup(ContactGroup &group); + bool readContactReference(ContactGroup::ContactReference &reference); + bool readContactGroupReference(ContactGroup::ContactGroupReference &reference); + bool readData(ContactGroup::Data &data); +}; + +XmlContactGroupReader::XmlContactGroupReader() +{ +} + +bool XmlContactGroupReader::read(QIODevice *device, ContactGroup &group) +{ + setDevice(device); + + while (!atEnd()) { + readNext(); + if (isStartElement()) { + if (name() == QLatin1String("contactGroup")) { + return readGroup(group); + } else { + raiseError(QStringLiteral("The document does not describe a ContactGroup")); + } + } + } + + return error() == NoError; +} + +bool XmlContactGroupReader::read(QIODevice *device, QVector &groupList) +{ + setDevice(device); + + int depth = 0; + + while (!atEnd()) { + readNext(); + if (isStartElement()) { + ++depth; + if (depth == 1) { + if (name() == QLatin1String("contactGroupList")) { + continue; + } else { + raiseError(QStringLiteral("The document does not describe a list of ContactGroup")); + } + } else if (depth == 2) { + if (name() == QLatin1String("contactGroup")) { + ContactGroup group; + if (!readGroup(group)) { + return false; + } + + groupList.append(group); + } else { + raiseError(QStringLiteral("The document does not describe a list of ContactGroup")); + } + } + } + + if (isEndElement()) { + --depth; + } + } + + return error() == NoError; +} + +bool XmlContactGroupReader::readGroup(ContactGroup &group) +{ + const QXmlStreamAttributes elementAttributes = attributes(); + const QStringRef uid = elementAttributes.value(QLatin1String("uid")); + if (uid.isEmpty()) { + raiseError(QStringLiteral("ContactGroup is missing a uid")); + return false; + } + + const QStringRef groupName = elementAttributes.value(QLatin1String("name")); + if (groupName.isEmpty()) { + raiseError(QStringLiteral("ContactGroup is missing a name")); + return false; + } + + group.setId(uid.toString()); + group.setName(groupName.toString()); + + while (!atEnd()) { + readNext(); + if (isStartElement()) { + if (name() == QLatin1String("contactData")) { + ContactGroup::Data data; + if (!readData(data)) { + return false; + } + group.append(data); + } else if (name() == QLatin1String("contactReference")) { + ContactGroup::ContactReference reference; + if (!readContactReference(reference)) { + return false; + } + group.append(reference); + } else if (name() == QLatin1String("contactGroupReference")) { + ContactGroup::ContactGroupReference reference; + if (!readContactGroupReference(reference)) { + return false; + } + group.append(reference); + } else { + raiseError(QStringLiteral("The document does not describe a ContactGroup")); + } + } + + if (isEndElement()) { + if (name() == QLatin1String("contactGroup")) { + return true; + } + } + } + + return false; +} + +bool XmlContactGroupReader::readData(ContactGroup::Data &data) +{ + const QXmlStreamAttributes elementAttributes = attributes(); + const QStringRef email = elementAttributes.value(QLatin1String("email")); + if (email.isEmpty()) { + raiseError(QStringLiteral("ContactData is missing an email address")); + return false; + } + + const QStringRef name = elementAttributes.value(QLatin1String("name")); + + data.setName(name.toString()); + data.setEmail(email.toString()); + + return true; +} + +bool XmlContactGroupReader::readContactReference(ContactGroup::ContactReference &reference) +{ + const QXmlStreamAttributes elementAttributes = attributes(); + const QStringRef uid = elementAttributes.value(QLatin1String("uid")); + const QStringRef gid = elementAttributes.value(QLatin1String("gid")); + if (uid.isEmpty() && gid.isEmpty()) { + raiseError(QStringLiteral("ContactReference is missing both uid and gid")); + return false; + } + const QStringRef preferredEmail = elementAttributes.value(QLatin1String("preferredEmail")); + + reference.setUid(uid.toString()); + reference.setGid(gid.toString()); + reference.setPreferredEmail(preferredEmail.toString()); + + return true; +} + +bool XmlContactGroupReader::readContactGroupReference( + ContactGroup::ContactGroupReference &reference) +{ + const QXmlStreamAttributes elementAttributes = attributes(); + const QStringRef uid = elementAttributes.value(QLatin1String("uid")); + if (uid.isEmpty()) { + raiseError(QStringLiteral("ContactGroupReference is missing a uid")); + return false; + } + + reference.setUid(uid.toString()); + + return true; +} + +bool ContactGroupTool::convertFromXml(QIODevice *device, ContactGroup &group, QString *errorMessage) +{ + Q_UNUSED(errorMessage); + + XmlContactGroupReader reader; + + bool ok = reader.read(device, group); + + if (!ok && errorMessage != nullptr) { + *errorMessage = reader.errorString(); + } + + return ok; +} + +bool ContactGroupTool::convertToXml(const ContactGroup &group, QIODevice *device, QString *errorMessage) +{ + Q_UNUSED(errorMessage); + + XmlContactGroupWriter writer; + writer.write(group, device); + + return true; +} + +bool ContactGroupTool::convertFromXml(QIODevice *device, QVector &groupList, QString *errorMessage) +{ + Q_UNUSED(errorMessage); + + XmlContactGroupReader reader; + + bool ok = reader.read(device, groupList); + + if (!ok && errorMessage != nullptr) { + *errorMessage = reader.errorString(); + } + + return ok; +} + +bool ContactGroupTool::convertToXml(const QVector &groupList, QIODevice *device, QString *errorMessage) +{ + Q_UNUSED(errorMessage); + + XmlContactGroupWriter writer; + writer.write(groupList, device); + + return true; +} diff --git a/src/contactgrouptool.h b/src/contactgrouptool.h new file mode 100644 index 0000000..da99533 --- /dev/null +++ b/src/contactgrouptool.h @@ -0,0 +1,67 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2008 Tobias Koenig + Copyright (c) 2008 Kevin Krammer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_CONTACTGROUPTOOL_H +#define KCONTACTS_CONTACTGROUPTOOL_H + +#include "kcontacts_export.h" +#include +class QIODevice; + +template class QList; + +namespace KContacts { +class ContactGroup; + +/** + * Static methods for converting ContactGroup to XML format and vice versa. + * + * @author Kevin Krammer + * @since 4.3 + */ +namespace ContactGroupTool { +/** + * Converts XML data coming from a @p device into a contact @p group. + * If an error occurs, @c false is returned and @p errorMessage is set. + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool convertFromXml(QIODevice *device, ContactGroup &group, QString *errorMessage = nullptr); + +/** + * Converts a contact @p group into XML data and writes them to a @p device. + * If an error occurs, @c false is returned and @p errorMessage is set. + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool convertToXml(const ContactGroup &group, QIODevice *device, QString *errorMessage = nullptr); + +/** + * Converts XML data coming from a @p device into a @p list of contact groups. + * If an error occurs, @c false is returned and @p errorMessage is set. + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool convertFromXml(QIODevice *device, QVector &list, QString *errorMessage = nullptr); + +/** + * Converts a @p list of contact groups into XML data and writes them to a @p device. + * If an error occurs, @c false is returned and @p errorMessage is set. + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool convertToXml(const QVector &list, QIODevice *device, QString *errorMessage = nullptr); +} +} + +#endif diff --git a/src/converter/CMakeLists.txt b/src/converter/CMakeLists.txt new file mode 100644 index 0000000..6d07969 --- /dev/null +++ b/src/converter/CMakeLists.txt @@ -0,0 +1,22 @@ +ecm_generate_headers(KContacts_CamelCase_Converter_HEADERS + HEADER_NAMES + LDIFConverter + VCardConverter + PREFIX KContacts + REQUIRED_HEADERS KContacts_Converter_HEADERS +) + +install(FILES + ${KContacts_CamelCase_Converter_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KContacts/KContacts + COMPONENT Devel +) + + +install(FILES + ${KContacts_Converter_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KContacts/kcontacts + COMPONENT Devel +) + + diff --git a/src/converter/ldifconverter.cpp b/src/converter/ldifconverter.cpp new file mode 100644 index 0000000..fa6177b --- /dev/null +++ b/src/converter/ldifconverter.cpp @@ -0,0 +1,638 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Helge Deller + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +/* + Useful links: + - http://tldp.org/HOWTO/LDAP-Implementation-HOWTO/schemas.html + - http://www.faqs.org/rfcs/rfc2849.html + + Not yet handled items: + - objectclass microsoftaddressbook + - info, + - initials, + - otherfacsimiletelephonenumber, + - otherpager, + - physicaldeliveryofficename, +*/ + +#include "ldifconverter.h" +#include "vcardconverter.h" +#include "address.h" +#include "addressee.h" +#include "kcontacts_debug.h" + +#include "ldif_p.h" + +#include + +#include +#include +#include + +using namespace KContacts; + +/* internal functions - do not use !! */ + +namespace KContacts { +/** + @internal + + Evaluates @p fieldname and sets the @p value at the addressee or the address + objects when appropriate. + + @param a The addressee to store information into + @param homeAddr The home address to store respective information into + @param workAddr The work address to store respective information into + @param fieldname LDIF field name to evaluate + @param value The value of the field addressed by @p fieldname +*/ +void evaluatePair(Addressee &a, Address &homeAddr, Address &workAddr, QString &fieldname, QString &value, int &birthday, int &birthmonth, int &birthyear, ContactGroup &contactGroup); +} + +/* generate LDIF stream */ + +static void ldif_out(QTextStream &t, const QString &formatStr, const QString &value) +{ + if (value.isEmpty()) { + return; + } + + const QByteArray txt = Ldif::assembleLine(formatStr, value, 72); + + // write the string + t << QString::fromUtf8(txt) << "\n"; +} + +bool LDIFConverter::addresseeAndContactGroupToLDIF(const AddresseeList &addrList, const ContactGroup::List &contactGroupList, QString &str) +{ + bool result = addresseeToLDIF(addrList, str); + if (!contactGroupList.isEmpty()) { + result = contactGroupToLDIF(contactGroupList, str); + } + return result; +} + +bool LDIFConverter::contactGroupToLDIF(const ContactGroup &contactGroup, QString &str) +{ + if (contactGroup.dataCount() <= 0) { + return false; + } + QTextStream t(&str, QIODevice::WriteOnly | QIODevice::Append); + t.setCodec(QTextCodec::codecForName("UTF-8")); + t << "objectclass: top\n"; + t << "objectclass: groupOfNames\n"; + + for (unsigned int i = 0; i < contactGroup.dataCount(); ++i) { + ContactGroup::Data data = contactGroup.data(i); + const QString value = QStringLiteral("cn=%1,mail=%2").arg(data.name(), data.email()); + ldif_out(t, QStringLiteral("member"), value); + } + + t << "\n"; + return true; +} + +bool LDIFConverter::contactGroupToLDIF(const ContactGroup::List &contactGroupList, QString &str) +{ + ContactGroup::List::ConstIterator it; + const ContactGroup::List::ConstIterator end(contactGroupList.constEnd()); + for (it = contactGroupList.constBegin(); it != end; ++it) { + contactGroupToLDIF(*it, str); + } + return true; +} + +bool LDIFConverter::addresseeToLDIF(const AddresseeList &addrList, QString &str) +{ + AddresseeList::ConstIterator it; + const AddresseeList::ConstIterator end(addrList.constEnd()); + for (it = addrList.constBegin(); it != end; ++it) { + addresseeToLDIF(*it, str); + } + return true; +} + +bool LDIFConverter::addresseeToLDIF(const Addressee &addr, QString &str) +{ + if (addr.isEmpty()) { + return false; + } + + QTextStream t(&str, QIODevice::WriteOnly | QIODevice::Append); + t.setCodec(QTextCodec::codecForName("UTF-8")); + + const Address homeAddr = addr.address(Address::Home); + const Address workAddr = addr.address(Address::Work); + + ldif_out(t, QStringLiteral("dn"), QStringLiteral("cn=%1,mail=%2"). + arg(addr.formattedName().simplified(), addr.preferredEmail())); + t << "objectclass: top\n"; + t << "objectclass: person\n"; + t << "objectclass: organizationalPerson\n"; + + ldif_out(t, QStringLiteral("givenname"), addr.givenName()); + ldif_out(t, QStringLiteral("sn"), addr.familyName()); + ldif_out(t, QStringLiteral("cn"), addr.formattedName().simplified()); + ldif_out(t, QStringLiteral("uid"), addr.uid()); + ldif_out(t, QStringLiteral("nickname"), addr.nickName()); + ldif_out(t, QStringLiteral("xmozillanickname"), addr.nickName()); + ldif_out(t, QStringLiteral("mozillanickname"), addr.nickName()); + + ldif_out(t, QStringLiteral("mail"), addr.preferredEmail()); + const QStringList emails = addr.emails(); + const int numEmails = emails.count(); + for (int i = 1; i < numEmails; ++i) { + if (i == 0) { + //nothing + } else if (i == 1) { + ldif_out(t, QStringLiteral("mozillasecondemail"), emails[1]); + } else { + ldif_out(t, QStringLiteral("othermailbox"), emails[i]); + } + } + //ldif_out( t, "mozilla_AIMScreenName: %1\n", "screen_name" ); + + ldif_out(t, QStringLiteral("telephonenumber"), + addr.phoneNumber(PhoneNumber::Work).number()); + ldif_out(t, QStringLiteral("facsimiletelephonenumber"), + addr.phoneNumber(PhoneNumber::Fax).number()); + ldif_out(t, QStringLiteral("homephone"), + addr.phoneNumber(PhoneNumber::Home).number()); + ldif_out(t, QStringLiteral("mobile"), + addr.phoneNumber(PhoneNumber::Cell).number()); // Netscape 7 + ldif_out(t, QStringLiteral("cellphone"), + addr.phoneNumber(PhoneNumber::Cell).number()); // Netscape 4.x + ldif_out(t, QStringLiteral("pager"), + addr.phoneNumber(PhoneNumber::Pager).number()); + ldif_out(t, QStringLiteral("pagerphone"), + addr.phoneNumber(PhoneNumber::Pager).number()); + + ldif_out(t, QStringLiteral("streethomeaddress"), homeAddr.street()); + ldif_out(t, QStringLiteral("postalcode"), workAddr.postalCode()); + ldif_out(t, QStringLiteral("postofficebox"), workAddr.postOfficeBox()); + + QStringList streets = homeAddr.street().split(QLatin1Char('\n')); + const int numberOfStreets(streets.count()); + if (numberOfStreets > 0) { + ldif_out(t, QStringLiteral("homepostaladdress"), streets.at(0)); // Netscape 7 + } + if (numberOfStreets > 1) { + ldif_out(t, QStringLiteral("mozillahomepostaladdress2"), streets.at(1)); // Netscape 7 + } + ldif_out(t, QStringLiteral("mozillahomelocalityname"), homeAddr.locality()); // Netscape 7 + ldif_out(t, QStringLiteral("mozillahomestate"), homeAddr.region()); + ldif_out(t, QStringLiteral("mozillahomepostalcode"), homeAddr.postalCode()); + ldif_out(t, QStringLiteral("mozillahomecountryname"), + Address::ISOtoCountry(homeAddr.country())); + ldif_out(t, QStringLiteral("locality"), workAddr.locality()); + ldif_out(t, QStringLiteral("streetaddress"), workAddr.street()); // Netscape 4.x + + streets = workAddr.street().split(QLatin1Char('\n')); + const int streetsCount = streets.count(); + if (streetsCount > 0) { + ldif_out(t, QStringLiteral("street"), streets.at(0)); + } + if (streetsCount > 1) { + ldif_out(t, QStringLiteral("mozillaworkstreet2"), streets.at(1)); + } + ldif_out(t, QStringLiteral("countryname"), Address::ISOtoCountry(workAddr.country())); + ldif_out(t, QStringLiteral("l"), workAddr.locality()); + ldif_out(t, QStringLiteral("c"), Address::ISOtoCountry(workAddr.country())); + ldif_out(t, QStringLiteral("st"), workAddr.region()); + + ldif_out(t, QStringLiteral("title"), addr.title()); + ldif_out(t, QStringLiteral("vocation"), addr.prefix()); + ldif_out(t, QStringLiteral("ou"), addr.role()); + ldif_out(t, QStringLiteral("o"), addr.organization()); + ldif_out(t, QStringLiteral("organization"), addr.organization()); + ldif_out(t, QStringLiteral("organizationname"), addr.organization()); + + // Compatibility with older kabc versions. + if (!addr.department().isEmpty()) { + ldif_out(t, QStringLiteral("department"), addr.department()); + } else { + ldif_out(t, QStringLiteral("department"), addr.custom(QStringLiteral("KADDRESSBOOK"), + QStringLiteral("X-Department"))); + } + + ldif_out(t, QStringLiteral("workurl"), addr.url().url().toDisplayString()); + ldif_out(t, QStringLiteral("homeurl"), addr.url().url().toDisplayString()); + ldif_out(t, QStringLiteral("mozillahomeurl"), addr.url().url().toDisplayString()); + + ldif_out(t, QStringLiteral("description"), addr.note()); + if (addr.revision().isValid()) { + ldif_out(t, QStringLiteral("modifytimestamp"), dateToVCardString(addr.revision())); + } + + const QDate birthday = addr.birthday().date(); + if (birthday.isValid()) { + const int year = birthday.year(); + if (year > 0) { + ldif_out(t, QStringLiteral("birthyear"), QString::number(year)); + } + ldif_out(t, QStringLiteral("birthmonth"), QString::number(birthday.month())); + ldif_out(t, QStringLiteral("birthday"), QString::number(birthday.day())); + } + + t << "\n"; + + return true; +} + +/* convert from LDIF stream */ +bool LDIFConverter::LDIFToAddressee(const QString &str, AddresseeList &addrList, ContactGroup::List &contactGroupList, const QDateTime &dt) +{ + if (str.isEmpty()) { + return true; + } + + bool endldif = false, end = false; + Ldif ldif; + Ldif::ParseValue ret; + Addressee a; + Address homeAddr, workAddr; + int birthday = -1; + int birthmonth = -1; + int birthyear = -1; + ContactGroup contactGroup; + ldif.setLdif(str.toLatin1()); + QDateTime qdt = dt; + if (!qdt.isValid()) { + qdt = QDateTime::currentDateTime(); + } + a.setRevision(qdt); + homeAddr = Address(Address::Home); + workAddr = Address(Address::Work); + + do { + ret = ldif.nextItem(); + switch (ret) { + case Ldif::Item: + { + QString fieldname = ldif.attr().toLower(); + QString value = QString::fromUtf8(ldif.value()); + evaluatePair(a, homeAddr, workAddr, fieldname, value, birthday, birthmonth, birthyear, contactGroup); + break; + } + case Ldif::EndEntry: + if (contactGroup.count() == 0) { + // if the new address is not empty, append it + QDate birthDate(birthyear, birthmonth, birthday); + if (birthDate.isValid()) { + a.setBirthday(birthDate); + } + + if (!a.formattedName().isEmpty() || !a.name().isEmpty() + || !a.familyName().isEmpty()) { + if (!homeAddr.isEmpty()) { + a.insertAddress(homeAddr); + } + if (!workAddr.isEmpty()) { + a.insertAddress(workAddr); + } + addrList.append(a); + } + } else { + contactGroupList.append(contactGroup); + } + a = Addressee(); + contactGroup = ContactGroup(); + a.setRevision(qdt); + homeAddr = Address(Address::Home); + workAddr = Address(Address::Work); + break; + case Ldif::MoreData: + if (endldif) { + end = true; + } else { + ldif.endLdif(); + endldif = true; + break; + } + default: + break; + } + } while (!end); + + return true; +} + +void KContacts::evaluatePair(Addressee &a, Address &homeAddr, Address &workAddr, QString &fieldname, QString &value, int &birthday, int &birthmonth, int &birthyear, ContactGroup &contactGroup) +{ + if (fieldname == QLatin1String("dn")) { // ignore + return; + } + + if (fieldname.startsWith(QLatin1Char('#'))) { + return; + } + + if (fieldname.isEmpty() && !a.note().isEmpty()) { + // some LDIF export filters are borken and add additional + // comments on stand-alone lines. Just add them to the notes for now. + a.setNote(a.note() + QLatin1Char('\n') + value); + return; + } + + if (fieldname == QLatin1String("givenname")) { + a.setGivenName(value); + return; + } + + if (fieldname == QLatin1String("xmozillanickname") + || fieldname == QLatin1String("nickname") + || fieldname == QLatin1String("mozillanickname")) { + a.setNickName(value); + return; + } + + if (fieldname == QLatin1String("sn")) { + a.setFamilyName(value); + return; + } + + if (fieldname == QLatin1String("uid")) { + a.setUid(value); + return; + } + if (fieldname == QLatin1String("mail") + || fieldname == QLatin1String("mozillasecondemail") /* mozilla */ + || fieldname == QLatin1String("othermailbox") /*TheBat!*/) { + if (a.emails().indexOf(value) == -1) { + a.insertEmail(value); + } + return; + } + + if (fieldname == QLatin1String("title")) { + a.setTitle(value); + return; + } + + if (fieldname == QLatin1String("vocation")) { + a.setPrefix(value); + return; + } + + if (fieldname == QLatin1String("cn")) { + a.setFormattedName(value); + return; + } + + if (fieldname == QLatin1String("o") + || fieldname == QLatin1String("organization") // Exchange + || fieldname == QLatin1String("organizationname")) { // Exchange + a.setOrganization(value); + return; + } + + if (fieldname == QLatin1String("description") + || fieldname == QLatin1String("mozillacustom1") + || fieldname == QLatin1String("mozillacustom2") + || fieldname == QLatin1String("mozillacustom3") + || fieldname == QLatin1String("mozillacustom4") + || fieldname == QLatin1String("custom1") + || fieldname == QLatin1String("custom2") + || fieldname == QLatin1String("custom3") + || fieldname == QLatin1String("custom4")) { + if (!a.note().isEmpty()) { + a.setNote(a.note() + QLatin1Char('\n')); + } + a.setNote(a.note() + value); + return; + } + + if (fieldname == QLatin1String("homeurl") + || fieldname == QLatin1String("workurl") + || fieldname == QLatin1String("mozillahomeurl")) { + if (a.url().url().isEmpty()) { + ResourceLocatorUrl url; + url.setUrl(QUrl(value)); + a.setUrl(url); + return; + } + if (a.url().url().toDisplayString() == QUrl(value).toDisplayString()) { + return; + } + // TODO: current version of kabc only supports one URL. + // TODO: change this with KDE 4 + } + + if (fieldname == QLatin1String("homephone")) { + a.insertPhoneNumber(PhoneNumber(value, PhoneNumber::Home)); + return; + } + + if (fieldname == QLatin1String("telephonenumber")) { + a.insertPhoneNumber(PhoneNumber(value, PhoneNumber::Work)); + return; + } + if (fieldname == QLatin1String("mobile") /* mozilla/Netscape 7 */ + || fieldname == QLatin1String("cellphone")) { + a.insertPhoneNumber(PhoneNumber(value, PhoneNumber::Cell)); + return; + } + + if (fieldname == QLatin1String("pager") // mozilla + || fieldname == QLatin1String("pagerphone")) { // mozilla + a.insertPhoneNumber(PhoneNumber(value, PhoneNumber::Pager)); + return; + } + + if (fieldname == QLatin1String("facsimiletelephonenumber")) { + a.insertPhoneNumber(PhoneNumber(value, PhoneNumber::Fax)); + return; + } + + if (fieldname == QLatin1String("xmozillaanyphone")) { // mozilla + a.insertPhoneNumber(PhoneNumber(value, PhoneNumber::Work)); + return; + } + + if (fieldname == QLatin1String("streethomeaddress") + || fieldname == QLatin1String("mozillahomestreet")) { // thunderbird + homeAddr.setStreet(value); + return; + } + + if (fieldname == QLatin1String("street") + || fieldname == QLatin1String("postaladdress")) { // mozilla + workAddr.setStreet(value); + return; + } + if (fieldname == QLatin1String("mozillapostaladdress2") + || fieldname == QLatin1String("mozillaworkstreet2")) { // mozilla + workAddr.setStreet(workAddr.street() + QLatin1Char('\n') + value); + return; + } + + if (fieldname == QLatin1String("postalcode")) { + workAddr.setPostalCode(value); + return; + } + + if (fieldname == QLatin1String("postofficebox")) { + workAddr.setPostOfficeBox(value); + return; + } + + if (fieldname == QLatin1String("homepostaladdress")) { // Netscape 7 + homeAddr.setStreet(value); + return; + } + + if (fieldname == QLatin1String("mozillahomepostaladdress2")) { // mozilla + homeAddr.setStreet(homeAddr.street() + QLatin1Char('\n') + value); + return; + } + + if (fieldname == QLatin1String("mozillahomelocalityname")) { // mozilla + homeAddr.setLocality(value); + return; + } + + if (fieldname == QLatin1String("mozillahomestate")) { // mozilla + homeAddr.setRegion(value); + return; + } + + if (fieldname == QLatin1String("mozillahomepostalcode")) { // mozilla + homeAddr.setPostalCode(value); + return; + } + + if (fieldname == QLatin1String("mozillahomecountryname")) { // mozilla + if (value.length() <= 2) { + value = Address::ISOtoCountry(value); + } + homeAddr.setCountry(value); + return; + } + + if (fieldname == QLatin1String("locality")) { + workAddr.setLocality(value); + return; + } + + if (fieldname == QLatin1String("streetaddress")) { // Netscape 4.x + workAddr.setStreet(value); + return; + } + + if (fieldname == QLatin1String("countryname") + || fieldname == QLatin1String("c")) { // mozilla + if (value.length() <= 2) { + value = Address::ISOtoCountry(value); + } + workAddr.setCountry(value); + return; + } + + if (fieldname == QLatin1String("l")) { // mozilla + workAddr.setLocality(value); + return; + } + + if (fieldname == QLatin1String("st")) { + workAddr.setRegion(value); + return; + } + + if (fieldname == QLatin1String("ou")) { + a.setRole(value); + return; + } + + if (fieldname == QLatin1String("department")) { + a.setDepartment(value); + return; + } + + if (fieldname == QLatin1String("member")) { + // this is a mozilla list member (cn=xxx, mail=yyy) + const QStringList list = value.split(QLatin1Char(',')); + QString name, email; + + QStringList::ConstIterator it; + const QStringList::ConstIterator end(list.constEnd()); + for (it = list.constBegin(); it != end; ++it) { + if ((*it).startsWith(QLatin1String("cn="))) { + name = (*it).mid(3).trimmed(); + } + if ((*it).startsWith(QLatin1String("mail="))) { + email = (*it).mid(5).trimmed(); + } + } + if (!name.isEmpty() && !email.isEmpty()) { + email = QLatin1String(" <") + email + QLatin1Char('>'); + } + ContactGroup::Data data; + data.setEmail(email); + data.setName(name); + contactGroup.append(data); + return; + } + + if (fieldname == QLatin1String("modifytimestamp")) { + if (value == QLatin1String("0Z")) { // ignore + return; + } + QDateTime dt = VCardStringToDate(value); + if (dt.isValid()) { + a.setRevision(dt); + return; + } + } + + if (fieldname == QLatin1String("display-name")) { + contactGroup.setName(value); + return; + } + + if (fieldname == QLatin1String("objectclass")) { // ignore + return; + } + + if (fieldname == QLatin1String("birthyear")) { + bool ok; + birthyear = value.toInt(&ok); + if (!ok) { + birthyear = -1; + } + return; + } + if (fieldname == QLatin1String("birthmonth")) { + birthmonth = value.toInt(); + return; + } + if (fieldname == QLatin1String("birthday")) { + birthday = value.toInt(); + return; + } + if (fieldname == QLatin1String("xbatbirthday")) { + QDate dt = QDate::fromString(value, QStringLiteral("yyyyMMdd")); + if (dt.isValid()) { + a.setBirthday(dt); + } + return; + } + qCWarning(KCONTACTS_LOG) << QStringLiteral("LDIFConverter: Unknown field for '%1': '%2=%3'\n"). + arg(a.formattedName(), fieldname, value); +} diff --git a/src/converter/ldifconverter.h b/src/converter/ldifconverter.h new file mode 100644 index 0000000..bbbf66d --- /dev/null +++ b/src/converter/ldifconverter.h @@ -0,0 +1,89 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Helge Deller + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 only as published by the Free Software Foundation. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_LDIFCONVERTER_H +#define KCONTACTS_LDIFCONVERTER_H + +#include "addressee.h" +#include "contactgroup.h" + +#include +#include + +namespace KContacts { +/** + A set of functions to convert a string with LDIF information to addressees + and vice versa. It is useful for addressbook import- and exportfilters + and might be used to read and write Mozilla and Netscape addresssbooks. +*/ + +namespace LDIFConverter { +/** + Converts a LDIF string to a list of addressees. + + @param str The vcard string. + @param addrList The addresseelist. + @param contactGroupList the contactGroupList + @param dt The date & time value of the last modification (e.g. file modification time). +*/ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool LDIFToAddressee(const QString &str, AddresseeList &addrList, QVector &contactGroupList, const QDateTime &dt = QDateTime::currentDateTime()); + +/** + Converts a list of addressees to a LDIF string. + + @param addrList The addresseelist. + @param str The LDIF string. +*/ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool addresseeToLDIF(const AddresseeList &addrList, QString &str); + +/** + Converts a list of addressees and contactgrouplist to a LDIF string. + + @param addrList The addresseelist. + @param contactGroupList The contact group list + @param str The LDIF string. + +*/ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool addresseeAndContactGroupToLDIF(const AddresseeList &addrList, const QVector &contactGroupList, QString &str); +/** + Converts an addressee to a LDIF string. + + @param addr The addressee. + @param str The LDIF string. +*/ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool addresseeToLDIF(const Addressee &addr, QString &str); + +/** + Converts a list of contact group to a LDIF string. + + @param contactGroupList The contact group list + @param str The LDIF string. +*/ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool contactGroupToLDIF(const ContactGroup::List &contactGroupList, QString &str); + +/** + Converts a contact group to a LDIF string. + + @param contactGroup The contact group + @param str The LDIF string. +*/ +Q_REQUIRED_RESULT KCONTACTS_EXPORT bool contactGroupToLDIF(const ContactGroup &contactGroup, QString &str); +} +} +#endif diff --git a/src/converter/vcardconverter.cpp b/src/converter/vcardconverter.cpp new file mode 100644 index 0000000..8ad9554 --- /dev/null +++ b/src/converter/vcardconverter.cpp @@ -0,0 +1,148 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardconverter.h" +#include "vcardtool.h" + +using namespace KContacts; + +VCardConverter::VCardConverter() + : d(nullptr) +{ +} + +VCardConverter::~VCardConverter() +{ +} + +QByteArray VCardConverter::exportVCard(const Addressee &addr, Version version) const +{ + Addressee::List list; + list.append(addr); + + return exportVCards(list, version); +} + +QByteArray VCardConverter::exportVCards(const Addressee::List &list, Version version) const +{ + VCardTool tool; + QByteArray returnValue; + switch (version) { + case v2_1: + returnValue = tool.exportVCards(list, VCard::v2_1); + break; + case v3_0: + returnValue = tool.exportVCards(list, VCard::v3_0); + break; + case v4_0: + returnValue = tool.exportVCards(list, VCard::v4_0); + break; + } + + return returnValue; +} + +QByteArray VCardConverter::createVCard(const Addressee &addr, Version version) const +{ + Addressee::List list; + list.append(addr); + + return createVCards(list, version); +} + +QByteArray VCardConverter::createVCards(const Addressee::List &list, Version version) const +{ + VCardTool tool; + QByteArray returnValue; + switch (version) { + case v2_1: + returnValue = tool.createVCards(list, VCard::v2_1); + break; + case v3_0: + returnValue = tool.createVCards(list, VCard::v3_0); + break; + case v4_0: + returnValue = tool.createVCards(list, VCard::v4_0); + break; + } + + return returnValue; +} + +Addressee VCardConverter::parseVCard(const QByteArray &vcard) const +{ + Addressee::List list = parseVCards(vcard); + + return list.isEmpty() ? Addressee() : list[ 0 ]; +} + +Addressee::List VCardConverter::parseVCards(const QByteArray &vcard) const +{ + VCardTool tool; + + return tool.parseVCards(vcard); +} + +/* Helper functions */ + +QString KContacts::dateToVCardString(const QDateTime &dateTime) +{ + return dateTime.toString(QStringLiteral("yyyyMMddThhmmssZ")); +} + +QString KContacts::dateToVCardString(QDate date) +{ + return date.toString(QStringLiteral("yyyyMMdd")); +} + +QDateTime KContacts::VCardStringToDate(const QString &dateString) +{ + QDate date; + QTime time; + QString d(dateString); + + d = d.remove(QLatin1Char('-')).remove(QLatin1Char(':')); + + if (d.length() >= 8) { + date = QDate(d.midRef(0, 4).toUInt(), d.midRef(4, 2).toUInt(), d.midRef(6, 2).toUInt()); + } + + if (d.length() > 9 && d[ 8 ].toUpper() == QLatin1Char('T')) { + time = QTime(d.midRef(9, 2).toUInt(), d.midRef(11, 2).toUInt(), d.midRef(13, 2).toUInt()); + } + + return QDateTime(date, time); +} + +void KContacts::adaptIMAttributes(QByteArray &data) +{ + data.replace("X-messaging/aim-All", ("X-AIM")); + data.replace("X-messaging/icq-All", ("X-ICQ")); + data.replace("X-messaging/xmpp-All", ("X-JABBER")); + data.replace("X-messaging/msn-All", ("X-MSN")); + data.replace("X-messaging/yahoo-All", ("X-YAHOO")); + data.replace("X-messaging/gadu-All", ("X-GADUGADU")); + data.replace("X-messaging/skype-All", ("X-SKYPE")); + data.replace("X-messaging/groupwise-All", ("X-GROUPWISE")); + data.replace("X-messaging/sms-All", ("X-SMS")); + data.replace("X-messaging/meanwhile-All", ("X-MEANWHILE")); + data.replace("X-messaging/irc-All", ("X-IRC")); + data.replace("X-messaging/googletalk-All", ("X-GTALK")); +} diff --git a/src/converter/vcardconverter.h b/src/converter/vcardconverter.h new file mode 100644 index 0000000..b44d3c3 --- /dev/null +++ b/src/converter/vcardconverter.h @@ -0,0 +1,155 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_VCARDCONVERTER_H +#define KCONTACTS_VCARDCONVERTER_H + +#include "kcontacts_export.h" +#include "kcontacts/addressee.h" +#include + +namespace KContacts { +/** + @short Class to converting contact objects into vCard format and vice versa. + + This class implements reading and writing of contact using from/to the + vCard format. Currently vCard version 2.1 and 3.0 is supported. + + Example: + + \code + + QFile file( "myfile.vcf" ); + file.open( QIODevice::ReadOnly ); + + QByteArray data = file.readAll(); + + VCardConverter converter; + Addressee::List list = converter.parseVCards( data ); + + // print formatted name of first contact + qDebug( "name=%s", list[ 0 ].formattedName().toLatin1() ); + + \endcode +*/ +class KCONTACTS_EXPORT VCardConverter +{ +public: + + /** + @li v2_1 - VCard format version 2.1 + @li v3_0 - VCard format version 3.0 + @li v4_0 - VCard format version 4.0 + */ + enum Version { + v2_1, + v3_0, + v4_0 + }; + + /** + Constructor. + */ + VCardConverter(); + + /** + Destructor. + */ + ~VCardConverter(); + + /** + Creates a string in vCard format which contains the given + contact. + + @param addr The contact object + @param version The version of the generated vCard format + */ + Q_REQUIRED_RESULT QByteArray createVCard(const Addressee &addr, Version version = v3_0) const; + + /** + Creates a string in vCard format which contains the given + list of contact. + + @param list The list of contact objects + @param version The version of the generated vCard format + */ + // FIXME: Add error handling + Q_REQUIRED_RESULT QByteArray createVCards(const Addressee::List &list, Version version = v3_0) const; + + /** + * @since 4.9.1 + */ + Q_REQUIRED_RESULT QByteArray exportVCard(const Addressee &addr, Version version) const; + + /** + * @since 4.9.1 + */ + Q_REQUIRED_RESULT QByteArray exportVCards(const Addressee::List &list, Version version) const; + + /** + Parses a string in vCard format and returns the first contact. + */ + Q_REQUIRED_RESULT Addressee parseVCard(const QByteArray &vcard) const; + + /** + Parses a string in vCard format and returns a list of contact objects. + */ + // FIXME: Add error handling + Q_REQUIRED_RESULT Addressee::List parseVCards(const QByteArray &vcard) const; + +private: + Q_DISABLE_COPY(VCardConverter) + class VCardConverterPrivate; + VCardConverterPrivate *const d; +}; + +/** + Helper functions + */ + +/** + * Converts a QDateTime to a date string as it is used in VCard and LDIF files. + * The return value is in the form "yyyyMMddThhmmssZ" (e.g. "20031201T120000Z") + * @param dateTime date and time to be converted + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT QString dateToVCardString(const QDateTime &dateTime); + +/** + * Converts a QDate to a short date string as it is used in VCard and LDIF files. + * The return value is in the form "yyyyMMdd" (e.g. "20031201") + * @param date date to be converted + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT QString dateToVCardString(QDate date); + +/** + * Converts a date string as it is used in VCard and LDIF files to a QDateTime value. + * If the date string does not contain a time value, it will be returned as 00:00:00. + * (e.g. "20031201T120000" will return a QDateTime for 2003-12-01 at 12:00) + * @param dateString string representing the date and time. + */ +Q_REQUIRED_RESULT KCONTACTS_EXPORT QDateTime VCardStringToDate(const QString &dateString); + +/** + * @brief adaptIMAttributes. Convert KAddressBook attribute to VCard IM Attribute + * @param data + */ +KCONTACTS_EXPORT void adaptIMAttributes(QByteArray &data); +} +#endif diff --git a/src/countrytransl.map b/src/countrytransl.map new file mode 100644 index 0000000..2810d36 --- /dev/null +++ b/src/countrytransl.map @@ -0,0 +1,5685 @@ +Andorra ad +Андора ad +Андора ad +Andora ad +ອີນເດີຍ ad +Andora ad +Андорра ad +安道尔 ad +United Arab Emirates ae +Vereenigde Arabiese Emirate ae +الإمارات العربية المتحدة ae +Злучаныя Арабскія Эміраты ae +Обединени Арабски Емирства ae +Ujedinjeni arapski emirati ae +Emirats Àrabs Units ae +Spojené arabské emiráty ae +Forenende Arabiske Emirater ae +Vereinigte Arabische Emirate ae +Ενωμένα Αραβικά Εμιράτα ae +Emiratos árabes unidos ae +Araabia Ühendemiraadid ae +Arabiar Emirato Batuak ae +امارات متحده عربی ae +Yhdistyneet Arabiemiraatit ae +Émirats Arabes Unis ae +איחוד האמירויות הערביות ae +Ujedinjeni arapski emirati ae +Egyesült Arab Emirátusok ae +Emirati arabi uniti ae +アラブ首長国連邦 ae +아랍 에미레이트 연합 ae +ສະຫະລັດ ae +Jungtiniai Arabų Emiratai ae +Emirati Għarab Magħquda ae +De forente arabiske emirater ae +Verenigde Arabische Emiraten ae +Dei sameinte arabiske emirata ae +Di-Emirate tseo di Kopanego tsa Arab ae +Zjednoczone Emiraty Arabskie ae +Emiratos Árabes Unidos ae +Emirados Árabes ae +Emiratele Arabe Unite ae +Объединенные Арабские Эмираты ae +Spojené arabské emiráty ae +Združeni arabski Emirati ae +Förenade arabemiraten ae +³ì¸¢Â «ÃÒ ¿¡Î¸û ae +Birleşik Arap Emirlikleri ae +Об'єднані Арабські Емірати ae +Mashango o tangananaho a Emirates ae +阿拉伯联合酋长国 ae +阿拉伯聯合大公國 ae +Izindawo zezinduna zase-United Arab ae +Afghanistan af +Афганістан af +Афганистан af +Afganistan af +Afghanistán af +Afganisztán af +ລີທົ່ວເນີຍ af +Afeganistão af +Afganistan af +Afganistan af +Afganistan af +Афганістан af +阿富汗 af +Antigua and Barbuda ag +Antigue en Barbuda ag +أنتيغوا و باربودا ag +Antigua və Barbuda ag +Антыгуа і Барбуда ag +Антигуа и Барбадос ag +Antigua ha Barbuda ag +Antigua i Barbuda ag +Antigua i Barbuda ag +Antigua a Barbuda ag +Antigua og Barbuda ag +Antigua und Barbuda ag +Antigua και Barbuda ag +Antigvo kaj Barbudo ag +Antigua y Barbuda ag +Antigua ja Barbuda ag +Antigua eta Barbuda ag +آنتیگوا و باربودا ag +Antigua ja Barbados ag +Antigua og Barbuda ag +Antigua et Barbuda ag +Antiga e Barbuda ag +אנטיגואה וברבודה ag +Antigua i Barbuda ag +Antigua és Barbuda ag +Antigua dan Barbuda ag +Antigúa og Barbúda ag +Antigua e Barbuda ag +アンティグアバーブーダ ag +앤티가 바부다 ag +Antikva ir Barbuda ag +Antigva un Barbudas ag +Antigwa u Barbuda ag +Antigua og Barbuda ag +Antigua en Barbuda ag +Antigua og Barbuda ag +Antigua le Barbuda ag +Antigua e Barbuda ag +Antigua i Barbuda ag +Antigua e Barbuda ag +Antigua e Barbuda ag +Antigua şi Barbuda ag +Антигуа и Барбадос ag +Antigua a Barbuda ag +Antigva in Barbuda ag +Antigua i Barbuda ag +I-Antigua kanye ne Barbuda ag +Antigua och Barbuda ag +¬ýÊÌÅ¡ & À¡÷Ò¼¡ ag +Antigua ve Barbuda ag +Трінідад та Тобаго ag +Antigua và Barbuda ag +Antigua eyet Barbuda ag +Antigua ne Barbuda ag +安地瓜岛和巴布达岛 ag +安地瓜島和巴布達島 ag +Antigua kanye ne-Barbuda ag +Anguilla ai +Ангуила ai +ແພນວິນ ai +Angvila ai +Ангілья ai +安圭拉 ai +Albania al +Альбанія al +Албания al +Albanija al +Albanien al +Albánia al +ແອດແລນຕິກ al +Albânia al +Albánsko al +Albanija al +Albanien al +Албанія al +阿尔巴尼亚 al +Armenia am +Армэнія am +Армения am +Armenija am +Armenien am +Örményország am +ອາເຈນຕິນາ am +Armênia am +Arménsko am +Armenija am +Armenien am +Арменія am +亚美尼亚 am +Netherlands Antilles an +Холандски Антили an +Nizozemski Antili an +Nederlandske antiller an +Antillas holandesas an +Antilla Holandarrak an +Holland-Antillák an +ເນເທີແລນ an +Antilhas an +Holandské Antily an +Nizozemski Antili an +Nederländska Antillerna an +Голландські Антилли an +荷属安的列斯群岛 an +Angola ao +Ангола ao +Ангола ao +ບັນແກເລີຍ ao +Ангола ao +安哥拉 ao +Argentina ar +Argentinië ar +الأرجنتين ar +Аргентына ar +Аржентина ar +Arc'hantina ar +Argentinien ar +Αργεντινή ar +Argentino ar +Argentiina ar +آرژانتین ar +Agentiina ar +Argentine ar +Arxentina ar +ארגנטינה ar +Argentína ar +Argentína ar +アルゼンチン ar +아르헨티나 ar +ອາເຈນຕິນາ ar +ArgentÄ«na ar +ArÄ¡entina ar +Argentinië ar +Argentyna ar +Аргентина ar +Argentína ar +I-Argentina ar +¬÷¦ºƒýÊÉ¡ ar +อาร์เจนตินา ar +Arjantin ar +Аргентина ar +Agenthina ar +Årdjintene ar +阿根廷 ar +阿根廷 ar +American Samoa as +Амэрыканскае Самоа as +Американска Самоа as +Američka Samoa as +Samoa (USA) as +Samoa americana as +Amerikako Samoa as +Amerikai Szamoa as +ອາເມລິກາເຫນືອ as +Samoa Americana as +Americká Samoa as +AmeriÅ¡ka Samoa as +Amerikanska Samoa as +Американське Самоа as +美属萨摩亚群岛 as +Austria at +Oostenryk at +النمسا at +Avstriya at +Аўстрыя at +Австрия at +Aostria at +Austrija at +Àustria at +Rakousko at +Østrig at +Österreich at +Αυστρία at +AÅ­strio at +اتریش at +Itävalta at +Eysturríki at +Autriche at +אוסטריה at +Austrija at +Ausztria at +Austurríki at +オーストリア at +오스트리아 at +ອອດສະເຕເລີຍ at +Austrija at +Austrija at +Awtrija at +Østerrike at +Oostenrijk at +Austerrike at +Áustria at +Áustria at +Австрия at +Rakúsko at +Avstrija at +Austrija at +I-Austria at +Österrike at +¬Íò¾¢Ã¢Â¡ at +ออสเตรีย at +Avusturya at +Австрія at +Ositiria at +A'o at +Ôtriche at +奥地利 at +奧地利 at +Australia au +Australië au +أستراليا au +Avustralya au +Аўстралія au +Австралия au +Aostralia au +Australija au +Austràlia au +Austrálie au +Australien au +Australien au +Αυστραλία au +AÅ­stralio au +Austraalia au +استرالیا au +Australie au +אוסטרליה au +Australija au +Ausztrália au +Ástralía au +オーストラリア au +오스트레일리아 au +ອອດສະເຕເລີຍ au +Australija au +Austrālija au +Awstralja au +Australië au +Austrália au +Austrália au +Австралия au +Austrália au +Avstralija au +Australija au +I-Australia au +Australien au +¬ŠÍò¾¢§ÃĢ¡ au +ออสเตรเลีย au +Avusturalya au +Австралія au +Ositiralia au +U'c au +Ôstraleye au +澳大利亚 au +澳大利亞 au +Aruba aw +Аруба aw +ເກມໄັພ່ aw +Аруба aw +阿鲁巴岛 aw +Azerbaijan az +أذربيجان az +Azərbaycan az +Азэрбайджан az +Азарбайджан az +Azerbejdžan az +Azerbaitjan az +Ázerbajdžánský az +Azerbajdjan az +Aserbaidschan az +Αζερμπαϊτζάν az +Azerbajĝana az +Azerbaiján az +Aserbaidžaan az +آذربایجان az +Azerbaidzan az +Aserbadsjan az +אזרביג'ן az +Azerbejdžan az +Azerbajdzsán az +Azerbaigian az +アゼルバイジャン az +아제르바이잔 az +ອາເຊີໄບຈັນ az +Azerbaidžanas az +Azerbaidžāņu az +AżerbajÄ¡an az +Aserbajdsjan az +Azerbeidjan az +Aserbajdsjan az +Azerbejdżan az +Azerbaijão az +Turco az +Azerbadjan az +Азербайджан az +Ázerbajdžánsky az +Azerbajdžan az +Azerbejdžan az +I-Azerbaijan az +«º÷¨Àº¡ý az +อาร์เซอร์ไบจัน az +Azerice az +Азербайджан az +Azerbaydjan az +阿塞拜疆 az +亞塞拜然 az +Bosnia and Herzegovina ba +Bosnië en Herzegovina ba +البوسنا و الهرسك ba +Босьнія і Герцагавіна ba +Боснена и Херцеговина ba +Bosna i Hercegovina ba +Bòsnia i Hercegovina ba +Bosna a Herzegovina ba +Bosnien-Herzegovina ba +Bosnien und Herzegowina ba +Βοσνία και Ερζεγοβίνη ba +Bosnio kaj Hercegovino ba +Bosnia y Herzegovina ba +Bosnia ja Hertsegovina ba +Bosnia eta Herzegovina ba +بوسنی و هرزگوین ba +Bosnia ja Herzegovina ba +Bosnia-Herzegovina ba +Bosnie herzégovine ba +בוסניה הרצגובינה ba +Bosna i Hercegovina ba +Bosznia-Hercegovina ba +Bosnia e Erzegovina ba +ボスニアヘルツェゴビナ ba +보스니아어와 헤르체고비나 ba +ບອສເນີຍ ແລະ ເຫີເຊີໂກວິນາ ba +Bosnija ir Hercegovina ba +Bosnija un Hercogovina ba +Bożnia u Ħerżegovina ba +Bosnia-Hercegovina ba +Bosnië en Herzegovina ba +Bosnia-Hercegovina ba +Bosnia le Herzegovina ba +Bośnia i Hercegowina ba +Bósnia e Herzegovina ba +Bósnia Herzegóvina ba +Bosnia şi HerÅ£egovina ba +Босния и Герцеговина ba +Bosna a Hercegovina ba +Bosna in Hercegovina ba +I-Bosnia kanye ne Herzegovina ba +Bosnien och Herzegovina ba +¦À¡Íɢ¡ ba +บอสเนีย และ เฮอร์เซโกวินา ba +Bosna Hersek ba +Боснія та Герцеговина ba +Mubosinia na Muhezegovina ba +Bosneye ba +Bosnia ne Herzegovina ba +波斯尼亚和黑塞哥维那 ba +波士尼亞與赫塞哥維納 ba +Bosnia kanye ne-Herzegovina ba +Barbados bb +بربادوس bb +Барбадос bb +Барбадос bb +Μπαρμπάντος bb +Babadoso bb +باربادوس bb +Barbade bb +ברבדוס bb +バルバドス bb +바르바도스 bb +ບາລບາດອດສ bb +Barbadosas bb +Barbadosa bb +Барбадос bb +I-Barbados bb +À¡÷§À¼¡Í bb +บาร์บาดอส bb +Барбадос bb +Barbades bb +巴巴多斯 bb +巴貝多 bb +Bangladesh bd +بنغلاديش bd +Banqladeş bd +Банглядэш bd +Бангладеш bd +BangladeÅ¡ bd +Bangladéš bd +Bangladesch bd +Μπαγκλαντές bd +Bangladeŝo bd +بنگلادش bd +בנגלדש bd +BangladeÅ¡ bd +Banglades bd +バングラデシュ bd +방글라데시 bd +ບັງຄະລາເທດ bd +BangladeÅ¡as bd +BangladeÅ¡a bd +Bangladexx bd +Bangladesz bd +Banglade bd +Бангладеш bd +Bangladéš bd +BangladeÅ¡ bd +I-Bangladesh bd +Àí¸Ç¡§¾Í bd +บังคลาเทศ bd +Bangladeş bd +Бангладеш bd +孟加拉 bd +孟加拉 bd +Belgium be +België be +بلجيكا be +Belçika be +Бэльгія be +Белгия be +Belgia be +Belgija be +Bèlgica be +Belgie be +Belgien be +Belgien be +Βέλγιο be +Belgio be +Bélgica be +Belgia be +Belgika be +بلژیک be +Belgia be +Belgia be +Belgique be +Bélxica be +בלגיה be +Belgija be +Belgia be +Belgía be +Belgio be +ベルギー be +벨기에 be +ເບລຢ່ງມ be +Belgija be +Beļģija be +BelÄ¡ju be +Belgia be +België be +Belgia be +Bèlgica be +Belgia be +Bélgica be +Bélgica be +Belgia be +Бельгия be +Belgicko be +Belgija be +Belgija be +I-Belgium be +Belgien be +¦Àøº¢Âõ be +เบลเยียม be +Belçika be +Бельгія be +Beljike be +比利时 be +比利時 be +Burkina Faso bf +Буркіна Фасо bf +Буркина Фаско bf +ຕຸລະກີ bf +Буркіна Фасо bf +布基纳法索 bf +Bulgaria bg +Bulgarye bg +بلغاريا bg +Bolgarıstan bg +Баўгарыя bg +България bg +Bugarska bg +Bulgària bg +Bulharsko bg +Bulgarien bg +Bulgarien bg +Βουλγαρία bg +Bulgario bg +Bulgaaria bg +بلغارستان bg +Bulgarie bg +בולגריה bg +Bugarska bg +Bulgária bg +Búlgaría bg +ブルガリア bg +불가리아 bg +ບັນແກເລີຍ bg +Bulgarija bg +Bulgārija bg +Bulgarija bg +Bulgarije bg +Bułgaria bg +Bulgária bg +Bulgária bg +Болгария bg +Bulharsko bg +Bolgarija bg +Bugarska bg +I-Bulgaria bg +Bulgarien bg +Àø§¸Ã¢Â¡ bg +บัลแกเรีย bg +Bulgaristan bg +Болгарія bg +Baligaria bg +BulgÃ¥reye bg +保加利亚 bg +保加利亞 bg +Bahrain bh +البحرين bh +Бахрэйн bh +Бахрейн bh +Bahrein bh +Bahrajn bh +Μπαχρέιν bh +Bahrein bh +Bahrein bh +بحرین bh +בחריין bh +バーレーン bh +바레인 bh +ຖັກກ່ງວ bh +Bahreinas bh +Baħrain bh +Baghrein bh +Bahrajn bh +Bahamas bh +Bahrein bh +Бахрейн bh +Bahrajn bh +Bahrajn bh +I-Bahrain bh +Bahrein bh +À‹¨Ãý bh +Bahreyn bh +Бахрейн bh +巴林 bh +巴林 bh +Burundi bi +Бурундзі bi +Бурунди bi +ເຄອຣດ bi +Бурунді bi +布隆迪 bi +Benin bj +Бэнін bj +Бенин bj +ບອສເນີຍ bj +Бенін bj +贝宁 bj +Bermuda bm +Бэрмуды bm +Бермуда bm +ເຍລລະມັນ bm +Bermudy bm +Bermudi bm +Бермуди bm +百慕大 bm +Brunei Darussalam bn +Брунэй bn +Бруней bn +Brunei bn +Brunei Szultánság bn +ເບລາລັສເຊີຍ bn +Brunei bn +Brunei Darusalam bn +Бруней Даруссалам bn +Bolivia bo +Bolivië bo +بوليفيا bo +Boliviya bo +Балівія bo +Боливия bo +Bolivija bo +Bolívia bo +Bolívie bo +Bolivien bo +Βολιβία bo +Bolivio bo +Boliivia bo +بولیوی bo +Bolivie bo +בוליביה bo +Bolivija bo +Bolívia bo +Bólivía bo +ボリビア bo +볼리비아 bo +ໂບລີເວີຍ bo +Bolivija bo +BolÄ«vija bo +Bolivja bo +Boliwia bo +Bolívia bo +Bolívia bo +Боливия bo +Bolívia bo +Bolivija bo +Bolivija bo +I-Bolivia bo +¦À¡Ä¢Å¢Â¡ bo +โบลิเวีย bo +Bolivya bo +Болівія bo +Boliveye bo +波利维亚 bo +玻利維亞 bo +Brazil br +Brazilië br +البرازيل br +Braziliya br +Бразылія br +Бразилия br +Brasil br +Brazílie br +Brasilien br +Brasilien br +Βραζιλία br +Brazilo br +Brasil br +Brasiilia br +Brasil br +برزیل br +Brasilia br +Brésil br +Brasil br +ברזיל br +Brazília br +Brasilía br +Brasile br +ブラジル br +브라질 br +ບາຊີລ br +Brazilija br +BrazÄ«lija br +Brażil br +Brasil br +Brazilië br +Brasil br +Brasil br +Brazylia br +Brasil br +Brasil br +Brazilia br +Бразилия br +Brazília br +Brazilija br +I-Brazil br +Brasilien br +À¢§Ãº¢ø br +บราซิล br +Brezilya br +Бразилія br +Burazili br +Braezi br +巴西 br +巴西 br +Bahamas bs +Багамы bs +Бахами bs +Bahami bs +Bahamák bs +ປານາມາ bs +Bahamy bs +Bahami bs +Багами bs +巴哈马 bs +Bhutan bt +Бутан bt +Бутан bt +Butan bt +Bhután bt +Bhután bt +ຖັກກ່ງວ bt +Butan bt +Бутан bt +不丹 bt +Botswana bw +Батсвана bw +Боцвана bw +Bocvana bw +ບອດສເນີຍ bw +Botsvana bw +Ботсвана bw +博茨瓦纳 bw +Belarus by +روسيا البيضاء by +Беларусь by +Беларус by +Bjelorusija by +Bělorusko by +Hviderusland by +Weißrussland by +Bjelorusio by +Valgevene by +بلاروس by +Valkovenäjä by +Hvítarusland by +Bélarus by +בלרוס by +Bjelorusija by +Fehéroroszország by +Hvíta-Rússland by +Bielorussia by +ベラルーシ by +벨라루스 by +ເບລາລັສ by +Baltarusija by +Baltkrievu by +Hviterussland by +Wit-Rusland by +Kviterussland by +Białoruś by +Bielorússia by +Bielorusso by +Беларусь by +Bielorusko by +Belorusija by +I-Belarus by +Vitryssland by +¦ÀÄ¡åÍ by +เบลารัส by +Білорусія by +Belaruss by +白俄罗斯 by +白俄羅斯 by +Belize bz +Бэлізе bz +Белиз bz +ເບລຍ່ງມ bz +Беліз bz +伯利兹 bz +Default C +Verstek C +افتراضي C +Əsas C +Па ўмаўчаньні C +По подразбиране C +Dre ziouer C +Omissió C +Výchozí C +Standard C +Standard C +Προκαθορισμένο C +Apriora C +Predeterminado C +Vaikimisi C +Aurremugatua C +پیش‌فرض C +Oletus C +Forsettur C +Par défaut C +Por Omisión C +ברירת מחדל C +Uobičajeno C +Alapértelmezett C +Standar C +Sjálfgefið C +Predefinito C +標準 C +기본 C +ຄ່າປະລິຍາຍ C +Nutylima C +Noklusētais C +Normali C +Standard C +Standaard C +Standard C +Thuso ya Tshoganetso C +Omission C +Domyślnie C +Por Omissão C +Padrão C +Implicit C +По умолчанию C +Å tandardný C +Privzeto C +Predefinisano C +Förval C +¦¸¡¼¡¿¢¨Ä C +ค่าปริยาย C +Öntanımlı C +Типовий C +Mặc định C +Prémetou C +Okwendalo C +默认 C +預設 C +Okwendalo C +Canada ca +Kanada ca +كندا ca +Kanada ca +Канада ca +Канада ca +Kanada ca +Kanada ca +Canadà ca +Kanada ca +Kanada ca +Καναδάς ca +Kanado ca +Canadá ca +Kanada ca +Kanada ca +کانادا ca +Kanada ca +Kanada ca +Canadá ca +קנדה ca +Kanada ca +Kanada ca +Kanada ca +Kanada ca +カナダ ca +캐나다 ca +ແຄນາດາ ca +Kanada ca +Kanāda ca +Kanada ca +Kanada ca +Canadá ca +Canadá ca +Канада ca +Kanada ca +Kanada ca +Kanada ca +I-Canada ca +Kanada ca +¸É¼¡ ca +แคนาดา ca +Kanada ca +Канада ca +加拿大 ca +加拿大 ca +Cocos (Keeling) Islands cc +Кокосови Острови cc +Kokosovo (Keeling) ostrvo cc +Islas Cocos (Keeling) cc +Koko Irlak cc +Kókusz-szigetek (Keeling) cc +Ilhas Cocos cc +Kokosove Ostrovy cc +Kokosovi (Keelingovi) otoki cc +Kokosöarna cc +Кокосові острови cc +Congo, the democratic republic of the cd +Дэмакратычная Рэспубліка Конга cd +Конго cd +Kongo, demokratska republika cd +Congo, den demokratiske republik cd +Congo, república democrática del cd +Kongo, errepublika demokratikoa cd +Kongói Demokratikus Köztársaság cd +República Democrática do Congo cd +Demokratická Republika Kongo cd +Kongo, demokratična republika cd +Demokratiska republiken Kongo cd +刚果民主共和国 cd +Central African Republic cf +ЦАР cf +Centralnoafrička Republika cf +Central-afrikanske Republik cf +República Centroafricana cf +Afrika Erdiko Errepublika cf +Közép-Afrikai Köztársaság cf +ໂດມິນິກັນ cf +República da África Central cf +Stredoafrická Republika cf +CentralnoafriÅ¡ka republika cf +Centralafrikanska Republiken cf +Центральноафриканська республіка cf +中非共和国 cf +Congo cg +Конга cg +Конго cg +Kongo cg +Kongo cg +Kongó cg +ຄອນໂໍຊລ cg +Kongo cg +Kongo cg +Kongo cg +Конго cg +刚果 cg +Switzerland ch +Switserland ch +سويسرا ch +İsveçrə ch +Швэйцарыя ch +Швейцария ch +Suis ch +Å vicarska ch +Suïssa ch +Å výcarsko ch +Schweiz ch +Schweiz ch +Ελβετία ch +Svislando ch +Suiza ch +Å veits ch +Suitza ch +سوییس ch +Sveitsi ch +Suisse ch +Suíza ch +שוייץ ch +Å vicarska ch +Svájc ch +Swiss ch +Sviss ch +Svizzera ch +スイス ch +스위스 ch +ສະວິສເຊີແລນ ch +Å veicarija ch +Å veice ch +Svizzera ch +Sveits ch +Zwitserland ch +Sveits ch +Suissa ch +Szwajcaria ch +Suíça ch +Suíça ch +ElveÅ£ia ch +Швейцария ch +Å vajčiarsko ch +Å vica ch +Å vajcarska ch +I-Switzerland ch +Schweiz ch +ÍÅ¢ðº÷Ä¡óÐ ch +สวิสเซอร์แลนด์ ch +İsviçre ch +Швейцарія ch +Thuỵ SÄ© ch +Swisse ch +瑞士 ch +瑞士 ch +Cote d'ivoire ci +Бераг Слановай Косьці ci +Кот'Дивоар ci +Obala Slonovače ci +Elfenbenskysten ci +Costa de Marfil ci +Elefántcsontpart ci +ປ່ອຍຫມາກກະລອກ ci +Slonokoščena obala ci +Elfenbenskusten ci +Кот д'Івуар ci +Cook islands ck +Kukova ostrva ck +Cook-øerne ck +Islas Cook ck +Cook Irlak ck +Cook-szigetek ck +ຄຸກກີ້ ck +Ilhas Cook ck +Cookove ostrovy ck +Cookovi otoki ck +Cooköarna ck +Острови Кука ck +库克群岛 ck +Chile cl +Chilië cl +تشيلي cl +Şili cl +Чылі cl +Чили cl +Čile cl +Xile cl +Χιλή cl +Ĉilio cl +TÅ¡iili cl +Txile cl +شیلی cl +Chili cl +צ'ילה cl +Čile cl +Chili cl +Cile cl +チリ cl +칠레 cl +ຊີລີ cl +Čilė cl +Čīle cl +Ċile cl +Chili cl +Cile cl +Чили cl +Čile cl +Čile cl +Čile cl +I-Chile cl +º¢Ä¢ cl +ชิลี cl +Şili cl +Чилі cl +Chi lê cl +Tchili cl +智利 cl +智利 cl +Cameroon cm +Камэрун cm +Камерун cm +Kamerun cm +Cameroun cm +Camerún cm +Kamerun cm +Kamerun cm +ຕາລາງງານ - K cm +Camarões cm +Komerun cm +Kamerun cm +Kamerun cm +Камерун cm +喀麦隆 cm +China cn +Sjina cn +الصين cn +Çin cn +Кітай cn +Китай cn +Sina cn +Kina cn +Xina cn +Čína cn +Kina cn +Κίνα cn +Ĉinujo cn +Hiina cn +Txina cn +چین cn +Kiina cn +Kina cn +Chine cn +סין cn +Kina cn +Kína cn +Cina cn +Kína cn +Cina cn +中国 cn +중국 cn +ຈີນ cn +Kinija cn +Ķīna cn +Ċina cn +Kina cn +Kina cn +Xina cn +Chiny cn +Китай cn +Čína cn +Kitajska cn +Kina cn +I-China cn +Kina cn +º£É¡ cn +จีน cn +Çin cn +Китай cn +Trung Quốc cn +Chine cn +中国 cn +中國 cn +Colombia co +Colombië co +كولمبيا co +Калюмбія co +Колумбия co +Kolumbija co +Colòmbia co +Kolumbie co +Kolumbien co +Κολομβία co +Kolumbio co +Kolumbia co +Kolonbia co +کلمبیا co +Kolumbia co +Colombie co +קולומביה co +Kolumbija co +Kolumbia co +コロンビア co +콜롬비아 co +ໂຄລຳເບີຍ co +Kolumbija co +Kolumbija co +Kolumbja co +Columbia co +Kolumbia co +Colômbia co +Colômbia co +Columbia co +Колумбия co +Kolumbia co +Kolumbija co +I-Colombia co +¦¸¡ÄõÀ¢Â¡ co +โคลัมเบีย co +Kolombiya co +Колумбія co +Colombeye co +Columbia co +哥伦比亚 co +哥倫比亞 co +Costa Rica cr +كوستاريكا cr +Коста Рыка cr +Коста Рика cr +Kostarika cr +Kostarika cr +Κόστα Ρίκα cr +کاستاریکا cr +Kosta Rika cr +קוסטה ריקה cr +Costa rica cr +コスタリカ cr +코스타 리카 cr +ໂຄເອເທີຍ cr +Kosta Rika cr +Kostaryka cr +Коста-Рика cr +Kostarika cr +Kostarika cr +I-Costa Rica cr +§¸¡Š¼¡ ⸡ cr +Kosta Rika cr +Коста-Ріка cr +哥斯达黎加 cr +哥斯大黎加 cr +Cuba cu +Kuba cu +كوبا cu +Куба cu +Куба cu +Kuba cu +Kuba cu +Kuba cu +Κούβα cu +Kuuba cu +Kuba cu +کوبا cu +Kuuba cu +Kuba cu +קובה cu +Kuba cu +キューバ cu +쿠바 cu +ເກມໄພ່ cu +Kuba cu +Kuba cu +Kuba cu +Куба cu +Kuba cu +Kuba cu +I-Cuba cu +Kuba cu +¸¢ÔÀ¡ cu +Küba cu +Куба cu +古巴 cu +古巴 cu +Cape Verde cv +Капе Верде cv +Zelenortska ostrva cv +Kapverdiske øer cv +Cabo Verde cv +Cabo Verde cv +Zöldfoki-szigetek cv +ເກມໄພ່ cv +Cabo Verde cv +Kap Verde cv +佛得角 cv +Christmas Island cx +Božično ostrvo cx +Juleøen cx +Islas Christmas cx +Eguberri Irla cx +Karácsony-szigetek cx +ຄິດສະຕອລ cx +Ilhas do Natal cx +Vianočné Ostrovy cx +Božični otok cx +Julön cx +Острів Різдва cx +圣诞岛 cx +Cyprus cy +Кіпр cy +Кипър cy +Kipar cy +Cypern cy +Chipre cy +Txipre cy +Ciprus cy +ບີບອັດ cy +Chipre cy +Ciper cy +Cypern cy +Кипр cy +塞浦路斯 cy +Czechia cz +Czechië cz +التشيك cz +Çex Respublikası cz +Чэхія cz +Чехия cz +Tchekia cz +ČeÅ¡ka cz +Txèquia cz +Česko cz +Tjekkiet cz +Tschechien cz +Τσεχία cz +ĈeÄ¥io cz +República Checa cz +TÅ¡ehhi cz +Txekia cz +چک cz +Tsekki cz +République tchèque cz +Chequia cz +צ'כיה cz +ČeÅ¡ka cz +Csehország cz +Tékkland cz +Repubblica Ceca cz +チェコ cz +체코 cz +Čekija cz +Čehija cz +Cżekia cz +Tsjekkia cz +Tsjechië cz +Tsjekkia cz +Chèquia cz +Czechy cz +República Checa cz +República Tcheca cz +Cehia cz +Чехия cz +Česko cz +ČeÅ¡ka cz +ČeÅ¡ka cz +I-Czechia cz +Tjeckien cz +¦ºì¡ cz +Çek Cumhuriyeti cz +Чехія cz +Séc cz +Tchekeye cz +捷克 cz +捷克 cz +Germany de +Duitsland de +ألمانيا de +Almaniya de +Нямеччына de +Германия de +Alamagn de +Njemačka de +Alemanya de +Německo de +Tyskland de +Deutschland de +Γερμανία de +Germanio de +Alemania de +Saksamaa de +Alemania de + آلمان de +Saksa de +Týskland de +Allemagne de +Alemaña de +גרמניה de +Njemačka de +Németország de +Jerman de +Þýskaland de +Germania de +ドイツ de +독일 de +ເຍລລະມັນນີ de +Vokietija de +Vācija de +Ä ermanja de +Tyskland de +Duitsland de +Tyskland de +Alemanya de +Niemcy de +Alemanha de +Alemanha de +Germania de +Германия de +Nemecko de +Nemčija de +Nemačka de +I-Germany de +Tyskland de +§º÷ÁÉ¢ de +เยอรมันนี de +Almanya de +Німеччина de +Đức de +Almagne de +德国 de +德國 de +IJalimani de +Djibouti dj +جيبوتي dj +Джыбуці dj +Джибути dj +Đibuti dj +Džibuti dj +Dschibuti dj +Τζιμπουτί dj +جیبوتی dj +ג'יבוטי dj +Džibuti dj +Dzsibuti dj +ジブティ dj +지부티 dj +ພັດພາ dj +Džibuti dj +DÄ¡ibuti dj +Dżibuti dj +Djibuti dj +Djibuti dj +Джибути dj +Džibuty dj +Džibuti dj +I-Djibouti dj +Ê¢ƒ¢¦À¡Ê dj +Cibuti dj +Джібуті dj +吉布提 dj +吉布地 dj +Denmark dk +Denemarke dk +الدنمارك dk +Danimarka dk +Данія dk +Дания dk +Danmark dk +Danska dk +Dinamarca dk +Dánsko dk +Danmark dk +Dänemark dk +Δανία dk +Danlando dk +Dinamarca dk +Taani dk +Danimarka dk +دانمارک dk +Tanska dk +Danmark dk +Danemark dk +Dinamarca dk +דנמרק dk +Danska dk +Dánia dk +Danmörk dk +Danimarca dk +デンマーク dk +덴마크 dk +ເດນມາກ dk +Danija dk +Dānija dk +Danimarka dk +Danmark dk +Denemarken dk +Danmark dk +Dinamarca dk +Dania dk +Dinamarca dk +Dinamarca dk +Danemarca dk +Дания dk +Dánsko dk +Danska dk +Danska dk +I-Denmark dk +Danmark dk +¦¼ýÁ¡÷ì dk +เดนมาร์ก dk +Danimarka dk +Данія dk +Đan Mạch dk +DaenmÃ¥tche dk +丹麦 dk +丹麥 dk +Dominica dm +Дамініка dm +Доминика dm +Dominika dm +Dominika dm +ໂລມາເນີຍ dm +Dominicana dm +Dominikánsko dm +Dominikanska republika dm +Домініка dm +多米尼加 dm +Dominican Republic do +Dominikiese Republiek do +جمهورية الدومينيكان do +Dominik Respublikası do +Дамініканская Рэспубліка do +Доминиканска република do +Republik Dominikan do +Dominikanska Republika do +República Dominicana do +Dominikánská republika do +Dominikanske Republik do +Dominikanische Republik do +Δομινικανή Δημοκρατία do +Dominika Respubliko do +República Dominicana do +Dominikaani Vabariik do +Dominikar Errepublika do +جمهوری دامینیکن do +Dominikaaninen tasavalta do +République dominicaine do +República Dominicana do +הרפובליקה הדומיניקנית do +Dominikanska Republika do +Dominikai Köztársaság do +Republik Dominika do +Dóminíska Lýðveldið do +Repubblica Dominicana do +ドミニカ共和国 do +도미니카 공화국 do +ໂດມິນີກັນ do +Dominikos Respublika do +Dominikas Republika do +Repubblika Dominikana do +Den dominikanske republikk do +Dominicaanse Republiek do +Den dominikanske republikken do +Republica Dominicana do +Dominikana do +República Dominicana do +República Dominicana do +Republica Dominicană do +Доминиканская республика do +Dominikánska republika do +Dominikanska republika do +Dominikanska republika do +I-Dominican Republic do +Dominikanska republiken do +¦¼¡Á¢É¢ì¸ý ÌÊÂÃÍ do +โดมินิกัน do +Dominik Cumhuriyeti do +Домініканська республіка do +Muvhuso wa Dominican do +Cộng hoà Dominican do +Republike Dominikinne do +IRepublic yeDominican do +多米尼加共和国 do +多明尼加共和國 do +Algeria dz +Algerië dz +الجزائر dz +Альжыр dz +Алжир dz +Alžir dz +Algèria dz +Alžírsko dz +Algeriet dz +Algerien dz +Αλγερία dz +Algerio dz +Argelia dz +Alžeeria dz + الجزیره dz +Algérie dz +אלג'יריה dz +Alžir dz +Algéria dz +アルジェリア dz +알제리 dz +ບັນກາເລີຍ dz +Alžyras dz +AlÄ¡erija dz +Algerie dz +Algerije dz +Algerie dz +Algieria dz +Argélia dz +Argélia dz +Алжир dz +Alžírsko dz +Alžirija dz +I-Algeria dz +Algeriet dz +«øƒ¢Ã¢Â¡ dz +Алжир dz +Aldjereye dz +阿尔及利亚 dz +阿爾及利亞 dz +Equador ec +Ewenaar ec +الإكوادور ec +Ekvator ec +Эквадор ec +Еквадор ec +Ecuador ec +Ekvador ec +Ekvádor ec +Ecuador ec +Ισημερινός ec +Ekvadoro ec +Ecuador ec +Ekvador ec +Ekuador ec +اکوادور ec +Équateur ec +Ecuador ec +אקוודור ec +Ekvador ec +Ecuador ec +Ekvador ec +Ecuador ec +エクアドル ec +에콰도르 ec +ເອກໍດໍ ec +Ekvadoras ec +Ekvadora ec +Ekwador ec +Ecuador ec +Ecuador ec +Ekwador ec +Ecuador ec +Эквадор ec +Ekvádor ec +Ekvador ec +Ekvador ec +I-Equador ec +®ì¦Å§¼¡÷ ec +เอกวาดอร์ ec +Ekvator ec +Еквадор ec +EcwÃ¥teur ec +厄瓜多尔 ec +厄瓜多 ec +Estonia ee +Estlandies ee +استونيا ee +Estoniya ee +Эстонія ee +Естония ee +Estonija ee +Estònia ee +Estonsko ee +Estland ee +Estland ee +Εσθονία ee +Estlando ee +Eesti ee +استونی ee +Eesti ee +Estonie ee +אסטוניה ee +Estonija ee +Észtország ee +Eistland ee +エストニア ee +에스토니아 ee +ເອໂທເນີຍ ee +Estija ee +Igaunija ee +Estonja ee +Estland ee +Estland ee +Estland ee +Estònia ee +Estónia ee +Estônia ee +Эстония ee +Estónsko ee +Estonija ee +Estonija ee +I-Estonia ee +Estland ee +±Í§¼¡É¢Â¡ ee +เอสโธเนีย ee +Estonya ee +Естонія ee +Estoneye ee +爱沙尼亚 ee +愛沙尼亞 ee +Egypt eg +Egipte eg +مصر eg +Misir eg +Эгіпэт eg +Египет eg +Egipat eg +Egipte eg +Egypten eg +Ägypten eg +Αίγυπτος eg +Egiptujo eg +Egipto eg +Egiptus eg +Egypto eg +مصر eg +Egypti eg +Egyptaland eg +Égypte eg +מצרים eg +Egipat eg +Egyiptom eg +Egyptaland eg +Egitto eg +エジプト eg +이집트 eg +ອີຢີບ eg +Egiptas eg +Ēģipte eg +EÄ¡ittu eg +Egypte eg +Egepeta eg +Egipt eg +Egipto eg +Egito eg +Egipt eg +Египет eg +Egipt eg +I-Egypt eg +Egypten eg +±¸¢ôÐ eg +อียิปต์ eg +Mısır eg +Єгипет eg +Edjipe eg +埃及 eg +埃及 eg +Igibhithe eg +Western Sahara eh +Западна Сахара eh +Zapadna Sahara eh +Vestsahara eh +Sahara occidental eh +Mendebaldeko Sahara eh +Nyugat-Szahara eh +ພື້ນທີ່ທຳງານ eh +Sahara eh +Západna Sahara eh +Zahodna Sahara eh +Västsahara eh +Західна Сахара eh +西撒哈拉 eh +Eritrea er +Эрытрэя er +Еритрея er +Eritreja er +ແກ້ໄຂແຟ້ມທຳງານ er +Eritreja er +Еритрея er +厄立特里亚 er +Spain es +Spanje es +أسبانيا es +İspaniya es +Гішпанія es +Испания es +Spagn es +Å panija es +Espanya es +Å panělsko es +Spanien es +Spanien es +Ισπανία es +Hispanio es +España es +Hispaania es +Espainia es +اسپانیا es +Espanja es +Spania es +Espagne es +España es +ספרד es +Å panjolska es +Spanyolország es +Spanyol es +Spánn es +Spagna es +スペイン es +스페인 es +ສະເປັນ es +Ispanija es +Spānija es +Spanja es +Spania es +Spanje es +Spania es +Espanha es +Hiszpania es +Espanha es +Espanha es +Spania es +Испания es +Å panielsko es +Å panija es +Å panija es +I-Spain es +Spanien es +ͦÀ¢ý es +สเปน es +İspanya es +Іспанія es +Tây Ban Nha es +Sipagne es +西班牙 es +西班牙 es +Ethiopia et +Этыёпія et +Етиопия et +Etiopija et +Ethiopien et +Etiopía et +Etiopia et +Etiópia et +ເອໂທເນີຍ et +Etiópia et +Etiópia et +Etiopija et +Etiopien et +Ефіопія et +埃塞俄比亚 et +Finland fi +فنلندا fi +Finlandiya fi +Фінляндыя fi +Финландия fi +Finska fi +Finlàndia fi +Finsko fi +Finnland fi +Φινλανδία fi +Finlando fi +Finlandia fi +Soome fi +Finlandia fi +فنلاند fi +Suomi fi +Finnland fi +Finlande fi +Finlandia fi +פינלנד fi +Finska fi +Finnország fi +Finlandia fi +Finnland fi +Finlandia fi +フィンランド fi +핀란드 fi +ຟີນແລນ fi +Suomija fi +Somija fi +Finlandja fi +Finlandia fi +Finlandia fi +Finlândia fi +Finlândia fi +Finlanda fi +Финляндия fi +Fínsko fi +Finska fi +Finska fi +I-Finland fi +À¢ýÄ¡óÐ fi +ฟินแลนด์ fi +Finlandiya fi +Фінляндія fi +Phần Lan fi +Finlande fi +芬兰 fi +芬蘭 fi +Fiji fj +Фіджы fj +Фиджи fj +Fidži fj +Fidzsi fj +ມີດີ fj +Ilhas Fiji fj +Fidži fj +Fidži fj +Фіджі fj +斐济 fj +Falkland Islands (Malvinas) fk +Фолклендски Острови fk +Foklandska ostrva (Malvini) fk +Falkland-øerne fk +Islas Falkland (Malvinas) fk +Falkland Irlak (Malvinak) fk +Falkland-szigetek fk +Ilhas Malvinas fk +Falklandské Ostrovy (Malviny) fk +Falklandski otoki (Malvini) fk +Falklandsöarna fk +福克兰岛 (马尔维纳斯) fk +Micronesia, Federated states of fm +Федэрацыя Мiкранэзіі fm +Микронезия fm +Mikronezija, Federalne države fm +Mikronesien, de forenede stater af fm +Micronesia, Estados federados de fm +Mikronesia, Estatu Federatuak fm +Mikronézia fm +Estados Federados da Micronésia fm +Spjoené Å¡táty Mikronézie fm +Mikronezija, Združene države fm +Mikronesiska federationen fm +密克罗尼西亚联邦 fm +Faroe Islands fo +Фареорски Острови fo +Farska ostrva fo +Færøerne fo +islas Faroe fo +Faroe Irlak fo +Faroe-szigetek fo +ໄອແລນ fo +Ilhas Faroe fo +Ostrovy Faroe fo +Otoki Faroe fo +Färöarna fo +Фарерські острови fo +France fr +Frankryk fr +فرنسا fr +Fransa fr +Францыя fr +Франция fr +Frañs fr +Francuska fr +França fr +Francie fr +Frankrig fr +Frankreich fr +Γαλλία fr +Francio fr +Francia fr +Prantsusmaa fr +Frantzia fr +فرانسه fr +Ranska fr +Frakland fr +Francia fr +צרפת fr +Francuska fr +Franciaország fr +Prancis fr +Frakkland fr +Francia fr +フランス fr +프랑스 fr +ຝຣັ່ງ fr +PrancÅ«zija fr +Francija fr +Franza fr +Frankrike fr +Frankrijk fr +Frankrike fr +Fora fr +França fr +Francja fr +França fr +França fr +FranÅ£a fr +Франция fr +Francúzsko fr +Francija fr +Francuska fr +I-France fr +Frankrike fr +À¢Ã¡ýÍ fr +ฝรั่งเศส fr +Fransa fr +Франція fr +Fura fr +Pháp fr +Fransi fr +法国 fr +法國 fr +Gabon ga +Габон ga +Габон ga +Gabón ga +ແກລ່ງນ ga +Gabão ga +Габон ga +加蓬 ga +United Kingdom gb +Vereenigde Koninkryk gb +المملكة المتحدة gb +Birləşmiş Krallıq gb +Злучанае Каралеўства gb +Великобритания gb +Rouantelezh Unanet gb +Velika Britanija gb +Regne Unit gb +Spojené království gb +Storbritannien gb +Großbritannien gb +Ηνωμένο Βασίλειο gb +Britio gb +Reino Unido gb +Ühendatud Kuningriigid gb +Erreinu Batua gb +بریتانیا gb +Iso-Britannia gb +Stórabretland gb +Royaume Uni gb +Reino Unido gb +בריטניה gb +Ujedinjeno Kraljevstvo gb +Egyesült Királyság gb +Inggris gb +Stóra Bretland gb +Regno Unito gb +イギリス gb +영국 gb +ສະຫະລາດສະອານາຈັກ gb +Jungtinė Karalystė gb +Apvienotā Karaliste gb +Renju Unit gb +Storbritannia gb +Verenigd Koninkrijk gb +Storbritannia gb +Regne Unit gb +Wielka Brytania gb +Reino Unido gb +Reino Unido gb +Anglia gb +Великобритания gb +Anglicko gb +Združeno kraljestvo gb +Velika Britanija gb +I-United Kingdom gb +Storbritannien gb +³ì¸¢Â ­Ã¡îº¢Âõ gb +สหราชอาณาจักร gb +Birleşik Krallık gb +Великобританія gb +Anh gb +United Kingdom gb +联合王国 gb +聯合王國 gb +United Kingdom gb +Grenada gd +غرينادا gd +Qrenada gd +Грэнада gd +Гренада gd +Granada gd +Γρενάδα gd +Grenado gd +Granada gd +گرانادا gd +Grenade gd +Granada gd +גרנדה gd +Grænhöfðaeyjar gd +Granada gd +グラナダ gd +그러네이다 gd +ເກນາດາ gd +Grenāda gd +Granada gd +Granada gd +Granada gd +Гренада gd +I-Grenada gd +¸¢¦Ãɼ¡ gd +เกรนาดา gd +Гренада gd +格林纳达 gd +格瑞那達 gd +Georgia ge +Грузія ge +Грузия ge +Gruzija ge +Georgien ge +Grúzia ge +ເຊີເບີຍ ge +Geórgia ge +Gruzija ge +Georgien ge +Грузія ge +格鲁吉亚 ge +Ghana gh +غانا gh +Гана gh +Гана gh +Gana gh +Γκάνα gh +غنا gh +גאנה gh +ガーナ gh +ຈີນ gh +Gana gh +Gana gh +Gana gh +Гана gh +Gana gh +I-Ghana gh +¸¡É¡ gh +Гана gh +加纳 gh +迦納 gh +Gibraltar gi +Гибралтар gi +Gibraltár gi +ມອລຕາ gi +Гібралтар gi +直布罗陀 gi +Gambia gm +Гамбія gm +Гамбия gm +Gambija gm +ແກມມາ gm +Gâmbia gm +Gambija gm +Гамбія gm +冈比亚 gm +Guinea gn +Гвінэя gn +Гвинея gn +Gvineja gn +ເຖາວັນ gn +Guiné gn +Gvineja gn +Гвінея gn +几内亚 gn +Guadeloupe gp +Гвадалупа gp +Gvadalupe gp +Guadalupe gp +ເດີລຸກ gp +Guadalupe gp +Гваделупа gp +瓜德罗普岛 gp +Equatorial Guinea gq +Экватарыяльная Гвінэя gq +Екваториялна Гвинея gq +Ekvatorijalna Gvineja gq +Ækvatorial Guinea gq +Guinea equatorial gq +Ginea Ekuatoriala gq +Egyenlítői Guinea gq +ການສອນ gq +Guiné Equatorial gq +Rovníkova Guinea gq +Ekvatorialna Gvineja gq +Ekvatorialguinea gq +Екваторіальна Гвінея gq +赤道几内亚 gq +Greece gr +Griekeland gr +اليونان gr +Yunanıstan gr +Грэцыя gr +Гърция gr +Gres gr +Grčka gr +Grècia gr +Řecko gr +Grækenland gr +Griechenland gr +Ελλάδα gr +Grekujo gr +Grecia gr +Kreeka gr +Grezia gr +یونان gr +Kreikka gr +Grikkaland gr +Grèce gr +Grecia gr +יוון gr +Grčka gr +Görögország gr +Grikkland gr +Grecia gr +ギリシャ gr +그리스 gr +ກີຊ gr +Graikija gr +GrieÄ·ija gr +Greċja gr +Hellas gr +Griekenland gr +Hellas gr +Grèça gr +Grecja gr +Grécia gr +Grécia gr +Grecia gr +Греция gr +Grécko gr +Grčija gr +Grčka gr +I-Greece gr +Grekland gr +¸¢Ã£Í gr +กรีซ gr +Yunanistan gr +Греція gr +Hy Lạp gr +Grece gr +希腊 gr +希臘 gr +Guatemala gt +Gautemala gt +غواتيمالا gt +Quatemala gt +Гватэмала gt +Гватемала gt +Gvatemala gt +Γουατεμάλα gt +Gvatemalo gt +Guatemaala gt +گواتمالا gt +גואטמלה gt +Gvatemala gt +カタロニア gt +과테말라 gt +ກັວເຕມາລາ gt +Gvatemala gt +Gvatemala gt +Gwatemala gt +Gwatemala gt +Гватемала gt +Gvatemala gt +Gvatemala gt +I-Guatemala gt +ÌÅ¡ò¾Á¡Ä¡ gt +กัวเตมาลา gt +Гватемала gt +Gwatemala gt +瓜地马拉 gt +瓜地馬拉 gt +Guam gu +Гуам gu +ແກມມາ gu +Гуам gu +关岛 gu +Guinea-Bissau gw +Гвінэя-Бісаў gw +Гвинея-Бисау gw +Gvineja-Bisau gw +Ginea-Bissau gw +Bissau-Guinea gw +ລັດເຊີຍ gw +Guiné-Bissau gw +Гвінея-Біссау gw +几内亚比绍 gw +Guyana gy +Гвіяна gy +Гуана gy +Gvajana gy +ຈີນ gy +Guiana gy +Gvajana gy +Гаяна gy +圭亚那 gy +Hong Kong hk +Ганконг hk +Хонг Конг hk +Hongkong hk +ບໍ່ຮູ້ຈັກ hk +Гонконг hk +香港 hk +Honduras hn +هندوراس hn +Гандурас hn +Хондурас hn +Hondures hn +Ονδούρα hn +Honduraso hn +Honduuras hn +هندوراس hn +הונדורס hn +ホンデュラス hn +온두라스 hn +ຫອນດູລັດ hn +HondÅ«ras hn +Hondurasa hn +Ħonduras hn +Hondures hn +Гондурас hn +I-Honduras hn +¬ñÎáŠÍ hn +ฮอนดูรัส hn +Гондурас hn +洪都拉斯 hn +宏都拉斯 hn +Croatia hr +Kroatië hr +كرواتيا hr +Xırvatıstan hr +Харватыя hr +Хърватска hr +Kroatia hr +Hrvatska hr +Croàcia hr +Chorvatsko hr +Kroatien hr +Kroatien hr +Κροατία hr +Kroatio hr +Croacia hr +Horvaatia hr +Kroazia hr +کرواسی hr +Kroatia hr +Kroatia hr +Croatie hr +Croacia hr +קרואטיה hr +Hrvatska hr +Horvátország hr +Kroasia hr +Króatía hr +Croazia hr +クロアチア hr +크로아티아 hr +ໂຄເອເທີຍ hr +Kroatija hr +Horvātija hr +Kroazja hr +Kroatia hr +Kroatië hr +Kroatia hr +Croacia hr +Chorwacja hr +Croácia hr +Croácia hr +CroaÅ£ia hr +Хорватия hr +Chorvátsko hr +HrvaÅ¡ka hr +Hrvatska hr +I-Croatia hr +Kroatien hr +̦á§Åº¢Â¡ hr +โครเอเธีย hr +Hırvatistan hr +Хорватія hr +CrowÃ¥ceye hr +克罗地亚 hr +克羅埃西亞 hr +Haiti ht +Гаіці ht +Хаити ht +Haití ht +ວາດຮູບ - K ht +Гаїті ht +海地岛 ht +Hungary hu +Hongarye hu +هنغاريا hu +Macarıstan hu +Вугоршчына hu +Унгария hu +Hungaria hu +Mađarska hu +Hongria hu +Maďarsko hu +Ungarn hu +Ungarn hu +Ουγγαρία hu +Hungario hu +Hungría hu +Ungari hu +Hungaria hu +مجارستان hu +Unkari hu +Ungarn hu +Hongrie hu +Hungría hu +הונגריה hu +Mađjarska hu +Magyarország hu +Hungaria hu +Ungverjaland hu +Ungheria hu +ハンガリー hu +헝가리 hu +ຫັງກາລີ hu +Vengrija hu +Ungārija hu +Ungerija hu +Ungarn hu +Hongarije hu +Ungarn hu +Hongria hu +Węgry hu +Hungria hu +Hungria hu +Ungaria hu +Венгрия hu +Maďarsko hu +Madžarska hu +Mađarska hu +I-Hungary hu +Ungern hu +¬í§¸Ã¢ hu +ฮังการี hu +Macaristan hu +Угорщина hu +Hongreye hu +匈牙利 hu +匈牙利 hu +Indonesia id +Indonesië id +إندونيسيا id +İndoneziya id +Інданэзія id +Индонезия id +Indonezija id +Indonèsia id +Indonésie id +Indonesien id +Indonesien id +Ινδονησία id +Indonezio id +Indoneesia id +اندونزی id +Indonésie id +אינדונזיה id +Indonezija id +Indonézia id +Indónesía id +インドネシア id +인도네시아 id +ອີຍໂດນີເຊີຍ id +Indonezija id +Indonēzija id +Indoneżja id +Indonesië id +Indonezja id +Indonésia id +Indonésia id +Indonezia id +Индонезия id +Indonézia id +Indonezija id +I-Indonesia id +Indonesien id +­ó§¾¡É£º¢Â¡ id +อินโดนีเซีย id +İndonezya id +Індонезія id +Indoneseye id +印度尼西亚 id +印尼 id +Ireland ie +Ierland ie +أيرلندا ie +İrlandiya ie +Ірляндыя ie +Ирландия ie +Iwerzhon ie +Irska ie +Irlanda ie +Irsko ie +Irland ie +Irland ie +Ιρλανδία ie +Islando ie +Irlanda ie +Island ie +Irlanda ie +ایرلند ie +Irlanti ie +Írland ie +Irlande ie +Irlanda ie +אירלנד ie +Irska ie +Írország ie +Irlandia ie +Írland ie +Irlanda ie +アイスランド ie +아일랜드 ie +ໄອແລນ ie +Airija ie +Īrija ie +Irlanda ie +Irland ie +Ierland ie +Irland ie +Irlanda ie +Irlandia ie +Irlanda ie +Irlanda ie +Irlanda ie +Ирландия ie +Írsko ie +Irska ie +Irska ie +I-Ireland ie +Irland ie +«Â÷Ä¡óÐ ie +ไอร์แลนด์ ie +İrlanda ie +Ірландія ie +Irlande ie +爱尔兰 ie +愛爾蘭 ie +Israel il +اسرائيل il +İzrail il +Ізраіль il +Израел il +Izrael il +Izrael il +Ισραήλ il +Israelo il +Iisrael il +اسراییل il +Ísrael il +Israël il +ישראל il +Izrael il +Izrael il +Ísrael il +Israele il +イスラエル il +이스라엘 il +ອິດສະລະເອລ il +Izraelis il +Izraēla il +Iżrael il +Izrael il +Израиль il +Izrael il +Izrael il +Izrael il +I-Israel il +­Í§Ãø il +อิสราเอล il +İsrail il +Ізраїль il +Israyel il +USirayeli il +以色列 il +以色列 il +India in +Indië in +الهند in +Hindistan in +Індыя in +Индия in +Indija in +Índia in +Indie in +Indien in +Indien in +Ινδία in +Hindujo in +هندوستان in +Intia in +Inde in +הודו in +Indija in +Indland in +インド in +인도 in +ອິນເດີຍ in +Indija in +Indija in +Indja in +Indie in +Índia in +Índia in +Индия in +Indija in +I-India in +Indien in +­ó¾¢Â¡ in +อินเดีย in +Hindistan in +Індія in +Inde in +印度 in +印度 in +Endiya in +Iraq iq +Irak iq +العراق iq +İraq iq +Ірак iq +Ирак iq +Irak iq +Irák iq +Irak iq +Irak iq +Ιράκ iq +Irako iq +Irak iq +Iraak iq +عراق iq +Irak iq +Irak iq +Irak iq +עירק iq +Irak iq +Irak iq +Írak iq +Irak iq +イラク iq +이라크 iq +ອີລັກ iq +Irakas iq +Irāka iq +Irak iq +Irak iq +Irak iq +Irak iq +Iraque iq +Iraque iq +Irak iq +Ирак iq +Irák iq +Irak iq +I-Iraq iq +Irak iq +®Ã¡ì iq +อิรัค iq +Irak iq +Ірак iq +Irak iq +伊拉克 iq +伊拉克 iq +Iran ir +أيران ir +Іран ir +Иран ir +Írán ir +Ιράν ir +Iraan ir +ایران ir +אירן ir +Irán ir +イラン ir +이란 ir +ອີລັກ ir +Iranas ir +Irão ir +Irã ir +Иран ir +Irán ir +I-Iran ir +®Ã¡ý ir +İran ir +Іран ir +伊朗 ir +伊朗 ir +Iceland is +Ysland is +أيسلندا is +İslandiya is +Ісьляндыя is +Исландия is +Island is +Island is +Islàndia is +Island is +Island is +Island is +Ισλανδία is +Islando is +Islandia is +Island is +Islandia is +ایسلند is +Islanti is +Ísland is +Islande is +Islandia is +איסלנד is +Island is +Izland is +Islandia is +Ísland is +Islanda is +アイスランド is +아이슬란드 is +ໄອຊແລນ is +Islandija is +Islande is +Islandja is +Island is +IJsland is +Island is +Islandia is +Islandia is +Islândia is +Islândia is +Islanda is +Исландия is +Island is +Islandija is +Island is +I-Iceland is +Island is +³ÍÄ¡óÐ is +ไอซ์แลนด์ is +İzlanda is +Ісландія is +Izlande is +冰岛 is +冰島 is +Icelandi is +Italy it +Italië it +ايطاليا it +İtalyia it +Італія it +Италия it +Italia it +Italija it +Itàlia it +Itálie it +Italien it +Italien it +Ιταλία it +Italio it +Italia it +Itaalia it +Italia it +ایتالیا it +Italia it +Italia it +Italie it +Italia it +איטליה it +Italija it +Olaszország it +Italia it +Ítalía it +Italia it +イタリア it +이탈리아 it +ອີຕາລີ it +Italija it +Itālija it +Italja it +Italia it +Italië it +Italia it +Italia it +Włochy it +Itália it +Itália it +Italia it +Италия it +Taliansko it +Italija it +Italija it +I-Italy it +Italien it +­ò¾¡Ä¢ it +อิตาลี it +İtalya it +Італія it +ItÃ¥leye it +Ithali it +意大利 it +義大利 it +Jamaica jm +Jamaika jm +جامايكا jm +Yamayka jm +Ямайка jm +Ямайка jm +Jamaika jm +Jamajka jm +Jamajka jm +Jamaika jm +Τζαμάικα jm +Ä´amaiko jm +Jamaika jm +Jamaika jm +جاماییکا jm +Jamaika jm +Jamaïque jm +Xamaica jm +ג'מייקה jm +Jamajka jm +Jamaika jm +Jamaika jm +Giamaica jm +ジャマイカ jm +자메이카 jm +ຈາໄມກາ jm +Jamaika jm +Jamaika jm +Ä amajka jm +Jamajka jm +Ямайка jm +Jamajka jm +Jamajka jm +Jamajka jm +I-Jamaica jm +ƒº¦Áö측 jm +จาไมกา jm +Jamaika jm +Ямайка jm +Djamayike jm +牙买加 jm +牙買加 jm +Jordan jo +Jordaan jo +الأردن jo +İordaniya jo +Ярданія jo +Йордания jo +Jordania jo +Jordán jo +Jordanien jo +Ιορδανία jo +Jordanio jo +Jordania jo +اردن jo +Jordania jo +Jordanie jo +ירדן jo +Jordánia jo +Jórdanía jo +Giordania jo +ヨルダン jo +요르단 jo +ຈໍແດນ jo +Jordanija jo +Jordāna jo +Ä ordan jo +Jordanië jo +Jordania jo +Jordânia jo +Jordânia jo +Iordania jo +Иордания jo +Jordánsko jo +Jordanija jo +I-Jordan jo +Jordanien jo +§Â¡÷¾¡ý jo +จอร์แดน jo +Ürdün jo +Йорданія jo +Djordaneye jo +约旦 jo +約旦 jo +Ijolidani jo +Japan jp +اليابان jp +Yaponiya jp +Японія jp +Япония jp +Japó jp +Japonsko jp +Ιαπωνία jp +Japanio jp +Japón jp +Jaapan jp +Japonia jp +ژاپن jp +Japani jp +Japon jp +Xapón jp +יפן jp +Japán jp +Jepang jp +Giappone jp +日本 jp +일본 jp +ຍີ່ປຸ່ນ jp +Japonija jp +Japāna jp +Ä appun jp +Japon jp +Japonia jp +Japão jp +Japão jp +Japonia jp +Япония jp +Japonsko jp +Japonska jp +I-Japan jp +ºôÀ¡ý jp +ญี่ปุ่น jp +Japonya jp +Японія jp +Nhật bản jp +Djapon jp +日本 jp +日本 jp +Kenya ke +Кенія ke +Кения ke +Kenija ke +Kenia ke +ເວນດາ ke +Quênia ke +Keňa ke +Kenija ke +Кенія ke +肯尼亚 ke +Kyrgyzstan kg +Кыргызстан kg +Киргистан kg +Kirgistan kg +Kirgizistan kg +Kyrgyzstán kg +Kirgizisztán kg +ຄສິຕັລ kg +Kirgizstan kg +Kirgizistan kg +Киргизстан kg +吉尔吉斯坦 kg +Cambodia kh +Камбоджа kh +Камбоджа kh +Kambođa kh +Kambodzsa kh +ໂຄລຳເບີຍ kh +Cambodja kh +Kambodža kh +Kambodža kh +Kambodja kh +Камбоджа kh +柬埔寨 kh +Kiribati ki +Кiрыбацi ki +Кирибати ki +ແຟຄທັລ - K ki +Кірібаті ki +基里巴斯 ki +Comoros km +Каморы km +Коморски km +Komori km +Comorerne km +ສີ km +Komori km +Komorerna km +Комори km +科摩罗群岛 km +St. Kitts and Nevis kn +St. Kitts en Nevis kn +سانت كيتس و نيفيس kn +St. Kitts və Nevis kn +Св. Кристоф и Невис kn +S. Kitts ha Nevis kn +St. Kitts i Nevis kn +Sv. Kitts a Nevis kn +St. Kitts-Nevis kn +St. Kitts und Nevis kn +St. Kitts και Nevis kn +St. Kitts kaj Nevis kn +St. Kitts y Nevis kn +St. Kitts ja Nevis kn +St. Kitts eta Nevis kn +سن کیتس و نویس kn +St. Kitts ja Nevis kn +St Kitts et Nevis kn +Saint Kitts e Nevis kn +סנט קיטס ונביס kn +St. Kitts és Nevis kn +St. Kitts dan Nevis kn +Ss. Kitts e Nevis kn +セントキッツネヴィス kn +세인트 키츠 네비스 kn +Å v. Kitts ir Nevis kn +St. Kitts un Nevis kn +St. Kitts u Nevis kn +St. Kitts og Nevis kn +St. Kitts en Nevis kn +St. Kitts og Nevis kn +St. Kitts le Nevis kn +St. Kitts e Nevis kn +St. Kitts e Nevis kn +St Kitts e Nevis kn +Sf. Kitts şi Nevis kn +о. Св. Кристофа и Невиса kn +St. Kitts a Nevis kn +St. Kitts in Nevis kn +St. Kitts i Nevis kn +I-St. Kitts and Nevis kn +St. Kitts och Nevis kn +¦ºÂ¢ý𠸢ðÍ & ¦¿Å¢Í kn +St. Kitts ve Nevis kn +Федерація Сент-Кітс і Невіс kn +St. Kitts na Nevis kn +St. Kitts neNevis kn +圣基特和里维斯 kn +聖克理斯多福及尼維斯 kn +St. Kitts kanye no-Nevis kn +North Korea kp +Noord Korea kp +كوريا الشمالية kp +Şimali Koreya kp +Паўночная Карэя kp +Северна Корея kp +Norzh-Korea kp +Sjeverna Koreja kp +Corea del Nord kp +Severní Korea kp +Nordkorea kp +Nord-Korea kp +Βόρεια Κορέα kp +Nordkoreo kp +Corea del Norte kp +Põhja-Korea kp +Ipar Korea kp +کره شمالی kp +Pohjois-Korea kp +Norðurkorea kp +Corée du nord kp +Corea do Norte kp +צפון קוריאה kp +Sjeverna Koreja kp +Észak-Korea kp +Korea Utara kp +Kórea - Norðurkórea kp +Corea del Nord kp +北朝鮮 kp +조선민주주의 인민공화국 kp +ເກົາລີເຫນືອ kp +Å iaurės Korėja kp +ZiemeļKoreja kp +Korea ta' Fuq kp +Nord-Korea kp +Noord-Korea kp +Nord-Korea kp +Lebowa la Korea kp +Corea dèu Nord kp +Korea Północna kp +Coreia do Norte kp +Coréia do Norte kp +Coreea de Nord kp +Северная Корея kp +severná Kórea kp +Severna Koreja kp +Severna Koreja kp +I-North Korea kp +Nordkorea kp +ż ¦¸¡Ã¢Â¡ kp +เกาหลีเหนือ kp +Kuzey Kore kp +Північна Корея kp +Devhula ha Korea kp +Bắc Triều Tiên kp +Bijhe Coreye kp +Umntla Korea kp +朝鲜 kp +北韓 kp +Enyakatho ne-Korea kp +South Korea kr +Suid Korea kr +كوريا الجنوبية kr +Cənubi Koreya kr +Паўднёвая Карэя kr +Южна Корея kr +Su-Korea kr +Južna Koreja kr +Corea del Sud kr +Jižní Korea kr +Sydkorea kr +Süd-Korea kr +Νότια Κορέα kr +Sudkoreo kr +Corea del Sur kr +Lõuna-Korea kr +Hego Korea kr +کره جنوبی kr +Etelä-Korea kr +Suðurkorea kr +Corée du sud kr +Corea do Sur kr +דרום קוריאה kr +Južna Koreja kr +Dél-Korea kr +Korea Selatan kr +Kórea - Suðurkórea kr +Corea del Sud kr +韓国 kr +대한민국 kr +ເກົາລີໃຕ້ kr +Pietų Korėja kr +DievidKoreja kr +Korea t'Isfel kr +Sør-Korea kr +Zuid-Korea kr +Sør-Korea kr +Borwa bja Korea kr +Corea dèu Sud kr +Korea Południowa kr +Coreia do Sul kr +Coréia do Sul kr +Coreea de Sud kr +Южная Корея kr +Južná Kórea kr +Južna Koreja kr +Južna Koreja kr +I-South Korea kr +Sydkorea kr +¦¾ý ¦¸¡Ã¢Â¡ kr +เกาหลีใต้ kr +Güney Kore kr +Південна Корея kr +Korea tshipembe kr +Hàn Quốc kr +Nonne Coreye kr +Umzantsi Korea kr +韩国 kr +南韓 kr +Emzansi Korea kr +Kuwait kw +Kuwaït kw +الكويت kw +Кувэйт kw +Кувейт kw +Kuvajt kw +Kuvajt kw +Κουβέιτ kw +Kuveit kw +کویت kw +Kuvait kw +Kowait kw +כווית kw +Kuvajt kw +Kuvait kw +クェート kw +쿠웨이트 kw +ແຕ້ມຮູບ- K kw +Kuveitas kw +Koeweit kw +Koweit kw +Kuveit kw +Кувейт kw +Kuvajt kw +Kuvajt kw +I-Kuwait kw +̨Åò kw +KКувейт kw +科威特 kw +科威特 kw +Cayman Islands ky +Кайманови Острови ky +Kajmanska ostrva ky +Cayman-øerne ky +Islas Caimán ky +Kaiman Irlak ky +Kajmán-szigetek ky +ຄາຕາລັນ ky +Ilhas Cayman ky +Kajmanske Ostrovy ky +Kajmanski otoki ky +Caymanöarna ky +Кайманські острови ky +开曼群岛 ky +Kazakhstan kz +Казахстан kz +Казахстан kz +Kazahstan kz +Kazakhstán kz +Kazahsztán kz +ແກແລກຕິກ - K kz +Kazaquistão kz +Kazachstan kz +Kazahstan kz +Kazakstan kz +Казахстан kz +哈萨克斯坦 kz +Laos la +Лаос la +Лаос la +Laosz la +ລາວ la +老挝 la +Lebanon lb +Libanon lb +لبنان lb +Ліван lb +Ливан lb +Liban lb +Libanon lb +Libanon lb +Libanon lb +Λίβανος lb +Lebanono lb +Líbano lb +Liibanon lb +لبنان lb +Libanon lb +Libanon lb +Liban lb +לבנון lb +Libanon lb +Libanon lb +Libano lb +レバノン lb +레바논 lb +ເດນ່ງນ lb +Libanas lb +Libanu lb +Libanon lb +Libanon lb +Libanon lb +Liban lb +Líbano lb +Líbano lb +Liban lb +Ливан lb +Libanon lb +Libanon lb +I-Lebanon lb +Libanon lb +¦ÄÀÉ¡ý lb +Ліван lb +Liban lb +黎巴嫩 lb +黎巴嫩 lb +St. Lucia lc +سانت لوسيا lc +Св. Люсиа lc +S. Lucia lc +Svatá Lucie lc +Σάντα Λουτσία lc +St. Lucio lc +Santa Lucía lc +سن لوسیا lc +Sankta Lusia lc +Sainte Lucie lc +Santa Lucía lc +סנטה לוסיה lc +Santa Lucia lc +セントルキア lc +세인트 루시아 lc +ເຊັນລູເຊີຍ lc +Å v Liucija lc +Sv. LÅ«cija lc +St. Luċija lc +Santa Lúcia lc +Santa Lúcia lc +Sf. Lucia lc +о. Св. Люсии lc +Sv. Júlia lc +Sv. Lucija lc +I-St. Lucia lc +¦ºýð 溢¡ lc +เซนต์ลูเซีย lc +Санта Лучія lc +圣路西亚 lc +聖露西亞 lc +Liechtenstein li +Ліхтэнштэйн li +Лихтенщайн li +LihtenÅ¡tajn li +Liechtestein li +ຟ້າແມບ li +列支敦士登 li +Sri Lanka lk +Шры-Ланка lk +Шри Ланка lk +Å ri Lanka lk +ເຊີເບີຍ lk +Å ri Lanka lk +斯里兰卡 lk +Liberia lr +Лібэрыя lr +Либеря lr +Liberija lr +Libéria lr +ລິຊາ lr +Libéria lr +Lýbia lr +Liberija lr +利比里亚 lr +Lesotho ls +Лесота ls +Лесото ls +Lesoto ls +Lesoto ls +ທົດສອບ ls +Lesoto ls +莱索托 ls +Lithuania lt +Lithuanië lt +ليتوانيا lt +Litvaniya lt +Літва lt +Литва lt +Litvanija lt +Lituània lt +Litva lt +Litauen lt +Litauen lt +Λιθουανία lt +Litovio lt +Lituania lt +Leedu lt +Lituania lt +لیتوانی lt +Liettua lt +Lituanie lt +ליטא lt +Litva lt +Litvánia lt +Litháenska lt +Lituania lt +リトアニア lt +리 투아니아 lt +ລິທົ່ວເນີຍ lt +Lietuva lt +Lietuva lt +Litwanja lt +Litauen lt +Litouwen lt +Litauen lt +Litwa lt +Lituânia lt +Lituânia lt +Lituania lt +Литва lt +Litva lt +Litva lt +Litvanija lt +I-Lithuania lt +Litauen lt +Ä¢òЧÅɢ¡ lt +ลิธัวเนีย lt +Litvanya lt +Литва lt +立陶宛 lt +立陶宛 lt +Luxembourg lu +Luxenburg lu +لوكسمبورغ lu +Lüksemburq lu +Люксэмбург lu +Люксембург lu +Luksemburg lu +Luxemburg lu +Lucembursko lu +Luxemburg lu +Λουξεμβούργο lu +Luksemburgo lu +Luxemburgo lu +Luksemburg lu +Luxemburg lu +لوگزامبورگ lu +Luxemburg lu +Luksemborg lu +לוקסמבורג lu +Luksemburg lu +Luxemburg lu +Lúxemborg lu +Lussemburgo lu +ルクセンブルグ lu +룩셈부르크 lu +ລັກແຊມເບີກ lu +Liuksemburgas lu +Luksemburga lu +Lussemburgu lu +Luxemburg lu +Luksemburg lu +Luxemburgo lu +Luxemburgo lu +Luxemburg lu +Люксембург lu +Luxemburg lu +Luksemburg lu +Luksemburg lu +I-Luxembourg lu +Luxemburg lu +Äìºõ§À¡÷ì lu +ลักเซมเบอร์ก lu +Lüksemburg lu +Люксембург lu +Lucsimbork lu +卢森堡 lu +盧森堡 lu +Latvia lv +لاتفيا lv +Latviya lv +Латвія lv +Латвия lv +Latvija lv +LotyÅ¡sko lv +Letland lv +Lettland lv +Λιθουανία lv +Latvio lv +Letonia lv +Läti lv +لاتویا lv +Lettonie lv +לטביה lv +Latvija lv +Lettország lv +Léttland lv +Lettonia lv +ラトビア lv +라트비아 lv +ລັດເວີຍ lv +Latvija lv +Latvija lv +Latvja lv +Letland lv +Łotwa lv +Letónia lv +Латвия lv +LotyÅ¡sko lv +Latvija lv +Latvija lv +I-Latvia lv +Lettland lv +ÄðŢ¡ lv +ลัธเวีย lv +Litvanya lv +Латвія lv +Lativia lv +拉脱维亚 lv +拉脫維亞 lv +Libya ly +Libië ly +ليبيا ly +Лівія ly +Либия ly +Libija ly +Líbia ly +Lýbie ly +Libyen ly +Libyen ly +Λιβύη ly +Libia ly +Liibüa ly +Libia ly +لیبی ly +Lybie ly +לוב ly +Líbia ly +Libia ly +リビア ly +ລິຊາ ly +Libija ly +Libië ly +Libia ly +Líbia ly +Líbia ly +Ливия ly +Lýbia ly +Libija ly +I-Libya ly +Libyen ly +Ä¢À¢Â¡ ly +Лівія ly +利比亚 ly +利比亞 ly +Morocco ma +Morokko ma +المغرب ma +Марока ma +Мароко ma +Maroko ma +Marroc ma +Maroko ma +Marokko ma +Marokko ma +Μαρόκο ma +Moroko ma +Marruecos ma +Maroko ma +Maroko ma +مراکش ma +Marokko ma +Marokko ma +Maroc ma +מרוקו ma +Maroko ma +Marokkó ma +Marocco ma +モロッコ ma +모로코 ma +ເມົາລິ ma +Marokas ma +Marokk ma +Marokko ma +Marokko ma +Marokko ma +Maroko ma +Marrocos ma +Marrocos ma +Maroc ma +Марокко ma +Maroko ma +Maroko ma +I-Morocco ma +Marocko ma +§Á¡Ã¡§¸¡ ma +Марокко ma +Marok ma +摩洛哥 ma +摩洛哥 ma +Monaco mc +Манака mc +Монако mc +Monako mc +Mónaco mc +ເມົາລິ mc +Mônaco mc +Monako mc +Monako mc +摩纳哥 mc +Moldova md +Малдова md +Молдова md +Moldavia md +Moldavia md +ສະໂລວັກ md +Moldávsko md +Moldavien md +摩尔多瓦 md +Madagascar mg +Мадагаскар mg +Мадагаскар mg +Madagaskar mg +Madagaszkár mg +ຄາສະບາລ - K mg +Madagaskar mg +Madagaskar mg +Madagaskar mg +马达加斯加 mg +Marshall Islands mh +Маршаллавы астравы mh +Маршалови Острови mh +MarÅ¡alova ostrva mh +Marshall-øerne mh +Islas Marshall mh +Marshall Irlak mh +Marshall-szigetek mh +ລາດສະອານາຈັກໄທຍ mh +Ilhas Marshall mh +Maršálove ostrovy mh +Marshallovi otoki mh +Marshallöarna mh +马绍尔群岛 mh +Macedonia mk +Makedoniese mk +مقدونيا mk +Makedonya mk +Македонія mk +Македония mk +Makedonia mk +Makedonija mk +Macedònia mk +Makedonie mk +Makedonien mk +Makedonien mk +Μακεδονία mk +Macedonio mk +Makedoonia mk +Mazedonia mk +مقدونیه mk +Makedonia mk +Macédoine mk +מקדוניה mk +Makedonija mk +Macedónia mk +Masedonia mk +Makedónía mk +マケドニア語 mk +마케도니아 mk +ມາເຊໂດເນີຍ mk +Makedonija mk +MaÄ·edonija mk +Maċedonja mk +Makedonia mk +Macedonië mk +Makedonia mk +Macedònian mk +Macedónia mk +Macedônia mk +Македония mk +Macedónsky mk +Makedonija mk +Makedonija mk +I-Macedonia mk +Makedonien mk +Á¡º¢§¼¡É¢Â¡ mk +มาเซโดเนีย mk +Makedonya mk +Македонія mk +Masedonia mk +马其顿 mk +馬其頓 mk +Mali ml +Малі ml +Мали ml +ຈົດຫມາຍ ml +马里 ml +Myanmar mm +М'янма mm +Майнмар mm +Mjanmar mm +Burma mm +Birmania mm +ຕົວຮງກພີື້ນທີ່ທຳງານ - K mm +Mjanmar mm +缅甸 mm +Mongolia mn +Манголія mn +Монголия mn +Mongolija mn +Mongoliet mn +Mongólia mn +ລອກອິນ mn +Mongólia mn +Mongolsko mn +Mongolija mn +Mongoliet mn +蒙古 mn +Macau mo +Макао mo +Makau mo +Macao mo +Makaó mo +ມອລຕາ mo +Makao mo +Macao mo +澳门 mo +Martinique mq +Мартиника mq +Martinik mq +Martinica mq +ເມົາລິ mq +Martinik mq +马提尼克岛 mq +Mauritania mr +Маўрытанія mr +Мавритания mr +Mauritanija mr +Mauretanien mr +Mauritánia mr +ລິທົວເນີຍ mr +Mauritânia mr +Mavretanija mr +Mauretanien mr +毛里塔尼亚 mr +Montserrat ms +Монсерат ms +Monsera ms +ຈໍພາບ ms +蒙特塞拉特岛 ms +Malta mt +مالطة mt +Мальта mt +Малта mt +Μάλτα mt +Malto mt +مالت mt +Malte mt +מלטה mt +Málta mt +マルタ mt +왈타 mt +ມອລຕາ mt +Мальта mt +I-Malta mt +Á¡ø¼¡ mt +มอลตา mt +Мальта mt +Male mt +马耳他 mt +馬爾他 mt +Mauritius mu +Маўрыцы mu +Маурици mu +Mauricijus mu +Mauricio mu +ພາທິຊັ້ນ mu +Maurícius mu +Mavricij mu +毛里求斯 mu +Maldives mv +Мальдывы mv +Малдиви mv +Maldivi mv +Maldiverne mv +Maldivas mv +Maldív-szigetek mv +ມັລດິສ mv +Maldivas mv +Maldiv mv +Maldiverna mv +马尔代夫 mv +Malawi mw +Малаві mw +Малави mw +Malavi mw +ມອລຕາ mw +马拉维 mw +Mexico mx +Meksiko mx +المكسيك mx +Meksika mx +Мэксыка mx +Мексико mx +Mec'hiko mx +Meksiko mx +Mèxic mx +Mexiko mx +Mexiko mx +Μεξικό mx +Meksikujo mx +México mx +Mehhiko mx +Mexiko mx +مکزیک mx +Meksiko mx +Meksiko mx +Mexique mx +México mx +מקסיקו mx +Meksiko mx +Mexikó mx +Meksiko mx +Mexíkó mx +Messico mx +メキシコ mx +멕시코 mx +ເມັກຊີໂກ mx +Meksika mx +Meksika mx +Messiku mx +Mèxic mx +Meksyk mx +México mx +México mx +Mexic mx +Мексика mx +Mexiko mx +Mehika mx +Meksiko mx +I-Mexico mx +¦Á캢§¸¡ mx +เม็กซิโก mx +Meksika mx +Мексика mx +Mê hi cô mx +Mecsike mx +墨西哥 mx +墨西哥 mx +Malaysia my +Малайзыя my +Малайзия my +Malezija my +Malasia my +Malasia my +Malajzia my +ມອລຕາ my +Malásia my +Malajzia my +Malezija my +马来西亚 my +Mozambique mz +Мазамбік mz +Мозамбик mz +Mozambik mz +Mozambik mz +ຫນ່ວຍຄວາມຈຳ mz +Moçambique mz +Mozambik mz +Mozambik mz +Moçambique mz +莫桑比克 mz +Namibia na +Намібія na +Намибия na +Namibija na +Namíbia na +ຈາໄມກາ na +Namíbia na +Namíbia na +Namibija na +纳米比亚 na +New Caledonia nc +Нова Каледония nc +Nova Kaledonija nc +Ny Caledonien nc +Nueva Caledonia nc +Kaledonia Berria nc +Új-Kaledónia nc +ມາເຊໂດເນີຍ nc +Nova Caledônia nc +Nová Kaledónia nc +Nova Kaledonija nc +Nya Caledonien nc +新喀里多尼亚 nc +Niger ne +Нігер ne +Нигер ne +ຕົວຮງກພື້ນທີ່ທຳງານ ne +Nigéria ne +Nigéria ne +尼日尔 ne +Norfolk Island nf +Остров Норфолк nf +Norfolk ostrvo nf +Norfolk-øerne (Australien) nf +Isla Norfolk nf +Norfok Irla nf +Norfolk-szigetek nf +ໂປແລນ nf +Ilhas Norfolk nf +Ostrov Norfolk nf +Otok Norfolk nf +Norfolkön nf +诺福克岛 nf +Nigeria ng +Нігерыя ng +Нигерия ng +Nigerija ng +Nigéria ng +ບັນແກເລີຍ ng +Nigéria ng +Nigéria ng +Nigerija ng +尼日利亚 ng +Nicaragua ni +Nikaragua ni +نيكاراغوا ni +Нікарагуа ni +Никарагуа ni +Nikaragva ni +Nikaragua ni +Νικαράγουα ni +Nikaraagua ni +نیکاراگویه ni +Nikaragua ni +Nikaragua ni +ניקרגווה ni +ニカラグア ni +니카라과 ni +ປາລາກກວຍ ni +Nikaragua ni +Nikaragwa ni +Nikaragua ni +Nicarágua ni +Nicarágua ni +Никарагуа ni +Nikaragua ni +Nikaragva ni +I-Nicaragua ni +¿¢¸Ã¡Ì§Å ni +Nikaragua ni +Нікарагуа ni +尼加拉瓜 ni +尼加拉瓜 ni +Netherlands nl +Nederland nl +هولندا nl +Hollandiya nl +Галяндыя nl +Холандия nl +Izelvroioù nl +Nizozemska nl +Holanda nl +Nizozemí nl +Holland nl +Niederlande nl +Κάτω Χώρες nl +Nederlando nl +Países Bajos nl +Holland nl +Holanda nl +هلند nl +Alankomaat nl +Háland nl +Pays bas nl +Países Baixos nl +הולנד nl +Nizozemska nl +Hollandia nl +Belanda nl +Holland nl +Paesi Bassi nl +オランダ nl +네덜란드 nl +ເນເທີແລນ์ nl +Olandija nl +NÄ«derlande nl +Nederland nl +Nederland nl +Nederland nl +Holanda nl +Holandia nl +Países Baixos nl +Holanda nl +Olanda nl +Нидерланды nl +Holandsko nl +Nizozemska nl +Holandija nl +I-Netherlands nl +Nederländerna nl +¦¿¾÷Ä¡óÐ nl +เนเธอร์แลนด์ nl +Hollanda nl +Голландія nl +Hà Lan nl +荷兰 nl +荷蘭 nl +Norway no +Noorweë no +النرويج no +Norveç no +Нарвэгія no +Норвегия no +Norvegia no +NorveÅ¡ka no +Noruega no +Norsko no +Norge no +Norwegen no +Νορβηγία no +Norvegio no +Noruega no +Norra no +Norvegia no +نروژ no +Norja no +Norra no +Norvège no +Noruega no +נורבגיה no +NorveÅ¡ka no +Norvégia no +Norwegia no +Noregur no +Norvegia no +ノルウェー no +노르웨이 no +ນໍເວ no +Norvegija no +Norvēģija no +NorveÄ¡ja no +Norge no +Noorwegen no +Noreg no +Noruega no +Norwegia no +Noruega no +Noruega no +Norvegia no +Норвегия no +Nórsko no +NorveÅ¡ka no +NorveÅ¡ka no +I-Norway no +Norge no +¿¡÷§Å no +นอร์เวย์ no +Norveç no +Норвегія no +Na uy no +挪威 no +挪威 no +Nepal np +Нэпал np +Непал np +Nepál np +ເວນດາ np +尼泊尔 np +Nauru nr +Науру nr +Науру nr +Naurú nr +ປາລາກກວຍ nr +瑙鲁 nr +Niue nu +Ниуе nu +ເນ໊ຕ nu +纽埃岛 nu +New Zealand nz +Nuwe Seeland nz +نيوزيلاندا nz +Yeni Zellandiya nz +Новая Зэляндыя nz +Нова Зеландия nz +Zeland nevez nz +Novi Zeland nz +Nova Zelanda nz +Nový Zéland nz +Neuseeland nz +Νέα Ζηλανδία nz +Novzelando nz +Nueva Zelanda nz +Uus-Meremaa nz +Zelanda Berria nz +زلاندنو nz +Uusi-Seelanti nz +Nýsæland nz +Nouvelle Zélande nz +Nova Celandia nz +ניו זילנד nz +Novi Zeland nz +Új-Zéland nz +Selandia Baru nz +Nýja Sjáland nz +Nuova Zelanda nz +ニュージーランド nz +뉴질랜드 nz +ນີວຊີແລນ nz +Naujoji Zelandija nz +JaunZēlande nz +Nieuw Zeeland nz +Navera Zelanda nz +Nowa Zelandia nz +Nova Zelândia nz +Nova Zelândia nz +Noua Zeelandă nz +Новая Зеландия nz +Nový Zéland nz +Nova Zelandija nz +Novi Zeland nz +I-New Zealand nz +Nya Zeeland nz +¿¢äº¢Ä¡óÐ nz +นิวซีแลนด์ nz +Yeni Zelanda nz +Нова Зеландія nz +Nouve Zelande nz +新西兰 nz +紐西蘭 nz +Oman om +عُمان om +Аман om +Оман om +Omán om +Ομάν om +Omano om +Omán om +Omaan om +عمان om +עומן om +Omán om +オマーン om +오만 om +ເຍີຍລະມັນ om +Omanas om +Omã om +Оман om +Omán om +I-Oman om +µÁý om +Umman om +Оман om + Oman om +阿曼 om +阿曼 om +Panama pa +بنما pa +Панама pa +Панама pa +Panamà pa +Παναμάς pa +Panamo pa +Panamá pa +پاناما pa +Panamá pa +פנמה pa +パナマ pa +파나마 pa +ປານາມາ pa +Panamá pa +Panamá pa +Панама pa +I-Panama pa +ÀÉ¡Á¡ pa +ปานามา pa +Панама pa +巴拿马 pa +巴拿馬 pa +Peru pe +البيرو pe +Пэру pe +Перу pe +Perou pe +Perú pe +Περού pe +Peruo pe +Perú pe +Peruu pe +پرو pe +Pérou pe +Perú pe +פרו pe +Perú pe +Perù pe +ペルー pe +페루 pe +ເປລູ pe +PerÅ« pe +Pero pe +Perú pe +Перу pe +I-Peru pe +¦ÀÕ pe +เปรู pe +Перу pe +Perou pe +秘鲁 pe +秘魯 pe +French Polynesia pf +Француская Палінэзія pf +Френска Полинезия pf +Francuska Polinezija pf +Fransk Polynesien pf +Polinesia francesa pf +Polinesia Frantziarra pf +Francia-Polinézia pf +ຝຣັ່ງເສດ pf +Polinésia Francesa pf +Francúzska Polynézia pf +Francoska Polinezija pf +Franska Polynesien pf +法属波利尼西亚 pf +Papua New Guinea pg +Папуа–Новая Гвінэя pg +Папуа и Нова Гвинея pg +Papua Nova Gvineja pg +Papua Nueva Guinea pg +Papua Ginea Berria pg +Pápua Új-Guinea pg +ເທົາອ່ອນ pg +Nova Guiné Papua pg +Papua Nová Guinea pg +Papua Nova Gvineja pg +Papua Nya Guinea pg +巴布亚新几内亚 pg +Philippines ph +Філіпіны ph +Филипини ph +Filipini ph +Filippinerne ph +Filipinas ph +Filipinak ph +Fülöp-szigetek ph +ອາລະປະໂຫຍດ ph +Filipinas ph +Filipíny ph +Filipini ph +Filippinerna ph +菲律宾 ph +Pakistan pk +Пакістан pk +Пакистан pk +Pakisztán pk +ລງບ pk +Paquistão pk +巴基斯坦 pk +Poland pl +Poolland pl +بولندا pl +Polşa pl +Польшча pl +Полша pl +Polonia pl +Poljska pl +Polònia pl +Polsko pl +Polen pl +Polen pl +Πολωνία pl +Pollando pl +Polonia pl +Poola pl +Polonia pl +لهستان pl +Puola pl +Pólland pl +Pologne pl +Polonia pl +פולין pl +Poljska pl +Lengyelország pl +Polandia pl +Pólland pl +Polonia pl +ポーランド pl +폴란드 pl +ໂປແລນ pl +Lenkija pl +Polija pl +Polonja pl +Polen pl +Polen pl +Polen pl +Polònia pl +Polska pl +Polónia pl +Polônia pl +Polonia pl +Польша pl +Poľsko pl +Poljska pl +Poljska pl +I-Poland pl +Polen pl +§À¡Ä¡óÐ pl +โปแลนด์ pl +Polonya pl +Польща pl +Pholandi pl +Ba Lan pl +Pologne pl +波兰 pl +波蘭 pl +Saint Pierre and Miquelon pm +Sveti Pjer i Migelon pm +Saint Pierre og Miquelon pm +Saint Pierre y Miquelon pm +Saint Pierre eta Miquelon pm +Saint Pierre és Miquelon pm +Saint Pierre e Miquelon pm +Saint Pierre a Miquelon pm +Sveti Pierre in Miquelon pm +Saint Pierre och Miquelon pm +圣皮埃尔和密克隆岛 pm +Pitcairn pn +Pitkern pn +ລງບ pn +Puerto Rico pr +Пуерто Рико pr +Portoriko pr +ໂປຣໂຕຄອນ pr +Porto Rico pr +Portoriko pr +波多尼各 pr +Palestinian Territory ps +Palesteinse Gebied ps +السلطة الفلسطينية ps +Палестынская тэрыторыя ps +Палестина ps +Palestinska teritorija ps +Territori Palestí ps +Palestinské území ps +Palæstinensiske selvstyreomrÃ¥der ps +Palästinensisches Gebiet ps +Παλαιστίνη ps +Palestinaj teritorioj ps +Territorio palestino ps +Palestiina territoorium ps +Palestina ps +فلسطین ps +Palestiinalaisalue ps +Palestinensiska økið ps +Territoire palestinien ps +השטחים הפלסטיניים ps +Palestinski teritorij ps +Palesztin területek ps +Territori palestinesi ps +パレスチナ自治区 ps +팔레스타인 자치구 ps +ການພິມຜິດພາດ ps +Palestinos teritorija ps +Palestina ps +Palestinske territorier ps +Palestijns territorium ps +Palestinske territorium ps +Bohwa bja Palestina ps +Palestyna ps +Território Palestiniano ps +Território Palestino ps +Teritoriul Palestinian ps +Палестинские территории ps +Palestínske územia ps +Palestinski teritorij ps +I-Palestinian Territory ps +Palestina ps +À¡Äо£É ¬¨½Âõ ps +Filistin Bölgesi ps +Палестинська територія ps +Mukano wa maphalesitina ps +Palestene ps +Umhlaba wePalestina ps +巴勒斯坦地区 ps +巴勒斯坦領地 ps +Indawo yama-Phalesitina ps +Portugal pt +البرتغال pt +Portuqaliya pt +Партугалія pt +Португалия pt +Portugalsko pt +Πορτογαλία pt +Portugalo pt +پرتغال pt +Portugali pt +פורטוגל pt +Portugália pt +Portúgal pt +Portogallo pt +ポルトガル pt +포르투갈 pt +ໂປຣຕຸເກສ pt +Portugalija pt +Portugāle pt +Portugall pt +Portugalia pt +Portugalia pt +Португалия pt +Portugalsko pt +Portugalska pt +I-Portugal pt +§À¡÷òиø pt +โปรตุเกส pt +Portekiz pt +Португалія pt +BềEĐào Nha pt +葡萄牙 pt +葡萄牙 pt +Palau pw +Палау pw +Палау pw +ມອລຕາ pw +帕劳群岛 pw +Paraguay py +Paraguaai py +باراغواي py +Paraqvay py +Парагвай py +Парагвай py +Paragvaj py +Paraguai py +Παραγουάη py +Paragvajo py +Paraguai py +پاراگویه py +Paraguai py +פרגואי py +Paragvaj py +パラグアイ py +파라과이 py +ປາລາກກວຍ py +Paragvajus py +Paragvaja py +Paragwaj py +Paraguai py +Paragwaj py +Paraguai py +Paraguai py +Paraguai py +Парагвай py +Portugalsko py +Paragvaj py +Paragvaj py +I-Paraguay py +Àá̧Å py +ปารากวัย py +Парагвай py +Paragway py +巴拉圭 py +巴拉圭 py +Qatar qa +قطر qa +Катар qa +Катар qa +Katar qa +Katar qa +Katar qa +Κατάρ qa +Kataro qa +Katar qa +قطر qa +Katar qa +קטר qa +Katar qa +Katar qa +カタール qa +카타르 qa +ມອລຕາ qa +Katar qa +Катар qa +Katar qa +Katar qa +I-Qatar qa +¸¾¡÷ qa +Katar qa +Катар qa +卡塔尔 qa +卡達 qa +Romania ro +Romenië ro +رومانيا ro +Rumıniya ro +Румынія ro +Румъния ro +Roumania ro +Rumunija ro +Rumunsko ro +Rumænien ro +Rumänien ro +Ρουμανία ro +Rumanio ro +Rumanía ro +Rumeenia ro +Errumania ro +رومانی ro +Rumenia ro +Roumanie ro +Romanía ro +רומניה ro +Rumunjska ro +Románia ro +Rumania ro +Rúmenía ro +ルーマニア ro +루마니아 ro +ໂລມາເນີຍ ro +Rumunija ro +Rumānija ro +Rumanija ro +Roemenië ro +Rumunia ro +Roménia ro +Romênia ro +Румыния ro +Rumunsko ro +Romunija ro +Rumunija ro +I-Romania ro +Rumänien ro +Õ§Áɢ¡ ro +โรมาเนีย ro +Romanya ro +Румунія ro +Ru ma ni ro +Roumaneye ro +罗马尼亚 ro +羅馬尼亞 ro +Russia ru +Rusland ru +روسيا ru +Rusiya ru +Расея ru +Русия ru +Rusia ru +Rusija ru +Rússia ru +Rusko ru +Rusland ru +Russland ru +Ρωσία ru +Ruslando ru +Rusia ru +Venemaa ru +Errusia ru +روسیه ru +Venäjä ru +Russland ru +Russie ru +Rusia ru +רוסיה ru +Rusija ru +Oroszország ru +Rusia ru +Rússland ru +ロシア ru +러시아 ru +ລັດເຊີຍ ru +Rusija ru +Krievija ru +Russja ru +Russland ru +Rusland ru +Russland ru +Rosja ru +Rússia ru +Rússia ru +Rusia ru +Россия ru +Rusko ru +Rusija ru +Rusija ru +I-Russia ru +Ryssland ru +ú¢Â¡ ru +รัสเซีย ru +Rusya ru +Росія ru +Rashia ru +Nga ru +Russeye ru +Rashiya ru +俄罗斯 ru +俄羅斯 ru +Rwanda rw +Руанда rw +Руанда rw +Ruanda rw +Ruanda rw +Ruanda rw +ແພນດ້າ rw +Ruanda rw +Ruanda rw +卢旺达 rw +Saudi Arabia sa +Saudi Arabië sa +السعودية sa +Саудаўская Арабія sa +Саудитска Арабия sa +Saudijska Arabija sa +Aràbia Saudí sa +Saúdská Arábie sa +Saudi Arabien sa +Saudi-Arabien sa +Σαουδική Αραβία sa +SaÅ­di-Arabio sa +Arabia Saudí sa +Saudi Araabia sa +عربستان سعودی sa +Saudi-Arabia sa +Arabie Saoudite sa +ערב הסעודית sa +Saudijska Arabija sa +Szaúd-Arábia sa +Arabia saudita sa +サウジアラビア sa +사우디 아라비아 sa +ອາລະບິກ sa +Saudi Arabija sa +Għarabja Sawdita sa +Saudi-Arabia sa +Saudi-Arabië sa +Saudi-Arabia sa +Arabia Saudyjska sa +Arábia Saudita sa +Arábia Saudita sa +Arabia Saudită sa +Саудовская Аравия sa +Saudská arábia sa +Saudova Arabija sa +I-Saudi Arabia sa +Saudiarabien sa +º×¾¢ «§ÃÀ¢Â¡ sa +Suudi Arabistan sa +Саудівська Аравія sa +沙特阿拉伯 sa +沙烏地阿拉伯 sa +Solomon Islands sb +Саламонавы астравы sb +Соломонови Острови sb +Solomonska ostrva sb +Salomon-øerne sb +Islas Salomón sb +Solomon Irlak sb +Salamon-szigetek sb +ສະໂລວະເນີຍ sb +Ilhas Salomão sb +Å alamúnove ostrovy sb +Solomonovi otoki sb +Salomonöarna sb +所罗门群岛 sb +Seychelles sc +Сэйшэлы sc +Сейшелски острови sc +SejÅ¡eli sc +Seychellerne sc +ເຊລ sc +SejÅ¡eli sc +Seychellerna sc +塞舌尔 sc +Sudan sd +السودان sd +Судан sd +Судан sd +Sudán sd +Σουδάν sd +Sudano sd +Sudán sd +Sudaan sd +سودان sd +Sudania sd +Soudan sd +סודן sd +Szudán sd +Súdan sd +スーダン sd +수단 sd +ຊູດານ sd +Sudanas sd +Sudāna sd +Sudão sd +Sudão sd +Судан sd +Sudán sd +I-Sudan sd +ݼ¡ý sd +ซูดาน sd +Судан sd +Sudani sd +Soudan sd +苏丹 sd +蘇丹 sd +Sweden se +Swede se +السويد se +İsveç se +Швэцыя se +Швеция se +Sveden se +Å vedska se +Suècia se +Å védsko se +Sverige se +Schweden se +Σουηδία se +Svedio se +Suecia se +Rootsi se +Suedia se +سوید se +Ruotsi se +Svøriki se +Suède se +Suecia se +שבדיה se +Å vedska se +Svédország se +Swedia se +Svíþjóð se +Svezia se +スウェーデン se +스웨덴 se +ສະວີເດນ se +Å vedija se +Zviedrija se +Svezja se +Sverige se +Zweden se +Sverige se +Suècia se +Szwecja se +Suécia se +Suécia se +Suedia se +Швеция se +Å védsko se +Å vedska se +Å vedska se +I-Sweden se +Sverige se +ÍÅ£¼ý se +สวีเดน se +İsveç se +Швеція se +Swidene se +Thuỵ Điển se +瑞典 se +瑞典 se +Singapore sg +Сынгапур sg +Сингапур sg +Singapur sg +Singapur sg +Szingapúr sg +ໂຊນາ sg +Singapura sg +Singapur sg +Singapur sg +新加坡 sg +Saint Helena sh +Свети Елена sh +Sveta Helena sh +St. Helena sh +Santa Helena sh +Szent Heléna sh +ຫົວເລື່ອງ sh +Santa Helena sh +Svätá Helena sh +Sveta Helena sh +圣赫勒拿岛 sh +Slovenia si +Slovenië si +سلوفينيا si +Sloveniya si +Славенія si +Словения si +Slovenija si +Eslovenia si +Slovinsko si +Slovenien si +Slowenien si +Σλοβενία si +Slovenio si +Eslovenia si +Sloveenia si +Eslovenia si +اسلوانی si +Slovénie si +Eslovenia si +סלובניה si +Slovenija si +Szlovénia si +Slóvenía si +スロベニア si +슬로베니아 si +ສະໂລວະເນີຍ si +Slovėnija si +Slovēnija si +Slovenja si +Slovenië si +Eslovenia si +Słowenia si +Eslovénia si +Eslovênia si +Словения si +Slovinsko si +Slovenija si +Slovenija si +I-Slovenia si +Slovenien si +ͧġŢɢ¡ si +สโลเวเนีย si +Slovenya si +Словенія si +斯洛文尼亚 si +斯洛維尼亞 si +Slovakia sk +Slovakië sk +سلوفاكيا sk +Slovakiya sk +Славакія sk +Словакия sk +Slovačka sk +Eslovaquia sk +Slovensko sk +Slovakiet sk +Slowakien sk +Σλοβακία sk +Slovakujo sk +Eslovaquia sk +Slovakkia sk +Eslovakia sk +اسلواکی sk +Slovaquie sk +סלובקיה sk +Slovačka sk +Szlovákia sk +Slóvakía sk +Slovacchia sk +スロバキア sk +슬로바키아 sk +ສະໂລວັກ sk +Slovakija sk +Slovākija sk +Slovakja sk +Slovakije sk +Słowacja sk +Eslováquia sk +Eslováquia sk +Slovacia sk +Словакия sk +Slovensko sk +SlovaÅ¡ka sk +I-Slovakia sk +Slovakien sk +ͧġš츢 sk +สโลวัค sk +Slovakya sk +Словакія sk +斯洛伐克 sk +斯洛伐克 sk +San Marino sm +Сан-Марына sm +Сан Марино sm +ໂຊນາ sm +圣马力诺 sm +Senegal sn +Сэнэгал sn +Сенегал sn +Szenegál sn +ທົ່ວໄປ sn +塞内加尔 sn +Somalia so +Somalië so +صومال so +Самалі so +Сомалия so +Somalija so +Somàlia so +Somálsko so +Σομαλία so +Somalio so +Somaalia so +سومالی so +Somalie so +סומליה so +Somalija so +Szomália so +ソマリア so +소말리아 so +ໂລມາເນີຍ so +Somalis so +Somalija so +Somalie so +Somália so +Somália so +Сомали so +Somálsko so +Somalija so +I-Somalia so +§º¡Á¡Ä¢Â¡ so +Somali so +Сомалі so +Somaleye so +索马里 so +索馬利亞 so +Suriname sr +Сурынам sr +Суринам sr +Surinam sr +ເຊີເບີຍ sr +Surinam sr +Surinam sr +Surinam sr +Sao Tome and Principe st +Сан Томе и Приницпе st +Sao Tome i Principe st +Sao Tomé og Principe st +Sao Tome y Príncipe st +Sao Tome eta Principe st +Sao Tome és Principe st +ບໍລິການ st +São Tome e Príncipe st +Sao Tome a Principe st +Sao Tome in Principe st +São Tomé och Príncipe st +El Salvador sv +السلفادور sv +Сальвадор sv +Ел Салвадор sv +Salvador sv +Salvador sv +Ελ Σαλβαντόρ sv +Elsalvadoro sv +Salvador sv +السالوادور sv +Salvador sv +O Salvador sv +אל סלבדור sv +Salvador sv +エルサルバドル sv +엘살바도르 sv +ເອລຊັນວາດດໍ sv +Salvadoras sv +Salvadora sv +Salwador sv +Salvador sv +Сальвадор sv +Salvádor sv +Salvador sv +I-El Salvador sv +±ø º¡øÅ§¼¡÷ sv +เอลซัลวาดอร์ sv +Ель-Сальвадор sv +萨尔瓦多 sv +薩爾瓦多 sv +Syria sy +Sirië sy +سوريا sy +Сырыя sy +Сирия sy +Sirija sy +Síria sy +Sýrie sy +Syrien sy +Syrien sy +Συρία sy +Sirio sy +Siria sy +Süüria sy +Siria sy +سوریه sy +Syyria sy +Syrie sy +סוריה sy +Sirija sy +Szíria sy +Siria sy +シリア sy +시리아 sy +ເຊີເບີຍ sy +Sirija sy +Siria sy +Syrië sy +Síria sy +Síria sy +Siria sy +Сирия sy +Sýria sy +Sirija sy +I-Syria sy +Syrien sy +º¢Ã¢Â¡ sy +Suriye sy +Сирія sy +叙利亚 sy +敘利亞 sy +Swaziland sz +Свазылэнд sz +Свазиленд sz +Svazilend sz +Swazilandia sz +Swazilandia sz +Szváziföld sz +ລາດສະນາຈັກໄທຍ sz +Suécia sz +Swazijsko sz +Svazi sz +斯威士兰 sz +Turks and Caicos Islands tc +Turks i Kaikos ostrva tc +Turks- og Caicosøerne tc +Islas Turcos y Caicos tc +Turks eta Caicos Irlak tc +Turks- és Caicos-szigetek tc +Ilhas Caicos e Turca tc +Turks a Caicos ostrovy tc +Otoka Turks in Caicos tc +Turks- och Caicosöarna tc +特克斯和凯科斯群岛 tc +Chad td +Чад td +Чад td +Čad td +Tchad td +Txad td +Csád td +ເກມໄພ່ td +Čad td +Čad td +Tchad td +乍得 td +Togo tg +Тога tg +Того tg +ຂອງເລ່ນສະນຸກ tg +多哥 tg +Thailand th +تايلاند th +Tayland th +Тайлянд th +Тайланд th +Tajland th +Tailàndia th +Thajsko th +Ταϊλάνδη th +Tajlando th +Tailandia th +Tai th +Thailandia th +تایلند th +Thaimaa th +Tailand th +Thaïlande th +Tailandia th +תאילנד th +Tajland th +Thaiföld th +Tæland th +Tailandia th +タイ th +태국 (타이) th +ລາດສະນາຈັກໄທຍ th +Tailandas th +Taivāna th +Tajlandja th +Tailandia th +Tajlandia th +Tailândia th +Tailândia th +Tailanda th +Таиланд th +Thajsko th +Tajska th +Tajland th +I-Thailand th +¾¡öÄ¡óÐ th +ราชอาณาจักรไทย th +Tayland th +Таїланд th +Thái Lan th +Taylande th +泰国 th +泰國 th +Tajikistan tj +Таджыкістан tj +Таджикистан tj +Tadžikistan tj +Tajikistán tj +Tadzsikisztán tj +ໃຕ້ຫວັນ tj +Tajiquistão tj +Tadžikistan tj +Tadžikistan tj +Tadzjikistan tj +塔吉克斯坦 tj +Tokelau tk +Токелао tk +ເບລາລັສ tk +Turkmenistan tm +Туркмэністан tm +Туркменистан tm +Turkmenistán tm +Türkmenisztán tm +ຕຸລະກີ tm +Turquia tm +土库曼斯坦 tm +Tunisia tn +Tunisië tn +تونس tn +Туніс tn +Тунис tn +Tunis tn +Tuníssia tn +Tunisko tn +Tunesien tn +Tunesien tn +Τυνησία tn +Tunisio tn +Túnez tn +Tuneesia tn +تونس tn +Tunesia tn +Tunisie tn +תוניסיה tn +Tunis tn +Tunézia tn +チュニジア tn +튀니지 tn +ລັດເຊີຍ tn +Tunisas tn +Tuneżija tn +Tunisie tn +Tunezja tn +Tunísia tn +Tunísia tn +Тунис tn +Tunisko tn +Tunizija tn +I-Tunisia tn +Tunisien tn +ÐÉ¢º¢Â¡ tn +Tunus tn +Туніс tn +突尼斯 tn +突尼西亞 tn +Tonga to +Тонга to +Тонга to +ໂຊນາ to +汤加 to +East Timor tp +Источен Тимур tp +Istočni Timor tp +Østtimor tp +Timor oriental tp +Ekialdeko Timor tp +Kelet-Timor tp +ວັນແລະເວລາ tp +Timor Leste tp +Východný Timor tp +Vzhodni Timor tp +Östtimor tp +东帝汶 tp +Turkey tr +Turkeye tr +تركيا tr +Türkiyə tr +Турцыя tr +Турция tr +Turkia tr +Turska tr +Turquia tr +Turecko tr +Tyrkiet tr +Türkei tr +Τουρκία tr +Turkujo tr +Turquía tr +Türgi tr +Turkia tr +ترکیه tr +Turkki tr +Turkaland tr +Turquie tr +Turquía tr +טורקיה tr +Turska tr +Törökország tr +Turki tr +Tyrkland tr +Turchia tr +トルコ tr +터키 tr +ຕຸລະກີ tr +Turkija tr +Turcija tr +Turkija tr +Tyrkia tr +Turkije tr +Tyrkia tr +Turquia tr +Turcja tr +Turquia tr +Turquia tr +Turcia tr +Турция tr +Turecko tr +Turčija tr +Turska tr +I-Turkey tr +Turkiet tr +ÐÕ츢 tr +ตุรกี tr +Türkiye tr +Туреччина tr +ThềENhÄ© Kì tr +土耳其 tr +土耳其 tr +Trinidad and Tobago tt +Trinidad en Tobago tt +ترينيداد و توباغو tt +Trinidad və Tabaqo tt +Трынідад і Табага tt +Тринидад и Тобаго tt +Trinidad ha Tobago tt +Trinidad i Tobago tt +Trinidad i Tobago tt +Trinidad a Tobago tt +Trinidad og Tobago tt +Trinidad und Tobago tt +Τρίνινταντ και Τομπάγκο tt +Trinidado kaj Tobago tt +Trinidad y Tobago tt +Trinidad ja Tobago tt +Trinidad eta Tobago tt +ترینیداد و تُباگو tt +Trinidad ja Tobago tt +Trinidad og Tobago tt +Trinidad et Tobago tt +Trindade e Tobago tt +טרינידד וטובגו tt +Trinidad i Tobago tt +Trinidad és Tobago tt +Trinidad dan Tobago tt +Trinidad og Tobago tt +Trinidad e Tobago tt +トリニダードトバコ tt +트리니다드토바고 tt +ຕີນິແດດແລະໂທບາໂກ tt +Trinidadas ir Tobagas tt +Trinidada un Tobago tt +Trinidad u Tobago tt +Trinidad og Tobago tt +Trinidad en Tobago tt +Trinidad og Tobago tt +Trinidad le Tobago tt +Trinidad e Tobago tt +Trinidad i Tobago tt +Trinidade e Tobago tt +Trinidad e Tobago tt +Trinidad şi Tobago tt +Тринидад и Тобаго tt +Trinidad a Tobago tt +Trinidad in Tabago tt +Trinidad i Tobago tt +I-Trinidad kanye neTobago tt +Trinidad och Tobago tt +ðâɢ¼¡ð & ¦¼¡À¡§¸¡ tt +ตรีนิแดดและโทบาโก tt +Trinidad veTabago tt +Республіка Трінідад та Тобаго tt +Trinidad na Tobago tt +Trinidad và Tobago tt +Trinidad ne Tobago tt +特里尼达和多巴哥 tt +千里達及托貝哥 tt +Trinidad knaye ne-Tobago tt +Tuvalu tv +Тувалу tv +Тували tv +ຊູລູ tv +图瓦卢 tv +Taiwan tw +تايوان tw +Tayvan tw +Тайвань tw +Тайван tw +Tajvan tw +Ταϊβάν tw +Tajvano tw +Taiwán tw +Taivan tw +تایوان tw +Taivan tw +Taïwan tw +Taiwán tw +טיוואן tw +Tajvan tw +Tajvan tw +台湾 tw +대만 tw +ໃຕ້ຫວັນ tw +Taivanis tw +Taivāna tw +Tajwan tw +Tajwan tw +Formosa tw +Тайвань tw +Tajvan tw +Tajvan tw +I-Taiwan tw +¾¡öÅ¡ý tw +ได้หวัน tw +Tayvan tw +Тайвань tw +Đài Loan tw +中国台湾 tw +台灣 tw +Tanzania, United Republic of tz +Злучаная Рэспубліка Танзанія tz +Танзания tz +Tanzanija, Ujedinjena Republika tz +Tanzania tz +Tanzania, Republica de tz +Tanazia, Errepublika Batua tz +Tanzánia tz +ໂດມິນິກັນ tz +República da Tanzânia tz +Tanzánia, Spojená republika tz +Tanzanija, Združena republika tz +Förenade republiken Tanzania tz +坦桑尼亚 tz +Ukraine ua +Ukraïne ua +أوكرانيا ua +Ukrayna ua +Украіна ua +Украйна ua +Ukraina ua +Ukrajina ua +Ucraïna ua +Ukrajina ua +Ουκρανία ua +Ukrainio ua +Ucrania ua +Ukraina ua +Ukrania ua +اکراین ua +Ukraina ua +Ukraina ua +Ucraína ua +אוקראינה ua +Ukrajina ua +Ukrajna ua +Ukraina ua +Úkraína ua +Ucraina ua +ウクライナ ua +우크라이나 ua +ຍູເຄຣນ ua +Ukraina ua +Ukraina ua +Ukranja ua +Ukraina ua +Oekraïne ua +Ukraina ua +Ucraina ua +Ukraina ua +Ucrânia ua +Ucrânia ua +Ucraina ua +Украина ua +Ukrajina ua +Ukrajina ua +Ukrajna ua +I-Ukraine ua +Ukraina ua +¯ì¦Ãöý ua +ยูเครน ua +Ukrayna ua +Україна ua +Ukraina ua +Ucrinne ua +乌克兰 ua +烏克蘭 ua +Uganda ug +Уганда ug +Уганда ug +ແພນດ້າ ug +乌干达 ug +United States of America us +Vereenigde State van Amerika us +الولايات المتحدة الأمريكية us +Amerika Birləşmiş Ştatları us +Злучаныя Штаты Амэрыкі us +САЩ us +Stadoù-Unanet Amerika us +Sjedinjene Američke Države us +Estats Units d'Amèrica us +Spojené státy americké us +USA us +USA us +Ην. Πολιτείες της Αμερικής us +Usono us +Estados Unidos de América us +Ameerika Ühendriigid us +Amerikako Estatu Batuak us +ایالات متحده‌ی آمریکا us +Yhdysvallat us +Sambandsríki Amerika (USA) us +États Unis d'Amérique us +Estados Unidos de América us +ארצות הברית us +Sjedinjene Američke Države us +Amerikai Egyesült Államok us +Amerika Serikat us +Bandaríki Norður Ameríku us +Stati Uniti d'America us +アメリカ us +미 합중국 us +ສະຫະລັດອາເມລິກາ us +Jungtinės Amerikos Valstijos us +Amerikas Savienotās Valstis us +Stati Uniti us +USA us +Verenigde Staten van Amerika us +USA us +Estats Units d'Amèrica us +Stany Zjednoczone Ameryki us +Estados Unidos da América us +Estados Unidos us +Statele Unite ale Americii us +Соединенные Штаты Америки us +USA us +Združene države Amerike us +Sjedinjene američke države us +I-United States of America us +Amerikas förenta stater us +³ì¸¢Â «¦Áâì¸ ¿¡Î¸û us +สหรัฐอเมริกา us +Amerika Birleşik Devletleri us +США us +mashango o tangananaho a America us +MÄ© us +United States ye Melika us +美利坚合众国 us +美利堅合眾國 us +Uruguay uy +الأوروغواي uy +Uruqvay uy +Уругвай uy +Уругвай uy +Urugvaj uy +Uruguai uy +Ουρουγουάη uy +Urugvajo uy +Uruguai uy +اروگویه uy +Uruguai uy +אורוגואי uy +Urugvaj uy +ウルグアイ uy +우루과이 uy +ອຸລຸກກວຍ uy +Urugvajus uy +Urugvaja uy +Urugwaj uy +Uruguai uy +Urugwaj uy +Uruguai uy +Uruguai uy +Uruguai uy +Уругвай uy +Uruguaj uy +Urugvaj uy +Urugvaj uy +I-Uruguay uy +¯Õ̧Å uy +อุรุกวัย uy +Уругвай uy +Ourougway uy +乌拉圭 uy +烏拉圭 uy +Uzbekistan uz +Узбэкістан uz +Узбекистан uz +Uzbekistán uz +Üzbegisztán uz +ເດນ່ງນ uz +Uzbequistão uz +乌兹别克斯坦 uz +Vatican City va +Ватыкан va +Ватикана va +Vatikan va +Vatikanstaten va +Vaticano va +Batikano Hiria va +Vatikán va +ລັດເວີຍ va +Cidade do Vaticano va +Vatikán va +Vatikan va +Vatikanstaten va +梵蒂冈 va +St. Vincent and the Grenadines vc +St. Vincent en die Grenadene vc +سانت فينسنت و الغرينادين vc +St. Vincent və Grenadines vc +Сент-Винсент и Гренадине vc +S. Visant hag ar Grenadinez vc +Sveti Vincent i Grenadini vc +St. Vincent i les Granadines vc +St. Vincent a Grenadiny vc +St. Vincent og Grenadinerne vc +St. Vincent und Grenadinen vc +St. Vincent kaj la Grenadinoj vc +San Vicente y las Granadinas vc +St. Vincent ja Grenadines vc +St. Vincent eta Grenadines vc +سن وینسن و گرادینس vc +St. Vincent ja Grenadiinit vc +Sankta Vinsent og Grenadinoyggjar vc +St Vincent et les Grenadines vc +San Vicente e as Granadinas vc +סנט וינסנט והגרנדינים vc +St. Vincent és Grenadines vc +St. Vincent dan the Grenadines vc +St. Vincent og Grenadines vc +S. Vincent e the Grenadines vc +セントヴィンセントグレナディン vc +세인트 빈센트 그레나딘 vc +ເຊີນວິນແຊນ ແລະເກນາດີນ vc +Å v. Vincentas ir Grenadinai vc +Sv. Vincents un GrenadÄ«nes vc +St. Vinċenz u l-Grenadini vc +St. Vincent og Grenadinene vc +St. Vincent en de Grenadines vc +St. Vincent og Grenadinane vc +St. Vincent le Grenadines vc +St. Vincent e les Granadines vc +St. Vincent i Grenadyny vc +São Vicente e Grenadinas vc +São Vicente e Grenadines vc +Sf. Vincent şi Grenadines vc +Сент-Винсент и Гренадины vc +St. Vincent a Grenadines vc +Sv. Vincent in Grenadini vc +St. Vincent i Grenadine vc +I-St. Vincent and the Grenadines vc +St. Vincent och Grenadinerna vc +¦ºÂ¢ýð Å¢ý¦ºýð & ¸¢¦ÃÉËý¸û vc +เซนต์วินเซนต์ และ เกรนาดีน vc +St. Vincent ve Grenadines vc +Сент-Вінсент і Гренадіни vc +St. Vincent na Grenadines vc +St. Vincent và Grenadines vc +St. Vincent ne Grenadines vc +圣文森特和格林那达 vc +聖文森及格納那丁 vc +I-St. Vincent kanye ne-Grenadines vc +Venezuela ve +فنزويلا ve +Вэнэсуэла ve +Венецуела ve +Venecuela ve +Βενεζουέλα ve +Venezuelo ve +Venetsueela ve +ونزویلا ve +Venesuela ve +Vénézuela ve +ונצואלה ve +Venecuela ve +ベネズェラ ve +베네수엘라 ve +ເວເນຊຸເອລາ ve +Venesuela ve +Venecuēla ve +Veneżwela ve +Wenezuela ve +Венесуэла ve +Venecuela ve +I-Venezuela ve +¦ÅÉ¢ÍÅÄ¡ ve +เวเนซูเอลา ve +Венесуела ve +委内瑞拉 ve +委內瑞拉 ve +Virgin Islands, British vg +Вирджински Острови, Британски vg +Djevičanska ostrva, Britanska vg +Britiske jomfruøer vg +Islas Vírgenes Británicas vg +Irla Birjinak, Britaniar vg +Virgin-szigetek (brit) vg +Ilhas Virgens, Inglaterra vg +Panenské Ostrovy, Britské vg +DeviÅ¡ki otoki, Britanski vg +Brittiska Jungfruöarna vg +维尔京群岛,英国 vg +Virgin Islands, U.S. vi +Вирджински Острови, Американски vi +Djevičanska ostrva, Američka vi +Jomfruøerne vi +Islas Vírgenes Americanas vi +Irla Birjinak, EE.BB. vi +Virgin-szigetek (USA) vi +Ilhas Virgens, EUA vi +Panenské Ostrovy, Americké vi +DeviÅ¡ki otoki, ZDA vi +Amerikanska Jungfruöarna vi +维尔京群岛,美国 vi +Vietnam vn +Viëtnam vn +فييتنام vn +Vyetnam vn +Віетнам vn +Виетнам vn +Vijetnam vn +Βιετνάμ vn +Vjetnamo vn +ویتنام vn +וייטנאם vn +Vijetnam vn +Víetnam vn +ベトナム vn +베트남 vn +ຫວງດນາມ vn +Vietnamas vn +Vjetnama vn +Vjetnam vn +Viëtnam vn +Wietnam vn +Vietname vn +Vietnã vn +Вьетнам vn +I-Vietnam vn +เวียตนาม vn +В'єтнам vn +越南 vn +越南 vn +Vanuatu vu +Вануату vu +Ванути vu +ຈີນ vu +瓦努阿图 vu +Wallis and Futuna wf +Valis i Futuna wf +Wallis- og Futuna-øerne wf +Wallis y Futuna wf +Wallis eta Futuna wf +Wallis és Futuna wf +ປັກອິນພາບ wf +Wallis e Futuna wf +Wallis a Futuna wf +Wallis in Futuna wf +Wallis och Futuna wf +Samoa ws +Самоа ws +Самоя ws +Szamoa ws +ໂຊນາ ws +萨摩亚群岛 ws +Yemen ye +اليمن ye +Емен ye +Йемен ye +Jemen ye +Iemen ye +Jemen ye +Jemen ye +Υεμένη ye +Jemeno ye +Jeemen ye +یمن ye +Jemen ye +Jemen ye +תימן ye +Jemen ye +Jemen ye +イエメン ye +예멘 ye +ເດມອນ ye +Jemenas ye +Jemen ye +Jemen ye +Jemen ye +Jemen ye +Jemen ye +Iémen ye +Йемен ye +Jemen ye +Jemen ye +I-Yemen ye +Jemen ye +§ÂÁý ye +Ємен ye +也门 ye +葉門 ye +Yugoslavia yu +Югаславія yu +Югославия yu +Jugoslavija yu +Jugoslavien (Serbien/Montenegro) yu +Jugoszlávia yu +ໂບລິເວີຍ yu +Iugoslávia yu +Juhoslávia yu +Jugoslavija yu +Jugoslavien yu +南斯拉夫 yu +South Africa za +Suid Afrika za +جنوب أفريقيا za +Cənubi Afrika za +Паўднёвая Афрыка za +Южна Африка za +Suafrika za +Južna Afrika za +Sudàfrica za +Jižní Afrika za +Sydafrikanske republik za +Südafrika za +Νότια Αφρική za +Sudafriko za +Sudáfrica za +Lõuna Aafrika za +Hego Afrika za +آفریقای جنوبی za +Etelä-Afrikka za +Suðurafrika za +Afrique du sud za +África do Sur za +דרום אפריקה za +Južna Afrika za +Dél-Afrika za +Afrika Selatan za +Suður Afríka za +Sud Africa za +南アフリカ za +남 아프리카 공화국 za +ແອບພິກາໃຕ້ za +Pietų Afrika za +Dienvid Āfrika za +Afrika t'Isfel za +Sør-Afrika za +Zuid-Afrika za +Sør-Afrika za +Afrika Borwa za +Sudafrica za +Afryka Południowa za +Africa do Sul za +África do Sul za +Africa de Sud za +Южная Африка za +Južná Afrika za +Južna Afrika za +Južna Afrika za +I-South Africa za +Sydafrika za +¦¾ý ¬ôâ측 za +แอฟริกาใต้ za +Güney Afrika za +Південна Африка za +Afurika tshipembe za +Nam Phi za +Mzantsi Afrika za +南非 za +南非 za +Emzantsi Afrika za +Zambia zm +Замбія zm +Замбия zm +ຈາໄມກາ້ zm +Zâmbia zm +Zambija zm +赞比亚 zm +Zimbabwe zw +Зымбабвэ zw +Зимбабве zw +Zimbabve zw +ລິຊາ zw +Zimbabve zw +津巴布韦 zw diff --git a/src/email.cpp b/src/email.cpp new file mode 100644 index 0000000..486c249 --- /dev/null +++ b/src/email.cpp @@ -0,0 +1,138 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "email.h" + +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Email::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + mail = other.mail; + } + + QMap parameters; + QString mail; +}; + +Email::Email() + : d(new Private) +{ +} + +Email::Email(const QString &mail) + : d(new Private) +{ + d->mail = mail; +} + +Email::Email(const Email &other) + : d(other.d) +{ +} + +Email::~Email() +{ +} + +QMap Email::parameters() const +{ + return d->parameters; +} + +bool Email::operator==(const Email &other) const +{ + return (d->parameters == other.parameters()) && (d->mail == other.mail()); +} + +bool Email::operator!=(const Email &other) const +{ + return !(other == *this); +} + +Email &Email::operator=(const Email &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Email::toString() const +{ + QString str = QLatin1String("Email {\n"); + str += QStringLiteral(" mail: %1\n").arg(d->mail); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +void Email::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +void Email::setEmail(const QString &mail) +{ + d->mail = mail; +} + +QString Email::mail() const +{ + return d->mail; +} + +bool Email::isValid() const +{ + return !d->mail.isEmpty(); +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Email &email) +{ + return s << email.d->parameters << email.d->mail; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Email &email) +{ + s >> email.d->parameters >> email.d->mail; + return s; +} diff --git a/src/email.h b/src/email.h new file mode 100644 index 0000000..88ef67f --- /dev/null +++ b/src/email.h @@ -0,0 +1,74 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef EMAIL_H +#define EMAIL_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a Email for a contact. + * @since 4.14.5 + */ + +namespace KContacts { +class KCONTACTS_EXPORT Email +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Email &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Email &); +public: + /** + * Creates an empty email object. + */ + Email(); + Email(const Email &other); + Email(const QString &mail); + + ~Email(); + + typedef QVector List; + + void setEmail(const QString &mail); + Q_REQUIRED_RESULT QString mail() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Email &other) const; + Q_REQUIRED_RESULT bool operator!=(const Email &other) const; + + Email &operator=(const Email &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; + +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Email &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Email &object); +} +Q_DECLARE_TYPEINFO(KContacts::Email, Q_MOVABLE_TYPE); +#endif // EMAIL_H diff --git a/src/field.cpp b/src/field.cpp new file mode 100644 index 0000000..cba3d39 --- /dev/null +++ b/src/field.cpp @@ -0,0 +1,658 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include "field.h" + +using namespace KContacts; + +class Q_DECL_HIDDEN Field::Private +{ +public: + Private(int fieldId, int category = 0, const QString &label = QString(), const QString &key = QString(), const QString &app = QString()) + : mFieldId(fieldId) + , mCategory(category) + , mLabel(label) + , mKey(key) + , mApp(app) + { + } + + enum FieldId { + CustomField, + FormattedName, + FamilyName, + GivenName, + AdditionalName, + Prefix, + Suffix, + NickName, + Birthday, + HomeAddressStreet, + HomeAddressPostOfficeBox, + HomeAddressLocality, + HomeAddressRegion, + HomeAddressPostalCode, + HomeAddressCountry, + HomeAddressLabel, + BusinessAddressStreet, + BusinessAddressPostOfficeBox, + BusinessAddressLocality, + BusinessAddressRegion, + BusinessAddressPostalCode, + BusinessAddressCountry, + BusinessAddressLabel, + HomePhone, + BusinessPhone, + MobilePhone, + HomeFax, + BusinessFax, + CarPhone, + Isdn, + Pager, + Email, + Mailer, + Title, + Role, + Organization, + Department, + Note, + Url + }; + + int fieldId() const + { + return mFieldId; + } + + int category() const + { + return mCategory; + } + + QString label() const + { + return mLabel; + } + + QString key() const + { + return mKey; + } + + QString app() const + { + return mApp; + } + + static Field::List mAllFields; + static Field::List mDefaultFields; + static Field::List mCustomFields; + +private: + int mFieldId; + int mCategory; + + QString mLabel; + QString mKey; + QString mApp; +}; + +Field::List Field::Private::mAllFields; +Field::List Field::Private::mDefaultFields; +Field::List Field::Private::mCustomFields; + +Field::Field(Private *p) + : d(p) +{ +} + +Field::~Field() +{ + delete d; +} + +QString Field::label() +{ + switch (d->fieldId()) { + case Private::FormattedName: + return Addressee::formattedNameLabel(); + case Private::FamilyName: + return Addressee::familyNameLabel(); + case Private::GivenName: + return Addressee::givenNameLabel(); + case Private::AdditionalName: + return Addressee::additionalNameLabel(); + case Private::Prefix: + return Addressee::prefixLabel(); + case Private::Suffix: + return Addressee::suffixLabel(); + case Private::NickName: + return Addressee::nickNameLabel(); + case Private::Birthday: + return Addressee::birthdayLabel(); + case Private::HomeAddressStreet: + return Addressee::homeAddressStreetLabel(); + case Private::HomeAddressPostOfficeBox: + return Addressee::homeAddressPostOfficeBoxLabel(); + case Private::HomeAddressLocality: + return Addressee::homeAddressLocalityLabel(); + case Private::HomeAddressRegion: + return Addressee::homeAddressRegionLabel(); + case Private::HomeAddressPostalCode: + return Addressee::homeAddressPostalCodeLabel(); + case Private::HomeAddressCountry: + return Addressee::homeAddressCountryLabel(); + case Private::HomeAddressLabel: + return Addressee::homeAddressLabelLabel(); + case Private::BusinessAddressStreet: + return Addressee::businessAddressStreetLabel(); + case Private::BusinessAddressPostOfficeBox: + return Addressee::businessAddressPostOfficeBoxLabel(); + case Private::BusinessAddressLocality: + return Addressee::businessAddressLocalityLabel(); + case Private::BusinessAddressRegion: + return Addressee::businessAddressRegionLabel(); + case Private::BusinessAddressPostalCode: + return Addressee::businessAddressPostalCodeLabel(); + case Private::BusinessAddressCountry: + return Addressee::businessAddressCountryLabel(); + case Private::BusinessAddressLabel: + return Addressee::businessAddressLabelLabel(); + case Private::HomePhone: + return Addressee::homePhoneLabel(); + case Private::BusinessPhone: + return Addressee::businessPhoneLabel(); + case Private::MobilePhone: + return Addressee::mobilePhoneLabel(); + case Private::HomeFax: + return Addressee::homeFaxLabel(); + case Private::BusinessFax: + return Addressee::businessFaxLabel(); + case Private::CarPhone: + return Addressee::carPhoneLabel(); + case Private::Isdn: + return Addressee::isdnLabel(); + case Private::Pager: + return Addressee::pagerLabel(); + case Private::Email: + return Addressee::emailLabel(); + case Private::Mailer: + return Addressee::mailerLabel(); + case Private::Title: + return Addressee::titleLabel(); + case Private::Role: + return Addressee::roleLabel(); + case Private::Organization: + return Addressee::organizationLabel(); + case Private::Department: + return Addressee::departmentLabel(); + case Private::Note: + return Addressee::noteLabel(); + case Private::Url: + return Addressee::urlLabel(); + case Private::CustomField: + return d->label(); + default: + return i18n("Unknown Field"); + } +} + +int Field::category() +{ + return d->category(); +} + +QString Field::categoryLabel(int category) +{ + switch (category) { + case All: + return i18n("All"); + case Frequent: + return i18n("Frequent"); + case Address: + return i18nc("street/postal", "Address"); + case Email: + return i18n("Email"); + case Personal: + return i18n("Personal"); + case Organization: + return i18n("Organization"); + case CustomCategory: + return i18n("Custom"); + default: + return i18n("Undefined"); + } +} + +QString Field::value(const KContacts::Addressee &a) +{ + switch (d->fieldId()) { + case Private::FormattedName: + return a.formattedName(); + case Private::FamilyName: + return a.familyName(); + case Private::GivenName: + return a.givenName(); + case Private::AdditionalName: + return a.additionalName(); + case Private::Prefix: + return a.prefix(); + case Private::Suffix: + return a.suffix(); + case Private::NickName: + return a.nickName(); + case Private::Mailer: + return a.mailer(); + case Private::Title: + return a.title(); + case Private::Role: + return a.role(); + case Private::Organization: + return a.organization(); + case Private::Department: + return a.department(); + case Private::Note: + return a.note(); + case Private::Email: + return a.preferredEmail(); + case Private::Birthday: + if (a.birthday().isValid()) { + return a.birthday().date().toString(Qt::ISODate); + } else { + return QString(); + } + case Private::Url: + return a.url().url().toDisplayString(); + case Private::HomePhone: + { + PhoneNumber::List::ConstIterator it; + + { + // check for preferred number + const PhoneNumber::List list = a.phoneNumbers(PhoneNumber::Home | PhoneNumber::Pref); + PhoneNumber::List::ConstIterator end(list.end()); + for (it = list.begin(); it != end; ++it) { + if (((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home) { + return (*it).number(); + } + } + } + + { + // check for normal home number + const PhoneNumber::List list = a.phoneNumbers(PhoneNumber::Home); + PhoneNumber::List::ConstIterator end(list.end()); + for (it = list.begin(); it != end; ++it) { + if (((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Home) { + return (*it).number(); + } + } + } + + return QString(); + } + case Private::BusinessPhone: + { + PhoneNumber::List::ConstIterator it; + + { + // check for preferred number + const PhoneNumber::List list = a.phoneNumbers(PhoneNumber::Work | PhoneNumber::Pref); + PhoneNumber::List::ConstIterator end(list.end()); + for (it = list.begin(); it != end; ++it) { + if (((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work) { + return (*it).number(); + } + } + } + + { + // check for normal work number + const PhoneNumber::List list = a.phoneNumbers(PhoneNumber::Work); + for (it = list.begin(); it != list.end(); ++it) { + if (((*it).type() & ~(PhoneNumber::Pref)) == PhoneNumber::Work) { + return (*it).number(); + } + } + } + + return QString(); + } + case Private::MobilePhone: + return a.phoneNumber(PhoneNumber::Cell).number(); + case Private::HomeFax: + return a.phoneNumber(PhoneNumber::Home | PhoneNumber::Fax).number(); + case Private::BusinessFax: + return a.phoneNumber(PhoneNumber::Work | PhoneNumber::Fax).number(); + case Private::CarPhone: + return a.phoneNumber(PhoneNumber::Car).number(); + case Private::Isdn: + return a.phoneNumber(PhoneNumber::Isdn).number(); + case Private::Pager: + return a.phoneNumber(PhoneNumber::Pager).number(); + case Private::HomeAddressStreet: + return a.address(Address::Home).street(); + case Private::HomeAddressPostOfficeBox: + return a.address(Address::Home).postOfficeBox(); + case Private::HomeAddressLocality: + return a.address(Address::Home).locality(); + case Private::HomeAddressRegion: + return a.address(Address::Home).region(); + case Private::HomeAddressPostalCode: + return a.address(Address::Home).postalCode(); + case Private::HomeAddressCountry: + return a.address(Address::Home).country(); + case Private::BusinessAddressStreet: + return a.address(Address::Work).street(); + case Private::BusinessAddressPostOfficeBox: + return a.address(Address::Work).postOfficeBox(); + case Private::BusinessAddressLocality: + return a.address(Address::Work).locality(); + case Private::BusinessAddressRegion: + return a.address(Address::Work).region(); + case Private::BusinessAddressPostalCode: + return a.address(Address::Work).postalCode(); + case Private::BusinessAddressCountry: + return a.address(Address::Work).country(); + case Private::CustomField: + return a.custom(d->app(), d->key()); + default: + return QString(); + } +} + +bool Field::setValue(KContacts::Addressee &a, const QString &value) +{ + switch (d->fieldId()) { + case Private::FormattedName: + a.setFormattedName(value); + return true; + case Private::FamilyName: + a.setFamilyName(value); + return true; + case Private::GivenName: + a.setGivenName(value); + return true; + case Private::AdditionalName: + a.setAdditionalName(value); + return true; + case Private::Prefix: + a.setPrefix(value); + return true; + case Private::Suffix: + a.setSuffix(value); + return true; + case Private::NickName: + a.setNickName(value); + return true; + case Private::Mailer: + a.setMailer(value); + return true; + case Private::Title: + a.setTitle(value); + return true; + case Private::Role: + a.setRole(value); + return true; + case Private::Organization: + a.setOrganization(value); + return true; + case Private::Department: + a.setDepartment(value); + return true; + case Private::Note: + a.setNote(value); + return true; + case Private::Birthday: + a.setBirthday(QDate::fromString(value, Qt::ISODate)); + return true; + case Private::CustomField: + a.insertCustom(d->app(), d->key(), value); + return true; + default: + return false; + } +} + +QString Field::sortKey(const KContacts::Addressee &a) +{ + switch (d->fieldId()) { + case Private::FormattedName: + return a.formattedName(); + case Private::FamilyName: + return a.familyName(); + case Private::GivenName: + return a.givenName(); + case Private::AdditionalName: + return a.additionalName(); + case Private::Prefix: + return a.prefix(); + case Private::Suffix: + return a.suffix(); + case Private::NickName: + return a.nickName(); + case Private::Mailer: + return a.mailer(); + case Private::Title: + return a.title(); + case Private::Role: + return a.role(); + case Private::Organization: + return a.organization(); + case Private::Department: + return a.department(); + case Private::Note: + return a.note(); + case Private::Birthday: + if (a.birthday().isValid()) { + QDate date = a.birthday().date(); + QString key; + key.sprintf("%02d-%02d", date.month(), date.day()); + return key; + } else { + return QStringLiteral("00-00"); + } + default: + return value(a).toLower(); + } +} + +bool Field::isCustom() +{ + return d->fieldId() == Private::CustomField; +} + +Field::List Field::allFields() +{ + if (Private::mAllFields.isEmpty()) { + createField(Private::FormattedName, Frequent); + createField(Private::FamilyName, Frequent); + createField(Private::GivenName, Frequent); + createField(Private::AdditionalName); + createField(Private::Prefix); + createField(Private::Suffix); + createField(Private::NickName, Personal); + createField(Private::Birthday, Personal); + createField(Private::HomeAddressStreet, Address | Personal); + createField(Private::HomeAddressPostOfficeBox, Address | Personal); + createField(Private::HomeAddressLocality, Address | Personal); + createField(Private::HomeAddressRegion, Address | Personal); + createField(Private::HomeAddressPostalCode, Address | Personal); + createField(Private::HomeAddressCountry, Address | Personal); + createField(Private::HomeAddressLabel, Address | Personal); + createField(Private::BusinessAddressStreet, Address | Organization); + createField(Private::BusinessAddressPostOfficeBox, Address | Organization); + createField(Private::BusinessAddressLocality, Address | Organization); + createField(Private::BusinessAddressRegion, Address | Organization); + createField(Private::BusinessAddressPostalCode, Address | Organization); + createField(Private::BusinessAddressCountry, Address | Organization); + createField(Private::BusinessAddressLabel, Address | Organization); + createField(Private::HomePhone, Personal | Frequent); + createField(Private::BusinessPhone, Organization | Frequent); + createField(Private::MobilePhone, Frequent); + createField(Private::HomeFax); + createField(Private::BusinessFax); + createField(Private::CarPhone); + createField(Private::Isdn); + createField(Private::Pager); + createField(Private::Email, Email | Frequent); + createField(Private::Mailer, Email); + createField(Private::Title, Organization); + createField(Private::Role, Organization); + createField(Private::Organization, Organization); + createField(Private::Department, Organization); + createField(Private::Note); + createField(Private::Url); + } + + return Private::mAllFields; +} + +Field::List Field::defaultFields() +{ + if (Private::mDefaultFields.isEmpty()) { + createDefaultField(Private::FormattedName); + createDefaultField(Private::Email); + } + + return Private::mDefaultFields; +} + +void Field::createField(int id, int category) +{ + Private::mAllFields.append(new Field(new Private(id, category))); +} + +void Field::createDefaultField(int id, int category) +{ + Private::mDefaultFields.append(new Field(new Private(id, category))); +} + +void Field::deleteFields() +{ + Field::List::ConstIterator it; + + for (it = Private::mAllFields.constBegin(); it != Private::mAllFields.constEnd(); ++it) { + delete(*it); + } + Private::mAllFields.clear(); + + for (it = Private::mDefaultFields.constBegin(); it != Private::mDefaultFields.constEnd(); ++it) { + delete(*it); + } + Private::mDefaultFields.clear(); + + for (it = Private::mCustomFields.constBegin(); it != Private::mCustomFields.constEnd(); ++it) { + delete(*it); + } + Private::mCustomFields.clear(); +} + +void Field::saveFields(const QString &identifier, const Field::List &fields) +{ + KConfigGroup cg(KSharedConfig::openConfig(), "KABCFields"); + + saveFields(cg, identifier, fields); +} + +void Field::saveFields(KConfigGroup &cfg, const QString &identifier, const Field::List &fields) +{ + QList fieldIds; + + int custom = 0; + Field::List::ConstIterator it; + fieldIds.reserve(fields.count()); + for (it = fields.begin(); it != fields.end(); ++it) { + fieldIds.append((*it)->d->fieldId()); + if ((*it)->isCustom()) { + QStringList customEntry; + customEntry << (*it)->d->label(); + customEntry << (*it)->d->key(); + customEntry << (*it)->d->app(); + cfg.writeEntry(QLatin1String("KCONTACTS_CustomEntry_") + identifier + QLatin1Char('_') + +QString::number(custom++), customEntry); + } + } + + cfg.writeEntry(identifier, fieldIds); +} + +Field::List Field::restoreFields(const QString &identifier) +{ + KConfigGroup cg(KSharedConfig::openConfig(), "KABCFields"); + + return restoreFields(cg, identifier); +} + +Field::List Field::restoreFields(const KConfigGroup &cfg, const QString &identifier) +{ + const QList fieldIds = cfg.readEntry(identifier, QList()); + + Field::List fields; + + int custom = 0; + QList::ConstIterator it; + fields.reserve(fieldIds.count()); + for (it = fieldIds.begin(); it != fieldIds.end(); ++it) { + Private *f = nullptr; + if ((*it) == Private::CustomField) { + QStringList customEntry = cfg.readEntry(QLatin1String("KCONTACTS_CustomEntry_") + +identifier + QLatin1Char('_') + +QString::number(custom++), QStringList()); + f = new Private(*it, CustomCategory, customEntry[ 0 ], + customEntry[ 1 ], customEntry[ 2 ]); + } else { + f = new Private(*it); + } + fields.append(new Field(f)); + } + + return fields; +} + +bool Field::equals(Field *field) +{ + bool sameId = (d->fieldId() == field->d->fieldId()); + + if (!sameId) { + return false; + } + + if (d->fieldId() != Private::CustomField) { + return true; + } + + return d->key() == field->d->key(); +} + +Field *Field::createCustomField(const QString &label, int category, const QString &key, const QString &app) +{ + Field *field = new Field(new Private(Private::CustomField, + category | CustomCategory, + label, key, app)); + Private::mCustomFields.append(field); + + return field; +} diff --git a/src/field.h b/src/field.h new file mode 100644 index 0000000..f5f102a --- /dev/null +++ b/src/field.h @@ -0,0 +1,234 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_FIELD_H +#define KCONTACTS_FIELD_H + +#include "addressee.h" +#include + +class KConfigGroup; + +namespace KContacts { +/** + * @short Represents a field in the Addressbook + * + * This class represents a field in the Addressbook database. + * It provides methods for accessing meta-information about + * the field (such as label() or category()) as well as + * getting or setting the field's value in an instance of + * Addressee (value(), setValue()). + * + * Furthermore, some static methods are provided for getting + * a list of all fields (allFields(), defaultFields()), for + * creating new fields (createCustomField()) and for saving + * or loading fields to/from a config file (saveFields(), + * restoreFields()). + */ +class KCONTACTS_EXPORT Field +{ +public: + /** + * This type is used for a list of fields. + */ + typedef QList List; + + /** + * Represents the category a field belongs to. + */ + enum FieldCategory { + /** + * All fields + */ + All = 0x0, + /** + * Frequently used fields + */ + Frequent = 0x01, + /** + * Fields which belong to the address, such as Street, City, Zip, etc. + */ + Address = 0x02, + /** + * Fields which store information about the e-mail contact, such as + * e-mail address or mail client + */ + Email = 0x04, + /** + * Personal fields, such as Birthday, Home Address fields, IM Address, etc. + */ + Personal = 0x08, + /** + * Fields about the organization, such as Business Address fields, Department, + * Profession, etc. + */ + Organization = 0x10, + /** + * Custom (user-defined) fields + */ + CustomCategory = 0x20 + }; + + /** + * Returns the translated label for this field. + */ + Q_REQUIRED_RESULT virtual QString label(); + + /** + * Returns the ored categories the field belongs to. + */ + Q_REQUIRED_RESULT virtual int category(); + + /** + * Returns the translated label for @p category. + * + * @param category the category of type FieldCategory + * @return the translated label + */ + static QString categoryLabel(int category); + + /** + * Returns a string representation of the value the field has in the given + * Addressee. + * + * @return the string representation of the value or QString(), if it + * is not possible to convert the value to a string. + */ + Q_REQUIRED_RESULT virtual QString value(const KContacts::Addressee &addressee); + + /** + * Sets the value of the field in the given Addressee. + * + * @return @c true on success or @c false, if the given string couldn't + * be converted to a valid value. + */ + Q_REQUIRED_RESULT virtual bool setValue(KContacts::Addressee &addressee, const QString &value); + + /** + * Returns a string, that can be used for sorting. + */ + Q_REQUIRED_RESULT QString sortKey(const KContacts::Addressee &addressee); + + /** + * Returns, if the field is a user-defined field. + * + * @return @c true if this is a custom field, @c false otherwise + */ + Q_REQUIRED_RESULT virtual bool isCustom(); + + /** + * Returns, if the field is equal with @p field. + * + * @param field the field to compare this field to + * @return @c true if the fields are equal, @c false otherwise + */ + Q_REQUIRED_RESULT virtual bool equals(Field *field); + + /** + * Returns a list of all fields. + */ + static Field::List allFields(); + + /** + * Returns a list of the default fields. + */ + Q_REQUIRED_RESULT static Field::List defaultFields(); + + /** + * Creates a custom field. + * + * @param label The label for this field + * @param category The category of this field + * @param key Unique key for this field + * @param app Unique app name for this field + */ + static Field *createCustomField(const QString &label, int category, const QString &key, const QString &app); + + /** + * Delete all fields from list. + */ + static void deleteFields(); + + /** + * Save the field settings to a config file. + * + * @param cfg The config file object + * @param identifier The unique identifier + * @param fields The list of the fields + */ + static void saveFields(KConfigGroup &cfg, const QString &identifier, const Field::List &fields); + /** + * @overload + * + * Here, the list is stored in KSharedConfig::openConfig() in group "KABCFields". + * + * @param identifier The unique identifier + * @param fields The list of the fields + */ + static void saveFields(const QString &identifier, const Field::List &fields); + + /** + * Load the field settings from a config file. + * + * @param cfg The config file object + * @param identifier The unique identifier + */ + static Field::List restoreFields(const KConfigGroup &cfg, const QString &identifier); + + /** + * @overload + * + * Here, the list is loaded from KSharedConfig::openConfig() from group "KABCFields". + * + * @param identifier The unique identifier + */ + static Field::List restoreFields(const QString &identifier); + +protected: + /** + * @internal + * + * Creates a field and appends it to the general list of fields. + * + * @param id The identifier for the field + * @param category The optional category for the field + */ + static void createField(int id, int category = 0); + + /** + * @internal + * + * Creates a field and appends it to the list of default fields. + * + * @param id The identifier for the field + * @param category The optional category for the field + */ + static void createDefaultField(int id, int category = 0); + +private: + class Private; + + Field(Private *p); + virtual ~Field(); + + Private *const d; +}; +} +#endif diff --git a/src/fieldgroup.cpp b/src/fieldgroup.cpp new file mode 100644 index 0000000..7835049 --- /dev/null +++ b/src/fieldgroup.cpp @@ -0,0 +1,150 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "fieldgroup.h" + +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN FieldGroup::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + fieldGroupName = other.fieldGroupName; + value = other.value; + } + + QMap parameters; + QString fieldGroupName; + QString value; +}; + +FieldGroup::FieldGroup() + : d(new Private) +{ +} + +FieldGroup::FieldGroup(const FieldGroup &other) + : d(other.d) +{ +} + +FieldGroup::FieldGroup(const QString &FieldGroupName) + : d(new Private) +{ + d->fieldGroupName = FieldGroupName; +} + +FieldGroup::~FieldGroup() +{ +} + +void FieldGroup::setFieldGroupName(const QString &fieldGroup) +{ + d->fieldGroupName = fieldGroup; +} + +QString FieldGroup::fieldGroupName() const +{ + return d->fieldGroupName; +} + +bool FieldGroup::isValid() const +{ + return !d->fieldGroupName.isEmpty(); +} + +void FieldGroup::setValue(const QString &value) +{ + d->value = value; +} + +QString FieldGroup::value() const +{ + return d->value; +} + +void FieldGroup::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap FieldGroup::parameters() const +{ + return d->parameters; +} + +bool FieldGroup::operator==(const FieldGroup &other) const +{ + return (d->parameters == other.parameters()) && (d->fieldGroupName == other.fieldGroupName()) && (d->value == other.value()); +} + +bool FieldGroup::operator!=(const FieldGroup &other) const +{ + return !(other == *this); +} + +FieldGroup &FieldGroup::operator=(const FieldGroup &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString FieldGroup::toString() const +{ + QString str = QLatin1String("FieldGroup {\n"); + str += QStringLiteral(" FieldGroupName: %1 Value %2\n").arg(d->fieldGroupName).arg(d->value); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const FieldGroup &fieldGroup) +{ + return s << fieldGroup.d->parameters << fieldGroup.d->fieldGroupName << fieldGroup.d->value; +} + +QDataStream &KContacts::operator>>(QDataStream &s, FieldGroup &fieldGroup) +{ + s >> fieldGroup.d->parameters >> fieldGroup.d->fieldGroupName >> fieldGroup.d->value; + return s; +} diff --git a/src/fieldgroup.h b/src/fieldgroup.h new file mode 100644 index 0000000..e01c8ca --- /dev/null +++ b/src/fieldgroup.h @@ -0,0 +1,73 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef FIELDGROUP_H +#define FIELDGROUP_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a FieldGroup for a contact. + * @since 5.3 + */ + +namespace KContacts { +class KCONTACTS_EXPORT FieldGroup +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const FieldGroup &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, FieldGroup &); +public: + FieldGroup(); + FieldGroup(const FieldGroup &other); + FieldGroup(const QString &fieldGroupName); + + ~FieldGroup(); + + typedef QVector List; + + void setFieldGroupName(const QString &fieldGroup); + Q_REQUIRED_RESULT QString fieldGroupName() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setValue(const QString &value); + Q_REQUIRED_RESULT QString value() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const FieldGroup &other) const; + Q_REQUIRED_RESULT bool operator!=(const FieldGroup &other) const; + + FieldGroup &operator=(const FieldGroup &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const FieldGroup &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, FieldGroup &object); +} +Q_DECLARE_TYPEINFO(KContacts::FieldGroup, Q_MOVABLE_TYPE); +#endif // FIELDGROUP_H diff --git a/src/gender.cpp b/src/gender.cpp new file mode 100644 index 0000000..08be81a --- /dev/null +++ b/src/gender.cpp @@ -0,0 +1,128 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "gender.h" + +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Gender::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + comment = other.comment; + gender = other.gender; + } + + QString gender; + QString comment; +}; + +Gender::Gender() + : d(new Private) +{ +} + +Gender::Gender(const QString &gender) + : d(new Private) +{ + d->gender = gender; +} + +Gender::Gender(const Gender &other) + : d(other.d) +{ +} + +Gender::~Gender() +{ +} + +bool Gender::operator==(const Gender &other) const +{ + return (d->comment == other.comment()) && (d->gender == other.gender()); +} + +bool Gender::operator!=(const Gender &other) const +{ + return !(other == *this); +} + +Gender &Gender::operator=(const Gender &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Gender::toString() const +{ + QString str = QLatin1String("Gender {\n"); + str += QStringLiteral(" gender: %1\n").arg(d->gender); + str += QStringLiteral(" comment: %1\n").arg(d->comment); + str += QLatin1String("}\n"); + return str; +} + +void Gender::setGender(const QString &gender) +{ + d->gender = gender; +} + +QString Gender::gender() const +{ + return d->gender; +} + +void Gender::setComment(const QString &comment) +{ + d->comment = comment; +} + +QString Gender::comment() const +{ + return d->comment; +} + +bool Gender::isValid() const +{ + return !d->gender.isEmpty() || !d->comment.isEmpty(); +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Gender &gender) +{ + return s << gender.d->comment << gender.d->gender; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Gender &gender) +{ + s >> gender.d->comment >> gender.d->gender; + return s; +} diff --git a/src/gender.h b/src/gender.h new file mode 100644 index 0000000..7e34489 --- /dev/null +++ b/src/gender.h @@ -0,0 +1,70 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef GENDER_H +#define GENDER_H +#include "kcontacts_export.h" +#include +#include + +/** @short Class that holds a Gender for a contact. + * @since 4.14.5 + */ + +namespace KContacts { +class KCONTACTS_EXPORT Gender +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Gender &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Gender &); +public: + /** + * Creates an empty Gender object. + */ + Gender(); + Gender(const Gender &other); + Gender(const QString &gender); + + ~Gender(); + + void setGender(const QString &gender); + Q_REQUIRED_RESULT QString gender() const; + + void setComment(const QString &comment); + Q_REQUIRED_RESULT QString comment() const; + + Q_REQUIRED_RESULT bool isValid() const; + + Q_REQUIRED_RESULT bool operator==(const Gender &other) const; + Q_REQUIRED_RESULT bool operator!=(const Gender &other) const; + + Q_REQUIRED_RESULT Gender &operator=(const Gender &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; + +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Gender &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Gender &object); +} +Q_DECLARE_TYPEINFO(KContacts::Gender, Q_MOVABLE_TYPE); +#endif // GENDER_H diff --git a/src/geo.cpp b/src/geo.cpp new file mode 100644 index 0000000..5cda657 --- /dev/null +++ b/src/geo.cpp @@ -0,0 +1,174 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "geo.h" + +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Geo::Private : public QSharedData +{ +public: + Private() + : mLatitude(91) + , mLongitude(181) + , mValidLatitude(false) + , mValidLongitude(false) + { + } + + Private(const Private &other) + : QSharedData(other) + { + mLatitude = other.mLatitude; + mLongitude = other.mLongitude; + mValidLatitude = other.mValidLatitude; + mValidLongitude = other.mValidLongitude; + } + + float mLatitude; + float mLongitude; + + bool mValidLatitude; + bool mValidLongitude; +}; + +Geo::Geo() + : d(new Private) +{ +} + +Geo::Geo(float latitude, float longitude) + : d(new Private) +{ + setLatitude(latitude); + setLongitude(longitude); +} + +Geo::Geo(const Geo &other) + : d(other.d) +{ +} + +Geo::~Geo() +{ +} + +void Geo::setLatitude(float latitude) +{ + if (latitude >= -90 && latitude <= 90) { + d->mLatitude = latitude; + d->mValidLatitude = true; + } else { + d->mLatitude = 91; + d->mValidLatitude = false; + } +} + +float Geo::latitude() const +{ + return d->mLatitude; +} + +void Geo::setLongitude(float longitude) +{ + if (longitude >= -180 && longitude <= 180) { + d->mLongitude = longitude; + d->mValidLongitude = true; + } else { + d->mLongitude = 181; + d->mValidLongitude = false; + } +} + +float Geo::longitude() const +{ + return d->mLongitude; +} + +bool Geo::isValid() const +{ + return d->mValidLatitude && d->mValidLongitude; +} + +bool Geo::operator==(const Geo &other) const +{ + if (!other.isValid() && !isValid()) { + return true; + } + + if (!other.isValid() || !isValid()) { + return false; + } + + if (other.d->mLatitude == d->mLatitude && other.d->mLongitude == d->mLongitude) { + return true; + } + + return false; +} + +bool Geo::operator!=(const Geo &other) const +{ + return !(*this == other); +} + +Geo &Geo::operator=(const Geo &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Geo::toString() const +{ + QString str = QLatin1String("Geo {\n"); + str += QStringLiteral(" Valid: %1\n"). + arg(isValid() ? QStringLiteral("true") : QStringLiteral("false")); + str += QStringLiteral(" Latitude: %1\n").arg(d->mLatitude); + str += QStringLiteral(" Longitude: %1\n").arg(d->mLongitude); + str += QLatin1String("}\n"); + + return str; +} + +void Geo::clear() +{ + d->mValidLatitude = false; + d->mValidLongitude = false; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Geo &geo) +{ + return s << geo.d->mLatitude << geo.d->mValidLatitude + << geo.d->mLongitude << geo.d->mValidLongitude; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Geo &geo) +{ + s >> geo.d->mLatitude >> geo.d->mValidLatitude + >> geo.d->mLongitude >> geo.d->mValidLongitude; + + return s; +} diff --git a/src/geo.h b/src/geo.h new file mode 100644 index 0000000..29d23cb --- /dev/null +++ b/src/geo.h @@ -0,0 +1,139 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_GEO_H +#define KCONTACTS_GEO_H + +#include "kcontacts_export.h" +#include +#include + +namespace KContacts { +/** + * @short Geographic position + * + * This class represents a geographic position. + */ +class KCONTACTS_EXPORT Geo +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Geo &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Geo &); + +public: + /** + * Creates an invalid geographics position object. + */ + Geo(); + + /** + * Creates a geographics position object. + * + * @param latitude Geographical latitude + * @param longitude Geographical longitude + */ + Geo(float latitude, float longitude); + + /** + * Copy constructor. + */ + Geo(const Geo &other); + + /** + * Destroys the geographics position object. + */ + ~Geo(); + + /** + * Sets the @p latitude. + * + * @param latitude The location's latitude coordinate + */ + void setLatitude(float latitude); + + /** + * Returns the latitude. + */ + Q_REQUIRED_RESULT float latitude() const; + + /** + * Sets the @p longitude. + * + * @param longitude The location's longitude coordinate + */ + void setLongitude(float longitude); + + /** + * Returns the longitude. + */ + Q_REQUIRED_RESULT float longitude() const; + + /** + * Returns, whether this object contains a valid geographical position. + */ + Q_REQUIRED_RESULT bool isValid() const; + + /** + * Equality operator. + * + * @note Two invalid Geo instance will return @c true + */ + Q_REQUIRED_RESULT bool operator==(const Geo &other) const; + + /** + * Not-Equal operator. + */ + bool operator!=(const Geo &other) const; + + /** + * Assignment operator. + * + * @param other The Geo instance to assign to @c this + */ + Geo &operator=(const Geo &other); + + /** + * Returns string representation of geographical position. + */ + Q_REQUIRED_RESULT QString toString() const; + + /** + * Clears the class, marking it as invalid. + * + * @since 5.6 + */ + void clear(); + +private: + class Private; + QSharedDataPointer d; +}; + +/** + * Serializes the geographical position @p object into the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Geo &object); + +/** + * Initializes the geographical position @p object from the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Geo &object); +} +Q_DECLARE_TYPEINFO(KContacts::Geo, Q_MOVABLE_TYPE); +#endif diff --git a/src/impp.cpp b/src/impp.cpp new file mode 100644 index 0000000..0c5924c --- /dev/null +++ b/src/impp.cpp @@ -0,0 +1,193 @@ +/* + This file is part of libkabc. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "impp.h" + +#include +#include +#include +#include "kcontacts_debug.h" + +using namespace KContacts; + +class Q_DECL_HIDDEN Impp::Private : public QSharedData +{ +public: + Private() + : type(KContacts::Impp::Unknown) + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + type = other.type; + } + + QMap parameters; + QString address; + ImppType type; +}; + +Impp::Impp() + : d(new Private) +{ +} + +Impp::Impp(const Impp &other) + : d(other.d) +{ +} + +Impp::Impp(const QString &address) + : d(new Private) +{ + d->address = address; +} + +Impp::~Impp() +{ +} + +bool Impp::isValid() const +{ + return !d->address.isEmpty() && (d->type != Unknown); +} + +Impp::ImppType Impp::type() const +{ + return d->type; +} + +void Impp::setType(Impp::ImppType type) +{ + d->type = type; +} + +void Impp::setAddress(const QString &address) +{ + d->address = address; +} + +QString Impp::address() const +{ + return d->address; +} + +void Impp::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Impp::parameters() const +{ + return d->parameters; +} + +bool Impp::operator==(const Impp &other) const +{ + return (d->parameters == other.parameters()) && (d->address == other.address()) && (d->type == other.type()); +} + +bool Impp::operator!=(const Impp &other) const +{ + return !(other == *this); +} + +Impp &Impp::operator=(const Impp &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Impp::toString() const +{ + QString str = QLatin1String("Impp {\n"); + str += QStringLiteral(" type: %1\n").arg(typeToString(d->type)); + str += QStringLiteral(" address: %1\n").arg(d->address); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QString Impp::typeToString(ImppType type) +{ + switch (type) { + case Unknown: + case EndList: + qCWarning(KCONTACTS_LOG) << "Invalid type requested"; + break; + case Skype: + return QStringLiteral("skype"); + case Xmpp: + return QStringLiteral("xmpp"); + case Jabber: + return QStringLiteral("jabber"); + case Sip: + return QStringLiteral("sip"); + case Aim: + return QStringLiteral("aim"); + case Msn: + return QStringLiteral("msn"); + case Twitter: + return QStringLiteral("twitter"); + case GoogleTalk: + return QStringLiteral("googletalk"); + case Yahoo: + return QStringLiteral("yahoo"); + case Qq: + return QStringLiteral("qq"); + case GaduGadu: + return QStringLiteral("gadugadu"); + case Ownclound: + return QStringLiteral("owncloud-handle"); + case Facebook: + return QStringLiteral("facebook"); + case Icq: + return QStringLiteral("icq"); + } + return QString(); +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Impp &impp) +{ + return s << impp.d->parameters << impp.d->address << impp.d->type; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Impp &impp) +{ + int i; + s >> impp.d->parameters >> impp.d->address >> i; + impp.d->type = static_cast(i); + return s; +} diff --git a/src/impp.h b/src/impp.h new file mode 100644 index 0000000..236a4d7 --- /dev/null +++ b/src/impp.h @@ -0,0 +1,94 @@ +/* + This file is part of libkabc. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef IMPP_H +#define IMPP_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a IMPP for a contact. + * @since 4.14.5 + */ +namespace KContacts { +class KCONTACTS_EXPORT Impp +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Impp &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Impp &); +public: + Impp(); + Impp(const Impp &other); + Impp(const QString &address); + + ~Impp(); + + typedef QVector List; + enum ImppType { + Unknown = 0, + Skype = 1, + Xmpp = 2, + Jabber = 3, + Sip = 4, + Aim = 5, + Msn = 6, + Twitter = 7, + GoogleTalk = 8, + Yahoo = 9, + Qq = 10, + GaduGadu = 11, + Ownclound = 12, + Icq = 13, + Facebook = 14, + EndList + }; + Q_REQUIRED_RESULT bool isValid() const; + + Q_REQUIRED_RESULT ImppType type() const; + void setType(ImppType type); + + void setAddress(const QString &address); + Q_REQUIRED_RESULT QString address() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Impp &other) const; + Q_REQUIRED_RESULT bool operator!=(const Impp &other) const; + + Impp &operator=(const Impp &other); + + Q_REQUIRED_RESULT QString toString() const; + + Q_REQUIRED_RESULT static QString typeToString(ImppType type); + +private: + class Private; + QSharedDataPointer d; +}; + +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Impp &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Impp &object); +} + +Q_DECLARE_TYPEINFO(KContacts::Impp, Q_MOVABLE_TYPE); +#endif // IMPP_H diff --git a/src/kcontacts.qrc b/src/kcontacts.qrc new file mode 100644 index 0000000..a06eba6 --- /dev/null +++ b/src/kcontacts.qrc @@ -0,0 +1,6 @@ + + + addressformatrc + countrytransl.map + + diff --git a/src/key.cpp b/src/key.cpp new file mode 100644 index 0000000..829eeff --- /dev/null +++ b/src/key.cpp @@ -0,0 +1,243 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "key.h" + +#include +#include + +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Key::Private : public QSharedData +{ +public: + Private() + : mId(KRandom::randomString(8)) + { + } + + Private(const Private &other) + : QSharedData(other) + { + mId = other.mId; + mBinaryData = other.mBinaryData; + mTextData = other.mTextData; + mCustomTypeString = other.mCustomTypeString; + mIsBinary = other.mIsBinary; + mType = other.mType; + } + + QString mId; + QByteArray mBinaryData; + QString mTextData; + QString mCustomTypeString; + + Type mType; + bool mIsBinary; +}; + +Key::Key(const QString &text, Type type) + : d(new Private) +{ + d->mTextData = text; + d->mIsBinary = false; + d->mType = type; +} + +Key::Key(const Key &other) + : d(other.d) +{ +} + +Key::~Key() +{ +} + +bool Key::operator==(const Key &other) const +{ + if (d->mId != other.d->mId) { + return false; + } + + if (d->mType != other.d->mType) { + return false; + } + + if (d->mIsBinary != other.d->mIsBinary) { + return false; + } + + if (d->mIsBinary) { + if (d->mBinaryData != other.d->mBinaryData) { + return false; + } + } else { + if (d->mTextData != other.d->mTextData) { + return false; + } + } + + if (d->mCustomTypeString != other.d->mCustomTypeString) { + return false; + } + + return true; +} + +bool Key::operator!=(const Key &other) const +{ + return !(*this == other); +} + +Key &Key::operator=(const Key &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +void Key::setId(const QString &id) +{ + d->mId = id; +} + +QString Key::id() const +{ + return d->mId; +} + +void Key::setBinaryData(const QByteArray &binary) +{ + d->mBinaryData = binary; + d->mIsBinary = true; +} + +QByteArray Key::binaryData() const +{ + return d->mBinaryData; +} + +void Key::setTextData(const QString &text) +{ + d->mTextData = text; + d->mIsBinary = false; +} + +QString Key::textData() const +{ + return d->mTextData; +} + +bool Key::isBinary() const +{ + return d->mIsBinary; +} + +void Key::setType(Type type) +{ + d->mType = type; +} + +void Key::setCustomTypeString(const QString &custom) +{ + d->mCustomTypeString = custom; +} + +Key::Type Key::type() const +{ + return d->mType; +} + +QString Key::customTypeString() const +{ + return d->mCustomTypeString; +} + +QString Key::toString() const +{ + QString str = QLatin1String("Key {\n"); + str += QStringLiteral(" Id: %1\n").arg(d->mId); + str += QStringLiteral(" Type: %1\n").arg(typeLabel(d->mType)); + if (d->mType == Custom) { + str += QStringLiteral(" CustomType: %1\n").arg(d->mCustomTypeString); + } + str += QStringLiteral(" IsBinary: %1\n"). + arg(d->mIsBinary ? QStringLiteral("true") : QStringLiteral("false")); + if (d->mIsBinary) { + str += QStringLiteral(" Binary: %1\n"). + arg(QString::fromLatin1(d->mBinaryData.toBase64())); + } else { + str += QStringLiteral(" Text: %1\n").arg(d->mTextData); + } + str += QLatin1String("}\n"); + + return str; +} + +Key::TypeList Key::typeList() +{ + static TypeList list; + + if (list.isEmpty()) { + list << X509 << PGP << Custom; + } + + return list; +} + +QString Key::typeLabel(Type type) +{ + switch (type) { + case X509: + return i18nc("X.509 public key", "X509"); + break; + case PGP: + return i18nc("Pretty Good Privacy key", "PGP"); + break; + case Custom: + return i18nc("A custom key", "Custom"); + break; + default: + return i18nc("another type of encryption key", "Unknown type"); + break; + } +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Key &key) +{ + return s << key.d->mId << key.d->mType << key.d->mIsBinary << key.d->mBinaryData + << key.d->mTextData << key.d->mCustomTypeString; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Key &key) +{ + uint type; + s >> key.d->mId >> type >> key.d->mIsBinary >> key.d->mBinaryData >> key.d->mTextData + >> key.d->mCustomTypeString; + + key.d->mType = Key::Type(type); + + return s; +} diff --git a/src/key.h b/src/key.h new file mode 100644 index 0000000..35664d8 --- /dev/null +++ b/src/key.h @@ -0,0 +1,183 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_KEY_H +#define KCONTACTS_KEY_H + +#include "kcontacts_export.h" + +#include +#include + +namespace KContacts { +/** + * @short A class to store an encryption key. + */ +class KCONTACTS_EXPORT Key +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Key &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Key &); + +public: + /** + List of keys. + */ + typedef QVector List; + + /** + Key types + */ + enum Type { + X509, /**< X509 key */ + PGP, /**< Pretty Good Privacy key */ + Custom /**< Custom or IANA conform key */ + }; + + /** + List of key types. + */ + typedef QList TypeList; + + /** + Creates a new key. + + @param text The text data. + @param type The key type, see Types. + */ + explicit Key(const QString &text = QString(), Type type = PGP); + + /** + Copy constructor. + */ + Key(const Key &other); + + /** + Destroys the key. + */ + ~Key(); + + /** + Equality operator. + */ + Q_REQUIRED_RESULT bool operator==(const Key &other) const; + + /** + Not-equal operator. + */ + Q_REQUIRED_RESULT bool operator!=(const Key &other) const; + + /** + Assignment operator. + + @param other The Key instance to assign to @c this + */ + Q_REQUIRED_RESULT Key &operator=(const Key &other); + + /** + Sets the unique @p identifier. + */ + void setId(const QString &identifier); + + /** + Returns the unique identifier. + */ + Q_REQUIRED_RESULT QString id() const; + + /** + Sets binary @p data. + */ + void setBinaryData(const QByteArray &data); + + /** + Returns the binary data. + */ + Q_REQUIRED_RESULT QByteArray binaryData() const; + + /** + Sets text @p data. + */ + void setTextData(const QString &data); + + /** + Returns the text data. + */ + Q_REQUIRED_RESULT QString textData() const; + + /** + Returns whether the key contains binary or text data. + */ + Q_REQUIRED_RESULT bool isBinary() const; + + /** + Sets the @p type. + + @param type The type of the key + + @see Type + */ + void setType(Type type); + + /** + Sets custom @p type string. + */ + void setCustomTypeString(const QString &type); + + /** + Returns the type, see Type. + */ + Q_REQUIRED_RESULT Type type() const; + + /** + Returns the custom type string. + */ + Q_REQUIRED_RESULT QString customTypeString() const; + + /** + Returns a string representation of the key. + */ + Q_REQUIRED_RESULT QString toString() const; + + /** + Returns a list of all available key types. + */ + Q_REQUIRED_RESULT static TypeList typeList(); + + /** + Returns a translated label for a given key @p type. + */ + Q_REQUIRED_RESULT static QString typeLabel(Type type); + +private: + class Private; + QSharedDataPointer d; +}; + +/** + Serializes the @p key object into the @p stream. +*/ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Key &key); + +/** + Initializes the @p key object from the @p stream. +*/ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Key &key); +} +Q_DECLARE_TYPEINFO(KContacts::Key, Q_MOVABLE_TYPE); +#endif diff --git a/src/lang.cpp b/src/lang.cpp new file mode 100644 index 0000000..fa82aea --- /dev/null +++ b/src/lang.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "lang.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Lang::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + language = other.language; + } + + QMap parameters; + QString language; +}; + +Lang::Lang() + : d(new Private) +{ +} + +Lang::Lang(const Lang &other) + : d(other.d) +{ +} + +Lang::Lang(const QString &language) + : d(new Private) +{ + d->language = language; +} + +Lang::~Lang() +{ +} + +void Lang::setLanguage(const QString &lang) +{ + d->language = lang; +} + +QString Lang::language() const +{ + return d->language; +} + +bool Lang::isValid() const +{ + return !d->language.isEmpty(); +} + +void Lang::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Lang::parameters() const +{ + return d->parameters; +} + +bool Lang::operator==(const Lang &other) const +{ + return (d->parameters == other.parameters()) && (d->language == other.language()); +} + +bool Lang::operator!=(const Lang &other) const +{ + return !(other == *this); +} + +Lang &Lang::operator=(const Lang &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Lang::toString() const +{ + QString str = QLatin1String("Lang {\n"); + str += QStringLiteral(" language: %1\n").arg(d->language); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Lang &lang) +{ + return s << lang.d->parameters << lang.d->language; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Lang &lang) +{ + s >> lang.d->parameters >> lang.d->language; + return s; +} diff --git a/src/lang.h b/src/lang.h new file mode 100644 index 0000000..f685df3 --- /dev/null +++ b/src/lang.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LANG_H +#define LANG_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a Language for a contact. + * @since 4.14.5 + */ +namespace KContacts { +class KCONTACTS_EXPORT Lang +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Lang &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Lang &); +public: + Lang(); + Lang(const Lang &other); + Lang(const QString &language); + + ~Lang(); + + typedef QVector List; + + void setLanguage(const QString &lang); + Q_REQUIRED_RESULT QString language() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Lang &other) const; + Q_REQUIRED_RESULT bool operator!=(const Lang &other) const; + + Q_REQUIRED_RESULT Lang &operator=(const Lang &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Lang &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Lang &object); +} +Q_DECLARE_TYPEINFO(KContacts::Lang, Q_MOVABLE_TYPE); +#endif // LANG_H diff --git a/src/ldapdn.cpp b/src/ldapdn.cpp new file mode 100644 index 0000000..90dd104 --- /dev/null +++ b/src/ldapdn.cpp @@ -0,0 +1,214 @@ +/* + A temporary copy to break dependency to KLDAP + + This file is part of libkldap. + Copyright (c) 2006 Sean Harmer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "ldapdn_p.h" + +#include + +#include "kcontacts_debug.h" + +class Q_DECL_HIDDEN LdapDN::LdapDNPrivate +{ +public: + LdapDNPrivate() : m_dn() + { + } + + ~LdapDNPrivate() + { + } + + bool isValidRDNString(const QString &rdn) const; + QStringList splitOnNonEscapedChar(const QString &rdn, QChar ch) const; + + QString m_dn; +}; + +bool LdapDN::LdapDNPrivate::isValidRDNString(const QString &rdn) const +{ + qCDebug(KCONTACTS_LOG) << "Testing rdn:" << rdn; + + // If it is a muli-valued rdn, split it into its constituent parts + QStringList rdnParts = splitOnNonEscapedChar(rdn, QLatin1Char('+')); + const int numberOfParts(rdnParts.size()); + if (numberOfParts > 1) { + for (int i = 0; i < numberOfParts; i++) { + if (!isValidRDNString(rdnParts.at(i))) { + return false; + } + } + return true; + } + + // Split the rdn into the attribute name and value parts + const QVector components = rdn.splitRef(QLatin1Char('=')); + + // We should have exactly two parts + if (components.size() != 2) { + return false; + } + + return true; +} + +QStringList LdapDN::LdapDNPrivate::splitOnNonEscapedChar(const QString &str, QChar ch) const +{ + QStringList strParts; + int index = 0; + int searchFrom = 0; + int strPartStartIndex = 0; + while ((index = str.indexOf(ch, searchFrom)) != -1) { + const QChar prev = str[std::max(0, index - 1)]; + if (prev != QLatin1Char('\\')) { + // Found a component of a multi-valued RDN + //qCDebug(KCONTACTS_LOG) << "Found" << ch << "at index" << index; + QString tmp = str.mid(strPartStartIndex, index - strPartStartIndex); + //qCDebug(KCONTACTS_LOG) << "Adding part:" << tmp; + strParts.append(tmp); + strPartStartIndex = index + 1; + } + + searchFrom = index + 1; + } + + // Add on the part after the last found delimeter + QString tmp = str.mid(strPartStartIndex); + //qCDebug(KCONTACTS_LOG) << "Adding part:" << tmp; + strParts.append(tmp); + + return strParts; +} + +LdapDN::LdapDN() + : d(new LdapDNPrivate) +{ +} + +LdapDN::LdapDN(const QString &dn) + : d(new LdapDNPrivate) +{ + d->m_dn = dn; +} + +LdapDN::LdapDN(const LdapDN &that) + : d(new LdapDNPrivate) +{ + *d = *that.d; +} + +LdapDN &LdapDN::operator=(const LdapDN &that) +{ + if (this == &that) { + return *this; + } + + *d = *that.d; + return *this; +} + +LdapDN::~LdapDN() +{ + delete d; +} + +void LdapDN::clear() +{ + d->m_dn.clear(); +} + +bool LdapDN::isEmpty() const +{ + return d->m_dn.isEmpty(); +} + +QString LdapDN::toString() const +{ + return d->m_dn; +} + +QString LdapDN::toString(int depth) const +{ + QStringList rdns = d->splitOnNonEscapedChar(d->m_dn, QLatin1Char(',')); + if (depth >= rdns.size()) { + return QString(); + } + + // Construct a DN down to the requested depth + QString dn; + for (int i = depth; i >= 0; i--) { + dn += rdns.at(rdns.size() - 1 - i) + QLatin1Char(','); + qCDebug(KCONTACTS_LOG) << "dn =" << dn; + } + dn = dn.left(dn.length() - 1); // Strip off the extraneous comma + + return dn; +} + +QString LdapDN::rdnString() const +{ + /** \TODO We should move this into the d pointer as we calculate rdns quite a lot */ + QStringList rdns = d->splitOnNonEscapedChar(d->m_dn, QLatin1Char(',')); + return rdns.at(0); +} + +QString LdapDN::rdnString(int depth) const +{ + QStringList rdns = d->splitOnNonEscapedChar(d->m_dn, QLatin1Char(',')); + const int numberOfRdns(rdns.size()); + if (depth >= numberOfRdns) { + return QString(); + } + return rdns.at(numberOfRdns - 1 - depth); +} + +bool LdapDN::isValid() const +{ + qCDebug(KCONTACTS_LOG) << "Testing dn:" << d->m_dn; + + // Break the string into rdn's + QStringList rdns = d->splitOnNonEscapedChar(d->m_dn, QLatin1Char(',')); + + // Test to see if each rdn is valid + for (int i = 0; i < rdns.size(); i++) { + if (!d->isValidRDNString(rdns.at(i))) { + return false; + } + } + + return true; +} + +int LdapDN::depth() const +{ + QStringList rdns = d->splitOnNonEscapedChar(d->m_dn, QLatin1Char(',')); + return rdns.size(); +} + +bool LdapDN::operator ==(const LdapDN &rhs) const +{ + return d->m_dn == rhs.d->m_dn; +} + +bool LdapDN::operator !=(const LdapDN &rhs) const +{ + return d->m_dn != rhs.d->m_dn; +} diff --git a/src/ldapdn_p.h b/src/ldapdn_p.h new file mode 100644 index 0000000..5ee5f5c --- /dev/null +++ b/src/ldapdn_p.h @@ -0,0 +1,84 @@ +/* + A temporary copy to break dependency to KLDAP + + This file is part of libkldap. + Copyright (c) 2006 Sean Harmer + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LDAPDN_P_H +#define LDAPDN_P_H + +#include + +class LdapDN +{ +public: + explicit LdapDN(); + explicit LdapDN(const QString &dn); + + LdapDN(const LdapDN &that); + LdapDN &operator=(const LdapDN &that); + + ~LdapDN(); + + void clear(); + + bool isEmpty() const; + + /** + * \returns A QString representing the DN. + */ + QString toString() const; + + /** + * \param depth The depth of the DN to return using a zero-based index. + * \returns A QString representing the DN levels deep in the directory. + */ + QString toString(int depth) const; + + /** + * \returns A QString representing the RDN of this DN. + */ + QString rdnString() const; + + /** + * \param depth The depth of the RDN to return using a zero-based index. + * \returns A QString representing the RDN levels deep in the directory. + */ + QString rdnString(int depth) const; + + /** + * \returns True if this is a valid DN, false otherwise. + */ + bool isValid() const; + + /** + * \returns The depth of this DN in the directory. + */ + int depth() const; + + bool operator==(const LdapDN &rhs) const; + + bool operator!=(const LdapDN &rhs) const; + +private: + class LdapDNPrivate; + LdapDNPrivate *const d; +}; + +#endif diff --git a/src/ldif.cpp b/src/ldif.cpp new file mode 100644 index 0000000..72293d5 --- /dev/null +++ b/src/ldif.cpp @@ -0,0 +1,447 @@ +/* + A temporary copy to break dependency to KLDAP + + This file is part of libkldap. + Copyright (c) 2004-2006 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "ldif_p.h" + +#include "kcontacts_debug.h" + +class Q_DECL_HIDDEN Ldif::LdifPrivate +{ +public: + int mModType; + bool mDelOldRdn, mUrl; + LdapDN mDn; + QString mAttr, mNewRdn, mNewSuperior, mOid; + QByteArray mLdif, mValue; + EntryType mEntryType; + + bool mIsNewLine, mIsComment, mCritical; + ParseValue mLastParseValue; + uint mPos, mLineNumber; + QByteArray mLine; +}; + +Ldif::Ldif() : d(new LdifPrivate) +{ + startParsing(); +} + +Ldif::Ldif(const Ldif &that) : d(new LdifPrivate) +{ + *d = *that.d; + + startParsing(); +} + +Ldif &Ldif::operator=(const Ldif &that) +{ + if (this == &that) { + return *this; + } + + *d = *that.d; + + return *this; +} + +Ldif::~Ldif() +{ + delete d; +} + +QByteArray Ldif::assembleLine(const QString &fieldname, const QByteArray &value, uint linelen, bool url) +{ + QByteArray result; + + if (url) { + result = fieldname.toUtf8() + ":< " + value; + } else { + bool safe = false; + bool isDn = fieldname.toLower() == QLatin1String("dn"); + //SAFE-INIT-CHAR + if (value.size() > 0 && value[0] > 0 && value[0] != '\n' + && value[0] != '\r' && value[0] != ':' && value[0] != '<') { + safe = true; + } + + //SAFE-CHAR + if (safe) { + for (int i = 1; i < value.size(); ++i) { + //allow utf-8 in Distinguished Names + if ((isDn && value[i] == 0) + || (!isDn && value[i] <= 0) + || value[i] == '\r' || value[i] == '\n') { + safe = false; + break; + } + } + } + + if (value.isEmpty()) { + safe = true; + } + + if (safe) { + result = fieldname.toUtf8() + ": " + value; + } else { + result = fieldname.toUtf8() + ":: " + value.toBase64(); + } + + if (linelen > 0) { + int i = (uint)(fieldname.length() + 2) > linelen ? fieldname.length() + 2 : linelen; + while (i < result.length()) { + result.insert(i, "\n "); + i += linelen + 2; + } + } + } + return result; +} + +QByteArray Ldif::assembleLine(const QString &fieldname, const QString &value, uint linelen, bool url) +{ + return assembleLine(fieldname, value.toUtf8(), linelen, url); +} + +bool Ldif::splitLine(const QByteArray &line, QString &fieldname, QByteArray &value) +{ + int position; + QByteArray tmp; + int linelen; + +// qCDebug(KCONTACTS_LOG) << "line:" << QString::fromUtf8(line); + + position = line.indexOf(":"); + if (position == -1) { + // strange: we did not find a fieldname + fieldname = QLatin1String(""); + value = line.trimmed(); +// qCDebug(KCONTACTS_LOG) << "value :" << value[0]; + return false; + } + + linelen = line.size(); + fieldname = QString::fromUtf8(line.left(position).trimmed()); + + if (linelen > (position + 1) && line[ position + 1 ] == ':') { + // String is BASE64 encoded -> decode it now. + if (linelen <= (position + 3)) { + value.resize(0); + return false; + } + value = QByteArray::fromBase64(line.mid(position + 3)); + return false; + } + + if (linelen > (position + 1) && line[ position + 1 ] == '<') { + // String is an URL. + if (linelen <= (position + 3)) { + value.resize(0); + return false; + } + value = QByteArray::fromBase64(line.mid(position + 3)); + return true; + } + + if (linelen <= (position + 2)) { + value.resize(0); + return false; + } + value = line.mid(position + 2); + return false; +} + +bool Ldif::splitControl(const QByteArray &line, QString &oid, bool &critical, QByteArray &value) +{ + QString tmp; + critical = false; + bool url = splitLine(line, tmp, value); + + qCDebug(KCONTACTS_LOG) << "value:" << QString::fromUtf8(value); + if (tmp.isEmpty()) { + tmp = QString::fromUtf8(value); + value.resize(0); + } + if (tmp.endsWith(QLatin1String("true"))) { + critical = true; + tmp.truncate(tmp.length() - 5); + } else if (tmp.endsWith(QLatin1String("false"))) { + critical = false; + tmp.truncate(tmp.length() - 6); + } + oid = tmp; + return url; +} + +Ldif::ParseValue Ldif::processLine() +{ + if (d->mIsComment) { + return None; + } + + ParseValue retval = None; + if (d->mLastParseValue == EndEntry) { + d->mEntryType = Entry_None; + } + + d->mUrl = splitLine(d->mLine, d->mAttr, d->mValue); + + QString attrLower = d->mAttr.toLower(); + + switch (d->mEntryType) { + case Entry_None: + if (attrLower == QLatin1String("version")) { + if (!d->mDn.isEmpty()) { + retval = Err; + } + } else if (attrLower == QLatin1String("dn")) { + qCDebug(KCONTACTS_LOG) << "ldapentry dn:" << QString::fromUtf8(d->mValue); + d->mDn = LdapDN(QString::fromUtf8(d->mValue)); + d->mModType = Mod_None; + retval = NewEntry; + } else if (attrLower == QLatin1String("changetype")) { + if (d->mDn.isEmpty()) { + retval = Err; + } else { + QString tmpval = QString::fromUtf8(d->mValue); + qCDebug(KCONTACTS_LOG) << "changetype:" << tmpval; + if (tmpval == QLatin1String("add")) { + d->mEntryType = Entry_Add; + } else if (tmpval == QLatin1String("delete")) { + d->mEntryType = Entry_Del; + } else if (tmpval == QLatin1String("modrdn") || tmpval == QLatin1String("moddn")) { + d->mNewRdn = QLatin1String(""); + d->mNewSuperior = QLatin1String(""); + d->mDelOldRdn = true; + d->mEntryType = Entry_Modrdn; + } else if (tmpval == QLatin1String("modify")) { + d->mEntryType = Entry_Mod; + } else { + retval = Err; + } + } + } else if (attrLower == QLatin1String("control")) { + d->mUrl = splitControl(d->mValue, d->mOid, d->mCritical, d->mValue); + retval = Control; + } else if (!d->mAttr.isEmpty() && !d->mValue.isEmpty()) { + d->mEntryType = Entry_Add; + retval = Item; + } + break; + case Entry_Add: + if (d->mAttr.isEmpty() && d->mValue.isEmpty()) { + retval = EndEntry; + } else { + retval = Item; + } + break; + case Entry_Del: + if (d->mAttr.isEmpty() && d->mValue.isEmpty()) { + retval = EndEntry; + } else { + retval = Err; + } + break; + case Entry_Mod: + if (d->mModType == Mod_None) { + qCDebug(KCONTACTS_LOG) << "new modtype" << d->mAttr; + if (d->mAttr.isEmpty() && d->mValue.isEmpty()) { + retval = EndEntry; + } else if (attrLower == QLatin1String("add")) { + d->mModType = Mod_Add; + } else if (attrLower == QLatin1String("replace")) { + d->mModType = Mod_Replace; + d->mAttr = QString::fromUtf8(d->mValue); + d->mValue = QByteArray(); + retval = Item; + } else if (attrLower == QLatin1String("delete")) { + d->mModType = Mod_Del; + d->mAttr = QString::fromUtf8(d->mValue); + d->mValue = QByteArray(); + retval = Item; + } else { + retval = Err; + } + } else { + if (d->mAttr.isEmpty()) { + if (QString::fromUtf8(d->mValue) == QLatin1String("-")) { + d->mModType = Mod_None; + } else if (d->mValue.isEmpty()) { + retval = EndEntry; + } else { + retval = Err; + } + } else { + retval = Item; + } + } + break; + case Entry_Modrdn: + if (d->mAttr.isEmpty() && d->mValue.isEmpty()) { + retval = EndEntry; + } else if (attrLower == QLatin1String("newrdn")) { + d->mNewRdn = QString::fromUtf8(d->mValue); + } else if (attrLower == QLatin1String("newsuperior")) { + d->mNewSuperior = QString::fromUtf8(d->mValue); + } else if (attrLower == QLatin1String("deleteoldrdn")) { + if (d->mValue.size() > 0 && d->mValue[0] == '0') { + d->mDelOldRdn = false; + } else if (d->mValue.size() > 0 && d->mValue[0] == '1') { + d->mDelOldRdn = true; + } else { + retval = Err; + } + } else { + retval = Err; + } + break; + } + return retval; +} + +Ldif::ParseValue Ldif::nextItem() +{ + ParseValue retval = None; + char c = 0; + + while (retval == None) { + if (d->mPos < (uint)d->mLdif.size()) { + c = d->mLdif[d->mPos]; + d->mPos++; + if (d->mIsNewLine && c == '\r') { + continue; //handle \n\r line end + } + if (d->mIsNewLine && (c == ' ' || c == '\t')) { //line folding + d->mIsNewLine = false; + continue; + } + if (d->mIsNewLine) { + d->mIsNewLine = false; + retval = processLine(); + d->mLastParseValue = retval; + d->mLine.resize(0); + d->mIsComment = (c == '#'); + } + if (c == '\n' || c == '\r') { + d->mLineNumber++; + d->mIsNewLine = true; + continue; + } + } else { + retval = MoreData; + break; + } + + if (!d->mIsComment) { + d->mLine += c; + } + } + return retval; +} + +void Ldif::endLdif() +{ + QByteArray tmp(3, '\n'); + d->mLdif = tmp; + d->mPos = 0; +} + +void Ldif::startParsing() +{ + d->mPos = d->mLineNumber = 0; + d->mDelOldRdn = false; + d->mEntryType = Entry_None; + d->mModType = Mod_None; + d->mDn = LdapDN(); + d->mNewRdn.clear(); + d->mNewSuperior.clear(); + d->mLine = QByteArray(); + d->mIsNewLine = false; + d->mIsComment = false; + d->mLastParseValue = None; +} + +void Ldif::setLdif(const QByteArray &ldif) +{ + d->mLdif = ldif; + d->mPos = 0; +} + +Ldif::EntryType Ldif::entryType() const +{ + return d->mEntryType; +} + +int Ldif::modType() const +{ + return d->mModType; +} + +LdapDN Ldif::dn() const +{ + return d->mDn; +} + +QString Ldif::newRdn() const +{ + return d->mNewRdn; +} + +QString Ldif::newSuperior() const +{ + return d->mNewSuperior; +} + +bool Ldif::delOldRdn() const +{ + return d->mDelOldRdn; +} + +QString Ldif::attr() const +{ + return d->mAttr; +} + +QByteArray Ldif::value() const +{ + return d->mValue; +} + +bool Ldif::isUrl() const +{ + return d->mUrl; +} + +bool Ldif::isCritical() const +{ + return d->mCritical; +} + +QString Ldif::oid() const +{ + return d->mOid; +} + +uint Ldif::lineNumber() const +{ + return d->mLineNumber; +} diff --git a/src/ldif_p.h b/src/ldif_p.h new file mode 100644 index 0000000..fce895a --- /dev/null +++ b/src/ldif_p.h @@ -0,0 +1,191 @@ +/* + A temporary copy to break dependency to KLDAP + + This file is part of libkldap. + Copyright (c) 2004-2006 Szombathelyi György + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef LDIF_P_H +#define LDIF_P_H + +#include +#include + +#include "ldapdn_p.h" + +/** + * Ldif + * + * Ldif implements an RFC 2849 compliant Ldif parser. Ldif files are used to + * represent directory information on LDAP-based servers, or to describe a set + * of changes which are to be applied to a directory. + */ +class Ldif +{ +public: + + typedef enum { + None, NewEntry, EndEntry, Item, Control, Err, MoreData + } ParseValue; + + typedef enum { + Entry_None, Entry_Add, Entry_Del, Entry_Mod, Entry_Modrdn + } EntryType; + + typedef enum { + Mod_None, Mod_Add, Mod_Replace, Mod_Del + } ModType; + + Ldif(); + + Ldif(const Ldif &that); + Ldif &operator=(const Ldif &that); + + virtual ~Ldif(); + + /** + * Assembles fieldname and value into a valid Ldif line, BASE64 encodes the + * value if necessary and optionally splits into more lines. + * @param fieldname The name of the entry. + * @param value The value of the entry. + * @param linelen Maximum length of the lines in the result. + * @param url If true, encode value as url ( use :< ). + */ + static QByteArray assembleLine(const QString &fieldname, const QByteArray &value, uint linelen = 0, bool url = false); + /** + * This is the same as the above function, the only difference that + * this accepts QString as the value. + */ + static QByteArray assembleLine(const QString &fieldname, const QString &value, uint linelen = 0, bool url = false); + + /** + * Splits one line from an Ldif file to attribute and value components. + * @return true if value is an URL, false otherwise + */ + static bool splitLine(const QByteArray &line, QString &fieldname, QByteArray &value); + + /** + * Splits a control specification (without the "control:" directive) + * @param line is the control directive + * @param oid will contain the OID + * @param critical will contain the criticality of control + * @param value is the control value + */ + static bool splitControl(const QByteArray &line, QString &oid, bool &critical, QByteArray &value); + + /** + * Starts the parsing of a new Ldif + */ + void startParsing(); + + /** + * Process one Ldif line + */ + ParseValue processLine(); + + /** + * Process the Ldif until a complete item can be returned + * @return NewEntry if a new DN encountered, Item if a new item returned, + * Err if the Ldif contains error, EndEntry if the parser reached the end + * of the current entry and MoreData if the parser encountered the end of + * the current chunk of the Ldif. + * + * If you want to finish the parsing after receiving MoreData, then call + * endLdif(), so the parser can safely flush the current entry. + */ + ParseValue nextItem(); + + /** + * Sets a chunk of Ldif. Call before startParsing(), or if nextItem() + * returned MoreData. + */ + void setLdif(const QByteArray &ldif); + + /** + * Indicates the end of the Ldif file/stream. Call if nextItem() returned + * MoreData, but actually you don't have more data. + */ + void endLdif(); + + /** + * Returns the requested LDAP operation extracted from the current entry. + */ + EntryType entryType() const; + + /** + * Returns the LDAP modify request type if entryType() returned Entry_Mod. + */ + int modType() const; + + /** + * Returns the Distinguished Name of the current entry. + */ + LdapDN dn() const; + + /** + * Returns the new Relative Distinguished Name if modType() returned + * Entry_Modrdn. + */ + QString newRdn() const; + + /** + * Returns the new parent of the entry if modType() returned Entry_Modrdn. + */ + QString newSuperior() const; + + /** + * Returns if the delete of the old RDN is required. + */ + bool delOldRdn() const; + + /** + * Returns the attribute name. + */ + QString attr() const; + + /** + * Returns the attribute value. + */ + QByteArray value() const; + + /** + * Returns if val() is an url + */ + bool isUrl() const; + + /** + * Returns the criticality level when modType() returned Control. + */ + bool isCritical() const; + + /** + * Returns the OID when modType() returned Control. + */ + QString oid() const; + + /** + * Returns the line number which the parser processes. + */ + uint lineNumber() const; + +private: + class LdifPrivate; + LdifPrivate *const d; +}; + +#endif diff --git a/src/nickname.cpp b/src/nickname.cpp new file mode 100644 index 0000000..48b6409 --- /dev/null +++ b/src/nickname.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "nickname.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN NickName::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + nickname = other.nickname; + } + + QMap parameters; + QString nickname; +}; + +NickName::NickName() + : d(new Private) +{ +} + +NickName::NickName(const NickName &other) + : d(other.d) +{ +} + +NickName::NickName(const QString &nickname) + : d(new Private) +{ + d->nickname = nickname; +} + +NickName::~NickName() +{ +} + +void NickName::setNickName(const QString &nickname) +{ + d->nickname = nickname; +} + +QString NickName::nickname() const +{ + return d->nickname; +} + +bool NickName::isValid() const +{ + return !d->nickname.isEmpty(); +} + +void NickName::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap NickName::parameters() const +{ + return d->parameters; +} + +bool NickName::operator==(const NickName &other) const +{ + return (d->parameters == other.parameters()) && (d->nickname == other.nickname()); +} + +bool NickName::operator!=(const NickName &other) const +{ + return !(other == *this); +} + +NickName &NickName::operator=(const NickName &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString NickName::toString() const +{ + QString str = QLatin1String("NickName {\n"); + str += QStringLiteral(" nickname: %1\n").arg(d->nickname); + if (!d->parameters.isEmpty()) { + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + QString param; + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const NickName &nickname) +{ + return s << nickname.d->parameters << nickname.d->nickname; +} + +QDataStream &KContacts::operator>>(QDataStream &s, NickName &nickname) +{ + s >> nickname.d->parameters >> nickname.d->nickname; + return s; +} diff --git a/src/nickname.h b/src/nickname.h new file mode 100644 index 0000000..8fcd511 --- /dev/null +++ b/src/nickname.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef NICKNAME_H +#define NICKNAME_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a NickName for a contact. + * @since 5.3 + */ +namespace KContacts { +class KCONTACTS_EXPORT NickName +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const NickName &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, NickName &); +public: + NickName(); + NickName(const NickName &other); + NickName(const QString &nickname); + + ~NickName(); + + typedef QVector List; + + void setNickName(const QString &nickname); + Q_REQUIRED_RESULT QString nickname() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const NickName &other) const; + Q_REQUIRED_RESULT bool operator!=(const NickName &other) const; + + Q_REQUIRED_RESULT NickName &operator=(const NickName &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const NickName &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, NickName &object); +} +Q_DECLARE_TYPEINFO(KContacts::NickName, Q_MOVABLE_TYPE); +#endif // NICKNAME_H diff --git a/src/note.cpp b/src/note.cpp new file mode 100644 index 0000000..a4461fb --- /dev/null +++ b/src/note.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "note.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Note::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + note = other.note; + } + + QMap parameters; + QString note; +}; + +Note::Note() + : d(new Private) +{ +} + +Note::Note(const Note &other) + : d(other.d) +{ +} + +Note::Note(const QString ¬e) + : d(new Private) +{ + d->note = note; +} + +Note::~Note() +{ +} + +void Note::setNote(const QString ¬e) +{ + d->note = note; +} + +QString Note::note() const +{ + return d->note; +} + +bool Note::isValid() const +{ + return !d->note.isEmpty(); +} + +void Note::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Note::parameters() const +{ + return d->parameters; +} + +bool Note::operator==(const Note &other) const +{ + return (d->parameters == other.parameters()) && (d->note == other.note()); +} + +bool Note::operator!=(const Note &other) const +{ + return !(other == *this); +} + +Note &Note::operator=(const Note &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Note::toString() const +{ + QString str = QLatin1String("Note {\n"); + str += QStringLiteral(" note: %1\n").arg(d->note); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Note ¬e) +{ + return s << note.d->parameters << note.d->note; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Note ¬e) +{ + s >> note.d->parameters >> note.d->note; + return s; +} diff --git a/src/note.h b/src/note.h new file mode 100644 index 0000000..c4ffcfd --- /dev/null +++ b/src/note.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef NOTE_H +#define NOTE_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a Note for a contact. + * @since 5.3 + */ +namespace KContacts { +class KCONTACTS_EXPORT Note +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Note &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Note &); +public: + Note(); + Note(const Note &other); + Note(const QString ¬e); + + ~Note(); + + typedef QVector List; + + void setNote(const QString ¬e); + Q_REQUIRED_RESULT QString note() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Note &other) const; + Q_REQUIRED_RESULT bool operator!=(const Note &other) const; + + Q_REQUIRED_RESULT Note &operator=(const Note &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Note &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Note &object); +} +Q_DECLARE_TYPEINFO(KContacts::Note, Q_MOVABLE_TYPE); +#endif // NOTE_H diff --git a/src/org.cpp b/src/org.cpp new file mode 100644 index 0000000..9e7041c --- /dev/null +++ b/src/org.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "org.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Org::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + organization = other.organization; + } + + QMap parameters; + QString organization; +}; + +Org::Org() + : d(new Private) +{ +} + +Org::Org(const Org &other) + : d(other.d) +{ +} + +Org::Org(const QString &org) + : d(new Private) +{ + d->organization = org; +} + +Org::~Org() +{ +} + +void Org::setOrganization(const QString &org) +{ + d->organization = org; +} + +QString Org::organization() const +{ + return d->organization; +} + +bool Org::isValid() const +{ + return !d->organization.isEmpty(); +} + +void Org::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Org::parameters() const +{ + return d->parameters; +} + +bool Org::operator==(const Org &other) const +{ + return (d->parameters == other.parameters()) && (d->organization == other.organization()); +} + +bool Org::operator!=(const Org &other) const +{ + return !(other == *this); +} + +Org &Org::operator=(const Org &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Org::toString() const +{ + QString str = QLatin1String("Org {\n"); + str += QStringLiteral(" organization: %1\n").arg(d->organization); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Org &org) +{ + return s << org.d->parameters << org.d->organization; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Org &org) +{ + s >> org.d->parameters >> org.d->organization; + return s; +} diff --git a/src/org.h b/src/org.h new file mode 100644 index 0000000..0a024f7 --- /dev/null +++ b/src/org.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ORG_H +#define ORG_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a Organization for a contact. + * @since 5.3 + */ +namespace KContacts { +class KCONTACTS_EXPORT Org +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Org &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Org &); +public: + Org(); + Org(const Org &other); + Org(const QString &org); + + ~Org(); + + typedef QVector List; + + void setOrganization(const QString &org); + Q_REQUIRED_RESULT QString organization() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Org &other) const; + Q_REQUIRED_RESULT bool operator!=(const Org &other) const; + + Q_REQUIRED_RESULT Org &operator=(const Org &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Org &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Org &object); +} +Q_DECLARE_TYPEINFO(KContacts::Org, Q_MOVABLE_TYPE); +#endif // ORG_H diff --git a/src/phonenumber.cpp b/src/phonenumber.cpp new file mode 100644 index 0000000..defbce4 --- /dev/null +++ b/src/phonenumber.cpp @@ -0,0 +1,296 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "phonenumber.h" + +#include +#include + +#include +#include + +using namespace KContacts; + +static QString cleanupNumber(const QString &input) +{ + return input.simplified(); +} + +class Q_DECL_HIDDEN PhoneNumber::Private : public QSharedData +{ +public: + Private(Type type) + : mId(KRandom::randomString(8)) + , mType(type) + { + } + + Private(const Private &other) + : QSharedData(other) + { + mId = other.mId; + mType = other.mType; + mNumber = other.mNumber; + } + + QString mId; + QString mNumber; + Type mType; + QMap mParameters; +}; + +PhoneNumber::PhoneNumber() + : d(new Private(Home)) +{ +} + +PhoneNumber::PhoneNumber(const QString &number, Type type) + : d(new Private(type)) +{ + d->mNumber = cleanupNumber(number); +} + +PhoneNumber::PhoneNumber(const PhoneNumber &other) + : d(other.d) +{ +} + +PhoneNumber::~PhoneNumber() +{ +} + +bool PhoneNumber::operator==(const PhoneNumber &other) const +{ + if (d->mId != other.d->mId) { + return false; + } + + if (d->mNumber != other.d->mNumber) { + return false; + } + + if (d->mType != other.d->mType) { + return false; + } + + if (d->mParameters != other.d->mParameters) { + return false; + } + + return true; +} + +bool PhoneNumber::operator!=(const PhoneNumber &other) const +{ + return !(other == *this); +} + +PhoneNumber &PhoneNumber::operator=(const PhoneNumber &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool PhoneNumber::isEmpty() const +{ + return d->mNumber.isEmpty(); +} + +void PhoneNumber::setId(const QString &id) +{ + d->mId = id; +} + +QString PhoneNumber::id() const +{ + return d->mId; +} + +void PhoneNumber::setNumber(const QString &number) +{ + d->mNumber = cleanupNumber(number); +} + +QString PhoneNumber::number() const +{ + return d->mNumber; +} + +void PhoneNumber::setType(Type type) +{ + d->mType = type; +} + +PhoneNumber::Type PhoneNumber::type() const +{ + return d->mType; +} + +QString PhoneNumber::typeLabel() const +{ + return typeLabel(type()); +} + +PhoneNumber::TypeList PhoneNumber::typeList() +{ + static TypeList list; + + if (list.isEmpty()) { + list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video + << Bbs << Modem << Car << Isdn << Pcs << Pager << Undefined; + } + + return list; +} + +QString PhoneNumber::typeFlagLabel(TypeFlag type) +{ + switch (type) { + case Undefined: + return i18nc("Undefined phone type", "Telephone number"); + case Home: + return i18nc("Home phone", "Home"); + case Work: + return i18nc("Work phone", "Work"); + case Msg: + return i18n("Messenger"); + case Pref: + return i18nc("Preferred phone", "Preferred"); + case Voice: + return i18n("Voice"); + case Fax: + return i18n("Fax"); + case Cell: + return i18nc("Mobile Phone", "Mobile"); + case Video: + return i18nc("Video phone", "Video"); + case Bbs: + return i18n("Mailbox"); + case Modem: + return i18n("Modem"); + case Car: + return i18nc("Car Phone", "Car"); + case Isdn: + return i18n("ISDN"); + case Pcs: + return i18n("PCS"); + case Pager: + return i18n("Pager"); + default: + return i18nc("another type of phone", "Other"); + } +} + +QString PhoneNumber::typeLabel(Type type) +{ + QString label; + bool first = true; + + // special cases + // Pref stand alone -> Preferred Number + // Home+Fax or Work+Fax -> combine as initial string + if (type == Pref) { + return i18n("Preferred Number"); + } + + if (type & Fax) { + if (type & Home) { + label = i18n("Home Fax"); + first = false; + type &= ~Fax; + type &= ~Home; + } else if (type & Work) { + label = i18n("Work Fax"); + first = false; + type &= ~Fax; + type &= ~Work; + } + } + + const TypeList list = typeList(); + + TypeList::ConstIterator it; + TypeList::ConstIterator end(list.constEnd()); + for (it = list.constBegin(); it != end; ++it) { + // these are actually flags + const TypeFlag flag = static_cast(static_cast(*it)); + if (type & flag) { + if (!first) { + label.append(QLatin1Char('/')); + } + + label.append(typeFlagLabel(flag)); + + if (first) { + first = false; + } + } + } + + return label; +} + +QString PhoneNumber::toString() const +{ + QString str = QLatin1String("PhoneNumber {\n"); + str += QStringLiteral(" Id: %1\n").arg(d->mId); + str += QStringLiteral(" Type: %1\n").arg(typeLabel(d->mType)); + if (!d->mParameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->mParameters.constBegin(); + const QMap::const_iterator end = d->mParameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QStringLiteral(" Number: %1\n").arg(d->mNumber); + str += QLatin1String("}\n"); + + return str; +} + +void PhoneNumber::setParameters(const QMap ¶ms) +{ + d->mParameters = params; +} + +QMap PhoneNumber::parameters() const +{ + return d->mParameters; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const PhoneNumber &phone) +{ + return s << phone.d->mId << (uint)phone.d->mType << phone.d->mNumber << phone.d->mParameters; +} + +QDataStream &KContacts::operator>>(QDataStream &s, PhoneNumber &phone) +{ + uint type; + s >> phone.d->mId >> type >> phone.d->mNumber >> phone.d->mParameters; + phone.d->mType = PhoneNumber::Type(type); + + return s; +} diff --git a/src/phonenumber.h b/src/phonenumber.h new file mode 100644 index 0000000..35f417e --- /dev/null +++ b/src/phonenumber.h @@ -0,0 +1,234 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_PHONENUMBER_H +#define KCONTACTS_PHONENUMBER_H + +#include "kcontacts_export.h" + +#include +#include +#include +#include + +namespace KContacts { +/** + * @short Phonenumber information. + * + * This class provides phone number information. A phone number is classified by + * a type. The following types are available, it's possible to use multiple types + * Types for a number by combining them through a logical or. +*/ +class KCONTACTS_EXPORT PhoneNumber +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const PhoneNumber &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, PhoneNumber &); + +public: + /** + Phone number types. + */ + enum TypeFlag { + Home = 1, /**< Home number */ + Work = 2, /**< Office number */ + Msg = 4, /**< Messaging */ + Pref = 8, /**< Preferred number */ + Voice = 16, /**< Voice */ + Fax = 32, /**< Fax machine */ + Cell = 64, /**< Cell phone */ + Video = 128, /**< Video phone */ + Bbs = 256, /**< Mailbox */ + Modem = 512, /**< Modem */ + Car = 1024, /**< Car phone */ + Isdn = 2048, /**< ISDN connection */ + Pcs = 4096, /**< Personal Communication Service*/ + Pager = 8192, /**< Pager */ + //TODO add Text and textphone support vcard4 + Undefined = 16384 /** Undefined number type */ + }; + + Q_DECLARE_FLAGS(Type, TypeFlag) + + /** + * List of phone number types. + */ + typedef QVector TypeList; + + /** + * List of phone numbers. + */ + typedef QVector List; + + /** + * Creates an empty phone number object. + */ + PhoneNumber(); + + /** + * Creates a phone number object. + * + * @param number Number + * @param type Type as defined in enum. Multiple types can be + * specified by combining them by a logical or. + */ + PhoneNumber(const QString &number, Type type = Home); //krazy:exclude=explicit + + /** + * Copy constructor. + * + * Fast operation, PhoneNumber's data is implicitly shared. + * + * @param other The PhoneNumber object to copy from + */ + PhoneNumber(const PhoneNumber &other); + + /** + * Destroys the phone number. + */ + ~PhoneNumber(); + + /** + * Equality operator. + * + * @return @c true if number, type and identifier are equal, + * otherwise @c false + */ + Q_REQUIRED_RESULT bool operator==(const PhoneNumber &other) const; + + /** + * Not-Equal operator. + */ + Q_REQUIRED_RESULT bool operator!=(const PhoneNumber &other) const; + + /** + * Assignment operator. + * + * Fast operation, PhoneNumber's data is implicitly shared. + * + * @param other The PhoneNumber object to asssign to @c this + */ + Q_REQUIRED_RESULT PhoneNumber &operator=(const PhoneNumber &other); + + /** + * Returns true, if the phone number is empty. + */ + Q_REQUIRED_RESULT bool isEmpty() const; + + /** + * Sets the unique @p identifier. + */ + void setId(const QString &identifier); + + /** + * Returns the unique identifier. + */ + Q_REQUIRED_RESULT QString id() const; + + /** + * Sets the phone @p number. + */ + void setNumber(const QString &number); + + /** + * Returns the phone number. + */ + Q_REQUIRED_RESULT QString number() const; + + /** + * Sets the @p type. + * Multiple types can be specified by combining them by a logical or. + * + * @param type The #Type of the phone number + */ + void setType(Type type); + + /** + * Returns the type. Can be a multiple types combined by a logical or. + * + * @see #TypeFlag + * @see typeLabel() + */ + Q_REQUIRED_RESULT Type type() const; + + /** + * Returns a translated string of the address' type. + */ + Q_REQUIRED_RESULT QString typeLabel() const; + + /** + * Returns a list of all available types + */ + Q_REQUIRED_RESULT static TypeList typeList(); + + /** + * Returns the translated label for phone number @p type. + * + * In opposite to typeFlagLabel( TypeFlag type ), it returns all types + * of the phone number concatenated by '/'. + * + * @param type An OR'ed combination of #TypeFlag + * + * @see type() + */ + static QString typeLabel(Type type); + + /** + * Returns the translated label for phone number @p type. + * + * @param type An OR'ed combination of #TypeFlag + * + * @see typeLabel() + * @since 4.5 + */ + Q_REQUIRED_RESULT static QString typeFlagLabel(TypeFlag type); + + /** + * Returns a string representation of the phone number. + */ + QString toString() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + +private: + class Private; + QSharedDataPointer d; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(PhoneNumber::Type) + +/** + * Serializes the phone @p number object into the @p stream. + * + * @param stream The stream to write into + * @param number The phone number object to serialize + */ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const PhoneNumber &number); + +/** + * Initializes the phone @p number object from the @p stream. + * + * @param stream The stream to read from + * @param number The phone number object to deserialize into + */ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, PhoneNumber &number); +} +Q_DECLARE_TYPEINFO(KContacts::PhoneNumber, Q_MOVABLE_TYPE); +#endif diff --git a/src/picture.cpp b/src/picture.cpp new file mode 100644 index 0000000..dc0ebc1 --- /dev/null +++ b/src/picture.cpp @@ -0,0 +1,247 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "picture.h" + +#include +#include + +#include + +namespace KContacts { +class PicturePrivate : public QSharedData +{ +public: + PicturePrivate() + : mIntern(false) + { + } + + PicturePrivate(const PicturePrivate &other) + : QSharedData(other) + { + mUrl = other.mUrl; + mType = other.mType; + mData = other.mData; + mIntern = other.mIntern; + } + + QString mUrl; + QString mType; + mutable QImage mData; + mutable QByteArray mRawData; + + bool mIntern; +}; +} + +Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer, s_sharedEmpty, (new KContacts::PicturePrivate)) + +using namespace KContacts; + +Picture::Picture() + : d(*s_sharedEmpty()) +{ +} + +Picture::Picture(const QString &url) + : d(new PicturePrivate) +{ + d->mUrl = url; +} + +Picture::Picture(const QImage &data) + : d(new PicturePrivate) +{ + setData(data); +} + +Picture::Picture(const Picture &other) + : d(other.d) +{ +} + +Picture::~Picture() +{ +} + +Picture &Picture::operator=(const Picture &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool Picture::operator==(const Picture &p) const +{ + if (d->mIntern != p.d->mIntern) { + return false; + } + + if (d->mType != p.d->mType) { + return false; + } + + if (d->mIntern) { + if (!d->mData.isNull() && !p.d->mData.isNull()) { + if (d->mData != p.d->mData) { + return false; + } + } else if (!d->mRawData.isEmpty() && !p.d->mRawData.isEmpty()) { + if (d->mRawData != p.d->mRawData) { + return false; + } + } else if ((!d->mData.isNull() || !d->mRawData.isEmpty()) + && (!p.d->mData.isNull() || !p.d->mRawData.isEmpty())) { + if (data() != p.data()) { + return false; + } + } else { + // if one picture is empty and the other is not + return false; + } + } else { + if (d->mUrl != p.d->mUrl) { + return false; + } + } + + return true; +} + +bool Picture::operator!=(const Picture &p) const +{ + return !(p == *this); +} + +bool Picture::isEmpty() const +{ + return + (d->mIntern == false && d->mUrl.isEmpty()) + || (d->mIntern == true && d->mData.isNull() && d->mRawData.isEmpty()); +} + +void Picture::setUrl(const QString &url) +{ + d->mUrl = url; + d->mType.clear(); + d->mIntern = false; +} + +void Picture::setUrl(const QString &url, const QString &type) +{ + d->mUrl = url; + d->mType = type; + d->mIntern = false; +} + +void Picture::setData(const QImage &data) +{ + d->mRawData.clear(); + d->mData = data; + d->mIntern = true; + +// set the type, the raw data will have when accessed through Picture::rawData() + if (!d->mData.hasAlphaChannel()) { + d->mType = QStringLiteral("jpeg"); + } else { + d->mType = QStringLiteral("png"); + } +} + +void Picture::setRawData(const QByteArray &rawData, const QString &type) +{ + d->mRawData = rawData; + d->mType = type; + d->mData = QImage(); + d->mIntern = true; +} + +void Picture::setType(const QString &type) +{ + d->mType = type; +} + +bool Picture::isIntern() const +{ + return d->mIntern; +} + +QString Picture::url() const +{ + return d->mUrl; +} + +QImage Picture::data() const +{ + if (d->mData.isNull() && !d->mRawData.isEmpty()) { + d->mData.loadFromData(d->mRawData); + } + + return d->mData; +} + +QByteArray Picture::rawData() const +{ + if (d->mRawData.isEmpty() && !d->mData.isNull()) { + QBuffer buffer(&d->mRawData); + buffer.open(QIODevice::WriteOnly); + + // d->mType was already set accordingly by Picture::setData() + d->mData.save(&buffer, d->mType.toUpper().toLatin1().data()); + } + + return d->mRawData; +} + +QString Picture::type() const +{ + return d->mType; +} + +QString Picture::toString() const +{ + QString str = QLatin1String("Picture {\n"); + str += QStringLiteral(" Type: %1\n").arg(d->mType); + str += QStringLiteral(" IsIntern: %1\n"). + arg(d->mIntern ? QStringLiteral("true") : QStringLiteral("false")); + if (d->mIntern) { + str += QStringLiteral(" Data: %1\n").arg(QString::fromLatin1(rawData().toBase64())); + } else { + str += QStringLiteral(" Url: %1\n").arg(d->mUrl); + } + str += QLatin1String("}\n"); + + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Picture &picture) +{ + return s << picture.d->mIntern << picture.d->mUrl << picture.d->mType << picture.data(); +} + +QDataStream &KContacts::operator>>(QDataStream &s, Picture &picture) +{ + s >> picture.d->mIntern >> picture.d->mUrl >> picture.d->mType >> picture.d->mData; + + return s; +} diff --git a/src/picture.h b/src/picture.h new file mode 100644 index 0000000..845066a --- /dev/null +++ b/src/picture.h @@ -0,0 +1,202 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_PICTURE_H +#define KCONTACTS_PICTURE_H + +#include "kcontacts_export.h" + +#include +#include +#include + +class QImage; + +namespace KContacts { +class PicturePrivate; + +/** + A class to store a picture of an addressee. It can store the data directly or + an url reference to a picture. +*/ +class KCONTACTS_EXPORT Picture +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Picture &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Picture &); + +public: + /** + * Creates an empty picture. + */ + Picture(); + + /** + * Creates a picture which points to the given url. + * + * @param url A URL that describes the location of the picture file. + */ + Picture(const QString &url); + + /** + * Creates a picture with the given data. + * + * @param data The raw data of the picture. + */ + Picture(const QImage &data); + + /** + * Copy constructor. + * + * Fast operation, Picture's data is implicitly shared. + * + * @param picture The Picture instance to copy from + */ + Picture(const Picture &picture); + + /** + * Destructor. + */ + ~Picture(); + + typedef QVector List; + /** + * Assignment operator + * + * Fast operation, Picture's data is implicitly shared. + * + * @param other The Picture instance to assign to @c this + */ + Q_REQUIRED_RESULT Picture &operator=(const Picture &other); + + /** + * Equality operator. + */ + Q_REQUIRED_RESULT bool operator==(const Picture &other) const; + + /** + * Not-Equal operator. + */ + Q_REQUIRED_RESULT bool operator!=(const Picture &other) const; + + /** + * Returns true, if the picture is empty. + */ + Q_REQUIRED_RESULT bool isEmpty() const; + + /** + * Sets a URL for the location of the picture file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * This also clears the type, as it is unknown. + * + * @param url The location URL of the picture file. + */ + void setUrl(const QString &url); + + /** + * Sets a URL for the location of the picture file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * + * @param url The location URL of the picture file. + * @param type The encoding format of the image, e.g. jpeg or png + * @since 4.10 + */ + void setUrl(const QString &url, const QString &type); + + /** + * Sets the image data of the picture. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * This also sets type to "png" or "jpeg" depending + * on whether the image has an alpha channel or not. + * + * @param data The image data of the picture. + */ + void setData(const QImage &data); + + /** + * Sets the raw data of the picture. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param rawData The raw data of the picture. + * @param type The encoding format of the image, e.g. jpeg or png + * @since 4.10 + */ + void setRawData(const QByteArray &rawData, const QString &type); + + /** + * Sets the type of the picture. + * @param type the picture's data type + * @deprecated type should only be set along with setRawData() + */ + void KCONTACTS_DEPRECATED setType(const QString &type); + + /** + * Returns whether the picture is described by a URL (extern) or + * by the raw data (intern). + * When this method returns 'true' you can use data() to + * get the raw data. Otherwise you can request the URL of this + * picture by url() and load the raw data from that location. + */ + Q_REQUIRED_RESULT bool isIntern() const; + + /** + * Returns the location URL of this picture. + */ + Q_REQUIRED_RESULT QString url() const; + + /** + * Returns the image data of this picture. + */ + Q_REQUIRED_RESULT QImage data() const; + + /** + * Returns the raw data of this picture. + * + * @since 4.10 + */ + Q_REQUIRED_RESULT QByteArray rawData() const; + + /** + * Returns the type of this picture. + */ + Q_REQUIRED_RESULT QString type() const; + + /** + * Returns string representation of the picture. + */ + Q_REQUIRED_RESULT QString toString() const; + +private: + QSharedDataPointer d; +}; + +/** + * Serializes the @p picture object into the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Picture &picture); + +/** + * Initializes the @p picture object from the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Picture &picture); +} +Q_DECLARE_TYPEINFO(KContacts::Picture, Q_MOVABLE_TYPE); +#endif diff --git a/src/related.cpp b/src/related.cpp new file mode 100644 index 0000000..a1d0e67 --- /dev/null +++ b/src/related.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "related.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Related::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + relatedTo = other.relatedTo; + } + + QMap parameters; + QString relatedTo; +}; + +Related::Related() + : d(new Private) +{ +} + +Related::Related(const Related &other) + : d(other.d) +{ +} + +Related::Related(const QString &relatedTo) + : d(new Private) +{ + d->relatedTo = relatedTo; +} + +Related::~Related() +{ +} + +void Related::setRelated(const QString &relatedTo) +{ + d->relatedTo = relatedTo; +} + +QString Related::related() const +{ + return d->relatedTo; +} + +bool Related::isValid() const +{ + return !d->relatedTo.isEmpty(); +} + +void Related::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Related::parameters() const +{ + return d->parameters; +} + +bool Related::operator==(const Related &other) const +{ + return (d->parameters == other.parameters()) && (d->relatedTo == other.related()); +} + +bool Related::operator!=(const Related &other) const +{ + return !(other == *this); +} + +Related &Related::operator=(const Related &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Related::toString() const +{ + QString str = QLatin1String("Related {\n"); + str += QStringLiteral(" relatedTo: %1\n").arg(d->relatedTo); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Related &related) +{ + return s << related.d->parameters << related.d->relatedTo; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Related &related) +{ + s >> related.d->parameters >> related.d->relatedTo; + return s; +} diff --git a/src/related.h b/src/related.h new file mode 100644 index 0000000..1411eac --- /dev/null +++ b/src/related.h @@ -0,0 +1,66 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RELATED_H +#define RELATED_H + +#include "kcontacts_export.h" +#include +#include +#include + +namespace KContacts { +class KCONTACTS_EXPORT Related +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Related &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Related &); +public: + Related(); + Related(const Related &other); + Related(const QString &related); + + ~Related(); + + typedef QVector List; + + void setRelated(const QString &relatedTo); + Q_REQUIRED_RESULT QString related() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Related &other) const; + Q_REQUIRED_RESULT bool operator!=(const Related &other) const; + + Q_REQUIRED_RESULT Related &operator=(const Related &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Related &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Related &object); +} +Q_DECLARE_TYPEINFO(KContacts::Related, Q_MOVABLE_TYPE); +#endif // LANG_H diff --git a/src/resourcelocatorurl.cpp b/src/resourcelocatorurl.cpp new file mode 100644 index 0000000..c6afd2f --- /dev/null +++ b/src/resourcelocatorurl.cpp @@ -0,0 +1,132 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "resourcelocatorurl.h" +#include +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN ResourceLocatorUrl::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + url = other.url; + } + + QMap parameters; + QUrl url; +}; + +ResourceLocatorUrl::ResourceLocatorUrl() + : d(new Private) +{ +} + +ResourceLocatorUrl::ResourceLocatorUrl(const ResourceLocatorUrl &other) + : d(other.d) +{ +} + +ResourceLocatorUrl::~ResourceLocatorUrl() +{ +} + +QMap ResourceLocatorUrl::parameters() const +{ + return d->parameters; +} + +bool ResourceLocatorUrl::operator==(const ResourceLocatorUrl &other) const +{ + return (d->parameters == other.parameters()) && (d->url == other.url()); +} + +bool ResourceLocatorUrl::operator!=(const ResourceLocatorUrl &other) const +{ + return !(other == *this); +} + +ResourceLocatorUrl &ResourceLocatorUrl::operator=(const ResourceLocatorUrl &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString ResourceLocatorUrl::toString() const +{ + QString str = QLatin1String("ResourceLocatorUrl {\n"); + str += QStringLiteral(" url: %1\n").arg(d->url.toString()); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +void ResourceLocatorUrl::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +bool ResourceLocatorUrl::isValid() const +{ + return d->url.isValid(); +} + +void ResourceLocatorUrl::setUrl(const QUrl &url) +{ + d->url = url; +} + +QUrl ResourceLocatorUrl::url() const +{ + return d->url; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const ResourceLocatorUrl &calUrl) +{ + return s << calUrl.d->parameters << calUrl.d->url; +} + +QDataStream &KContacts::operator>>(QDataStream &s, ResourceLocatorUrl &calUrl) +{ + s >> calUrl.d->parameters >> calUrl.d->url; + return s; +} diff --git a/src/resourcelocatorurl.h b/src/resourcelocatorurl.h new file mode 100644 index 0000000..6c92276 --- /dev/null +++ b/src/resourcelocatorurl.h @@ -0,0 +1,73 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2015-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef RESOURCELOCATORURL_H +#define RESOURCELOCATORURL_H + +#include "kcontacts_export.h" + +#include +#include +#include +class QUrl; +/** @short Class that holds a Resource Locator + * @since 5.0 + */ + +namespace KContacts { +class KCONTACTS_EXPORT ResourceLocatorUrl +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const ResourceLocatorUrl &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, ResourceLocatorUrl &); +public: + + ResourceLocatorUrl(); + ResourceLocatorUrl(const ResourceLocatorUrl &other); + + ~ResourceLocatorUrl(); + + typedef QVector List; + + Q_REQUIRED_RESULT bool isValid() const; + + void setUrl(const QUrl &url); + Q_REQUIRED_RESULT QUrl url() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const ResourceLocatorUrl &other) const; + Q_REQUIRED_RESULT bool operator!=(const ResourceLocatorUrl &other) const; + + ResourceLocatorUrl &operator=(const ResourceLocatorUrl &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; + +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const ResourceLocatorUrl &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, ResourceLocatorUrl &object); +} +Q_DECLARE_TYPEINFO(KContacts::ResourceLocatorUrl, Q_MOVABLE_TYPE); + +#endif // RESOURCELOCATORURL_H diff --git a/src/role.cpp b/src/role.cpp new file mode 100644 index 0000000..56ef0b1 --- /dev/null +++ b/src/role.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "role.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Role::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + role = other.role; + } + + QMap parameters; + QString role; +}; + +Role::Role() + : d(new Private) +{ +} + +Role::Role(const Role &other) + : d(other.d) +{ +} + +Role::Role(const QString &role) + : d(new Private) +{ + d->role = role; +} + +Role::~Role() +{ +} + +void Role::setRole(const QString &role) +{ + d->role = role; +} + +QString Role::role() const +{ + return d->role; +} + +bool Role::isValid() const +{ + return !d->role.isEmpty(); +} + +void Role::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Role::parameters() const +{ + return d->parameters; +} + +bool Role::operator==(const Role &other) const +{ + return (d->parameters == other.parameters()) && (d->role == other.role()); +} + +bool Role::operator!=(const Role &other) const +{ + return !(other == *this); +} + +Role &Role::operator=(const Role &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Role::toString() const +{ + QString str = QLatin1String("Role {\n"); + str += QStringLiteral(" role: %1\n").arg(d->role); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Role &role) +{ + return s << role.d->parameters << role.d->role; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Role &role) +{ + s >> role.d->parameters >> role.d->role; + return s; +} diff --git a/src/role.h b/src/role.h new file mode 100644 index 0000000..7a9ba6e --- /dev/null +++ b/src/role.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef ROLE_H +#define ROLE_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a Role for a contact. + * @since 5.3 + */ +namespace KContacts { +class KCONTACTS_EXPORT Role +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Role &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Role &); +public: + Role(); + Role(const Role &other); + Role(const QString &role); + + ~Role(); + + typedef QVector List; + + void setRole(const QString &role); + Q_REQUIRED_RESULT QString role() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap ¶ms); + Q_REQUIRED_RESULT QMap parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Role &other) const; + Q_REQUIRED_RESULT bool operator!=(const Role &other) const; + + Q_REQUIRED_RESULT Role &operator=(const Role &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Role &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Role &object); +} +Q_DECLARE_TYPEINFO(KContacts::Role, Q_MOVABLE_TYPE); +#endif // ROLE_H diff --git a/src/secrecy.cpp b/src/secrecy.cpp new file mode 100644 index 0000000..8ee8737 --- /dev/null +++ b/src/secrecy.cpp @@ -0,0 +1,160 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "secrecy.h" + +#include + +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Secrecy::PrivateData : public QSharedData +{ +public: + PrivateData() + : mType(Secrecy::Invalid) + { + } + + PrivateData(const PrivateData &other) + : QSharedData(other) + { + mType = other.mType; + } + + Type mType; +}; + +Secrecy::Secrecy(Type type) + : d(new PrivateData) +{ + d->mType = type; +} + +Secrecy::Secrecy(const Secrecy &other) + : d(other.d) +{ +} + +Secrecy::~Secrecy() +{ +} + +Secrecy &Secrecy::operator=(const Secrecy &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool Secrecy::operator==(const Secrecy &other) const +{ + return d->mType == other.d->mType; +} + +bool Secrecy::operator!=(const Secrecy &other) const +{ + return !(*this == other); +} + +bool Secrecy::isValid() const +{ + return d->mType != Invalid; +} + +void Secrecy::setType(Type type) +{ + d->mType = type; +} + +Secrecy::Type Secrecy::type() const +{ + return d->mType; +} + +Secrecy::TypeList Secrecy::typeList() +{ + static TypeList list; + + if (list.isEmpty()) { + list << Public << Private << Confidential; + } + + return list; +} + +QString Secrecy::typeLabel(Type type) +{ + switch (type) { + case Public: + return i18nc("access is for everyone", "Public"); + break; + case Private: + return i18nc("access is by owner only", "Private"); + break; + case Confidential: + return i18nc("access is by owner and a controlled group", "Confidential"); + break; + default: + return i18nc("unknown secrecy type", "Unknown type"); + break; + } +} + +QString Secrecy::toString() const +{ + QString str = QLatin1String("Secrecy {\n"); + str += QStringLiteral(" Type: %1\n").arg(typeLabel(d->mType)); + str += QLatin1String("}\n"); + + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Secrecy &secrecy) +{ + return s << (uint)secrecy.d->mType; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Secrecy &secrecy) +{ + uint type; + s >> type; + + switch (type) { + case 0: + secrecy.d->mType = Secrecy::Public; + break; + case 1: + secrecy.d->mType = Secrecy::Private; + break; + case 2: + secrecy.d->mType = Secrecy::Confidential; + break; + default: + secrecy.d->mType = Secrecy::Invalid; + break; + } + + return s; +} diff --git a/src/secrecy.h b/src/secrecy.h new file mode 100644 index 0000000..9345da4 --- /dev/null +++ b/src/secrecy.h @@ -0,0 +1,124 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_SECRECY_H +#define KCONTACTS_SECRECY_H + +#include "kcontacts_export.h" +#include +#include + +namespace KContacts { +class KCONTACTS_EXPORT Secrecy +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Secrecy &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Secrecy &); + +public: + /** + * Secrecy types + * + * @li Public - for public access + * @li Private - only private access + * @li Confidential - access for confidential persons + */ + enum Type { + Public, + Private, + Confidential, + Invalid + }; + + /** + * List of secrecy types. + */ + typedef QVector TypeList; + + /** + * Creates a new secrecy of the given type. + * + * @param type The secrecy type. @see Type + */ + Secrecy(Type type = Invalid); + + /** + * Copy constructor. + */ + Secrecy(const Secrecy &other); + + /** + * Destroys the secrecy. + */ + ~Secrecy(); + + Secrecy &operator=(const Secrecy &other); + + Q_REQUIRED_RESULT bool operator==(const Secrecy &other) const; + Q_REQUIRED_RESULT bool operator!=(const Secrecy &other) const; + + /** + * Returns if the Secrecy object has a valid value. + */ + Q_REQUIRED_RESULT bool isValid() const; + + /** + * Sets the @p type. + * + * @param type The #Type of secrecy + */ + void setType(Type type); + + /** + * Returns the type. + */ + Q_REQUIRED_RESULT Type type() const; + + /** + * Returns a list of all available secrecy types. + */ + Q_REQUIRED_RESULT static TypeList typeList(); + + /** + * Returns a translated label for a given secrecy @p type. + */ + Q_REQUIRED_RESULT static QString typeLabel(Type type); + + /** + * Returns a string representation of the secrecy. + */ + Q_REQUIRED_RESULT QString toString() const; + +private: + class PrivateData; + QSharedDataPointer d; +}; + +/** + * Serializes the @p secrecy object into the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Secrecy &secrecy); + +/** + * Initializes the @p secrecy object from the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Secrecy &secrecy); +} +Q_DECLARE_TYPEINFO(KContacts::Secrecy, Q_MOVABLE_TYPE); +#endif diff --git a/src/sortmode.cpp b/src/sortmode.cpp new file mode 100644 index 0000000..d19ca36 --- /dev/null +++ b/src/sortmode.cpp @@ -0,0 +1,114 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2004 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "sortmode.h" +#include "field.h" + +using namespace KContacts; + +SortMode::~SortMode() +{ +} + +class Q_DECL_HIDDEN NameSortMode::Private +{ +public: + NameType mNameType; + bool mAscendingOrder; +}; + +NameSortMode::NameSortMode() + : d(new Private) +{ + d->mNameType = FormattedName; + d->mAscendingOrder = true; +} + +NameSortMode::NameSortMode(NameType type, bool ascending) + : d(new Private) +{ + d->mNameType = type; + d->mAscendingOrder = ascending; +} + +NameSortMode::~NameSortMode() +{ + delete d; +} + +bool NameSortMode::lesser(const KContacts::Addressee &first, const KContacts::Addressee &second) const +{ + bool lesser = false; + + switch (d->mNameType) { + case FormattedName: + lesser = QString::localeAwareCompare(first.formattedName(), second.formattedName()) < 0; + break; + case FamilyName: + lesser = QString::localeAwareCompare(first.familyName(), second.familyName()) < 0; + break; + case GivenName: + lesser = QString::localeAwareCompare(first.givenName(), second.givenName()) < 0; + break; + default: + lesser = false; + break; + } + + if (!d->mAscendingOrder) { + lesser = !lesser; + } + + return lesser; +} + +class Q_DECL_HIDDEN FieldSortMode::Private +{ +public: + KContacts::Field *mField; + bool mAscendingOrder; +}; + +FieldSortMode::FieldSortMode(KContacts::Field *field, bool ascending) + : d(new Private) +{ + d->mField = field; + d->mAscendingOrder = ascending; +} + +FieldSortMode::~FieldSortMode() +{ + delete d; +} + +bool FieldSortMode::lesser(const KContacts::Addressee &first, const KContacts::Addressee &second) const +{ + if (!d->mField) { + return false; + } else { + bool lesser + = QString::localeAwareCompare(d->mField->value(first), d->mField->value(second)) < 0; + if (!d->mAscendingOrder) { + lesser = !lesser; + } + + return lesser; + } +} diff --git a/src/sortmode.h b/src/sortmode.h new file mode 100644 index 0000000..62edf3e --- /dev/null +++ b/src/sortmode.h @@ -0,0 +1,134 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2004 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_SORTMODE_H +#define KCONTACTS_SORTMODE_H + +#include "kcontacts_export.h" +#include "addressee.h" + +namespace KContacts { +class Field; + +/** + @short Sort method for sorting an addressee list. + + This interface should be reimplemented by classes which shall act as + SortModes for KContacts::AddresseeList. +*/ +class KCONTACTS_EXPORT SortMode +{ +public: + virtual ~SortMode(); + + /** + Reimplement this method and return whether the first contact is 'smaller' + than the second. + */ + virtual bool lesser(const KContacts::Addressee &first, const KContacts::Addressee &second) const = 0; +}; + +/** + @short Implements comparison by name. + + This class implements a comparison of two Addressee objects by name. + */ +class KCONTACTS_EXPORT NameSortMode : public SortMode +{ +public: + /** + Specifies which parts of the name are used for comparison. + */ + enum NameType { + FormattedName, /**< use the formatted name, e.g. "John Doe" */ + FamilyName, /**< use the last name, e.g. "Doe" */ + GivenName /**< use the first name, e.g. "John" */ + }; + + /** + Constructor. + + Creates a NameSortMethod with FormattedName as name type set. + */ + NameSortMode(); + + /** + Constructor. + + Creates a NameSortMethod with the specified name type. + + @param type The name type. + @param ascending if @c true, Addressee object are sorted in + ascending order; if @c false, objects are sorted in + descending order + */ + explicit NameSortMode(NameType type, bool ascending = true); + + ~NameSortMode() override; + + /** + Returns whether the first contact is 'smaller' then the second. + */ + bool lesser(const KContacts::Addressee &first, const KContacts::Addressee &second) const override; + +private: + class Private; + Private *const d; + + Q_DISABLE_COPY(NameSortMode) +}; + +/** + @short Implements comparison by an arbitrary field. + + This class implements a comparison of two Addressee objects by the + value of an arbitrary field. + */ +class KCONTACTS_EXPORT FieldSortMode : public SortMode +{ +public: + /** + Constructor. + + Creates a FieldSortMethod with the specified @p field. + + @param field The field. + @param ascending if @c true, Addressee object are sorted in + ascending order; if @c false, objects are sorted in + descending order + */ + explicit FieldSortMode(KContacts::Field *field, bool ascending = true); + + virtual ~FieldSortMode(); + + /** + Returns whether the first contact is 'smaller' then the second. + */ + bool lesser(const KContacts::Addressee &first, const KContacts::Addressee &second) const override; + +private: + class Private; + Private *const d; + + Q_DISABLE_COPY(FieldSortMode) +}; +} + +#endif diff --git a/src/sound.cpp b/src/sound.cpp new file mode 100644 index 0000000..b7491f8 --- /dev/null +++ b/src/sound.cpp @@ -0,0 +1,169 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "sound.h" + +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Sound::Private : public QSharedData +{ +public: + Private() + : mIntern(false) + { + } + + Private(const Private &other) + : QSharedData(other) + { + mUrl = other.mUrl; + mData = other.mData; + mIntern = other.mIntern; + } + + QString mUrl; + QByteArray mData; + + bool mIntern; +}; + +Sound::Sound() + : d(new Private) +{ +} + +Sound::Sound(const QString &url) + : d(new Private) +{ + d->mUrl = url; +} + +Sound::Sound(const QByteArray &data) + : d(new Private) +{ + d->mIntern = true; + d->mData = data; +} + +Sound::Sound(const Sound &other) + : d(other.d) +{ +} + +Sound::~Sound() +{ +} + +Sound &Sound::operator=(const Sound &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +bool Sound::operator==(const Sound &other) const +{ + if (d->mIntern != other.d->mIntern) { + return false; + } + + if (d->mIntern) { + if (d->mData != other.d->mData) { + return false; + } + } else { + if (d->mUrl != other.d->mUrl) { + return false; + } + } + + return true; +} + +bool Sound::operator!=(const Sound &other) const +{ + return !(other == *this); +} + +void Sound::setUrl(const QString &url) +{ + d->mIntern = false; + d->mUrl = url; +} + +void Sound::setData(const QByteArray &data) +{ + d->mIntern = true; + d->mData = data; +} + +bool Sound::isIntern() const +{ + return d->mIntern; +} + +bool Sound::isEmpty() const +{ + return + (d->mIntern && d->mData.isEmpty()) || (!d->mIntern && d->mUrl.isEmpty()); +} + +QString Sound::url() const +{ + return d->mUrl; +} + +QByteArray Sound::data() const +{ + return d->mData; +} + +QString Sound::toString() const +{ + QString str = QLatin1String("Sound {\n"); + str += QStringLiteral(" IsIntern: %1\n"). + arg(d->mIntern ? QStringLiteral("true") : QStringLiteral("false")); + if (d->mIntern) { + str += QStringLiteral(" Data: %1\n"). + arg(QString::fromLatin1(d->mData.toBase64())); + } else { + str += QStringLiteral(" Url: %1\n").arg(d->mUrl); + } + str += QLatin1String("}\n"); + + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Sound &sound) +{ + return s << sound.d->mIntern << sound.d->mUrl << sound.d->mData; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Sound &sound) +{ + s >> sound.d->mIntern >> sound.d->mUrl >> sound.d->mData; + + return s; +} diff --git a/src/sound.h b/src/sound.h new file mode 100644 index 0000000..7f92cbd --- /dev/null +++ b/src/sound.h @@ -0,0 +1,181 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2002 Tobias Koenig + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_SOUND_H +#define KCONTACTS_SOUND_H + +#include "kcontacts_export.h" +#include +#include + +namespace KContacts { +/** @short Class that holds a Sound clip for a contact. + * + * The sound can be played doing something like this: + * + * \code + * KTempFile tmp; + * if ( sound.isIntern() ) { + * tmp.file()->write( sound.data() ); + * tmp.close(); + * KAudioPlayer::play( tmp.name() ); + * } else if( !sound.url().isEmpty() ) { + * QString tmpFile; + * if ( !KIO::NetAccess::download( QUrl( themeURL.url() ), tmpFile, 0 ) ) { + * KMessageBox::error( 0, + * KIO::NetAccess::lastErrorString(), + * i18n( "Failed to download sound file" ), + * KMessageBox::Notify + * ); + * return; + * } + * KAudioPlayer::play( tmpFile ); + * } + * \endcode + * + * Unfortunately, KAudioPlayer::play is ASync, so to delete the temporary file + * the best you can really do is set a timer. + * + */ +class KCONTACTS_EXPORT Sound +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Sound &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Sound &); + +public: + + /** + * Creates an empty sound object. + */ + Sound(); + + /** + * Creates a sound object for the given url. + * + * @param url A url that describes the position of the sound file. + */ + Sound(const QString &url); + + /** + * Creates a sound object for the given data. + * + * @param data The raw data of the sound. + */ + Sound(const QByteArray &data); + + /** + * Copy constructor. + */ + Sound(const Sound &other); + + /** + * Destroys the sound object. + */ + ~Sound(); + + typedef QVector List; + /** + * Assignment operator. + * + * @param other The sound object to assign to @c this + */ + Sound &operator=(const Sound &other); + + /** + * Equality operator. + * + * @param other The object to compare with + * + * @return @c true if the two objects are equal, otherwise @c false + */ + Q_REQUIRED_RESULT bool operator==(const Sound &other) const; + + /** + * Not-Equal operator. + * + * @param other The object to compare with + * + * @return @c true if the two objects are not equal, otherwise @c false + */ + Q_REQUIRED_RESULT bool operator!=(const Sound &other) const; + + /** + * Sets a URL for the location of the sound file. When using this + * function, isIntern() will return 'false' until you use + * setData(). + * + * @param url The location URL of the sound file. + */ + void setUrl(const QString &url); + + /** + * Returns true, if the sound object is empty. + */ + Q_REQUIRED_RESULT bool isEmpty() const; + + /** + * Sets the raw data of the sound. When using this function, + * isIntern() will return 'true' until you use setUrl(). + * + * @param data The raw data of the sound. + */ + void setData(const QByteArray &data); + + /** + * Returns whether the sound is described by a URL (extern) or + * by the raw data (intern). + * When this method returns 'true' you can use data() to + * get the raw data. Otherwise you can request the URL of this + * sound by url() and load the raw data from that location. + */ + Q_REQUIRED_RESULT bool isIntern() const; + + /** + * Returns the location URL of this sound. + */ + Q_REQUIRED_RESULT QString url() const; + + /** + * Returns the raw data of this sound. + */ + Q_REQUIRED_RESULT QByteArray data() const; + + /** + * Returns string representation of the sound. + */ + Q_REQUIRED_RESULT QString toString() const; + +private: + class Private; + QSharedDataPointer d; +}; + +/** + * Serializes the @p sound object into the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Sound &sound); + +/** + * Initializes the @p sound object from the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Sound &sound); +} +Q_DECLARE_TYPEINFO(KContacts::Sound, Q_MOVABLE_TYPE); +#endif diff --git a/src/timezone.cpp b/src/timezone.cpp new file mode 100644 index 0000000..2067c92 --- /dev/null +++ b/src/timezone.cpp @@ -0,0 +1,133 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "timezone.h" + +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN TimeZone::Private : public QSharedData +{ +public: + Private(int offset = 0, bool valid = false) + : mOffset(offset) + , mValid(valid) + { + } + + Private(const Private &other) + : QSharedData(other) + { + mOffset = other.mOffset; + mValid = other.mValid; + } + + int mOffset; + bool mValid; +}; + +TimeZone::TimeZone() + : d(new Private) +{ +} + +TimeZone::TimeZone(int offset) + : d(new Private(offset, true)) +{ +} + +TimeZone::TimeZone(const TimeZone &other) + : d(other.d) +{ +} + +TimeZone::~TimeZone() +{ +} + +void TimeZone::setOffset(int offset) +{ + d->mOffset = offset; + d->mValid = true; +} + +int TimeZone::offset() const +{ + return d->mOffset; +} + +bool TimeZone::isValid() const +{ + return d->mValid; +} + +bool TimeZone::operator==(const TimeZone &t) const +{ + if (!t.isValid() && !isValid()) { + return true; + } + + if (!t.isValid() || !isValid()) { + return false; + } + + if (t.d->mOffset == d->mOffset) { + return true; + } + + return false; +} + +bool TimeZone::operator!=(const TimeZone &t) const +{ + return !(*this == t); +} + +TimeZone &TimeZone::operator=(const TimeZone &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString TimeZone::toString() const +{ + QString str = QLatin1String("TimeZone {\n"); + str += QStringLiteral(" Offset: %1\n").arg(d->mOffset); + str += QLatin1String("}\n"); + + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const TimeZone &zone) +{ + return s << zone.d->mOffset << zone.d->mValid; +} + +QDataStream &KContacts::operator>>(QDataStream &s, TimeZone &zone) +{ + s >> zone.d->mOffset >> zone.d->mValid; + + return s; +} diff --git a/src/timezone.h b/src/timezone.h new file mode 100644 index 0000000..8fe45cd --- /dev/null +++ b/src/timezone.h @@ -0,0 +1,105 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2001 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_TIMEZONE_H +#define KCONTACTS_TIMEZONE_H + +#include "kcontacts_export.h" +#include +#include + +namespace KContacts { +/** + * @short Time zone information. + * + * This class stores information about a time zone. + */ +class KCONTACTS_EXPORT TimeZone +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const TimeZone &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, TimeZone &); + +public: + /** + * Construct invalid time zone. + */ + TimeZone(); + + /** + * Construct time zone. + * + * @param offset Offset in minutes relative to UTC. + */ + TimeZone(int offset); + + /** + * Copy constructor. + */ + TimeZone(const TimeZone &other); + + /** + * Destroys the time zone. + */ + ~TimeZone(); + + /** + * Set time zone offset relative to UTC. + * + * @param offset Offset in minutes. + */ + void setOffset(int offset); + + /** + * Return offset in minutes relative to UTC. + */ + Q_REQUIRED_RESULT int offset() const; + + /** + * Return, if this time zone object is valid. + */ + Q_REQUIRED_RESULT bool isValid() const; + + Q_REQUIRED_RESULT bool operator==(const TimeZone &other) const; + Q_REQUIRED_RESULT bool operator!=(const TimeZone &other) const; + TimeZone &operator=(const TimeZone &other); + + /** + * Return string representation of time zone offset. + */ + Q_REQUIRED_RESULT QString toString() const; + +private: + class Private; + QSharedDataPointer d; +}; + +/** + * Serializes the @p timezone object into the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const TimeZone &timeZone); + +/** + * Initializes the @p timezone object from the @p stream. + */ +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, TimeZone &timeZone); +} +Q_DECLARE_TYPEINFO(KContacts::TimeZone, Q_MOVABLE_TYPE); + +#endif diff --git a/src/title.cpp b/src/title.cpp new file mode 100644 index 0000000..46839a9 --- /dev/null +++ b/src/title.cpp @@ -0,0 +1,137 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "title.h" +#include +#include +#include + +using namespace KContacts; + +class Q_DECL_HIDDEN Title::Private : public QSharedData +{ +public: + Private() + { + } + + Private(const Private &other) + : QSharedData(other) + { + parameters = other.parameters; + title = other.title; + } + + QMap parameters; + QString title; +}; + +Title::Title() + : d(new Private) +{ +} + +Title::Title(const Title &other) + : d(other.d) +{ +} + +Title::Title(const QString &title) + : d(new Private) +{ + d->title = title; +} + +Title::~Title() +{ +} + +void Title::setTitle(const QString &title) +{ + d->title = title; +} + +QString Title::title() const +{ + return d->title; +} + +bool Title::isValid() const +{ + return !d->title.isEmpty(); +} + +void Title::setParameters(const QMap ¶ms) +{ + d->parameters = params; +} + +QMap Title::parameters() const +{ + return d->parameters; +} + +bool Title::operator==(const Title &other) const +{ + return (d->parameters == other.parameters()) && (d->title == other.title()); +} + +bool Title::operator!=(const Title &other) const +{ + return !(other == *this); +} + +Title &Title::operator=(const Title &other) +{ + if (this != &other) { + d = other.d; + } + + return *this; +} + +QString Title::toString() const +{ + QString str = QLatin1String("Title {\n"); + str += QStringLiteral(" title: %1\n").arg(d->title); + if (!d->parameters.isEmpty()) { + QString param; + QMap::const_iterator it = d->parameters.constBegin(); + const QMap::const_iterator end = d->parameters.constEnd(); + while (it != end) { + param += QStringLiteral("%1 %2").arg(it.key(), it.value().join(QLatin1Char(','))); + ++it; + } + str += QStringLiteral(" parameters: %1\n").arg(param); + } + str += QLatin1String("}\n"); + return str; +} + +QDataStream &KContacts::operator<<(QDataStream &s, const Title &title) +{ + return s << title.d->parameters << title.d->title; +} + +QDataStream &KContacts::operator>>(QDataStream &s, Title &title) +{ + s >> title.d->parameters >> title.d->title; + return s; +} diff --git a/src/title.h b/src/title.h new file mode 100644 index 0000000..add4ce6 --- /dev/null +++ b/src/title.h @@ -0,0 +1,69 @@ +/* + This file is part of the KContacts framework. + Copyright (C) 2016-2018 Laurent Montel + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TITLE_H +#define TITLE_H + +#include "kcontacts_export.h" +#include +#include +#include + +/** @short Class that holds a Title for a contact. + * @since 5.3 + */ +namespace KContacts { +class KCONTACTS_EXPORT Title +{ + friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Title &); + friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Title &); +public: + Title(); + Title(const Title &other); + Title(const QString &title); + + ~Title(); + + typedef QVector List; + + void setTitle(const QString &title); + Q_REQUIRED_RESULT QString title() const; + + Q_REQUIRED_RESULT bool isValid() const; + + void setParameters(const QMap<QString, QStringList> ¶ms); + Q_REQUIRED_RESULT QMap<QString, QStringList> parameters() const; + + Q_REQUIRED_RESULT bool operator==(const Title &other) const; + Q_REQUIRED_RESULT bool operator!=(const Title &other) const; + + Title &operator=(const Title &other); + + Q_REQUIRED_RESULT QString toString() const; +private: + class Private; + QSharedDataPointer<Private> d; +}; +KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Title &object); + +KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Title &object); +} +Q_DECLARE_TYPEINFO(KContacts::Title, Q_MOVABLE_TYPE); +#endif // TITLE_H diff --git a/src/vcarddrag.cpp b/src/vcarddrag.cpp new file mode 100644 index 0000000..6c296b0 --- /dev/null +++ b/src/vcarddrag.cpp @@ -0,0 +1,93 @@ +/* + This file is part of the KContacts framework. + + Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcarddrag.h" + +#include "converter/vcardconverter.h" + +#include <QMimeData> +#include <QMimeDatabase> + +using namespace KContacts; + +static QString findCompatibleMimeType(const QMimeData *md) +{ + if (!md) { + return {}; + } + // check the canonical MIME type first + if (md->hasFormat(KContacts::Addressee::mimeType())) { + return KContacts::Addressee::mimeType(); + } + + const QStringList mimeTypeOffers = md->formats(); + const QMimeDatabase db; + for (const QString &mimeType : mimeTypeOffers) { + const QMimeType mimeTypePtr = db.mimeTypeForName(mimeType); + if (mimeTypePtr.isValid() && mimeTypePtr.inherits(KContacts::Addressee::mimeType())) { + return mimeType; + } + } + + return QString(); +} + +bool VCardDrag::populateMimeData(QMimeData *md, const QByteArray &content) +{ + md->setData(KContacts::Addressee::mimeType(), content); + return true; +} + +bool VCardDrag::populateMimeData(QMimeData *md, const KContacts::Addressee::List &addressees) +{ + KContacts::VCardConverter converter; + const QByteArray vcards = converter.createVCards(addressees); + if (!vcards.isEmpty()) { + return populateMimeData(md, vcards); + } else { + return false; + } +} + +bool VCardDrag::canDecode(const QMimeData *md) +{ + return !findCompatibleMimeType(md).isEmpty(); +} + +bool VCardDrag::fromMimeData(const QMimeData *md, QByteArray &content) +{ + const QString mimeOffer = findCompatibleMimeType(md); + if (mimeOffer.isEmpty()) { + return false; + } + content = md->data(mimeOffer); + return !content.isEmpty(); +} + +bool VCardDrag::fromMimeData(const QMimeData *md, KContacts::Addressee::List &addressees) +{ + const QString mimeOffer = findCompatibleMimeType(md); + if (mimeOffer.isEmpty()) { + return false; + } + addressees = KContacts::VCardConverter().parseVCards(md->data(mimeOffer)); + return !addressees.isEmpty(); +} diff --git a/src/vcarddrag.h b/src/vcarddrag.h new file mode 100644 index 0000000..219f925 --- /dev/null +++ b/src/vcarddrag.h @@ -0,0 +1,97 @@ +/* + This file is part of the KContacts framework. + + Copyright (c) 2002-2010 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_VCARDDRAG_H +#define KCONTACTS_VCARDDRAG_H + +#include "kcontacts_export.h" + +#include <kcontacts/addressee.h> +#include <QMimeData> + +namespace KContacts { +/** + @brief Utility function for implementing drag&drop for vCards + + See the Qt drag'n'drop documentation. + + @since 4.5 +*/ +namespace VCardDrag { +/** + Adds the vCard representation as data of the drag object. + + @param md the object to set the data on + @param content the vCard data to set + + @return Always @c true +*/ +KCONTACTS_EXPORT bool populateMimeData(QMimeData *md, const QByteArray &content); + +/** + Adds the vCard representation as data of the drag object. + + @param md the object to set the data on + @param contacts list of Addressee objects to serialize to vCard + + @return @c true if serializing of the given list worked, otherwise @c false + + @see VCardConverter::createVCards() +*/ +KCONTACTS_EXPORT bool populateMimeData(QMimeData *md, const KContacts::Addressee::List &contacts); + +/** + Returns if drag&drop object can be decoded to vCard. + + @param md the object to check for vCard data + + @return @c true if the given data object contains a vCard MIME type, otherwise @c false +*/ +KCONTACTS_EXPORT bool canDecode(const QMimeData *md); + +/** + Decodes the drag&drop object to vCard component @p content. + + @param md the object to check for vCard data + @param content where to put the vCard data from @p md + + @return @c true if there was data for the vCard MIME type, otherwise @c false + + @see canDecode() +*/ +KCONTACTS_EXPORT bool fromMimeData(const QMimeData *md, QByteArray &content); + +/** + Decodes the MIME data @p md and puts the resulting vCard into @p contactss. + + @param md the object to check for vCard data + @param contacts where to put the parsed vCards from @p md + + @return @c true if there was data for the vCard MIME type and it could be parsed successfully, + otherwise @c false + + @see canDecode() +*/ +KCONTACTS_EXPORT bool fromMimeData(const QMimeData *md, KContacts::Addressee::List &contacts); +} +} + +#endif // VCARDDRAG_H diff --git a/src/vcardparser/CMakeLists.txt b/src/vcardparser/CMakeLists.txt new file mode 100644 index 0000000..5ada0ee --- /dev/null +++ b/src/vcardparser/CMakeLists.txt @@ -0,0 +1,10 @@ + + +########### install files ############### +install( + FILES + vcard.h + vcardline.h + vcardparser.h + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/kcontacts COMPONENT Devel +) diff --git a/src/vcardparser/vcard.cpp b/src/vcardparser/vcard.cpp new file mode 100644 index 0000000..59717b3 --- /dev/null +++ b/src/vcardparser/vcard.cpp @@ -0,0 +1,121 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcard.h" +#include <QVector> + +using namespace KContacts; + +VCard::VCard() +{ +} + +VCard::VCard(const VCard &vcard) +{ + mLineMap = vcard.mLineMap; +} + +VCard::~VCard() +{ +} + +VCard &VCard::operator=(const VCard &vcard) +{ + if (&vcard == this) { + return *this; + } + + mLineMap = vcard.mLineMap; + + return *this; +} + +void VCard::clear() +{ + mLineMap.clear(); +} + +QStringList VCard::identifiers() const +{ + return mLineMap.keys(); +} + +void VCard::addLine(const VCardLine &line) +{ + mLineMap[ line.identifier() ].append(line); +} + +VCardLine::List VCard::lines(const QString &identifier) const +{ + LineMap::ConstIterator it = mLineMap.find(identifier); + if (it == mLineMap.end()) { + return VCardLine::List(); + } + + return *it; +} + +VCardLine VCard::line(const QString &identifier) const +{ + LineMap::ConstIterator it = mLineMap.find(identifier); + if (it == mLineMap.end()) { + return VCardLine(); + } + + if ((*it).isEmpty()) { + return VCardLine(); + } else { + return (*it).first(); + } +} + +void VCard::setVersion(Version version) +{ + mLineMap.remove(QStringLiteral("VERSION")); + + VCardLine line; + line.setIdentifier(QStringLiteral("VERSION")); + if (version == v2_1) { + line.setIdentifier(QStringLiteral("2.1")); + } else if (version == v3_0) { + line.setIdentifier(QStringLiteral("3.0")); + } else if (version == v4_0) { + line.setIdentifier(QStringLiteral("4.0")); + } + + mLineMap[ QStringLiteral("VERSION") ].append(line); +} + +VCard::Version VCard::version() const +{ + LineMap::ConstIterator versionEntry = mLineMap.find(QStringLiteral("VERSION")); + if (versionEntry == mLineMap.end()) { + return v3_0; + } + + VCardLine line = (*versionEntry)[ 0 ]; + if (line.value() == QLatin1String("2.1")) { + return v2_1; + } else if (line.value() == QLatin1String("3.0")) { + return v3_0; + } else { + return v4_0; + } +} diff --git a/src/vcardparser/vcard.h b/src/vcardparser/vcard.h new file mode 100644 index 0000000..716eb21 --- /dev/null +++ b/src/vcardparser/vcard.h @@ -0,0 +1,89 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDPARSER_VCARD_H +#define VCARDPARSER_VCARD_H + +#include <QMap> +#include <QStringList> + +#include "vcardline.h" + +namespace KContacts { +class VCard +{ +public: + typedef QVector<VCard> List; + typedef QMap<QString, VCardLine::List> LineMap; + + enum Version { + v2_1, + v3_0, + v4_0 + }; + + VCard(); + VCard(const VCard &card); + + ~VCard(); + + VCard &operator=(const VCard &card); + + /** + * Removes all lines from the vCard. + */ + void clear(); + + /** + * Returns a list of all identifiers that exists in the vCard. + */ + Q_REQUIRED_RESULT QStringList identifiers() const; + + /** + * Adds a VCardLine to the VCard + */ + void addLine(const VCardLine &line); + + /** + * Returns all lines of the vcard with a special identifier. + */ + Q_REQUIRED_RESULT VCardLine::List lines(const QString &identifier) const; + + /** + * Returns only the first line of the vcard with a special identifier. + */ + Q_REQUIRED_RESULT VCardLine line(const QString &identifier) const; + + /** + * Set the version of the vCard. + */ + void setVersion(Version version); + + /** + * Returns the version of this vCard. + */ + Q_REQUIRED_RESULT Version version() const; + +private: + LineMap mLineMap; +}; +} + +#endif diff --git a/src/vcardparser/vcardline.cpp b/src/vcardparser/vcardline.cpp new file mode 100644 index 0000000..719bad6 --- /dev/null +++ b/src/vcardparser/vcardline.cpp @@ -0,0 +1,149 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardline.h" + +using namespace KContacts; + +VCardLine::VCardLine() +{ +} + +VCardLine::VCardLine(const QString &identifier) +{ + mIdentifier = identifier; +} + +VCardLine::VCardLine(const QString &identifier, const QVariant &value) +{ + mIdentifier = identifier; + mValue = value; +} + +VCardLine::VCardLine(const VCardLine &line) +{ + mParamMap = line.mParamMap; + mValue = line.mValue; + mIdentifier = line.mIdentifier; + mGroup = line.mGroup; +} + +VCardLine::~VCardLine() +{ +} + +VCardLine &VCardLine::operator=(const VCardLine &line) +{ + if (&line == this) { + return *this; + } + + mParamMap = line.mParamMap; + mValue = line.mValue; + mIdentifier = line.mIdentifier; + mGroup = line.mGroup; + + return *this; +} + +bool VCardLine::operator==(const VCardLine &other) const +{ + return (mParamMap == other.parameterMap()) + && (mValue == other.value()) + && (mIdentifier == other.identifier()) + && (mGroup == other.group()); +} + +void VCardLine::setIdentifier(const QString &identifier) +{ + mIdentifier = identifier; +} + +QString VCardLine::identifier() const +{ + return mIdentifier; +} + +void VCardLine::setValue(const QVariant &value) +{ + mValue = value; +} + +QVariant VCardLine::value() const +{ + return mValue; +} + +void VCardLine::setGroup(const QString &group) +{ + mGroup = group; +} + +QString VCardLine::group() const +{ + return mGroup; +} + +bool VCardLine::hasGroup() const +{ + return !mGroup.isEmpty(); +} + +QStringList VCardLine::parameterList() const +{ + return mParamMap.keys(); +} + +void VCardLine::addParameter(const QString ¶m, const QString &value) +{ + QStringList &list = mParamMap[ param ]; + if (!list.contains(value)) { // not included yet + list.append(value); + } +} + +QStringList VCardLine::parameters(const QString ¶m) const +{ + ParamMap::ConstIterator it = mParamMap.find(param); + if (it == mParamMap.end()) { + return QStringList(); + } else { + return *it; + } +} + +QString VCardLine::parameter(const QString ¶m) const +{ + ParamMap::ConstIterator it = mParamMap.find(param); + if (it == mParamMap.end()) { + return QString(); + } else { + if ((*it).isEmpty()) { + return QString(); + } else { + return (*it).first(); + } + } +} + +VCardLine::ParamMap VCardLine::parameterMap() const +{ + return mParamMap; +} diff --git a/src/vcardparser/vcardline.h b/src/vcardparser/vcardline.h new file mode 100644 index 0000000..2b315bd --- /dev/null +++ b/src/vcardparser/vcardline.h @@ -0,0 +1,133 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDLINE_H +#define VCARDLINE_H + +#include <QMap> +#include <QString> +#include <QStringList> +#include <QVariant> + +#include "kcontacts_export.h" + +namespace KContacts { +class KCONTACTS_EXPORT VCardLine +{ +public: + typedef QVector<VCardLine> List; + typedef QMap<QString, QStringList> ParamMap; + + VCardLine(); + VCardLine(const QString &identifier); + VCardLine(const QString &identifier, const QVariant &value); + VCardLine(const VCardLine &line); + + ~VCardLine(); + + VCardLine &operator=(const VCardLine &line); + + /** + * Equality operator. + * + */ + Q_REQUIRED_RESULT bool operator==(const VCardLine &other) const; + + /** + * Sets the identifier of this line e.g. UID, FN, CLASS + * + * @param identifier The VCard identifier of this line + */ + void setIdentifier(const QString &identifier); + + /** + * Returns the identifier of this line. + */ + Q_REQUIRED_RESULT QString identifier() const; + + /** + * Sets the value of of this line. + */ + void setValue(const QVariant &value); + + /** + * Returns the value of this line. + */ + Q_REQUIRED_RESULT QVariant value() const; + + /** + * Sets the group the line belongs to. + */ + void setGroup(const QString &group); + + /** + * Returns the group the line belongs to. + */ + Q_REQUIRED_RESULT QString group() const; + + /** + * Returns whether the line belongs to a group. + */ + Q_REQUIRED_RESULT bool hasGroup() const; + + /** + * Returns all parameters. + */ + Q_REQUIRED_RESULT QStringList parameterList() const; + + /** + * Add a new parameter to the line. + * + * @param param Name of the parameter to insert + * @param value Value of the parameter to insert + */ + void addParameter(const QString ¶m, const QString &value); + + /** + * Returns the values of a special parameter. + * You can get a list of all parameters with paramList(). + * + * @param param Name of the parameter to look for + */ + Q_REQUIRED_RESULT QStringList parameters(const QString ¶m) const; + + /** + * Returns only the first value of a special parameter. + * You can get a list of all parameters with paramList(). + * + * @param param Name of the parameter to look for + */ + Q_REQUIRED_RESULT QString parameter(const QString ¶m) const; + + /** + * Returns all parameters + * @since 4.14.5 + */ + Q_REQUIRED_RESULT ParamMap parameterMap() const; + +private: + ParamMap mParamMap; + QString mIdentifier; + QString mGroup; + QVariant mValue; +}; +} + +#endif diff --git a/src/vcardparser/vcardparser.cpp b/src/vcardparser/vcardparser.cpp new file mode 100644 index 0000000..e8e3726 --- /dev/null +++ b/src/vcardparser/vcardparser.cpp @@ -0,0 +1,501 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardparser.h" +#include <kcodecs.h> +#include "kcontacts_debug.h" +#include <QTextCodec> +#include <functional> + +// This cache for QString::fromLatin1() isn't about improving speed, but about reducing memory usage by sharing common strings +class StringCache +{ +public: + QString fromLatin1(const QByteArray &value) + { + if (value.isEmpty()) { + return QString(); + } + + QHash<QByteArray, QString>::const_iterator it = m_values.constFind(value); + if (it != m_values.constEnd()) { + return it.value(); + } + + QString string = QString::fromLatin1(value); + m_values.insert(value, string); + return string; + } + +private: + QHash<QByteArray, QString> m_values; +}; + +using namespace KContacts; + +static void addEscapes(QByteArray &str, bool excludeEscapedComma) +{ + str.replace('\\', "\\\\"); + if (!excludeEscapedComma) { + str.replace(',', "\\,"); + } + str.replace('\r', "\\r"); + str.replace('\n', "\\n"); +} + +static void removeEscapes(QByteArray &str) +{ + // It's more likely that no escape is present, so add fast path + if (!str.contains('\\')) { + return; + } + str.replace("\\n", "\n"); + str.replace("\\N", "\n"); + str.replace("\\r", "\r"); + str.replace("\\,", ","); + str.replace("\\\\", "\\"); +} + +class VCardLineParser +{ +public: + VCardLineParser(StringCache &cache, std::function<QByteArray()> fetchAnotherLine) + : m_cache(cache) + , m_fetchAnotherLine(fetchAnotherLine) + { + } + + void parseLine(const QByteArray ¤tLine, VCardLine *vCardLine); + +private: + void addParameter(const QByteArray ¶mKey, const QByteArray ¶mValue); + +private: + StringCache &m_cache; + std::function<QByteArray()> m_fetchAnotherLine; + + VCardLine *m_vCardLine = nullptr; + QByteArray m_encoding; + QByteArray m_charset; +}; + +void VCardLineParser::addParameter(const QByteArray ¶mKey, const QByteArray ¶mValue) +{ + if (paramKey == "encoding") { + m_encoding = paramValue.toLower(); + } else if (paramKey == "charset") { + m_charset = paramValue.toLower(); + } + //qDebug() << " add parameter" << paramKey << " = " << paramValue; + m_vCardLine->addParameter(m_cache.fromLatin1(paramKey), m_cache.fromLatin1(paramValue)); +} + +void VCardLineParser::parseLine(const QByteArray ¤tLine, KContacts::VCardLine *vCardLine) +{ + //qDebug() << currentLine; + m_vCardLine = vCardLine; + // The syntax is key:value, but the key can contain semicolon-separated parameters, which can contain a ':', so indexOf(':') is wrong. + // EXAMPLE: ADR;GEO="geo:22.500000,45.099998";LABEL="My Label";TYPE=home:P.O. Box 101;;;Any Town;CA;91921-1234; + // Therefore we need a small state machine, just the way I like it. + enum State { + StateInitial, StateParamKey, StateParamValue, StateQuotedValue, StateAfterParamValue, StateValue + }; + State state = StateInitial; + const int lineLength = currentLine.length(); + const char *lineData = currentLine.constData(); // to skip length checks from at() in debug mode + QByteArray paramKey; + QByteArray paramValue; + int start = 0; + int pos = 0; + for (; pos < lineLength; ++pos) { + const char ch = lineData[pos]; + const bool colonOrSemicolon = (ch == ';' || ch == ':'); + switch (state) { + case StateInitial: + if (colonOrSemicolon) { + const QByteArray identifier = currentLine.mid(start, pos - start); + //qDebug() << " identifier" << identifier; + vCardLine->setIdentifier(m_cache.fromLatin1(identifier)); + start = pos + 1; + } + if (ch == ';') { + state = StateParamKey; + } else if (ch == ':') { + state = StateValue; + } else if (ch == '.') { + vCardLine->setGroup(m_cache.fromLatin1(currentLine.mid(start, pos - start))); + start = pos + 1; + } + break; + case StateParamKey: + if (colonOrSemicolon || ch == '=') { + paramKey = currentLine.mid(start, pos - start); + start = pos + 1; + } + if (colonOrSemicolon) { + // correct the so-called 2.1 'standard' + paramValue = paramKey; + const QByteArray lowerKey = paramKey.toLower(); + if (lowerKey == "quoted-printable" || lowerKey == "base64") { + paramKey = "encoding"; + } else { + paramKey = "type"; + } + addParameter(paramKey, paramValue); + } + if (ch == ';') { + state = StateParamKey; + } else if (ch == ':') { + state = StateValue; + } else if (ch == '=') { + state = StateParamValue; + } + break; + case StateQuotedValue: + if (ch == '"' || (ch == ',' && paramKey.toLower() == "type")) { + // TODO the hack above is for TEL;TYPE=\"voice,home\":... without breaking GEO.... TODO: check spec + paramValue = currentLine.mid(start, pos - start); + addParameter(paramKey.toLower(), paramValue); + start = pos + 1; + if (ch == '"') { + state = StateAfterParamValue; // to avoid duplicating code with StateParamValue, we use this intermediate state for one char + } + } + break; + case StateParamValue: + if (colonOrSemicolon || ch == ',') { + paramValue = currentLine.mid(start, pos - start); + addParameter(paramKey.toLower(), paramValue); + start = pos + 1; + } + // fall-through intended + Q_FALLTHROUGH(); + case StateAfterParamValue: + if (ch == ';') { + state = StateParamKey; + start = pos + 1; + } else if (ch == ':') { + state = StateValue; + } else if (pos == start && ch == '"') { // don't treat foo"bar" as quoted - TODO check the vCard 3.0 spec. + state = StateQuotedValue; + start = pos + 1; + } + break; + case StateValue: + Q_UNREACHABLE(); + break; + } + + if (state == StateValue) { + break; + } + } + + if (state != StateValue) { // invalid line, no ':' + return; + } + + QByteArray value = currentLine.mid(pos + 1); + removeEscapes(value); + + QByteArray output; + bool wasBase64Encoded = false; + + if (!m_encoding.isEmpty()) { + // have to decode the data + if (m_encoding == "b" || m_encoding == "base64") { + output = QByteArray::fromBase64(value); + wasBase64Encoded = true; + } else if (m_encoding == "quoted-printable") { + // join any qp-folded lines + while (value.endsWith('=')) { + value.chop(1); // remove the '=' + value.append(m_fetchAnotherLine()); + } + KCodecs::quotedPrintableDecode(value, output); + } else if (m_encoding == "8bit") { + output = value; + } else { + qDebug("Unknown vcard encoding type!"); + } + } else { + output = value; + } + + if (!m_charset.isEmpty()) { + // have to convert the data + QTextCodec *codec = QTextCodec::codecForName(m_charset); + if (codec) { + vCardLine->setValue(codec->toUnicode(output)); + } else { + vCardLine->setValue(QString::fromUtf8(output)); + } + } else if (wasBase64Encoded) { + vCardLine->setValue(output); + } else { + vCardLine->setValue(QString::fromUtf8(output)); + } +} + +//// + +VCardParser::VCardParser() + : d(nullptr) +{ +} + +VCardParser::~VCardParser() +{ +} + +VCard::List VCardParser::parseVCards(const QByteArray &text) +{ + VCard currentVCard; + VCard::List vCardList; + QByteArray currentLine; + + int lineStart = 0; + int lineEnd = text.indexOf('\n'); + + bool inVCard = false; + + StringCache cache; + for (; lineStart != text.size() + 1; lineStart = lineEnd + 1, lineEnd = (text.indexOf('\n', lineStart) == -1) ? text.size() : text.indexOf('\n', lineStart)) { + QByteArray cur = text.mid(lineStart, lineEnd - lineStart); + // remove the trailing \r, left from \r\n + if (cur.endsWith('\r')) { + cur.chop(1); + } + + if (cur.startsWith(' ') + || cur.startsWith('\t')) { //folded line => append to previous + currentLine.append(cur.mid(1)); + continue; + } else { + if (cur.trimmed().isEmpty()) { // empty line + continue; + } + if (inVCard && !currentLine.isEmpty()) { // now parse the line + VCardLine vCardLine; + + // Provide a way for the parseVCardLine function to read more lines (for quoted-printable support) + auto fetchAnotherLine = [&text, &lineStart, &lineEnd, &cur]() -> QByteArray { + const QByteArray ret = cur; + lineStart = lineEnd + 1; + lineEnd = text.indexOf('\n', lineStart); + if (lineEnd != -1) { + cur = text.mid(lineStart, lineEnd - lineStart); + // remove the trailing \r, left from \r\n + if (cur.endsWith('\r')) { + cur.chop(1); + } + } + return ret; + }; + + VCardLineParser lineParser(cache, fetchAnotherLine); + + lineParser.parseLine(currentLine, &vCardLine); + + currentVCard.addLine(vCardLine); + } + + const QByteArray curLower = cur.toLower(); + + // we do not save the start and end tag as vcardline + if (curLower.startsWith("begin:vcard")) { //krazy:exclude=strings + inVCard = true; + currentLine.clear(); + currentVCard.clear(); // flush vcard + continue; + } + + if (curLower.startsWith("end:vcard")) { //krazy:exclude=strings + inVCard = false; + vCardList.append(currentVCard); + currentLine.clear(); + currentVCard.clear(); // flush vcard + continue; + } + + currentLine = cur; + } + } + + return vCardList; +} + +static const int FOLD_WIDTH = 75; + +QByteArray VCardParser::createVCards(const VCard::List &list) +{ + QByteArray text; + QByteArray textLine; + QString encodingType; + QStringList idents; + QStringList params; + QStringList values; + QStringList::ConstIterator identIt; + QStringList::Iterator paramIt; + QStringList::ConstIterator valueIt; + + VCardLine::List lines; + VCardLine::List::ConstIterator lineIt; + VCard::List::ConstIterator cardIt; + + bool hasEncoding; + + text.reserve(list.size() * 300); // reserve memory to be more efficient + + // iterate over the cards + const VCard::List::ConstIterator listEnd(list.end()); + for (cardIt = list.begin(); cardIt != listEnd; ++cardIt) { + text.append("BEGIN:VCARD\r\n"); + + idents = (*cardIt).identifiers(); + //VERSION must be first + if (idents.contains(QLatin1String("VERSION"))) { + const QString str = idents.takeAt(idents.indexOf(QStringLiteral("VERSION"))); + idents.prepend(str); + } + + for (identIt = idents.constBegin(); identIt != idents.constEnd(); ++identIt) { + lines = (*cardIt).lines((*identIt)); + + // iterate over the lines + for (lineIt = lines.constBegin(); lineIt != lines.constEnd(); ++lineIt) { + QVariant val = (*lineIt).value(); + if (val.isValid()) { + if ((*lineIt).hasGroup()) { + textLine = (*lineIt).group().toLatin1() + '.' + (*lineIt).identifier().toLatin1(); + } else { + textLine = (*lineIt).identifier().toLatin1(); + } + + params = (*lineIt).parameterList(); + hasEncoding = false; + if (!params.isEmpty()) { // we have parameters + for (paramIt = params.begin(); paramIt != params.end(); ++paramIt) { + if ((*paramIt) == QLatin1String("encoding")) { + hasEncoding = true; + encodingType = (*lineIt).parameter(QStringLiteral("encoding")).toLower(); + } + + values = (*lineIt).parameters(*paramIt); + for (valueIt = values.constBegin(); valueIt != values.constEnd(); ++valueIt) { + textLine.append(';' + (*paramIt).toLatin1().toUpper()); + if (!(*valueIt).isEmpty()) { + textLine.append('=' + (*valueIt).toLatin1()); + } + } + } + } + + QByteArray input, output; + bool checkMultibyte = false; // avoid splitting a multibyte character + + // handle charset + const QString charset = (*lineIt).parameter(QStringLiteral("charset")); + if (!charset.isEmpty()) { + // have to convert the data + const QString value = (*lineIt).value().toString(); + QTextCodec *codec = QTextCodec::codecForName(charset.toLatin1()); + if (codec) { + input = codec->fromUnicode(value); + } else { + checkMultibyte = true; + input = value.toUtf8(); + } + } else if ((*lineIt).value().type() == QVariant::ByteArray) { + input = (*lineIt).value().toByteArray(); + } else { + checkMultibyte = true; + input = (*lineIt).value().toString().toUtf8(); + } + + // handle encoding + if (hasEncoding) { // have to encode the data + if (encodingType == QLatin1String("b")) { + checkMultibyte = false; + output = input.toBase64(); + } else if (encodingType == QLatin1String("quoted-printable")) { + checkMultibyte = false; + KCodecs::quotedPrintableEncode(input, output, false); + } + } else { + output = input; + } + addEscapes(output, ((*lineIt).identifier() == QLatin1String("CATEGORIES") || (*lineIt).identifier() == QLatin1String("GEO"))); + + if (!output.isEmpty()) { + textLine.append(':' + output); + + if (textLine.length() > FOLD_WIDTH) { // we have to fold the line + if (checkMultibyte) { + // RFC 6350: Multi-octet characters MUST remain contiguous. + // we know that textLine contains UTF-8 encoded characters + int lineLength = 0; + for (int i = 0; i < textLine.length(); ++i) { + if ((textLine[i] & 0xC0) == 0xC0) { // a multibyte sequence follows + int sequenceLength = 2; + if ((textLine[i] & 0xE0) == 0xE0) { + sequenceLength = 3; + } else if ((textLine[i] & 0xF0) == 0xF0) { + sequenceLength = 4; + } + if ((lineLength + sequenceLength) > FOLD_WIDTH) { + // the current line would be too long. fold it + text += "\r\n " + textLine.mid(i, sequenceLength); + lineLength = 1 + sequenceLength; // incl. leading space + } else { + text += textLine.mid(i, sequenceLength); + lineLength += sequenceLength; + } + i += sequenceLength - 1; + } else { + text += textLine[i]; + ++lineLength; + } + if ((lineLength == FOLD_WIDTH) && (i < (textLine.length() - 1))) { + text += "\r\n "; + lineLength = 1; // leading space + } + } + text += "\r\n"; + } else { + for (int i = 0; i <= (textLine.length() / FOLD_WIDTH); ++i) { + text.append( + (i == 0 ? "" : " ") + textLine.mid(i * FOLD_WIDTH, FOLD_WIDTH) + "\r\n"); + } + } + } else { + text.append(textLine + "\r\n"); + } + } + } + } + } + + text.append("END:VCARD\r\n"); + text.append("\r\n"); + } + + return text; +} diff --git a/src/vcardparser/vcardparser.h b/src/vcardparser/vcardparser.h new file mode 100644 index 0000000..d498c50 --- /dev/null +++ b/src/vcardparser/vcardparser.h @@ -0,0 +1,44 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef VCARDPARSER_H +#define VCARDPARSER_H + +#include "vcard.h" +#include <QByteArray> + +namespace KContacts { +class VCardParser +{ +public: + VCardParser(); + ~VCardParser(); + + static VCard::List parseVCards(const QByteArray &text); + static QByteArray createVCards(const VCard::List &list); + +private: + Q_DISABLE_COPY(VCardParser) + class VCardParserPrivate; + VCardParserPrivate *d; +}; +} + +#endif diff --git a/src/vcardtool.cpp b/src/vcardtool.cpp new file mode 100644 index 0000000..fb6a560 --- /dev/null +++ b/src/vcardtool.cpp @@ -0,0 +1,1617 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + Copyright (C) 2015-2018 Laurent Montel <montel@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "vcardtool.h" +#include "key.h" +#include "picture.h" +#include "secrecy.h" +#include "sound.h" +#include "lang.h" +#include "gender.h" +#include "related.h" +#include "fieldgroup.h" +#include "kcontacts_debug.h" +#include <QString> +#include <QBuffer> +#include <QDebug> +#include <QRegularExpression> + +using namespace KContacts; + +static bool needsEncoding(const QString &value) +{ + int length = value.length(); + for (int i = 0; i < length; ++i) { + char c = value.at(i).toLatin1(); + if ((c < 33 || c > 126) && c != ' ' && c != '=') { + return true; + } + } + + return false; +} + +static const struct { + const char *addressType; + Address::TypeFlag flag; +} s_addressTypes[] = { + { "dom", Address::Dom }, + { "home", Address::Home }, + { "intl", Address::Intl }, + { "parcel", Address::Parcel }, + { "postal", Address::Postal }, + { "pref", Address::Pref }, + { "work", Address::Work }, +}; + +static const unsigned int s_numAddressTypes + = sizeof s_addressTypes / sizeof *s_addressTypes; + +static Address::TypeFlag stringToAddressType(const QString &str) +{ + for (unsigned int i = 0; i < s_numAddressTypes; ++i) { + if (str == QLatin1String(s_addressTypes[i].addressType)) { + return s_addressTypes[i].flag; + } + } + return {}; +} + +static const struct { + const char *phoneType; + PhoneNumber::TypeFlag flag; +} s_phoneTypes[] = { + { "BBS", PhoneNumber::Bbs }, + { "CAR", PhoneNumber::Car }, + { "CELL", PhoneNumber::Cell }, + { "FAX", PhoneNumber::Fax }, + { "HOME", PhoneNumber::Home }, + { "ISDN", PhoneNumber::Isdn }, + { "MODEM", PhoneNumber::Modem }, + { "MSG", PhoneNumber::Msg }, + { "PAGER", PhoneNumber::Pager }, + { "PCS", PhoneNumber::Pcs }, + { "PREF", PhoneNumber::Pref }, + { "VIDEO", PhoneNumber::Video }, + { "VOICE", PhoneNumber::Voice }, + { "WORK", PhoneNumber::Work }, +}; + +static const unsigned int s_numPhoneTypes + = sizeof s_phoneTypes / sizeof *s_phoneTypes; + +static PhoneNumber::TypeFlag stringToPhoneType(const QString &str) +{ + for (unsigned int i = 0; i < s_numPhoneTypes; ++i) { + if (str == QLatin1String(s_phoneTypes[i].phoneType)) { + return s_phoneTypes[i].flag; + } + } + return {}; +} + +VCardTool::VCardTool() +{ +} + +VCardTool::~VCardTool() +{ +} + +QByteArray VCardTool::exportVCards(const Addressee::List &list, VCard::Version version) const +{ + return createVCards(list, version, true /*export vcard*/); +} + +QByteArray VCardTool::createVCards(const Addressee::List &list, VCard::Version version) const +{ + return createVCards(list, version, false /*don't export*/); +} + +void VCardTool::addParameters(VCardLine &line, const QMap<QString, QStringList> ¶ms) const +{ + QMapIterator<QString, QStringList> i(params); + while (i.hasNext()) { + i.next(); + line.addParameter(i.key(), i.value().join(QLatin1Char(','))); + } +} + +void VCardTool::addParameter(VCardLine &line, VCard::Version version, const QString &key, const QStringList &valueStringList) const +{ + if (version == VCard::v2_1) { + for (const QString &valueStr : valueStringList) { + line.addParameter(valueStr, QString()); + } + } else if (version == VCard::v3_0) { + line.addParameter(key, valueStringList.join(QLatin1Char(','))); + } else { + if (valueStringList.count() < 2) { + line.addParameter(key, valueStringList.join(QLatin1Char(','))); + } else { + line.addParameter(key, QLatin1Char('"') + valueStringList.join(QLatin1Char(',')) + QLatin1Char('"')); + } + } +} + +QByteArray VCardTool::createVCards(const Addressee::List &list, VCard::Version version, bool exportVcard) const +{ + VCard::List vCardList; + + Addressee::List::ConstIterator addrIt; + Addressee::List::ConstIterator listEnd(list.constEnd()); + for (addrIt = list.constBegin(); addrIt != listEnd; ++addrIt) { + VCard card; + QStringList::ConstIterator strIt; + // VERSION + if (version == VCard::v2_1) { + card.addLine(VCardLine(QStringLiteral("VERSION"), QStringLiteral("2.1"))); + } else if (version == VCard::v3_0) { + card.addLine(VCardLine(QStringLiteral("VERSION"), QStringLiteral("3.0"))); + } else if (version == VCard::v4_0) { + card.addLine(VCardLine(QStringLiteral("VERSION"), QStringLiteral("4.0"))); + } + + // ADR + LABEL + const Address::List addresses = (*addrIt).addresses(); + Address::List::ConstIterator end(addresses.end()); + for (Address::List::ConstIterator it = addresses.begin(); it != end; ++it) { + QStringList address; + + const bool isEmpty = ((*it).postOfficeBox().isEmpty() + && (*it).extended().isEmpty() + && (*it).street().isEmpty() + && (*it).locality().isEmpty() + && (*it).region().isEmpty() + && (*it).postalCode().isEmpty() + && (*it).country().isEmpty()); + + address.append((*it).postOfficeBox().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + address.append((*it).extended().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + address.append((*it).street().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + address.append((*it).locality().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + address.append((*it).region().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + address.append((*it).postalCode().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + address.append((*it).country().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + const QString addressJoined(address.join(QLatin1Char(';'))); + VCardLine adrLine(QStringLiteral("ADR"), addressJoined); + if (version == VCard::v2_1 && needsEncoding(addressJoined)) { + adrLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + adrLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + + const bool hasLabel = !(*it).label().isEmpty(); + QStringList addreLineType; + QStringList labelLineType; + for (unsigned int i = 0; i < s_numAddressTypes; ++i) { + if (s_addressTypes[i].flag & (*it).type()) { + const QString str = QString::fromLatin1(s_addressTypes[i].addressType); + addreLineType << str; + if (hasLabel) { + labelLineType << str; + } + } + } + + if (hasLabel) { + if (version == VCard::v4_0) { + if (!(*it).label().isEmpty()) { + adrLine.addParameter(QStringLiteral("LABEL"), QStringLiteral("\"%1\"").arg((*it).label())); + } + } else { + VCardLine labelLine(QStringLiteral("LABEL"), (*it).label()); + if (version == VCard::v2_1 && needsEncoding((*it).label())) { + labelLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + labelLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + addParameter(labelLine, version, QStringLiteral("TYPE"), labelLineType); + card.addLine(labelLine); + } + } + if (version == VCard::v4_0) { + Geo geo = (*it).geo(); + if (geo.isValid()) { + QString str; + str.sprintf("\"geo:%.6f,%.6f\"", geo.latitude(), geo.longitude()); + adrLine.addParameter(QStringLiteral("GEO"), str); + } + } + if (!isEmpty) { + addParameter(adrLine, version, QStringLiteral("TYPE"), addreLineType); + card.addLine(adrLine); + } + } + + // BDAY + const bool withTime = (*addrIt).birthdayHasTime(); + const QString birthdayString = createDateTime((*addrIt).birthday(), version, withTime); + card.addLine(VCardLine(QStringLiteral("BDAY"), birthdayString)); + + //Laurent: 31 Jan 2015. Not necessary to export it. When Categories were changes as AkonadiTag nobody thought that it was break categorie support... + //=> not necessary to export just tag... + // CATEGORIES only > 2.1 + if (!exportVcard) { + if (version != VCard::v2_1) { + QStringList categories = (*addrIt).categories(); + QStringList::Iterator catIt; + QStringList::Iterator catEnd(categories.end()); + for (catIt = categories.begin(); catIt != catEnd; ++catIt) { + (*catIt).replace(QLatin1Char(','), QStringLiteral("\\,")); + } + + VCardLine catLine(QStringLiteral("CATEGORIES"), categories.join(QLatin1Char(','))); + card.addLine(catLine); + } + } + // MEMBER (only in 4.0) + if (version == VCard::v4_0) { + // The KIND property must be set to "group" in order to use this property. + if ((*addrIt).kind().toLower() == QLatin1String("group")) { + const QStringList lst = (*addrIt).members(); + for (const QString &member : lst) { + VCardLine line(QStringLiteral("MEMBER"), member); + card.addLine(line); + } + } + } + // SOURCE + const QVector<QUrl> lstUrl = (*addrIt).sourcesUrlList(); + for (const QUrl &url : lstUrl) { + VCardLine line = VCardLine(QStringLiteral("SOURCE"), url.url()); + card.addLine(line); + } + + const Related::List relatedList = (*addrIt).relationShips(); + Related::List::ConstIterator relatedIt; + Related::List::ConstIterator relatedEnd(relatedList.end()); + for (relatedIt = relatedList.begin(); relatedIt != relatedEnd; ++relatedIt) { + VCardLine line(QStringLiteral("RELATED"), (*relatedIt).related()); + addParameters(line, (*relatedIt).parameters()); + card.addLine(line); + } + // CLASS only for version == 3.0 + if (version == VCard::v3_0) { + card.addLine(createSecrecy((*addrIt).secrecy())); + } + // LANG only for version == 4.0 + if (version == VCard::v4_0) { + const Lang::List langList = (*addrIt).langs(); + Lang::List::ConstIterator langIt; + Lang::List::ConstIterator langEnd(langList.end()); + for (langIt = langList.begin(); langIt != langEnd; ++langIt) { + VCardLine line(QStringLiteral("LANG"), (*langIt).language()); + addParameters(line, (*langIt).parameters()); + card.addLine(line); + } + } + // CLIENTPIDMAP + if (version == VCard::v4_0) { + const ClientPidMap::List clientpidmapList = (*addrIt).clientPidMapList(); + ClientPidMap::List::ConstIterator clientPidMapIt; + ClientPidMap::List::ConstIterator clientPidMapEnd(clientpidmapList.end()); + for (clientPidMapIt = clientpidmapList.begin(); clientPidMapIt != clientPidMapEnd; ++clientPidMapIt) { + VCardLine line(QStringLiteral("CLIENTPIDMAP"), (*clientPidMapIt).clientPidMap()); + addParameters(line, (*clientPidMapIt).parameters()); + card.addLine(line); + } + } + // EMAIL + const Email::List emailList = (*addrIt).emailList(); + Email::List::ConstIterator emailIt; + Email::List::ConstIterator emailEnd(emailList.end()); + for (emailIt = emailList.begin(); emailIt != emailEnd; ++emailIt) { + VCardLine line(QStringLiteral("EMAIL"), (*emailIt).mail()); + QMapIterator<QString, QStringList> i((*emailIt).parameters()); + while (i.hasNext()) { + i.next(); + if (version == VCard::v2_1) { + if (i.key().toLower() == QLatin1String("type")) { + QStringList valueStringList = i.value(); + bool hasPreferred = false; + const int removeItems = valueStringList.removeAll(QStringLiteral("PREF")); + if (removeItems > 0) { + hasPreferred = true; + } + if (!valueStringList.isEmpty()) { + addParameter(line, version, i.key(), valueStringList); + } + if (hasPreferred) { + line.addParameter(QStringLiteral("PREF"), QString()); + } + } else { + line.addParameter(i.key(), i.value().join(QLatin1Char(','))); + } + } else { + line.addParameter(i.key(), i.value().join(QLatin1Char(','))); + } + } + card.addLine(line); + } + + // FN required for only version > 2.1 + VCardLine fnLine(QStringLiteral("FN"), (*addrIt).formattedName()); + if (version == VCard::v2_1 && needsEncoding((*addrIt).formattedName())) { + fnLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + fnLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + card.addLine(fnLine); + + // GEO + const Geo geo = (*addrIt).geo(); + if (geo.isValid()) { + QString str; + if (version == VCard::v4_0) { + str.sprintf("geo:%.6f,%.6f", geo.latitude(), geo.longitude()); + } else { + str.sprintf("%.6f;%.6f", geo.latitude(), geo.longitude()); + } + card.addLine(VCardLine(QStringLiteral("GEO"), str)); + } + + // KEY + const Key::List keys = (*addrIt).keys(); + Key::List::ConstIterator keyIt; + Key::List::ConstIterator keyEnd(keys.end()); + for (keyIt = keys.begin(); keyIt != keyEnd; ++keyIt) { + card.addLine(createKey(*keyIt, version)); + } + + // LOGO + card.addLine(createPicture(QStringLiteral("LOGO"), (*addrIt).logo(), version)); + const QVector<Picture> lstLogo = (*addrIt).extraLogoList(); + for (const Picture &logo : lstLogo) { + card.addLine(createPicture(QStringLiteral("LOGO"), logo, version)); + } + + // MAILER only for version < 4.0 + if (version != VCard::v4_0) { + VCardLine mailerLine(QStringLiteral("MAILER"), (*addrIt).mailer()); + if (version == VCard::v2_1 && needsEncoding((*addrIt).mailer())) { + mailerLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + mailerLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + card.addLine(mailerLine); + } + + // N required for only version < 4.0 + QStringList name; + name.append((*addrIt).familyName().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + name.append((*addrIt).givenName().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + name.append((*addrIt).additionalName().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + name.append((*addrIt).prefix().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + name.append((*addrIt).suffix().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + + VCardLine nLine(QStringLiteral("N"), name.join(QLatin1Char(';'))); + if (version == VCard::v2_1 && needsEncoding(name.join(QLatin1Char(';')))) { + nLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + nLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + if (version == VCard::v4_0 && !(*addrIt).sortString().isEmpty()) { + nLine.addParameter(QStringLiteral("SORT-AS"), (*addrIt).sortString()); + } + + card.addLine(nLine); + + // NAME only for version < 4.0 + if (version != VCard::v4_0) { + VCardLine nameLine(QStringLiteral("NAME"), (*addrIt).name()); + if (version == VCard::v2_1 && needsEncoding((*addrIt).name())) { + nameLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + nameLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + card.addLine(nameLine); + } + + // NICKNAME only for version > 2.1 + if (version != VCard::v2_1) { + const QVector<NickName> lstNickName = (*addrIt).extraNickNameList(); + for (const NickName &nickName : lstNickName) { + VCardLine nickNameLine(QStringLiteral("NICKNAME"), nickName.nickname()); + addParameters(nickNameLine, nickName.parameters()); + + card.addLine(nickNameLine); + } + } + + // NOTE + VCardLine noteLine(QStringLiteral("NOTE"), (*addrIt).note()); + if (version == VCard::v2_1 && needsEncoding((*addrIt).note())) { + noteLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + noteLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + card.addLine(noteLine); + + // ORG + const QVector<Org> lstOrg = (*addrIt).extraOrganizationList(); + for (const Org &org : lstOrg) { + QStringList organization; + organization.append(org.organization().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + if (!(*addrIt).department().isEmpty()) { + organization.append((*addrIt).department().replace(QLatin1Char(';'), + QStringLiteral("\\;"))); + } + const QString orgStr = organization.join(QLatin1Char(';')); + VCardLine orgLine(QStringLiteral("ORG"), orgStr); + if (version == VCard::v2_1 && needsEncoding(orgStr)) { + orgLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + orgLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + addParameters(orgLine, org.parameters()); + card.addLine(orgLine); + } + + // PHOTO + card.addLine(createPicture(QStringLiteral("PHOTO"), (*addrIt).photo(), version)); + const QVector<Picture> lstExtraPhoto = (*addrIt).extraPhotoList(); + for (const Picture &photo : lstExtraPhoto) { + card.addLine(createPicture(QStringLiteral("PHOTO"), photo, version)); + } + + // PROID only for version > 2.1 + if (version != VCard::v2_1) { + card.addLine(VCardLine(QStringLiteral("PRODID"), (*addrIt).productId())); + } + + // REV + card.addLine(VCardLine(QStringLiteral("REV"), createDateTime((*addrIt).revision(), version))); + + // ROLE + const QVector<Role> lstExtraRole = (*addrIt).extraRoleList(); + for (const Role &role : lstExtraRole) { + VCardLine roleLine(QStringLiteral("ROLE"), role.role()); + if (version == VCard::v2_1 && needsEncoding(role.role())) { + roleLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + roleLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + addParameters(roleLine, role.parameters()); + card.addLine(roleLine); + } + + // SORT-STRING + if (version == VCard::v3_0) { + card.addLine(VCardLine(QStringLiteral("SORT-STRING"), (*addrIt).sortString())); + } + + // SOUND + card.addLine(createSound((*addrIt).sound(), version)); + const QVector<Sound> lstSound = (*addrIt).extraSoundList(); + for (const Sound &sound : lstSound) { + card.addLine(createSound(sound, version)); + } + + // TEL + const PhoneNumber::List phoneNumbers = (*addrIt).phoneNumbers(); + PhoneNumber::List::ConstIterator phoneIt; + PhoneNumber::List::ConstIterator phoneEnd(phoneNumbers.end()); + for (phoneIt = phoneNumbers.begin(); phoneIt != phoneEnd; ++phoneIt) { + VCardLine line(QStringLiteral("TEL"), (*phoneIt).number()); + QMapIterator<QString, QStringList> i((*phoneIt).parameters()); + while (i.hasNext()) { + i.next(); + if (i.key().toUpper() != QLatin1String("TYPE")) { + line.addParameter(i.key(), i.value().join(QLatin1Char(','))); + } + } + + QStringList lst; + for (unsigned int i = 0; i < s_numPhoneTypes; ++i) { + if (s_phoneTypes[i].flag & (*phoneIt).type()) { + const QString str = QString::fromLatin1(s_phoneTypes[i].phoneType); + if (version == VCard::v4_0) { + lst << str.toLower(); + } else { + lst << str; + } + } + } + if (!lst.isEmpty()) { + addParameter(line, version, QStringLiteral("TYPE"), lst); + } + card.addLine(line); + } + + // TITLE + const QVector<Title> lstTitle = (*addrIt).extraTitleList(); + for (const Title &title : lstTitle) { + VCardLine titleLine(QStringLiteral("TITLE"), title.title()); + if (version == VCard::v2_1 && needsEncoding(title.title())) { + titleLine.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + titleLine.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + addParameters(titleLine, title.parameters()); + + card.addLine(titleLine); + } + + // TZ + // TODO Add vcard4.0 support + const TimeZone timeZone = (*addrIt).timeZone(); + if (timeZone.isValid()) { + QString str; + + int neg = 1; + if (timeZone.offset() < 0) { + neg = -1; + } + + str.sprintf("%c%02d:%02d", (timeZone.offset() >= 0 ? '+' : '-'), + (timeZone.offset() / 60) * neg, + (timeZone.offset() % 60) * neg); + + card.addLine(VCardLine(QStringLiteral("TZ"), str)); + } + + // UID + card.addLine(VCardLine(QStringLiteral("UID"), (*addrIt).uid())); + + // URL + const QVector<ResourceLocatorUrl> lstExtraUrl = (*addrIt).extraUrlList(); + for (const ResourceLocatorUrl &url : lstExtraUrl) { + VCardLine line(QStringLiteral("URL"), url.url()); + addParameters(line, url.parameters()); + card.addLine(line); + } + if (version == VCard::v4_0) { + // GENDER + const Gender gender = (*addrIt).gender(); + if (gender.isValid()) { + QString genderStr; + if (!gender.gender().isEmpty()) { + genderStr = gender.gender(); + } + if (!gender.comment().isEmpty()) { + genderStr += QLatin1Char(';') + gender.comment(); + } + VCardLine line(QStringLiteral("GENDER"), genderStr); + card.addLine(line); + } + // KIND + if (!(*addrIt).kind().isEmpty()) { + VCardLine line(QStringLiteral("KIND"), (*addrIt).kind()); + card.addLine(line); + } + } + // From vcard4. + if (version == VCard::v4_0) { + const QVector<CalendarUrl> lstCalendarUrl = (*addrIt).calendarUrlList(); + for (const CalendarUrl &url : lstCalendarUrl) { + if (url.isValid()) { + QString type; + switch (url.type()) { + case CalendarUrl::Unknown: + case CalendarUrl::EndCalendarType: + break; + case CalendarUrl::FBUrl: + type = QStringLiteral("FBURL"); + break; + case CalendarUrl::CALUri: + type = QStringLiteral("CALURI"); + break; + case CalendarUrl::CALADRUri: + type = QStringLiteral("CALADRURI"); + break; + } + if (!type.isEmpty()) { + VCardLine line(type, url.url().toDisplayString()); + addParameters(line, url.parameters()); + card.addLine(line); + } + } + } + } + //FieldGroup + const QVector<FieldGroup> lstGroup = (*addrIt).fieldGroupList(); + for (const FieldGroup &group : lstGroup) { + VCardLine line(group.fieldGroupName(), group.value()); + addParameters(line, group.parameters()); + card.addLine(line); + } + + // IMPP (supported in vcard 3 too) + const QVector<Impp> lstImpp = (*addrIt).imppList(); + for (const Impp &impp : lstImpp) { + VCardLine line(QStringLiteral("IMPP"), impp.address()); + line.addParameter(QStringLiteral("X-SERVICE-TYPE"), Impp::typeToString(impp.type())); + QMapIterator<QString, QStringList> i(impp.parameters()); + while (i.hasNext()) { + i.next(); + if (i.key().toLower() != QStringLiteral("x-service-type")) { + line.addParameter(i.key(), i.value().join(QLatin1Char(','))); + } + } + card.addLine(line); + } + + // X- + const QStringList customs = (*addrIt).customs(); + for (strIt = customs.begin(); strIt != customs.end(); ++strIt) { + QString identifier = QLatin1String("X-") + +(*strIt).left((*strIt).indexOf(QLatin1Char(':'))); + const QString value = (*strIt).mid((*strIt).indexOf(QLatin1Char(':')) + 1); + if (value.isEmpty()) { + continue; + } + //Convert to standard identifier + if (exportVcard) { + if (identifier == QLatin1String("X-messaging/aim-All")) { + identifier = QStringLiteral("X-AIM"); + } else if (identifier == QLatin1String("X-messaging/icq-All")) { + identifier = QStringLiteral("X-ICQ"); + } else if (identifier == QLatin1String("X-messaging/xmpp-All")) { + identifier = QStringLiteral("X-JABBER"); + } else if (identifier == QLatin1String("X-messaging/msn-All")) { + identifier = QStringLiteral("X-MSN"); + } else if (identifier == QLatin1String("X-messaging/yahoo-All")) { + identifier = QStringLiteral("X-YAHOO"); + } else if (identifier == QLatin1String("X-messaging/gadu-All")) { + identifier = QStringLiteral("X-GADUGADU"); + } else if (identifier == QLatin1String("X-messaging/skype-All")) { + identifier = QStringLiteral("X-SKYPE"); + } else if (identifier == QLatin1String("X-messaging/groupwise-All")) { + identifier = QStringLiteral("X-GROUPWISE"); + } else if (identifier == QLatin1String("X-messaging/sms-All")) { + identifier = QStringLiteral("X-SMS"); + } else if (identifier == QLatin1String("X-messaging/meanwhile-All")) { + identifier = QStringLiteral("X-MEANWHILE"); + } else if (identifier == QLatin1String("X-messaging/irc-All")) { + identifier = QStringLiteral("X-IRC"); //Not defined by rfc but need for fixing #300869 + } else if (identifier == QLatin1String("X-messaging/googletalk-All")) { + //Not defined by rfc but need for fixing #300869 + identifier = QStringLiteral("X-GTALK"); + } else if (identifier == QLatin1String("X-messaging/twitter-All")) { + identifier = QStringLiteral("X-TWITTER"); + } + } + if (identifier.toLower() == QLatin1String("x-kaddressbook-x-anniversary") && version == VCard::v4_0) { + // ANNIVERSARY + if (!value.isEmpty()) { + const QDate date = QDate::fromString(value, Qt::ISODate); + QDateTime dt = QDateTime(date); + dt.setTime(QTime()); + VCardLine line(QStringLiteral("ANNIVERSARY"), createDateTime(dt, version, false)); + card.addLine(line); + } + } else if (identifier.toLower() == QLatin1String("x-kaddressbook-x-spousesname") && version == VCard::v4_0) { + if (!value.isEmpty()) { + VCardLine line(QStringLiteral("RELATED"), QStringLiteral(";")); + line.addParameter(QStringLiteral("TYPE"), QStringLiteral("spouse")); + line.addParameter(QStringLiteral("VALUE"), value); + card.addLine(line); + } + } else { + VCardLine line(identifier, value); + if (version == VCard::v2_1 && needsEncoding(value)) { + line.addParameter(QStringLiteral("charset"), QStringLiteral("UTF-8")); + line.addParameter(QStringLiteral("encoding"), QStringLiteral("QUOTED-PRINTABLE")); + } + card.addLine(line); + } + } + + vCardList.append(card); + } + + return VCardParser::createVCards(vCardList); +} + +Addressee::List VCardTool::parseVCards(const QByteArray &vcard) const +{ + static const QLatin1Char semicolonSep(';'); + static const QLatin1Char commaSep(','); + QString identifier; + QString group; + + Addressee::List addrList; + const VCard::List vCardList = VCardParser::parseVCards(vcard); + + VCard::List::ConstIterator cardIt; + VCard::List::ConstIterator listEnd(vCardList.end()); + for (cardIt = vCardList.begin(); cardIt != listEnd; ++cardIt) { + Addressee addr; + + const QStringList idents = (*cardIt).identifiers(); + QStringList::ConstIterator identIt; + QStringList::ConstIterator identEnd(idents.end()); + for (identIt = idents.begin(); identIt != identEnd; ++identIt) { + const VCardLine::List lines = (*cardIt).lines((*identIt)); + VCardLine::List::ConstIterator lineIt; + + // iterate over the lines + for (lineIt = lines.begin(); lineIt != lines.end(); ++lineIt) { + identifier = (*lineIt).identifier().toLower(); + group = (*lineIt).group(); + if (!group.isEmpty()) { + KContacts::FieldGroup groupField(group + QLatin1Char('.') + (*lineIt).identifier()); + groupField.setParameters((*lineIt).parameterMap()); + groupField.setValue((*lineIt).value().toString()); + addr.insertFieldGroup(groupField); + } + // ADR + else if (identifier == QLatin1String("adr")) { + Address address; + const QStringList addrParts = splitString(semicolonSep, (*lineIt).value().toString()); + const int addrPartsCount(addrParts.count()); + if (addrPartsCount > 0) { + address.setPostOfficeBox(addrParts.at(0)); + } + if (addrPartsCount > 1) { + address.setExtended(addrParts.at(1)); + } + if (addrPartsCount > 2) { + address.setStreet(addrParts.at(2)); + } + if (addrPartsCount > 3) { + address.setLocality(addrParts.at(3)); + } + if (addrPartsCount > 4) { + address.setRegion(addrParts.at(4)); + } + if (addrPartsCount > 5) { + address.setPostalCode(addrParts.at(5)); + } + if (addrPartsCount > 6) { + address.setCountry(addrParts.at(6)); + } + + Address::Type type; + + const QStringList types = (*lineIt).parameters(QStringLiteral("type")); + QStringList::ConstIterator end(types.end()); + for (QStringList::ConstIterator it = types.begin(); it != end; ++it) { + type |= stringToAddressType((*it).toLower()); + } + + address.setType(type); + QString label = (*lineIt).parameter(QStringLiteral("label")); + if (!label.isEmpty()) { + if (label.length() > 1) { + if (label.at(0) == QLatin1Char('"') && label.at(label.length() - 1) == QLatin1Char('"')) { + label = label.mid(1, label.length() - 2); + } + } + address.setLabel(label); + } + QString geoStr = (*lineIt).parameter(QStringLiteral("geo")); + if (!geoStr.isEmpty()) { + geoStr.remove(QLatin1Char('\"')); + geoStr.remove(QStringLiteral("geo:")); + if (geoStr.contains(QLatin1Char(','))) { + QStringList arguments = geoStr.split(QLatin1Char(',')); + KContacts::Geo geo; + geo.setLatitude(arguments.at(0).toDouble()); + geo.setLongitude(arguments.at(1).toDouble()); + address.setGeo(geo); + } + } + addr.insertAddress(address); + } + // ANNIVERSARY + else if (identifier == QLatin1String("anniversary")) { + const QString t = (*lineIt).value().toString(); + const QDateTime dt(parseDateTime(t)); + addr.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-Anniversary"), dt.date().toString(Qt::ISODate)); + } + // BDAY + else if (identifier == QLatin1String("bday")) { + bool withTime; + const QDateTime bday = parseDateTime((*lineIt).value().toString(), &withTime); + addr.setBirthday(bday, withTime); + } + // CATEGORIES + else if (identifier == QLatin1String("categories")) { + const QStringList categories = splitString(commaSep, (*lineIt).value().toString()); + addr.setCategories(categories); + } + // FBURL + else if (identifier == QLatin1String("fburl")) { + CalendarUrl calurl; + calurl.setType(CalendarUrl::FBUrl); + const QUrl url = QUrl((*lineIt).value().toString()); + calurl.setUrl(url); + calurl.setParameters((*lineIt).parameterMap()); + addr.insertCalendarUrl(calurl); + } + // CALADRURI + else if (identifier == QLatin1String("caladruri")) { + CalendarUrl calurl; + calurl.setType(CalendarUrl::CALADRUri); + const QUrl url = QUrl((*lineIt).value().toString()); + calurl.setUrl(url); + calurl.setParameters((*lineIt).parameterMap()); + addr.insertCalendarUrl(calurl); + } + // CALURI + else if (identifier == QLatin1String("caluri")) { + CalendarUrl calurl; + calurl.setType(CalendarUrl::CALUri); + const QUrl url = QUrl((*lineIt).value().toString()); + calurl.setUrl(url); + calurl.setParameters((*lineIt).parameterMap()); + addr.insertCalendarUrl(calurl); + } + //IMPP + else if (identifier == QLatin1String("impp")) { + QString imppStr = (*lineIt).value().toString(); + Impp impp; + impp.setParameters((*lineIt).parameterMap()); + if (!(*lineIt).parameter(QStringLiteral("x-service-type")).isEmpty()) { + impp.setAddress(imppStr); + const QString serviceType = (*lineIt).parameter(QStringLiteral("x-service-type")).toLower(); + imppService(serviceType, impp); + } else { + const int pos = imppStr.indexOf(QLatin1Char(':')); + if (pos != -1) { + const QString serviceType = imppStr.left(pos); + const QString address = imppStr.right(imppStr.length() - pos - 1); + impp.setAddress(address); + imppService(serviceType, impp); + } + } + addr.insertImpp(impp); + } + // CLASS + else if (identifier == QLatin1String("class")) { + addr.setSecrecy(parseSecrecy(*lineIt)); + } + // GENDER + else if (identifier == QLatin1String("gender")) { + QString genderStr = (*lineIt).value().toString(); + if (!genderStr.isEmpty()) { + Gender gender; + if (genderStr.at(0) != QLatin1Char(';')) { + gender.setGender(genderStr.at(0)); + if (genderStr.length() > 2 && (genderStr.at(1) == QLatin1Char(';'))) { + gender.setComment(genderStr.right(genderStr.length() - 2)); + } + } else { + gender.setComment(genderStr.right(genderStr.length() - 1)); + } + addr.setGender(gender); + } + } + // LANG + else if (identifier == QLatin1String("lang")) { + Lang lang; + lang.setLanguage((*lineIt).value().toString()); + lang.setParameters((*lineIt).parameterMap()); + addr.insertLang(lang); + } + // EMAIL + else if (identifier == QLatin1String("email")) { + const QStringList types = (*lineIt).parameters(QStringLiteral("type")); + addr.insertEmail((*lineIt).value().toString(), + types.contains(QLatin1String("PREF")), (*lineIt).parameterMap()); + } + // KIND + else if (identifier == QLatin1String("kind")) { + addr.setKind((*lineIt).value().toString()); + } + // FN + else if (identifier == QLatin1String("fn")) { + addr.setFormattedName((*lineIt).value().toString()); + } + // GEO + else if (identifier == QLatin1String("geo")) { + Geo geo; + QString lineStr = (*lineIt).value().toString(); + if (lineStr.startsWith(QLatin1String("geo:"))) { //VCard 4.0 + lineStr.remove(QStringLiteral("geo:")); + const QStringList geoParts + = lineStr.split(QLatin1Char(','), QString::KeepEmptyParts); + if (geoParts.size() >= 2) { + geo.setLatitude(geoParts.at(0).toFloat()); + geo.setLongitude(geoParts.at(1).toFloat()); + addr.setGeo(geo); + } + } else { + const QStringList geoParts + = lineStr.split(QLatin1Char(';'), QString::KeepEmptyParts); + if (geoParts.size() >= 2) { + geo.setLatitude(geoParts.at(0).toFloat()); + geo.setLongitude(geoParts.at(1).toFloat()); + addr.setGeo(geo); + } + } + } + // KEY + else if (identifier == QLatin1String("key")) { + addr.insertKey(parseKey(*lineIt)); + } + // LABEL + else if (identifier == QLatin1String("label")) { + Address::Type type; + + const QStringList types = (*lineIt).parameters(QStringLiteral("type")); + QStringList::ConstIterator end(types.end()); + for (QStringList::ConstIterator it = types.begin(); it != end; ++it) { + type |= stringToAddressType((*it).toLower()); + } + + bool available = false; + KContacts::Address::List addressList = addr.addresses(); + for (KContacts::Address::List::Iterator it = addressList.begin(); + it != addressList.end(); ++it) { + if ((*it).type() == type) { + (*it).setLabel((*lineIt).value().toString()); + addr.insertAddress(*it); + available = true; + break; + } + } + + if (!available) { // a standalone LABEL tag + KContacts::Address address(type); + address.setLabel((*lineIt).value().toString()); + addr.insertAddress(address); + } + } + // LOGO + else if (identifier == QLatin1String("logo")) { + Picture picture = parsePicture(*lineIt); + if (addr.logo().isEmpty()) { + addr.setLogo(picture); + } else { + addr.insertExtraLogo(picture); + } + } + // MAILER + else if (identifier == QLatin1String("mailer")) { + addr.setMailer((*lineIt).value().toString()); + } + // N + else if (identifier == QLatin1String("n")) { + const QStringList nameParts = splitString(semicolonSep, (*lineIt).value().toString()); + const int numberOfParts(nameParts.count()); + if (numberOfParts > 0) { + addr.setFamilyName(nameParts.at(0)); + } + if (numberOfParts > 1) { + addr.setGivenName(nameParts.at(1)); + } + if (numberOfParts > 2) { + addr.setAdditionalName(nameParts.at(2)); + } + if (numberOfParts > 3) { + addr.setPrefix(nameParts.at(3)); + } + if (numberOfParts > 4) { + addr.setSuffix(nameParts.at(4)); + } + if (!(*lineIt).parameter(QStringLiteral("sort-as")).isEmpty()) { + addr.setSortString((*lineIt).parameter(QStringLiteral("sort-as"))); + } + } + // NAME + else if (identifier == QLatin1String("name")) { + addr.setName((*lineIt).value().toString()); + } + // NICKNAME + else if (identifier == QLatin1String("nickname")) { + NickName nickName((*lineIt).value().toString()); + nickName.setParameters((*lineIt).parameterMap()); + addr.insertExtraNickName(nickName); + } + // NOTE + else if (identifier == QLatin1String("note")) { + addr.setNote((*lineIt).value().toString()); + } + // ORGANIZATION + else if (identifier == QLatin1String("org")) { + const QStringList orgParts = splitString(semicolonSep, (*lineIt).value().toString()); + const int orgPartsCount(orgParts.count()); + if (orgPartsCount > 0) { + Org organization(orgParts.at(0)); + organization.setParameters((*lineIt).parameterMap()); + addr.insertExtraOrganization(organization); + } + if (orgPartsCount > 1) { + addr.setDepartment(orgParts.at(1)); + } + if (!(*lineIt).parameter(QStringLiteral("sort-as")).isEmpty()) { + addr.setSortString((*lineIt).parameter(QStringLiteral("sort-as"))); + } + } + // PHOTO + else if (identifier == QLatin1String("photo")) { + Picture picture = parsePicture(*lineIt); + if (addr.photo().isEmpty()) { + addr.setPhoto(picture); + } else { + addr.insertExtraPhoto(picture); + } + } + // PROID + else if (identifier == QLatin1String("prodid")) { + addr.setProductId((*lineIt).value().toString()); + } + // REV + else if (identifier == QLatin1String("rev")) { + addr.setRevision(parseDateTime((*lineIt).value().toString())); + } + // ROLE + else if (identifier == QLatin1String("role")) { + Role role((*lineIt).value().toString()); + role.setParameters((*lineIt).parameterMap()); + addr.insertExtraRole(role); + } + // SORT-STRING + else if (identifier == QLatin1String("sort-string")) { + addr.setSortString((*lineIt).value().toString()); + } + // SOUND + else if (identifier == QLatin1String("sound")) { + Sound sound = parseSound(*lineIt); + if (addr.sound().isEmpty()) { + addr.setSound(sound); + } else { + addr.insertExtraSound(sound); + } + } + // TEL + else if (identifier == QLatin1String("tel")) { + PhoneNumber phone; + phone.setNumber((*lineIt).value().toString()); + + PhoneNumber::Type type; + bool foundType = false; + const QStringList types = (*lineIt).parameters(QStringLiteral("type")); + QStringList::ConstIterator typeEnd(types.constEnd()); + for (QStringList::ConstIterator it = types.constBegin(); it != typeEnd; ++it) { + type |= stringToPhoneType((*it).toUpper()); + foundType = true; + } + phone.setType(foundType ? type : PhoneNumber::Undefined); + phone.setParameters((*lineIt).parameterMap()); + + addr.insertPhoneNumber(phone); + } + // TITLE + else if (identifier == QLatin1String("title")) { + Title title((*lineIt).value().toString()); + title.setParameters((*lineIt).parameterMap()); + addr.insertExtraTitle(title); + } + // TZ + else if (identifier == QLatin1String("tz")) { + //TODO add vcard4 support + TimeZone tz; + const QString date = (*lineIt).value().toString(); + + if (!date.isEmpty()) { + int hours = date.midRef(1, 2).toInt(); + int minutes = date.midRef(4, 2).toInt(); + int offset = (hours * 60) + minutes; + offset = offset * (date[ 0 ] == QLatin1Char('+') ? 1 : -1); + + tz.setOffset(offset); + addr.setTimeZone(tz); + } + } + // UID + else if (identifier == QLatin1String("uid")) { + addr.setUid((*lineIt).value().toString()); + } + // URL + else if (identifier == QLatin1String("url")) { + const QUrl url = QUrl((*lineIt).value().toString()); + ResourceLocatorUrl resourceLocatorUrl; + resourceLocatorUrl.setUrl(url); + resourceLocatorUrl.setParameters((*lineIt).parameterMap()); + addr.insertExtraUrl(resourceLocatorUrl); + } + // SOURCE + else if (identifier == QLatin1String("source")) { + const QUrl url = QUrl((*lineIt).value().toString()); + addr.insertSourceUrl(url); + } + // MEMBER (vcard 4.0) + else if (identifier == QLatin1String("member")) { + addr.insertMember((*lineIt).value().toString()); + } + // RELATED (vcard 4.0) + else if (identifier == QLatin1String("related")) { + Related related; + related.setRelated((*lineIt).value().toString()); + related.setParameters((*lineIt).parameterMap()); + addr.insertRelationShip(related); + } + // CLIENTPIDMAP (vcard 4.0) + else if (identifier == QLatin1String("clientpidmap")) { + ClientPidMap clientpidmap; + clientpidmap.setClientPidMap((*lineIt).value().toString()); + clientpidmap.setParameters((*lineIt).parameterMap()); + addr.insertClientPidMap(clientpidmap); + } + // X- + //TODO import X-GENDER + else if (identifier.startsWith(QLatin1String("x-"))) { + QString ident = (*lineIt).identifier(); + //X-Evolution + if (identifier == QLatin1String("x-evolution-spouse") + || identifier == QLatin1String("x-spouse")) { + ident = QStringLiteral("X-KADDRESSBOOK-X-SpousesName"); + } else if (identifier == QLatin1String("x-evolution-blog-url")) { + ident = QStringLiteral("X-KADDRESSBOOK-BlogFeed"); + } else if (identifier == QLatin1String("x-evolution-assistant") + || identifier == QLatin1String("x-assistant")) { + ident = QStringLiteral("X-KADDRESSBOOK-X-AssistantsName"); + } else if (identifier == QLatin1String("x-evolution-anniversary") + || identifier == QLatin1String("x-anniversary")) { + ident = QStringLiteral("X-KADDRESSBOOK-X-Anniversary"); + } else if (identifier == QLatin1String("x-evolution-manager") + || identifier == QLatin1String("x-manager")) { + ident = QStringLiteral("X-KADDRESSBOOK-X-ManagersName"); + } else if (identifier == QLatin1String("x-aim")) { + ident = QStringLiteral("X-messaging/aim-All"); + } else if (identifier == QLatin1String("x-icq")) { + ident = QStringLiteral("X-messaging/icq-All"); + } else if (identifier == QLatin1String("x-jabber")) { + ident = QStringLiteral("X-messaging/xmpp-All"); + } else if (identifier == QLatin1String("x-jabber")) { + ident = QStringLiteral("X-messaging/xmpp-All"); + } else if (identifier == QLatin1String("x-msn")) { + ident = QStringLiteral("X-messaging/msn-All"); + } else if (identifier == QLatin1String("x-yahoo")) { + ident = QStringLiteral("X-messaging/yahoo-All"); + } else if (identifier == QLatin1String("x-gadugadu")) { + ident = QStringLiteral("X-messaging/gadu-All"); + } else if (identifier == QLatin1String("x-skype")) { + ident = QStringLiteral("X-messaging/skype-All"); + } else if (identifier == QLatin1String("x-groupwise")) { + ident = QStringLiteral("X-messaging/groupwise-All"); + } else if (identifier == QLatin1String("x-sms")) { + ident = QStringLiteral("X-messaging/sms-All"); + } else if (identifier == QLatin1String("x-meanwhile")) { + ident = QStringLiteral("X-messaging/meanwhile-All"); + } else if (identifier == QLatin1String("x-irc")) { + ident = QStringLiteral("X-messaging/irc-All"); + } else if (identifier == QLatin1String("x-gtalk")) { + ident = QStringLiteral("X-messaging/googletalk-All"); + } else if (identifier == QLatin1String("x-twitter")) { + ident = QStringLiteral("X-messaging/twitter-All"); + } + + const QString key = ident.mid(2); + const int dash = key.indexOf(QLatin1Char('-')); + addr.insertCustom(key.left(dash), key.mid(dash + 1), + (*lineIt).value().toString()); + } + } + } + + addrList.append(addr); + } + + return addrList; +} + +QDateTime VCardTool::parseDateTime(const QString &str, bool *timeValid) +{ + const int posT = str.indexOf(QLatin1Char('T')); + QString dateString = posT >= 0 ? str.left(posT) : str; + const bool noYear = dateString.startsWith(QLatin1String("--")); + dateString = dateString.remove(QLatin1Char('-')); + QDate date; + if (noYear) { + date = QDate::fromString(dateString, QStringLiteral("MMdd")); + date = date.addYears(-1900); + } else { + date = QDate::fromString(dateString, QStringLiteral("yyyyMMdd")); + } + + QTime time; + Qt::TimeSpec spec = Qt::LocalTime; + int offsetSecs = 0; + if (posT >= 0) { + QString timeString = str.mid(posT + 1); + timeString = timeString.remove(QLatin1Char(':')); + const int zPos = timeString.indexOf(QLatin1Char('Z')); + const int plusPos = timeString.indexOf(QLatin1Char('+')); + const int minusPos = timeString.indexOf(QLatin1Char('-')); + const int tzPos = qMax(qMax(zPos, plusPos), minusPos); + const QString hhmmssString = tzPos >= 0 ? timeString.left(tzPos) : timeString; + switch (hhmmssString.size()) { + case 2: + time = QTime::fromString(hhmmssString, QStringLiteral("hh")); + break; + case 4: + time = QTime::fromString(hhmmssString, QStringLiteral("hhmm")); + break; + case 6: + time = QTime::fromString(hhmmssString, QStringLiteral("hhmmss")); + break; + } + if (tzPos >= 0) { + if (zPos >= 0) { + spec = Qt::UTC; + } else { + spec = Qt::OffsetFromUTC; + QTime offsetTime; + const QString offsetString = timeString.mid(tzPos + 1); + switch (offsetString.size()) { + case 2: + offsetTime = QTime::fromString(offsetString, QStringLiteral("hh")); + break; + case 4: + offsetTime = QTime::fromString(offsetString, QStringLiteral("hhmm")); + break; + } + offsetSecs = offsetTime.hour() * 3600 + offsetTime.minute() * 60; + } + if (minusPos >= 0) { + offsetSecs *= -1; + } + } + } + if (timeValid) { + *timeValid = time.isValid(); + } + + return QDateTime(date, time, spec, offsetSecs); +} + +QString VCardTool::createDateTime(const QDateTime &dateTime, VCard::Version version, bool withTime) +{ + if (!dateTime.date().isValid()) { + return QString(); + } + QString str = createDate(dateTime.date(), version); + if (!withTime) { + return str; + } + str += createTime(dateTime.time(), version); + if (dateTime.timeSpec() == Qt::UTC) { + str += QLatin1Char('Z'); + } else if (dateTime.timeSpec() == Qt::OffsetFromUTC) { + const int offsetSecs = dateTime.offsetFromUtc(); + if (offsetSecs >= 0) { + str += QLatin1Char('+'); + } else { + str += QLatin1Char('-'); + } + QTime offsetTime = QTime(0, 0).addSecs(abs(offsetSecs)); + if (version == VCard::v4_0) { + str += offsetTime.toString(QStringLiteral("HHmm")); + } else { + str += offsetTime.toString(QStringLiteral("HH:mm")); + } + } + return str; +} + +QString VCardTool::createDate(const QDate &date, VCard::Version version) +{ + QString format; + if (date.year() > 0) { + format = QStringLiteral("yyyyMMdd"); + } else { + format = QStringLiteral("--MMdd"); + } + if (version != VCard::v4_0) { + format = format.replace(QStringLiteral("yyyy"), QStringLiteral("yyyy-")); + format = format.replace(QStringLiteral("MM"), QStringLiteral("MM-")); + } + return date.toString(format); +} + +QString VCardTool::createTime(const QTime &time, VCard::Version version) +{ + QString format; + if (version == VCard::v4_0) { + format = QStringLiteral("HHmmss"); + } else { + format = QStringLiteral("HH:mm:ss"); + } + return QLatin1Char('T') + time.toString(format); +} + +Picture VCardTool::parsePicture(const VCardLine &line) const +{ + Picture pic; + + const QStringList params = line.parameterList(); + QString type; + if (params.contains(QLatin1String("type"))) { + type = line.parameter(QStringLiteral("type")); + } + if (params.contains(QLatin1String("encoding"))) { + pic.setRawData(line.value().toByteArray(), type); + } else if (params.contains(QLatin1String("value"))) { + if (line.parameter(QStringLiteral("value")).toLower() == QLatin1String("uri")) { + pic.setUrl(line.value().toString()); + } + } + + return pic; +} + +VCardLine VCardTool::createPicture(const QString &identifier, const Picture &pic, VCard::Version version) const +{ + VCardLine line(identifier); + + if (pic.isEmpty()) { + return line; + } + + if (pic.isIntern()) { + line.setValue(pic.rawData()); + if (version == VCard::v2_1) { + line.addParameter(QStringLiteral("ENCODING"), QStringLiteral("BASE64")); + line.addParameter(pic.type(), QString()); + } else { /*if (version == VCard::v3_0) */ + line.addParameter(QStringLiteral("encoding"), QStringLiteral("b")); + line.addParameter(QStringLiteral("type"), pic.type()); +#if 0 + } else { //version 4.0 + line.addParameter(QStringLiteral("data") + QStringLiteral(":image/") + pic.type(), QStringLiteral("base64")); +#endif + } + } else { + line.setValue(pic.url()); + line.addParameter(QStringLiteral("value"), QStringLiteral("URI")); + } + + return line; +} + +Sound VCardTool::parseSound(const VCardLine &line) const +{ + Sound snd; + + const QStringList params = line.parameterList(); + if (params.contains(QLatin1String("encoding"))) { + snd.setData(line.value().toByteArray()); + } else if (params.contains(QLatin1String("value"))) { + if (line.parameter(QStringLiteral("value")).toLower() == QLatin1String("uri")) { + snd.setUrl(line.value().toString()); + } + } + + /* TODO: support sound types + if ( params.contains( "type" ) ) + snd.setType( line.parameter( "type" ) ); + */ + + return snd; +} + +VCardLine VCardTool::createSound(const Sound &snd, VCard::Version version) const +{ + Q_UNUSED(version); + VCardLine line(QStringLiteral("SOUND")); + + if (snd.isIntern()) { + if (!snd.data().isEmpty()) { + line.setValue(snd.data()); + if (version == VCard::v2_1) { + line.addParameter(QStringLiteral("ENCODING"), QStringLiteral("BASE64")); + } else { + line.addParameter(QStringLiteral("encoding"), QStringLiteral("b")); + } + // TODO: need to store sound type!!! + } + } else if (!snd.url().isEmpty()) { + line.setValue(snd.url()); + line.addParameter(QStringLiteral("value"), QStringLiteral("URI")); + } + + return line; +} + +Key VCardTool::parseKey(const VCardLine &line) const +{ + Key key; + + const QStringList params = line.parameterList(); + if (params.contains(QLatin1String("encoding"))) { + key.setBinaryData(line.value().toByteArray()); + } else { + key.setTextData(line.value().toString()); + } + + if (params.contains(QLatin1String("type"))) { + if (line.parameter(QStringLiteral("type")).toLower() == QLatin1String("x509")) { + key.setType(Key::X509); + } else if (line.parameter(QStringLiteral("type")).toLower() == QLatin1String("pgp")) { + key.setType(Key::PGP); + } else { + key.setType(Key::Custom); + key.setCustomTypeString(line.parameter(QStringLiteral("type"))); + } + } else if (params.contains(QLatin1String("mediatype"))) { + const QString param = line.parameter(QStringLiteral("mediatype")).toLower(); + if (param == QLatin1String("application/x-x509-ca-cert")) { + key.setType(Key::X509); + } else if (param == QLatin1String("application/pgp-keys")) { + key.setType(Key::PGP); + } else { + key.setType(Key::Custom); + key.setCustomTypeString(line.parameter(QStringLiteral("type"))); + } + } + + return key; +} + +VCardLine VCardTool::createKey(const Key &key, VCard::Version version) const +{ + VCardLine line(QStringLiteral("KEY")); + + if (key.isBinary()) { + if (!key.binaryData().isEmpty()) { + line.setValue(key.binaryData()); + if (version == VCard::v2_1) { + line.addParameter(QStringLiteral("ENCODING"), QStringLiteral("BASE64")); + } else { + line.addParameter(QStringLiteral("encoding"), QStringLiteral("b")); + } + } + } else if (!key.textData().isEmpty()) { + line.setValue(key.textData()); + } + + if (version == VCard::v4_0) { + if (key.type() == Key::X509) { + line.addParameter(QStringLiteral("MEDIATYPE"), QStringLiteral("application/x-x509-ca-cert")); + } else if (key.type() == Key::PGP) { + line.addParameter(QStringLiteral("MEDIATYPE"), QStringLiteral("application/pgp-keys")); + } else if (key.type() == Key::Custom) { + line.addParameter(QStringLiteral("MEDIATYPE"), key.customTypeString()); + } + } else { + if (key.type() == Key::X509) { + line.addParameter(QStringLiteral("type"), QStringLiteral("X509")); + } else if (key.type() == Key::PGP) { + line.addParameter(QStringLiteral("type"), QStringLiteral("PGP")); + } else if (key.type() == Key::Custom) { + line.addParameter(QStringLiteral("type"), key.customTypeString()); + } + } + + return line; +} + +Secrecy VCardTool::parseSecrecy(const VCardLine &line) const +{ + Secrecy secrecy; + + const QString value = line.value().toString().toLower(); + if (value == QLatin1String("public")) { + secrecy.setType(Secrecy::Public); + } else if (value == QLatin1String("private")) { + secrecy.setType(Secrecy::Private); + } else if (value == QLatin1String("confidential")) { + secrecy.setType(Secrecy::Confidential); + } + + return secrecy; +} + +VCardLine VCardTool::createSecrecy(const Secrecy &secrecy) const +{ + VCardLine line(QStringLiteral("CLASS")); + + int type = secrecy.type(); + + if (type == Secrecy::Public) { + line.setValue(QStringLiteral("PUBLIC")); + } else if (type == Secrecy::Private) { + line.setValue(QStringLiteral("PRIVATE")); + } else if (type == Secrecy::Confidential) { + line.setValue(QStringLiteral("CONFIDENTIAL")); + } + + return line; +} + +QStringList VCardTool::splitString(QChar sep, const QString &str) const +{ + QStringList list; + QString value(str); + + int start = 0; + int pos = value.indexOf(sep, start); + + while (pos != -1) { + if (pos == 0 || value[ pos - 1 ] != QLatin1Char('\\')) { + if (pos > start && pos <= value.length()) { + list << value.mid(start, pos - start); + } else { + list << QString(); + } + + start = pos + 1; + pos = value.indexOf(sep, start); + } else { + value.replace(pos - 1, 2, sep); + pos = value.indexOf(sep, pos); + } + } + + int l = value.length() - 1; + const QString mid = value.mid(start, l - start + 1); + if (!mid.isEmpty()) { + list << mid; + } else { + list << QString(); + } + + return list; +} + +void VCardTool::imppService(const QString &serviceType, KContacts::Impp &impp) const +{ + if (serviceType == QLatin1String("facebook")) { + impp.setType(KContacts::Impp::Facebook); + } else if (serviceType == QLatin1String("jabber")) { + impp.setType(KContacts::Impp::Jabber); + } else if (serviceType == QLatin1String("sip")) { + impp.setType(KContacts::Impp::Sip); + } else if (serviceType == QLatin1String("aim")) { + impp.setType(KContacts::Impp::Aim); + } else if (serviceType == QLatin1String("msn")) { + impp.setType(KContacts::Impp::Msn); + } else if (serviceType == QLatin1String("twitter")) { + impp.setType(KContacts::Impp::Twitter); + } else if (serviceType == QLatin1String("googletalk")) { + impp.setType(KContacts::Impp::GoogleTalk); + } else if (serviceType == QLatin1String("xmpp")) { + impp.setType(KContacts::Impp::Xmpp); + } else if (serviceType == QLatin1String("icq")) { + impp.setType(KContacts::Impp::Icq); + } else if (serviceType == QLatin1String("yahoo")) { + impp.setType(KContacts::Impp::Yahoo); + } else if (serviceType == QLatin1String("qq")) { + impp.setType(KContacts::Impp::Qq); + } else if (serviceType == QLatin1String("gadugadu")) { + impp.setType(KContacts::Impp::GaduGadu); + } else if (serviceType == QLatin1String("owncloud-handle")) { + impp.setType(KContacts::Impp::Ownclound); + } else if (serviceType == QLatin1String("skype")) { + impp.setType(KContacts::Impp::Skype); + } else { + qCDebug(KCONTACTS_LOG) << "unknown service type " << serviceType; + } +} diff --git a/src/vcardtool.h b/src/vcardtool.h new file mode 100644 index 0000000..958753e --- /dev/null +++ b/src/vcardtool.h @@ -0,0 +1,93 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KCONTACTS_VCARDTOOL_H +#define KCONTACTS_VCARDTOOL_H + +#include "kcontacts_export.h" +#include "addressee.h" +#include "vcardparser/vcardparser.h" + +class QDateTime; + +namespace KContacts { +class Key; +class Picture; +class Secrecy; +class Sound; + +class KCONTACTS_EXPORT VCardTool +{ +public: + VCardTool(); + ~VCardTool(); + + /** + Creates a string that contains the addressees from the list in + the vCard format. + */ + Q_REQUIRED_RESULT QByteArray createVCards(const Addressee::List &list, VCard::Version version = VCard::v3_0) const; + + /** + * @since 4.9.1 + */ + Q_REQUIRED_RESULT QByteArray exportVCards(const Addressee::List &list, VCard::Version version = VCard::v3_0) const; + /** + Parses the string and returns a list of addressee objects. + */ + Q_REQUIRED_RESULT Addressee::List parseVCards(const QByteArray &vcard) const; + + static QDateTime parseDateTime(const QString &str, bool *timeValid = nullptr); + static QString createDateTime(const QDateTime &dateTime, VCard::Version version, bool withTime = true); + static QString createDate(const QDate &date, VCard::Version version); + static QString createTime(const QTime &time, VCard::Version version); + +private: + + QByteArray createVCards(const Addressee::List &list, VCard::Version version, bool exportVcard) const; + + /** + Split a string and replaces escaped separators on the fly with + unescaped ones. + */ + QStringList splitString(QChar sep, const QString &value) const; + + Picture parsePicture(const VCardLine &line) const; + VCardLine createPicture(const QString &identifier, const Picture &pic, VCard::Version version) const; + + Sound parseSound(const VCardLine &line) const; + VCardLine createSound(const Sound &snd, VCard::Version version) const; + + Key parseKey(const VCardLine &line) const; + VCardLine createKey(const Key &key, VCard::Version version) const; + + Secrecy parseSecrecy(const VCardLine &line) const; + VCardLine createSecrecy(const Secrecy &secrecy) const; + + void addParameter(VCardLine &line, VCard::Version version, const QString &key, const QStringList &valueStringList) const; + void addParameters(VCardLine &line, const QMap<QString, QStringList> ¶ms) const; + + void imppService(const QString &serviceType, KContacts::Impp &impp) const; + + Q_DISABLE_COPY(VCardTool) +}; +} + +#endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..c407a19 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,22 @@ + +include(ECMMarkAsTest) + +########### next target ############### + +# FIXME: Build fails +set(testread_SRCS testread.cpp) +add_executable(testread ${testread_SRCS}) +target_link_libraries(testread KF5Contacts KF5::I18n Qt5::Gui) + +########### next target ############### + +# FIXME: Build fails +set(testwrite_SRCS testwrite.cpp) +add_executable(testwrite ${testwrite_SRCS}) +target_link_libraries(testwrite KF5Contacts Qt5::Gui KF5::I18n) + +########### next target ############### + +set(testread2_SRCS testread2.cpp testutils.cpp) +add_executable(testread2 ${testread2_SRCS}) +target_link_libraries(testread2 KF5Contacts Qt5::Gui) diff --git a/tests/README.testing b/tests/README.testing new file mode 100644 index 0000000..1a70685 --- /dev/null +++ b/tests/README.testing @@ -0,0 +1,12 @@ +For testing the vcardparser there are some test files and a small testsuite +automatically checking for regressions. The tests directory contains some vCard +files and correpsonding reference output files (with an additional ".ref" +suffix). For running the geression test do "./testroundtrip" or simply run "ctest". + +For creating a new test put a vCard file to be parsed into the tests directory. +Create a reference file by running "testread" on the test file. It will put out +the parsed data as vCard again on stdout. Carefully check the output, manually +correct any errors and save the result as reference file in the tests directory. +Now add the filename to the testroundtrip.qrc resource file and run +"make && ./roundtriptest" If the check fails adapt the reference file or fix the bugs +in the parser, whatever is appropriate. diff --git a/tests/checkvcard.pl b/tests/checkvcard.pl new file mode 100755 index 0000000..5965c89 --- /dev/null +++ b/tests/checkvcard.pl @@ -0,0 +1,79 @@ +#!/usr/bin/perl + +if ( @ARGV != 1 ) { + print STDERR "Missing arg: filename\n"; + system "touch FAILED"; + exit 1; +} + +$file = $ARGV[0]; + +if ( !open( IN, "$file" ) ) { + print STDERR "Unable to open '$file'\n"; + system "touch FAILED"; + exit 1; +} + +while( <IN> ) { + if (/^VERSION:(.*)$/ ) { + $version = $1; + if ( $version eq "2.1" ) { $options = "--vcard21"; } + } +} + +close IN; + +$ref = "$file.ref"; + +if ( !open( REF, "$ref" ) ) { + print STDERR "Unable to open $ref\n"; + system "touch FAILED"; + exit 1; +} + +while( <REF> ) { + push @ref, $_; +} + +close REF; + +if ( !open( READ, "./testread $file $options 2> /dev/null |" ) ) { + print STDERR "Unable to open testread\n"; + system "touch FAILED"; + exit 1; +} + +print "Checking '$file':\n"; + +$gotsomething = 0; +$error = 0; +$i = 0; +while( <READ> ) { + $gotsomething = 1; + $out = $_; + $ref = @ref[$i++]; + + if ( $out ne $ref ) { + if ( $ref =~ /^UID/ && $out =~ /^UID/ ) { next; } + $error++; + print " Expected : $ref"; + print " Parser output : $out"; + } +} + +close READ; + +if ( $gotsomething == 0 ) { + print "\n FAILED: testread didn't output anything\n"; + system "touch FAILED"; + exit 1; +} +if ( $error > 0 ) { + print "\n FAILED: $error errors found.\n"; + system "touch FAILED"; + exit 1; +} else { + print " OK\n"; +} + +exit 0; diff --git a/tests/testread.cpp b/tests/testread.cpp new file mode 100644 index 0000000..4b2f94a --- /dev/null +++ b/tests/testread.cpp @@ -0,0 +1,73 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team <kde-pim@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <iostream> +#include <stdlib.h> + +#include <QFile> + +#include <qdebug.h> +#include <QCoreApplication> +#include <QCommandLineParser> +#include <QCommandLineOption> + +#include "converter/kcontacts/vcardconverter.h" +#include "vcard.h" + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + QCommandLineParser parser; + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("vcard21"), QStringLiteral("vCard 2.1"))); + parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("+inputfile"), QStringLiteral("Input file"))); + + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + + if (parser.positionalArguments().count() != 1) { + std::cerr << "Missing argument" << std::endl; + return 1; + } + + QString inputFile(parser.positionalArguments().at(0)); + + QFile file(inputFile); + if (!file.open(QIODevice::ReadOnly)) { + qDebug("Unable to open file '%s' for reading!", qPrintable(file.fileName())); + return 1; + } + + QByteArray text = file.readAll(); + file.close(); + + KContacts::VCardConverter converter; + KContacts::Addressee::List list = converter.parseVCards(text); + + if (parser.isSet(QStringLiteral("vcard21"))) { + text = converter.createVCards(list, KContacts::VCardConverter::v2_1); // uses version 2.1 + } else { + text = converter.createVCards(list); // uses version 3.0 + } + + std::cout << text.data(); + + return 0; +} diff --git a/tests/testread2.cpp b/tests/testread2.cpp new file mode 100644 index 0000000..bfed387 --- /dev/null +++ b/tests/testread2.cpp @@ -0,0 +1,61 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team <kde-pim@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "testutils.h" +#include <kcontacts/addressee.h> +#include <converter/kcontacts/vcardconverter.h> +#include <qdebug.h> + +using namespace KContacts; + +int main() +{ + Addressee::List l = vCardsAsAddresseeList(); + QByteArray vcards = vCardsAsText(); + + VCardConverter vct; + + Addressee::List parsed = vct.parseVCards(vcards); + + if (l.size() != parsed.size()) { + qDebug() << "\tSize - FAILED :" << l.size() << "vs. parsed" << parsed.size(); + } else { + qDebug() << "\tSize - PASSED"; + } + + Addressee::List::iterator itr1; + Addressee::List::iterator itr2; + for (itr1 = l.begin(), itr2 = parsed.begin(); + itr1 != l.end() && itr2 != parsed.end(); ++itr1, ++itr2) { + if ((*itr1).fullEmail() == (*itr2).fullEmail() + && (*itr1).organization() == (*itr2).organization() + && (*itr1).phoneNumbers() == (*itr2).phoneNumbers() + && (*itr1).emails() == (*itr2).emails() + && (*itr1).role() == (*itr2).role()) { + qDebug() << "\tAddressee - PASSED"; + qDebug() << "\t\t" << (*itr1).fullEmail() << "VS." << (*itr2).fullEmail(); + } else { + qDebug() << "\tAddressee - FAILED"; + qDebug() << (*itr1).toString(); + qDebug() << (*itr2).toString(); + //qDebug()<<"\t\t"<< (*itr1).fullEmail() << "VS." << (*itr2).fullEmail(); + } + } +} diff --git a/tests/testutils.cpp b/tests/testutils.cpp new file mode 100644 index 0000000..43bb6a3 --- /dev/null +++ b/tests/testutils.cpp @@ -0,0 +1,117 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team <kde-pim@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <QFile> + +#include <kcontacts/addressee.h> + +#include "vcardparser.h" + +using namespace KContacts; + +Addressee vcard1() +{ + Addressee addr; + + addr.setName(QStringLiteral("Frank Dawson")); + addr.setOrganization(QStringLiteral("Lotus Development Corporation")); + KContacts::ResourceLocatorUrl url; + url.setUrl(QUrl(QStringLiteral("http://home.earthlink.net/~fdawson"))); + addr.setUrl(url); + addr.insertEmail(QStringLiteral("fdawson@earthlink.net")); + addr.insertEmail(QStringLiteral("Frank_Dawson@Lotus.com"), true); + addr.insertPhoneNumber(PhoneNumber(QStringLiteral("+1-919-676-9515"), + PhoneNumber::Voice | PhoneNumber::Msg | PhoneNumber::Work)); + addr.insertPhoneNumber(PhoneNumber(QStringLiteral("+1-919-676-9564"), + PhoneNumber::Fax | PhoneNumber::Work)); + Address a(Address::Work | Address::Postal | Address::Parcel); + a.setStreet(QStringLiteral("6544 Battleford Drive")); + a.setLocality(QStringLiteral("Raleigh")); + a.setRegion(QStringLiteral("NC")); + a.setPostalCode(QStringLiteral("27613-3502")); + a.setCountry(QStringLiteral("U.S.A.")); + addr.insertAddress(a); + return addr; +} + +Addressee vcard2() +{ + Addressee addr; + + addr.setName(QStringLiteral("Tim Howes")); + addr.setOrganization(QStringLiteral("Netscape Communications Corp.")); + addr.insertEmail(QStringLiteral("howes@netscape.com")); + addr.insertPhoneNumber(PhoneNumber(QStringLiteral("+1-415-937-3419"), + PhoneNumber::Voice | PhoneNumber::Msg | PhoneNumber::Work)); + addr.insertPhoneNumber(PhoneNumber(QStringLiteral("+1-415-528-4164"), + PhoneNumber::Fax | PhoneNumber::Work)); + Address a(Address::Work); + a.setStreet(QStringLiteral("501 E. Middlefield Rd.")); + a.setLocality(QStringLiteral("Mountain View")); + a.setRegion(QStringLiteral("CA")); + a.setPostalCode(QStringLiteral("94043")); + a.setCountry(QStringLiteral("U.S.A.")); + addr.insertAddress(a); + return addr; +} + +Addressee vcard3() +{ + Addressee addr; + + addr.setName(QStringLiteral("ian geiser")); + addr.setOrganization(QStringLiteral("Source eXtreme")); + addr.insertEmail(QStringLiteral("geiseri@yahoo.com")); + addr.setTitle(QStringLiteral("VP of Engineering")); + return addr; +} + +QByteArray vcardAsText(const QString &location) +{ + QByteArray text; + + QFile file(location); + if (file.open(QIODevice::ReadOnly)) { + text = file.readAll(); + file.close(); + } + + return text; +} + +Addressee::List vCardsAsAddresseeList() +{ + Addressee::List l; + + l.append(vcard1()); + l.append(vcard2()); + l.append(vcard3()); + + return l; +} + +QByteArray vCardsAsText() +{ + QByteArray vcards = vcardAsText(QStringLiteral("tests/vcard1.vcf")); + vcards += vcardAsText(QStringLiteral("tests/vcard2.vcf")); + vcards += vcardAsText(QStringLiteral("tests/vcard3.vcf")); + + return vcards; +} diff --git a/tests/testutils.h b/tests/testutils.h new file mode 100644 index 0000000..91e90aa --- /dev/null +++ b/tests/testutils.h @@ -0,0 +1,36 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team <kde-pim@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef TESTUTILS_H +#define TESTUTILS_H + +#include <QByteArray> +#include <QString> + +#include <kcontacts/addressee.h> + +KContacts::Addressee vcard1(); +KContacts::Addressee vcard2(); +KContacts::Addressee vcard3(); +KContacts::Addressee::List vCardsAsAddresseeList(); +QByteArray vCardAsText(const QString &location); +QByteArray vCardsAsText(); + +#endif diff --git a/tests/testwrite.cpp b/tests/testwrite.cpp new file mode 100644 index 0000000..5ff3ef5 --- /dev/null +++ b/tests/testwrite.cpp @@ -0,0 +1,122 @@ +/* + This file is part of the KContacts framework. + Copyright (c) 2007 KDE-PIM team <kde-pim@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include <QFile> + +#include <klocalizedstring.h> + +#include <QCoreApplication> +#include <QCommandLineParser> + +#include "kcontacts/addressee.h" +#include "kcontacts/phonenumber.h" +#include "kcontacts/address.h" +#include "kcontacts/key.h" +#include "kcontacts/picture.h" +#include "kcontacts/sound.h" +#include "kcontacts/secrecy.h" +#include "converter/kcontacts/vcardconverter.h" + +int main(int argc, char **argv) +{ + QCoreApplication app(argc, argv); + QCommandLineParser parser; + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + + KContacts::Addressee addressee; + + addressee.setNameFromString(QLatin1String("Mr. Tobias Koenig Jr.")); + addressee.setNickName(QLatin1String("tokoe")); + addressee.setBirthday(QDateTime(QDate(1982, 7, 19))); + addressee.setMailer(QLatin1String("mutt1.2")); + addressee.setTimeZone(KContacts::TimeZone(+2)); + + KContacts::Geo geo; + geo.setLatitude(30); + geo.setLongitude(51); + addressee.setGeo(geo); + + addressee.setTitle(QLatin1String("nerd")); + addressee.setRole(QLatin1String("Maintainer")); + addressee.setOrganization(QLatin1String("KDE")); + addressee.setNote(QLatin1String("nerver\ntouch a running system")); + addressee.setProductId(QLatin1String("testId")); + addressee.setRevision(QDateTime::currentDateTime()); + addressee.setSortString(QLatin1String("koenig")); + KContacts::ResourceLocatorUrl url; + url.setUrl(QUrl(QLatin1String("http://wgess16.dyndns.org"))); + addressee.setUrl(url); + addressee.setSecrecy(KContacts::Secrecy(KContacts::Secrecy::Confidential)); + + addressee.insertEmail(QLatin1String("tokoe@kde.org"), true); + addressee.insertEmail(QLatin1String("tokoe82@yahoo.de"), true); + + KContacts::PhoneNumber phone1(QLatin1String("3541523475"), + KContacts::PhoneNumber::Pref | KContacts::PhoneNumber::Home); + KContacts::PhoneNumber phone2(QLatin1String("+46745673475"), + KContacts::PhoneNumber::Work); + addressee.insertPhoneNumber(phone1); + addressee.insertPhoneNumber(phone2); + + KContacts::Key key(QLatin1String("secret key"), KContacts::Key::X509); + addressee.insertKey(key); + + QStringList categories; + categories << QLatin1String("Friends") << QLatin1String("School") << QLatin1String("KDE"); + addressee.setCategories(categories); + + KContacts::Address a(KContacts::Address::Work | KContacts::Address::Postal | KContacts::Address::Parcel); + a.setStreet(QLatin1String("6544 Battleford Drive")); + a.setLocality(QLatin1String("Raleigh")); + a.setRegion(QLatin1String("NC")); + a.setPostalCode(QLatin1String("27613-3502")); + a.setCountry(QLatin1String("U.S.A.")); + addressee.insertAddress(a); + + addressee.insertCustom(QLatin1String("1hsdf"), QLatin1String("ertuer"), + QLatin1String("iurt")); + addressee.insertCustom(QLatin1String("2hsdf"), QLatin1String("ertuer"), + QLatin1String("iurt")); + addressee.insertCustom(QLatin1String("3hsdf"), QLatin1String("ertuer"), + QLatin1String("iurt")); + + KContacts::Addressee::List list; + for (int i = 0; i < 1000; ++i) { + KContacts::Addressee addr = addressee; + addr.setUid(QString::number(i)); + list.append(addr); + } + + KContacts::VCardConverter converter; + QByteArray txt = converter.createVCards(list); + + QFile file(QLatin1String("out.vcf")); + if (!file.open(QIODevice::WriteOnly)) { + qDebug("Can't open file '%s' fro writing", qPrintable(file.fileName())); + return 1; + } + + file.write(txt); + file.close(); + + return 0; +} -- 2.30.2