diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ set(QT_REQUIRED_VERSION "5.10.0") find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test DBus PrintSupport) set(LIBKDEPIM_LIB_VERSION_LIB "5.11.40") -set(KDEPIM_APPS_LIB_VERSION_LIB "5.11.42") +set(KDEPIM_APPS_LIB_VERSION_LIB "5.11.43") set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.11.40") set(PIMCOMMON_LIB_VERSION_LIB "5.11.40") set(LIBKLEO_LIB_VERSION "5.11.40") diff --git a/Messages.sh b/Messages.sh --- a/Messages.sh +++ b/Messages.sh @@ -1,4 +1,5 @@ #! /bin/sh $EXTRACTRC `find . -name \*.ui` `find . -name \*.rc` >> rc.cpp || exit 11 +$EXTRACT_GRANTLEE_TEMPLATE_STRINGS `find . -name \*.html` >> html.cpp $XGETTEXT `find -name \*.cpp -o -name \*.h` -o $podir/kaddressbook.pot -rm -f rc.cpp +rm -f rc.cpp html.cpp diff --git a/src/mainwidget.cpp b/src/mainwidget.cpp --- a/src/mainwidget.cpp +++ b/src/mainwidget.cpp @@ -587,6 +587,7 @@ actions->connectToView(mContactDetails); actions->connectToView(mContactGroupDetails); mFormatter = new KAddressBookGrantlee::GrantleeContactFormatter; + mFormatter->setApplicationDomain("kaddressbook"); mContactDetails->setContactFormatter(mFormatter); diff --git a/src/viewertemplates/contact_embedded.html b/src/viewertemplates/contact_embedded.html --- a/src/viewertemplates/contact_embedded.html +++ b/src/viewertemplates/contact_embedded.html @@ -4,26 +4,30 @@ - {{ contact.name }} + {{ contact.realName }} - {{ contact.job }} + + {% if contact.title %} + {{ contact.title }} + {% elif contact.role %} + {{ contact.role }} + {% else %} + {{ contact.profession }} + {% endif %} + {{ contact.organization }} + {% if contact.birthday %} - {% with contact.birthdayi18n as title %} - {% if contact.birthdayage %} - {% with contact.birthdayage|safe as value %} - {% include "contact_row.html" %} - {% endwith %} - {% else %} - {% with contact.birthday|safe as value %} - {% include "contact_row.html" %} - {% endwith %} - {% endif %} - {% endwith %} + + {% i18n "Birthday" %} + + {{ contact.formattedBirthday }} {% i18np "(One year old)" "(%1 years old)" contact.age %} + + {% endif %} {% for phoneNumber in contact.phoneNumbers %} @@ -40,24 +44,22 @@ {% for email in contact.emails %} - {{ contact.emailsi18n }} + {% i18n "Email" %} {{ email.email }} {% endfor %} {% for imAddress in contact.imAddresses %} - {% with imAddress.type as title %} - {% with imAddress.imAddress|safe as value %} - {% with imAddress.imIcon|safe as value2 %} - {% include "contact_row.html" %} - {% endwith %} - {% endwith %} - {% endwith %} + + {{ imAddress.serviceLabel }} + {{ imAddress.address|safe }} + {% icon imAddress.serviceIcon small %} + {% endfor %} {% for website in contact.urls %} - {{ contact.websitei18n }} + {% i18n "Website" %} {% if website.url.scheme %} @@ -70,7 +72,7 @@ {% if contact.blogFeed %} - {{ contact.blogUrli18n }} + {% i18n "Blog Feed" %} {% if contact.blogFeed.scheme %} @@ -99,93 +101,93 @@ {% endfor %} {% if contact.profession %} - {% with contact.Professioni18n as title %} + {% with contact.professionLabel as title %} {% with contact.profession as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} {% if contact.department %} - {% with contact.departmenti18n as title %} + {% with contact.departmentLabel as title %} {% with contact.department as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} {% if contact.office %} - {% with contact.officei18n as title %} + {% with contact.officeLabel as title %} {% with contact.office as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} - {% if contact.manager %} - {% with contact.manageri18n as title %} - {% with contact.manager as value %} + {% if contact.managersName %} + {% with contact.managerLabel as title %} + {% with contact.managersName as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} - {% if contact.assistant %} - {% with contact.assistanti18n as title %} - {% with contact.assistant as value %} + {% if contact.assistantsName %} + {% with contact.assistantLabel as title %} + {% with contact.assistantsName as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} - {% if contact.spouse %} - {% with contact.spousei18n as title %} - {% with contact.spouse as value %} + {% if contact.spousesName %} + {% with contact.spouseLabel as title %} + {% with contact.spousesName as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} {% if contact.anniversary %} - {% with contact.anniversaryi18n as title %} - {% with contact.anniversary as value %} + {% with contact.anniversaryLabel as title %} + {% with contact.formattedAnniversary as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} - {% for customField in contact.customFieldsUrl %} + {% for customField in customFieldsUrl %} {% with customField.title as title %} {% with customField.value|safe as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endfor %} - {% for customField in contact.customFields %} + {% for customField in customFields %} {% with customField.title as title %} {% with customField.value as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endfor %} {% if contact.addressBookName %} - {% with contact.addressBookNamei18n as title %} + {% with contact.addressBookLabel as title %} {% with contact.addressBookName as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} {% if contact.note %} - {% with contact.notei18n as title %} - {% with contact.note|safe as value %} + {% with contact.noteLabel as title %} + {% with contact.note|linebreaksbr as value %} {% include "contact_row.html" %} {% endwith %} {% endwith %} {% endif %} - {% if contact.hasqrcode %} + {% if hasqrcode %}