Browse Source

Insist on the fact that the wizard deletes current better zip entries in the module description and in the wizard itself.

Better error message when the country code inside the file is wrong.
pull/22/head
Alexis de Lattre 10 years ago
committed by Lorenzo Battistini
parent
commit
e3d6622c9d
  1. 2
      base_location_geonames_import/__openerp__.py
  2. 16
      base_location_geonames_import/i18n/base_location_geonames_import.pot
  3. 24
      base_location_geonames_import/i18n/fr.po
  4. 5
      base_location_geonames_import/wizard/geonames_import.py
  5. 2
      base_location_geonames_import/wizard/geonames_import_view.xml

2
base_location_geonames_import/__openerp__.py

@ -31,7 +31,7 @@
Base Location Geonames Import
=============================
This module adds a wizard to import better zip entries from Geonames (http://download.geonames.org/export/zip/).
This module adds a wizard to import better zip entries from Geonames (http://download.geonames.org/export/zip/). When you start the wizard, it will ask you to select a country ; then, for the selected country, it will delete all the current better zip entries, download the latest version of the list of cities from geonames.org and create new better zip entries.
Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
""",

16
base_location_geonames_import/i18n/base_location_geonames_import.pot

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-07 15:00+0000\n"
"PO-Revision-Date: 2014-04-07 15:00+0000\n"
"POT-Creation-Date: 2014-04-11 20:55+0000\n"
"PO-Revision-Date: 2014-04-11 20:55+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -26,19 +26,19 @@ msgid "Country"
msgstr ""
#. module: base_location_geonames_import
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:64
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:87
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:66
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:90
#, python-format
msgid "Error:"
msgstr ""
#. module: base_location_geonames_import
#: view:better.zip.geonames.import:0
msgid "For the country selected above, this wizard will delete all the current better zip entries, download the latest version of the list of cities from geonames.org and create new better zip entries."
msgid "For the country selected above, this wizard will DELETE ALL THE CURRENT BETTER ZIP ENTRIES, download the latest version of the list of cities from geonames.org and create new better zip entries."
msgstr ""
#. module: base_location_geonames_import
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:88
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:91
#, python-format
msgid "Got an error %d when trying to download the file %s."
msgstr ""
@ -61,8 +61,8 @@ msgid "Import Geonames"
msgstr ""
#. module: base_location_geonames_import
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:65
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:67
#, python-format
msgid "The content of the file doesn't correspond to the selected country."
msgid "The country code inside the file (%s) doesn't correspond to the selected country (%s)."
msgstr ""

24
base_location_geonames_import/i18n/fr.po

@ -6,9 +6,9 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-07 15:01+0000\n"
"PO-Revision-Date: 2014-04-07 15:01+0000\n"
"Last-Translator: Alexis de Lattre <alexis.delattre@akretion.com>\n"
"POT-Creation-Date: 2014-04-11 20:56+0000\n"
"PO-Revision-Date: 2014-04-11 20:56+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -26,19 +26,19 @@ msgid "Country"
msgstr "Pays"
#. module: base_location_geonames_import
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:64
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:87
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:66
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:90
#, python-format
msgid "Error:"
msgstr "Erreur :"
#. module: base_location_geonames_import
#: view:better.zip.geonames.import:0
msgid "For the country selected above, this wizard will delete all the current better zip entries, download the latest version of the list of cities from geonames.org and create new better zip entries."
msgstr "Pour le pays sélectionné ci-dessus, cet assistant va supprimer toutes les entrées better zip, télécharger la dernière version de la liste des villes depuis geonames.org et créer de nouveaux enregistrements better zip."
msgid "For the country selected above, this wizard will DELETE ALL THE CURRENT BETTER ZIP ENTRIES, download the latest version of the list of cities from geonames.org and create new better zip entries."
msgstr "Pour le pays sélectionné ci-dessus, cet assistant va SUPPRIMER TOUTES LES ENTREES BETTER ZIP, télécharger la dernière version de la liste des villes depuis geonames.org et créer de nouveaux enregistrements better zip."
#. module: base_location_geonames_import
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:88
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:91
#, python-format
msgid "Got an error %d when trying to download the file %s."
msgstr "Erreur %d reçue suite à la tentative de téléchargement du fichier %s."
@ -51,7 +51,7 @@ msgstr "Importer"
#. module: base_location_geonames_import
#: model:ir.model,name:base_location_geonames_import.model_better_zip_geonames_import
msgid "Import Better Zip from Geonames"
msgstr "Import Better Zip depuis Geonames"
msgstr "Import Better Zip from Geonames"
#. module: base_location_geonames_import
#: view:better.zip.geonames.import:0
@ -61,8 +61,8 @@ msgid "Import Geonames"
msgstr "Importer Geonames"
#. module: base_location_geonames_import
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:65
#: code:addons/base_location_geonames_import/wizard/geonames_import.py:67
#, python-format
msgid "The content of the file doesn't correspond to the selected country."
msgstr "Le contenu du fichier ne correspond pas au pays sélectionné."
msgid "The country code inside the file (%s) doesn't correspond to the selected country (%s)."
msgstr "Le code pays utilisé à l'intérieur du fichier (%s) ne correspond pas au pays sélectionné (%s)."

5
base_location_geonames_import/wizard/geonames_import.py

@ -64,8 +64,9 @@ class better_zip_geonames_import(orm.TransientModel):
if row[0] != country_code:
raise orm.except_orm(
_('Error:'),
_("The content of the file doesn't correspond to the "
"selected country."))
_("The country code inside the file (%s) doesn't "
"correspond to the selected country (%s).")
% (row[0], country_code))
logger.debug('ZIP = %s - City = %s' % (row[1], row[2]))
if row[1] and row[2]:
vals = self._prepare_better_zip(

2
base_location_geonames_import/wizard/geonames_import_view.xml

@ -15,7 +15,7 @@
<form string="Import Geonames" version="7.0">
<group name="main">
<field name="country_id"/>
<label string="For the country selected above, this wizard will delete all the current better zip entries, download the latest version of the list of cities from geonames.org and create new better zip entries."
<label string="For the country selected above, this wizard will DELETE ALL THE CURRENT BETTER ZIP ENTRIES, download the latest version of the list of cities from geonames.org and create new better zip entries."
colspan="2" name="import-help"/>
</group>
<footer>

Loading…
Cancel
Save