From edefee486ae3daaa9902895f077a8e288064dbb1 Mon Sep 17 00:00:00 2001 From: Harald Friessnegger Date: Fri, 13 Jan 2017 14:08:47 +0100 Subject: [PATCH 1/4] localize address (fixes #29) --- CHANGES.rst | 3 + .../contact/core/browser/templates/address.pt | 6 +- .../core/locales/collective.contact.core.pot | 7 ++- .../de/LC_MESSAGES/collective.contact.core.po | 44 ++++++++++----- .../core/locales/de/LC_MESSAGES/plone.po | 3 +- .../fr/LC_MESSAGES/collective.contact.core.po | 55 +++++++++++++------ .../core/locales/fr/LC_MESSAGES/plone.po | 2 +- .../it/LC_MESSAGES/collective.contact.core.po | 46 +++++++++++----- .../core/locales/it/LC_MESSAGES/plone.po | 2 +- src/collective/contact/core/locales/plone.pot | 2 +- .../sl/LC_MESSAGES/collective.contact.core.po | 44 ++++++++++----- .../core/locales/sl/LC_MESSAGES/plone.po | 3 +- 12 files changed, 150 insertions(+), 67 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0a843f53..63d041b1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 1.11 (unreleased) ----------------- +- Localize Address: ` ` as default, ` ` for french + (fixes #29) [fRiSi] + - Fixed indexing a held position which organization has been removed. [thomasdesvenain] diff --git a/src/collective/contact/core/browser/templates/address.pt b/src/collective/contact/core/browser/templates/address.pt index 637696f6..d12a23c6 100644 --- a/src/collective/contact/core/browser/templates/address.pt +++ b/src/collective/contact/core/browser/templates/address.pt @@ -4,9 +4,9 @@ tal:repeat="address args">
-
- - +
+ +
diff --git a/src/collective/contact/core/locales/collective.contact.core.pot b/src/collective/contact/core/locales/collective.contact.core.pot index 0a3882df..38ea4b39 100644 --- a/src/collective/contact/core/locales/collective.contact.core.pot +++ b/src/collective/contact/core/locales/collective.contact.core.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -363,6 +363,11 @@ msgstr "" msgid "Zip Code" msgstr "" +#. Default: "${street} ${number}" +#: ../browser/templates/address.pt:9 +msgid "address_line" +msgstr "" + #. Default: ":" #: ../browser/basefields/templates/held_position.pt:7 #: ../browser/templates/organization.pt:55 diff --git a/src/collective/contact/core/locales/de/LC_MESSAGES/collective.contact.core.po b/src/collective/contact/core/locales/de/LC_MESSAGES/collective.contact.core.po index 8dd0f090..02e7bc18 100644 --- a/src/collective/contact/core/locales/de/LC_MESSAGES/collective.contact.core.po +++ b/src/collective/contact/core/locales/de/LC_MESSAGES/collective.contact.core.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: collective.contact.core\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: 2016-11-16 11:24+0100\n" "Last-Translator: Cédric Messiant \n" "Language-Team: French\n" @@ -53,11 +53,13 @@ msgstr "Zusätzliches Feld" msgid "Additional label with information that does not appear on position label" msgstr "Zusätzliches Feld mit Information die nicht im Positionsfeld aufscheint" -#: ../behaviors.py:130 ../browser/templates/address.pt:6 +#: ../behaviors.py:130 +#: ../browser/templates/address.pt:6 msgid "Address" msgstr "Adresse" -#: ../behaviors.py:320 ../browser/basefields/templates/person.pt:27 +#: ../behaviors.py:320 +#: ../browser/basefields/templates/person.pt:27 msgid "Birthday" msgstr "Geburtstag" @@ -85,7 +87,8 @@ msgstr "Kontaktdetails" msgid "Country" msgstr "Land" -#: ../browser/addcontact.py:63 ../browser/templates/organization.pt:83 +#: ../browser/addcontact.py:63 +#: ../browser/templates/organization.pt:83 #: ../browser/templates/position.pt:41 msgid "Create ${name}" msgstr "Eingabe ${name}" @@ -111,12 +114,14 @@ msgstr "Akademischen Titel bei Person anzeigen" msgid "Download VCard" msgstr "VCard herunterladen" -#: ../behaviors.py:137 ../browser/templates/contactdetails.pt:11 +#: ../behaviors.py:137 +#: ../browser/templates/contactdetails.pt:11 msgid "Email" msgstr "Email" #: ../browser/basefields/templates/held_position.pt:29 -#: ../browser/templates/heldpositions.pt:47 ../content/held_position.py:44 +#: ../browser/templates/heldpositions.pt:47 +#: ../content/held_position.py:44 msgid "End date" msgstr "Enddatum" @@ -197,7 +202,8 @@ msgstr "Nicht zugewiesen" msgid "Number" msgstr "Nummer" -#: ../browser/addcontact.py:271 ../content/directory.py:37 +#: ../browser/addcontact.py:271 +#: ../content/directory.py:37 #: ../profiles/default/types/organization.xml msgid "Organization" msgstr "Organisation" @@ -222,7 +228,8 @@ msgstr "Organisationstypen" msgid "Organization/Position" msgstr "Organisation/Position" -#: ../browser/templates/contact.pt:17 ../browser/templates/directory.pt:19 +#: ../browser/templates/contact.pt:17 +#: ../browser/templates/directory.pt:19 msgid "Organizations" msgstr "Organisationen" @@ -234,11 +241,13 @@ msgstr "Organisationen in dieser Organisation" msgid "Other contacts in this organization:" msgstr "Weitere Kontakte in dieser Organisation" -#: ../browser/templates/organization.pt:19 ../browser/templates/position.pt:17 +#: ../browser/templates/organization.pt:19 +#: ../browser/templates/position.pt:17 msgid "Parent organizations" msgstr "Übergeordnete Organisationen" -#: ../browser/addcontact.py:277 ../profiles/default/types/person.xml +#: ../browser/addcontact.py:277 +#: ../profiles/default/types/person.xml #: ../upgrades/profiles/v2/types/person.xml msgid "Person" msgstr "Person" @@ -259,7 +268,8 @@ msgstr "Telefon" msgid "Phone number" msgstr "Telefon" -#: ../content/held_position.py:48 ../content/person.py:52 +#: ../content/held_position.py:48 +#: ../content/person.py:52 msgid "Photo" msgstr "Foto" @@ -310,7 +320,8 @@ msgid "Select the position held by this person in the selected organization" msgstr "Wähle die Position, die die Person in der gewählten Organisation hat" #: ../browser/basefields/templates/held_position.pt:23 -#: ../browser/templates/heldpositions.pt:42 ../content/held_position.py:40 +#: ../browser/templates/heldpositions.pt:42 +#: ../content/held_position.py:40 msgid "Start date" msgstr "Beginndatum" @@ -342,7 +353,8 @@ msgstr "Verwende Positionen zum Suchen von Personen" msgid "Use the belonging entity address" msgstr "Verwende dazugehörige Adresseinheit" -#: ../behaviors.py:159 ../browser/templates/contactdetails.pt:50 +#: ../behaviors.py:159 +#: ../browser/templates/contactdetails.pt:50 msgid "Website" msgstr "Webseite" @@ -350,6 +362,11 @@ msgstr "Webseite" msgid "Zip Code" msgstr "Postleitzahl" +#. Default: "${street} ${number}" +#: ../browser/templates/address.pt:9 +msgid "address_line" +msgstr "" + #. Default: ":" #: ../browser/basefields/templates/held_position.pt:7 #: ../browser/templates/organization.pt:55 @@ -382,3 +399,4 @@ msgstr "Organisation/Position" #: ../browser/templates/organization.pt:65 msgid "to" msgstr "bis" + diff --git a/src/collective/contact/core/locales/de/LC_MESSAGES/plone.po b/src/collective/contact/core/locales/de/LC_MESSAGES/plone.po index b2bfb70b..c1d69df6 100644 --- a/src/collective/contact/core/locales/de/LC_MESSAGES/plone.po +++ b/src/collective/contact/core/locales/de/LC_MESSAGES/plone.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: collective.contact.core\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: 2016-11-16 11:25+0100\n" "Last-Translator: Cédric Messiant \n" "Language-Team: Ecréall\n" @@ -47,3 +47,4 @@ msgstr "Kein" #: ../profiles/testing/types/testtype.xml msgid "Test type" msgstr "Test-Typ" + diff --git a/src/collective/contact/core/locales/fr/LC_MESSAGES/collective.contact.core.po b/src/collective/contact/core/locales/fr/LC_MESSAGES/collective.contact.core.po index 508bd5e5..8e89c6b5 100644 --- a/src/collective/contact/core/locales/fr/LC_MESSAGES/collective.contact.core.po +++ b/src/collective/contact/core/locales/fr/LC_MESSAGES/collective.contact.core.po @@ -1,19 +1,20 @@ +# Harald Friessnegger , 2017. msgid "" msgstr "" "Project-Id-Version: collective.contact.core\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" -"PO-Revision-Date: 2016-10-04 15:22+0200\n" -"Last-Translator: Cédric Messiant \n" -"Language-Team: French\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" +"PO-Revision-Date: 2017-01-13 13:48+0100\n" +"Last-Translator: Harald Friessnegger \n" +"Language-Team: German \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" "Language-Code: fr\n" "Language-Name: French\n" "Preferred-Encodings: utf-8 latin1\n" "Domain: collective.contact.core\n" -"X-Generator: Poedit 1.8.8\n" +"X-Generator: Lokalize 2.0\n" "Language: fr\n" #: ../browser/addcontact.py:110 @@ -53,11 +54,13 @@ msgstr "Intitulé" msgid "Additional label with information that does not appear on position label" msgstr "Intitulé complétant l'intitulé de poste" -#: ../behaviors.py:130 ../browser/templates/address.pt:6 +#: ../behaviors.py:130 +#: ../browser/templates/address.pt:6 msgid "Address" msgstr "Adresse " -#: ../behaviors.py:320 ../browser/basefields/templates/person.pt:27 +#: ../behaviors.py:320 +#: ../browser/basefields/templates/person.pt:27 msgid "Birthday" msgstr "Date de naissance " @@ -85,7 +88,8 @@ msgstr "Coordonnées" msgid "Country" msgstr "Pays" -#: ../browser/addcontact.py:63 ../browser/templates/organization.pt:83 +#: ../browser/addcontact.py:63 +#: ../browser/templates/organization.pt:83 #: ../browser/templates/position.pt:41 msgid "Create ${name}" msgstr "Créer ${name}" @@ -111,12 +115,14 @@ msgstr "Afficher la civilité sur le titre de la personne." msgid "Download VCard" msgstr "Télécharger la VCard" -#: ../behaviors.py:137 ../browser/templates/contactdetails.pt:11 +#: ../behaviors.py:137 +#: ../browser/templates/contactdetails.pt:11 msgid "Email" msgstr "Courriel " #: ../browser/basefields/templates/held_position.pt:29 -#: ../browser/templates/heldpositions.pt:47 ../content/held_position.py:44 +#: ../browser/templates/heldpositions.pt:47 +#: ../content/held_position.py:44 msgid "End date" msgstr "Date de fin " @@ -197,7 +203,8 @@ msgstr "Non assigné" msgid "Number" msgstr "Numéro" -#: ../browser/addcontact.py:271 ../content/directory.py:37 +#: ../browser/addcontact.py:271 +#: ../content/directory.py:37 #: ../profiles/default/types/organization.xml msgid "Organization" msgstr "Organisation" @@ -222,7 +229,8 @@ msgstr "Types d'organisations" msgid "Organization/Position" msgstr "Organisation/Fonction" -#: ../browser/templates/contact.pt:17 ../browser/templates/directory.pt:19 +#: ../browser/templates/contact.pt:17 +#: ../browser/templates/directory.pt:19 msgid "Organizations" msgstr "Organisations " @@ -234,11 +242,13 @@ msgstr "Organisations dans cette organisation " msgid "Other contacts in this organization:" msgstr "Autres contacts dans cette organisation :" -#: ../browser/templates/organization.pt:19 ../browser/templates/position.pt:17 +#: ../browser/templates/organization.pt:19 +#: ../browser/templates/position.pt:17 msgid "Parent organizations" msgstr "Organisations parentes " -#: ../browser/addcontact.py:277 ../profiles/default/types/person.xml +#: ../browser/addcontact.py:277 +#: ../profiles/default/types/person.xml #: ../upgrades/profiles/v2/types/person.xml msgid "Person" msgstr "Personne" @@ -259,7 +269,8 @@ msgstr "Téléphone" msgid "Phone number" msgstr "Numéro de téléphone " -#: ../content/held_position.py:48 ../content/person.py:52 +#: ../content/held_position.py:48 +#: ../content/person.py:52 msgid "Photo" msgstr "Photo" @@ -310,7 +321,8 @@ msgid "Select the position held by this person in the selected organization" msgstr "Sélectionnez la fonction occupée par cette personne dans l'organisation sélectionnée" #: ../browser/basefields/templates/held_position.pt:23 -#: ../browser/templates/heldpositions.pt:42 ../content/held_position.py:40 +#: ../browser/templates/heldpositions.pt:42 +#: ../content/held_position.py:40 msgid "Start date" msgstr "Date de début " @@ -342,7 +354,8 @@ msgstr "Utiliser la position occupée pour rechercher des personnes." msgid "Use the belonging entity address" msgstr "Utiliser l'adresse de l'entité d'appartenance" -#: ../behaviors.py:159 ../browser/templates/contactdetails.pt:50 +#: ../behaviors.py:159 +#: ../browser/templates/contactdetails.pt:50 msgid "Website" msgstr "Site web " @@ -350,6 +363,11 @@ msgstr "Site web " msgid "Zip Code" msgstr "Code postal" +#. Default: "${street} ${number}" +#: ../browser/templates/address.pt:9 +msgid "address_line" +msgstr "${number} ${street}" + #. Default: ":" #: ../browser/basefields/templates/held_position.pt:7 #: ../browser/templates/organization.pt:55 @@ -382,3 +400,4 @@ msgstr "organisation/fonction" #: ../browser/templates/organization.pt:65 msgid "to" msgstr "à" + diff --git a/src/collective/contact/core/locales/fr/LC_MESSAGES/plone.po b/src/collective/contact/core/locales/fr/LC_MESSAGES/plone.po index 2ee401e0..b9efe323 100644 --- a/src/collective/contact/core/locales/fr/LC_MESSAGES/plone.po +++ b/src/collective/contact/core/locales/fr/LC_MESSAGES/plone.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: collective.contact.core\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: 2013-03-11 16:38+0100\n" "Last-Translator: Cédric Messiant \n" "Language-Team: Ecréall\n" diff --git a/src/collective/contact/core/locales/it/LC_MESSAGES/collective.contact.core.po b/src/collective/contact/core/locales/it/LC_MESSAGES/collective.contact.core.po index 7a5dc226..cd6a7881 100644 --- a/src/collective/contact/core/locales/it/LC_MESSAGES/collective.contact.core.po +++ b/src/collective/contact/core/locales/it/LC_MESSAGES/collective.contact.core.po @@ -4,9 +4,10 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: 2016-10-04 18:45+0200\n" "Last-Translator: Luca Fabbri \n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -15,7 +16,6 @@ msgstr "" "Language-Name: Italian\n" "Preferred-Encodings: utf-8 latin1\n" "Domain: collective.contact.core\n" -"Language-Team: \n" "Language: it\n" "X-Generator: Poedit 1.8.9\n" @@ -56,11 +56,13 @@ msgstr "Etichetta aggiuntiva" msgid "Additional label with information that does not appear on position label" msgstr "Etichetta aggiuntiva con informazioni che non compaiono nell'etichetta della posizione" -#: ../behaviors.py:130 ../browser/templates/address.pt:6 +#: ../behaviors.py:130 +#: ../browser/templates/address.pt:6 msgid "Address" msgstr "Indirizzo" -#: ../behaviors.py:320 ../browser/basefields/templates/person.pt:27 +#: ../behaviors.py:320 +#: ../browser/basefields/templates/person.pt:27 msgid "Birthday" msgstr "Data di nascita" @@ -88,7 +90,8 @@ msgstr "Dettagli contatto" msgid "Country" msgstr "Paese" -#: ../browser/addcontact.py:63 ../browser/templates/organization.pt:83 +#: ../browser/addcontact.py:63 +#: ../browser/templates/organization.pt:83 #: ../browser/templates/position.pt:41 msgid "Create ${name}" msgstr "Crea ${name}" @@ -114,12 +117,14 @@ msgstr "Visualizza il titolo della persona nel titolo della persona visualizzata msgid "Download VCard" msgstr "Scarica VCard" -#: ../behaviors.py:137 ../browser/templates/contactdetails.pt:11 +#: ../behaviors.py:137 +#: ../browser/templates/contactdetails.pt:11 msgid "Email" msgstr "E-mail" #: ../browser/basefields/templates/held_position.pt:29 -#: ../browser/templates/heldpositions.pt:47 ../content/held_position.py:44 +#: ../browser/templates/heldpositions.pt:47 +#: ../content/held_position.py:44 msgid "End date" msgstr "Data fine" @@ -200,7 +205,8 @@ msgstr "Non assegnata" msgid "Number" msgstr "Numero" -#: ../browser/addcontact.py:271 ../content/directory.py:37 +#: ../browser/addcontact.py:271 +#: ../content/directory.py:37 #: ../profiles/default/types/organization.xml msgid "Organization" msgstr "Organizzazione" @@ -225,7 +231,8 @@ msgstr "Tipi di organizzazione" msgid "Organization/Position" msgstr "Organizzazione/Posizione" -#: ../browser/templates/contact.pt:17 ../browser/templates/directory.pt:19 +#: ../browser/templates/contact.pt:17 +#: ../browser/templates/directory.pt:19 msgid "Organizations" msgstr "Organizzazioni" @@ -237,11 +244,13 @@ msgstr "Organizzazioni in questa organizzazione" msgid "Other contacts in this organization:" msgstr "Altri contatti in questa organizzazione:" -#: ../browser/templates/organization.pt:19 ../browser/templates/position.pt:17 +#: ../browser/templates/organization.pt:19 +#: ../browser/templates/position.pt:17 msgid "Parent organizations" msgstr "Organizzazione padre" -#: ../browser/addcontact.py:277 ../profiles/default/types/person.xml +#: ../browser/addcontact.py:277 +#: ../profiles/default/types/person.xml #: ../upgrades/profiles/v2/types/person.xml msgid "Person" msgstr "Persona" @@ -262,7 +271,8 @@ msgstr "Telefono" msgid "Phone number" msgstr "Numero di telefono" -#: ../content/held_position.py:48 ../content/person.py:52 +#: ../content/held_position.py:48 +#: ../content/person.py:52 msgid "Photo" msgstr "Foto" @@ -313,7 +323,8 @@ msgid "Select the position held by this person in the selected organization" msgstr "Seleziona la posizione tenuta da questa persona nell'organizzazione selezionata" #: ../browser/basefields/templates/held_position.pt:23 -#: ../browser/templates/heldpositions.pt:42 ../content/held_position.py:40 +#: ../browser/templates/heldpositions.pt:42 +#: ../content/held_position.py:40 msgid "Start date" msgstr "Datas inizio" @@ -345,7 +356,8 @@ msgstr "Usa le posizioni ricoperte per cercare le persone." msgid "Use the belonging entity address" msgstr "Usa l’indirizzo dell’ente di appartenenza" -#: ../behaviors.py:159 ../browser/templates/contactdetails.pt:50 +#: ../behaviors.py:159 +#: ../browser/templates/contactdetails.pt:50 msgid "Website" msgstr "Sito web" @@ -353,6 +365,11 @@ msgstr "Sito web" msgid "Zip Code" msgstr "CAP" +#. Default: "${street} ${number}" +#: ../browser/templates/address.pt:9 +msgid "address_line" +msgstr "" + #. Default: ":" #: ../browser/basefields/templates/held_position.pt:7 #: ../browser/templates/organization.pt:55 @@ -385,3 +402,4 @@ msgstr "organizzazione/posizione" #: ../browser/templates/organization.pt:65 msgid "to" msgstr "A" + diff --git a/src/collective/contact/core/locales/it/LC_MESSAGES/plone.po b/src/collective/contact/core/locales/it/LC_MESSAGES/plone.po index 21e51c93..1bd88344 100644 --- a/src/collective/contact/core/locales/it/LC_MESSAGES/plone.po +++ b/src/collective/contact/core/locales/it/LC_MESSAGES/plone.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: Luca Fabbri \n" "Language-Team: LANGUAGE \n" diff --git a/src/collective/contact/core/locales/plone.pot b/src/collective/contact/core/locales/plone.pot index 0908a36e..a63f319e 100644 --- a/src/collective/contact/core/locales/plone.pot +++ b/src/collective/contact/core/locales/plone.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/collective/contact/core/locales/sl/LC_MESSAGES/collective.contact.core.po b/src/collective/contact/core/locales/sl/LC_MESSAGES/collective.contact.core.po index f1247880..66df66f1 100644 --- a/src/collective/contact/core/locales/sl/LC_MESSAGES/collective.contact.core.po +++ b/src/collective/contact/core/locales/sl/LC_MESSAGES/collective.contact.core.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: collective.contact.core\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: 2016-10-01 22:38+0200\n" "Last-Translator: Cédric Messiant \n" "Language-Team: French\n" @@ -53,11 +53,13 @@ msgstr "Dodatna oznaka" msgid "Additional label with information that does not appear on position label" msgstr "Dodatna oznaka z informacijami, ki niso vidne na oznaki pozicije" -#: ../behaviors.py:130 ../browser/templates/address.pt:6 +#: ../behaviors.py:130 +#: ../browser/templates/address.pt:6 msgid "Address" msgstr "Naslov" -#: ../behaviors.py:320 ../browser/basefields/templates/person.pt:27 +#: ../behaviors.py:320 +#: ../browser/basefields/templates/person.pt:27 msgid "Birthday" msgstr "Rojstni dan" @@ -85,7 +87,8 @@ msgstr "Podrobnosti o kontaktu" msgid "Country" msgstr "Država" -#: ../browser/addcontact.py:63 ../browser/templates/organization.pt:83 +#: ../browser/addcontact.py:63 +#: ../browser/templates/organization.pt:83 #: ../browser/templates/position.pt:41 msgid "Create ${name}" msgstr "Ustvari ${name}" @@ -111,12 +114,14 @@ msgstr "Pokaži naziv osebe v prikazanem nazivu osebe" msgid "Download VCard" msgstr "Naloži VCard" -#: ../behaviors.py:137 ../browser/templates/contactdetails.pt:11 +#: ../behaviors.py:137 +#: ../browser/templates/contactdetails.pt:11 msgid "Email" msgstr "Email" #: ../browser/basefields/templates/held_position.pt:29 -#: ../browser/templates/heldpositions.pt:47 ../content/held_position.py:44 +#: ../browser/templates/heldpositions.pt:47 +#: ../content/held_position.py:44 msgid "End date" msgstr "Končni datum" @@ -197,7 +202,8 @@ msgstr "Ni dodeljen" msgid "Number" msgstr "Številka" -#: ../browser/addcontact.py:271 ../content/directory.py:37 +#: ../browser/addcontact.py:271 +#: ../content/directory.py:37 #: ../profiles/default/types/organization.xml msgid "Organization" msgstr "Organizacija" @@ -222,7 +228,8 @@ msgstr "Tipi organizacij" msgid "Organization/Position" msgstr "Organizacija/pozicija" -#: ../browser/templates/contact.pt:17 ../browser/templates/directory.pt:19 +#: ../browser/templates/contact.pt:17 +#: ../browser/templates/directory.pt:19 msgid "Organizations" msgstr "Organizacije" @@ -234,11 +241,13 @@ msgstr "Organizacije v tej organizaciji" msgid "Other contacts in this organization:" msgstr "Drugi kontakti v tej organizaciji" -#: ../browser/templates/organization.pt:19 ../browser/templates/position.pt:17 +#: ../browser/templates/organization.pt:19 +#: ../browser/templates/position.pt:17 msgid "Parent organizations" msgstr "Krovne organizacije" -#: ../browser/addcontact.py:277 ../profiles/default/types/person.xml +#: ../browser/addcontact.py:277 +#: ../profiles/default/types/person.xml #: ../upgrades/profiles/v2/types/person.xml msgid "Person" msgstr "Oseba" @@ -259,7 +268,8 @@ msgstr "Telefon" msgid "Phone number" msgstr "Telefonske številke" -#: ../content/held_position.py:48 ../content/person.py:52 +#: ../content/held_position.py:48 +#: ../content/person.py:52 msgid "Photo" msgstr "Foto" @@ -310,7 +320,8 @@ msgid "Select the position held by this person in the selected organization" msgstr "Izberi pozicijo, ki jo zaseda ta oseba v izbrani organizaciji" #: ../browser/basefields/templates/held_position.pt:23 -#: ../browser/templates/heldpositions.pt:42 ../content/held_position.py:40 +#: ../browser/templates/heldpositions.pt:42 +#: ../content/held_position.py:40 msgid "Start date" msgstr "Začetni datum" @@ -342,7 +353,8 @@ msgstr "Uporabi trenutne pozicije za iskanje osebe" msgid "Use the belonging entity address" msgstr "Uporabi pripadajoč naslov entitete" -#: ../behaviors.py:159 ../browser/templates/contactdetails.pt:50 +#: ../behaviors.py:159 +#: ../browser/templates/contactdetails.pt:50 msgid "Website" msgstr "Spletna stran" @@ -350,6 +362,11 @@ msgstr "Spletna stran" msgid "Zip Code" msgstr "Poštna številka" +#. Default: "${street} ${number}" +#: ../browser/templates/address.pt:9 +msgid "address_line" +msgstr "" + #. Default: ":" #: ../browser/basefields/templates/held_position.pt:7 #: ../browser/templates/organization.pt:55 @@ -382,3 +399,4 @@ msgstr "Organizacija/pozicija" #: ../browser/templates/organization.pt:65 msgid "to" msgstr "za" + diff --git a/src/collective/contact/core/locales/sl/LC_MESSAGES/plone.po b/src/collective/contact/core/locales/sl/LC_MESSAGES/plone.po index 166c8d91..c8c90244 100644 --- a/src/collective/contact/core/locales/sl/LC_MESSAGES/plone.po +++ b/src/collective/contact/core/locales/sl/LC_MESSAGES/plone.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: collective.contact.core\n" -"POT-Creation-Date: 2016-09-29 10:34+0000\n" +"POT-Creation-Date: 2017-01-13 13:05+0000\n" "PO-Revision-Date: 2016-10-01 23:31+0200\n" "Last-Translator: Cédric Messiant \n" "Language-Team: Ecréall\n" @@ -47,3 +47,4 @@ msgstr "Brez" #: ../profiles/testing/types/testtype.xml msgid "Test type" msgstr "Tip testa" + From ee0eced66c770ff7b7ce86d598a45017d95f2fc8 Mon Sep 17 00:00:00 2001 From: Harald Friessnegger Date: Fri, 13 Jan 2017 15:36:28 +0100 Subject: [PATCH 2/4] change order for street and number in add/editform as this is more common in most countries (see discussion in #36). refs #29 --- CHANGES.rst | 23 +++++++++++++++++++++++ src/collective/contact/core/behaviors.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 63d041b1..bf601efa 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,29 @@ Changelog 1.11 (unreleased) ----------------- +- Change field order for address (street before number - as this is more common in most countries) (refs #29) + + If you want the previous field order back, patch `collective.contact.core.behaviors`:: + + + + ADDRESS_FIELDS = ( + 'number', + 'street', + 'additional_address_details', + 'zip_code', + 'city', + 'region', + 'country', + ) + + [fRiSi] + - Localize Address: ` ` as default, ` ` for french (fixes #29) [fRiSi] diff --git a/src/collective/contact/core/behaviors.py b/src/collective/contact/core/behaviors.py index e45e09c1..206b5fad 100644 --- a/src/collective/contact/core/behaviors.py +++ b/src/collective/contact/core/behaviors.py @@ -98,8 +98,8 @@ class IGlobalPositioning(model.Schema): ADDRESS_FIELDS = ( - 'number', 'street', + 'number', 'additional_address_details', 'zip_code', 'city', From 2c61460b5131ae2b392aa7d5a3f2e3ed5106bbfe Mon Sep 17 00:00:00 2001 From: Harald Friessnegger Date: Fri, 13 Jan 2017 15:47:40 +0100 Subject: [PATCH 3/4] move documentation to readme, merge changelog entries --- CHANGES.rst | 25 +++---------------------- README.rst | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index bf601efa..bf424c31 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,30 +4,11 @@ Changelog 1.11 (unreleased) ----------------- -- Change field order for address (street before number - as this is more common in most countries) (refs #29) - - If you want the previous field order back, patch `collective.contact.core.behaviors`:: - - - - ADDRESS_FIELDS = ( - 'number', - 'street', - 'additional_address_details', - 'zip_code', - 'city', - 'region', - 'country', - ) +- Change field order for address (` ` - as this is more common in most countries) - [fRiSi] + * address format can be localized by using msgid `address_line` + * field order in add- and editforms can be patched (see README for details) -- Localize Address: ` ` as default, ` ` for french (fixes #29) [fRiSi] - Fixed indexing a held position which organization has been removed. diff --git a/README.rst b/README.rst index dcdd98fe..90520970 100644 --- a/README.rst +++ b/README.rst @@ -21,6 +21,36 @@ Modify your directory to customize the organization types and the position types Look at the test data profile collective.contact.core test data for detailed examples. +Localization +============ + +In some countries (ie. France) the format of an address is ` ` instead of ` `. + +You an provide a translation for the `address_line` i18n-msgid in the collective.contact.core translations if this is the case for your country. + +You can also patch `collective.contact.core.behaviors.ADDRESS_FIELDS` to make the number field show up before the street in add- and editforms. + +:: + + + + ADDRESS_FIELDS = ( + 'number', + 'street', + 'additional_address_details', + 'zip_code', + 'city', + 'region', + 'country', + ) + + + Installation ============ From ca5f58988ce22b1307b52e291b759a632d72f9cd Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Tue, 17 Jan 2017 10:56:32 +0100 Subject: [PATCH 4/4] make ADDRESS_FIELDS patchable to reorder the fields --- CHANGES.rst | 4 ++-- README.rst | 26 +++++++----------------- src/collective/contact/core/behaviors.py | 15 ++++++++++---- 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index bf424c31..ec755906 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,9 +7,9 @@ Changelog - Change field order for address (` ` - as this is more common in most countries) * address format can be localized by using msgid `address_line` - * field order in add- and editforms can be patched (see README for details) + * field order in add and edit forms can be patched (see README for details) - (fixes #29) [fRiSi] + (fixes #29) [fRiSi] - Fixed indexing a held position which organization has been removed. [thomasdesvenain] diff --git a/README.rst b/README.rst index 90520970..62adb98f 100644 --- a/README.rst +++ b/README.rst @@ -26,29 +26,17 @@ Localization In some countries (ie. France) the format of an address is ` ` instead of ` `. -You an provide a translation for the `address_line` i18n-msgid in the collective.contact.core translations if this is the case for your country. +You can provide a translation for the `address_line` i18n-msgid in the collective.contact.core translations if this is the case for your country. -You can also patch `collective.contact.core.behaviors.ADDRESS_FIELDS` to make the number field show up before the street in add- and editforms. +You can also patch `collective.contact.core.behaviors.ADDRESS_FIELDS` to make the number field show up before the street in add and edit forms. -:: +In your addon, create a `patches.py` file with this content:: - - - ADDRESS_FIELDS = ( - 'number', - 'street', - 'additional_address_details', - 'zip_code', - 'city', - 'region', - 'country', - ) + from collective.contact.core import behaviors + behaviors.ADDRESS_FIELDS[0:2] = reversed(behaviors.ADDRESS_FIELDS[0:2]) + behaviors.ADDRESS_FIELDS_PLUS_PARENT[2:4] = reversed(behaviors.ADDRESS_FIELDS_PLUS_PARENT[2:4]) +and import it in yout `__init__.py` so the patches takes effect. Installation diff --git a/src/collective/contact/core/behaviors.py b/src/collective/contact/core/behaviors.py index 206b5fad..3a933578 100644 --- a/src/collective/contact/core/behaviors.py +++ b/src/collective/contact/core/behaviors.py @@ -97,7 +97,8 @@ class IGlobalPositioning(model.Schema): alsoProvides(IGlobalPositioning, IFormFieldProvider) -ADDRESS_FIELDS = ( +# must stay a list so it can be patched +ADDRESS_FIELDS = [ 'street', 'number', 'additional_address_details', @@ -105,7 +106,14 @@ class IGlobalPositioning(model.Schema): 'city', 'region', 'country', - ) + ] + + +# must stay a list so it can be patched +ADDRESS_FIELDS_PLUS_PARENT = [ + 'use_parent_address', + 'parent_address'] + ADDRESS_FIELDS + CONTACT_DETAILS_FIELDS = ( 'phone', @@ -128,8 +136,7 @@ class IContactDetails(model.Schema): fieldset( 'address', label=_(u'Address'), - fields=('use_parent_address', - 'parent_address') + ADDRESS_FIELDS + fields=ADDRESS_FIELDS_PLUS_PARENT )