summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-05 13:11:34 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-05 13:11:34 +0200
commit0b0caee40b6c68263a349b54bc989ceb53af1b63 (patch)
tree484a7127d937d43edadaeb0f1d4fcbea6a44a781
parent4010aabb72ab25ead1b4b1bc3d34dab6265fc859 (diff)
Fix csv import from Thunderbird with French localization (#1489059)
-rw-r--r--CHANGELOG1
-rw-r--r--program/lib/Roundcube/rcube_csv2vcard.php6
-rw-r--r--program/localization/fr_FR/csv2vcard.inc96
3 files changed, 103 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 8aa7948fe..56d5d7b72 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix csv import from Thunderbird with French localization (#1489059)
- Fix messages list focus issue in Opera and Webkit (#1489058)
- Make PHP code eval() free, use create_function()
- Add option to display email address together with a name in mail preview (#1488732)
diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php
index b0e9c2374..fa22fa41b 100644
--- a/program/lib/Roundcube/rcube_csv2vcard.php
+++ b/program/lib/Roundcube/rcube_csv2vcard.php
@@ -389,6 +389,12 @@ class rcube_csv2vcard
if (!empty($this->local_label_map)) {
for ($i = 0; $i < $size; $i++) {
$label = $this->local_label_map[$elements[$i]];
+
+ // special localization label
+ if ($label && $label[0] == '_') {
+ $label = substr($label, 1);
+ }
+
if ($label && !empty($this->csv2vcard_map[$label])) {
$map2[$i] = $this->csv2vcard_map[$label];
}
diff --git a/program/localization/fr_FR/csv2vcard.inc b/program/localization/fr_FR/csv2vcard.inc
new file mode 100644
index 000000000..bb77001b5
--- /dev/null
+++ b/program/localization/fr_FR/csv2vcard.inc
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | localization/<lang>/csv2vcard.inc |
+ | |
+ | Localization file of the Roundcube Webmail client |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec@alec.pl> |
+ +-----------------------------------------------------------------------+
+*/
+
+// This is a list of CSV column names specified in CSV file header
+// These must be original texts used in Outlook/Thunderbird exported csv files
+// Encoding UTF-8
+
+$map = array();
+
+// MS Outlook 2010
+$map['anniversary'] = "Anniversaire de mariage ou fête";
+$map['assistants_name'] = "Nom de l''assistant(e)";
+$map['assistants_phone'] = "Téléphone de l''assistant(e)";
+$map['birthday'] = "Anniversaire";
+$map['business_city'] = "Ville (bureau)";
+$map['business_countryregion'] = "Pays/Région (bureau)";
+$map['business_fax'] = "Télécopie (bureau)";
+$map['business_phone'] = "Téléphone (bureau)";
+$map['business_phone_2'] = "Téléphone 2 (bureau)";
+$map['business_postal_code'] = "Code postal (bureau)";
+$map['business_state'] = "Dép/Région (bureau)";
+$map['business_street'] = "Rue (bureau)";
+$map['car_phone'] = "Téléphone (voiture)";
+$map['categories'] = "Catégories";
+$map['company'] = "Société";
+$map['department'] = "Service";
+$map['email_address'] = "Adresse de messagerie";
+$map['first_name'] = "Prénom";
+$map['gender'] = "Sexe";
+$map['home_city'] = "Ville (domicile)";
+$map['home_countryregion'] = "Pays/Région (domicile)";
+$map['home_fax'] = "Télécopie (domicile)";
+$map['home_phone'] = "Téléphone (domicile)";
+$map['home_phone_2'] = "Téléphone 2 (domicile)";
+$map['home_postal_code'] = "Code postal (domicile)";
+$map['home_state'] = "Dép/Région (domicile)";
+$map['home_street'] = "Rue (domicile)";
+$map['job_title'] = "Profession";
+$map['last_name'] = "Nom";
+$map['managers_name'] = "Manager's Name";
+$map['middle_name'] = "Deuxième prénom";
+$map['mobile_phone'] = "Tél. mobile";
+$map['notes'] = "Notes";
+$map['other_city'] = "Ville (autre)";
+$map['other_countryregion'] = "Pays/Région (autre)";
+$map['other_fax'] = "Télécopie (autre)";
+$map['other_phone'] = "Téléphone (autre)";
+$map['other_postal_code'] = "Code postal (autre)";
+$map['other_state'] = "Dép/Région (autre)";
+$map['other_street'] = "Rue (autre)";
+$map['pager'] = "Récepteur de radiomessagerie";
+$map['primary_phone'] = "Téléphone principal";
+$map['spouse'] = "Conjoint(e)";
+$map['suffix'] = "Suffixe";
+$map['title'] = "Titre";
+$map['web_page'] = "Page Web";
+
+// Thunderbird
+$map['birth_day'] = "Jour";
+$map['birth_month'] = "Mois";
+$map['birth_year'] = "Année de naissance";
+$map['display_name'] = "Nom à afficher";
+$map['fax_number'] = "Fax";
+$map['home_address'] = "Adresse privée";
+$map['home_country'] = "Région";
+$map['home_zipcode'] = "Code postal";
+$map['mobile_number'] = "Portable";
+$map['nickname'] = "Surnom";
+$map['organization'] = "Société";
+$map['pager_number'] = "Pager";
+$map['primary_email'] = "Adresse électronique principale";
+$map['secondary_email'] = "Adresse électronique secondaire";
+$map['web_page_1'] = "Site Web 1";
+$map['web_page_2'] = "Site Web 2";
+$map['work_phone'] = "Tél. professionnel";
+$map['work_address'] = "Adresse professionnelle";
+$map['work_country'] = "Région";
+$map['work_zipcode'] = "Code postal";
+
+// Other
+$map['_home_city'] = "Ville";