Skip to content

Commit

Permalink
Merge pull request #22 from openownership/more-info
Browse files Browse the repository at this point in the history
Add extra checks and statistics from lib-cove-bods v0.3.0
  • Loading branch information
James authored Mar 28, 2019
2 parents 0f0e7de + e5adfd5 commit 59336b4
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 36 deletions.
77 changes: 72 additions & 5 deletions cove_bods/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-05 13:48+0000\n"
"POT-Creation-Date: 2019-03-27 17:26+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -84,6 +84,27 @@ msgstr ""
msgid "Person that is missing"
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:98
msgid "This statement ID has been used more than once."
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:101
msgid "Statement ID"
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:110
msgid "This person statement has a birthday that is to early."
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:113
#: cove_bods/templates/cove_bods/additional_checks_table.html:125
msgid "Year"
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:122
msgid "This person statement has a birthday that is to late."
msgstr ""

#. Translators: Label of a button that triggers search
#: cove_bods/templates/cove_bods/base.html:44
msgid "Go"
Expand Down Expand Up @@ -117,6 +138,10 @@ msgstr ""
msgid "Using the data review tool"
msgstr ""

#: cove_bods/templates/cove_bods/base.html:122
msgid "Running version "
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:5
msgid "Load New File"
msgstr ""
Expand Down Expand Up @@ -168,27 +193,48 @@ msgstr ""
msgid "Entity Statements"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:192
#: cove_bods/templates/cove_bods/explore.html:194
#: cove_bods/templates/cove_bods/explore.html:204
#, python-format
msgid " ... with type %(key)s"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:199
msgid "Person Statements"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:195
#: cove_bods/templates/cove_bods/explore.html:209
msgid "Ownership or Control Statements"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:198
#: cove_bods/templates/cove_bods/explore.html:212
msgid "Ownership or Control Statements where interested party is a person"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:202
#: cove_bods/templates/cove_bods/explore.html:216
msgid "Ownership or Control Statements where interested party is a entity"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:220
msgid "Ownership or Control Statements where interested party is unspecified"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:227
#, python-format
msgid " Interest statements with type %(key)s"
msgstr ""

#: cove_bods/views.py:55 cove_bods/views.py:66
#: src/libcove/libcove/lib/converters.py:182
#: src/libcove/libcove/lib/exceptions.py:21
#: src/libcove/libcove/lib/exceptions.py:38
msgid "Sorry, we can't process that data"
msgstr ""

#: cove_bods/views.py:57 cove_bods/views.py:68
#: src/libcove/libcove/lib/converters.py:184
#: src/libcove/libcove/lib/exceptions.py:23
#: src/libcove/libcove/lib/exceptions.py:40
msgid "Try Again"
msgstr ""

Expand All @@ -197,3 +243,24 @@ msgid ""
"BODS JSON should have an list as the top level, the JSON you supplied does "
"not."
msgstr ""

#: src/libcove/libcove/lib/converters.py:185
msgid ""
"We think you tried to upload a JSON file, but it is not well formed JSON.\n"
"\n"
"Error message: {}"
msgstr ""

#: src/libcove/libcove/lib/exceptions.py:24
msgid ""
"We did not recognise the file type.\n"
"\n"
"We can only process json, csv and xlsx files."
msgstr ""

#: src/libcove/libcove/lib/exceptions.py:41
msgid ""
"We think you tried to supply a spreadsheet, but we failed to convert it.\n"
"\n"
"Error message: {}"
msgstr ""
92 changes: 84 additions & 8 deletions cove_bods/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Ben Webb <[email protected]>, 2018
# Bibiana Cristòfol <[email protected]>, 2018
# Eduardo Gomez <[email protected]>, 2018
# Ben Webb <[email protected]>, 2019
# Eduardo Gomez <[email protected]>, 2019
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-05 13:48+0000\n"
"POT-Creation-Date: 2019-03-27 17:26+0000\n"
"PO-Revision-Date: 2018-11-30 13:12+0000\n"
"Last-Translator: Eduardo Gomez <[email protected]>, 2018\n"
"Last-Translator: Eduardo Gomez <[email protected]>, 2019\n"
"Language-Team: Spanish (https://www.transifex.com/OpenDataServices/teams/59127/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -90,6 +90,27 @@ msgstr ""
msgid "Person that is missing"
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:98
msgid "This statement ID has been used more than once."
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:101
msgid "Statement ID"
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:110
msgid "This person statement has a birthday that is to early."
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:113
#: cove_bods/templates/cove_bods/additional_checks_table.html:125
msgid "Year"
msgstr ""

#: cove_bods/templates/cove_bods/additional_checks_table.html:122
msgid "This person statement has a birthday that is to late."
msgstr ""

#. Translators: Label of a button that triggers search
#: cove_bods/templates/cove_bods/base.html:44
msgid "Go"
Expand Down Expand Up @@ -123,6 +144,10 @@ msgstr "Comprobar y revisar"
msgid "Using the data review tool"
msgstr "Uso de la herramienta de revisión de datos"

#: cove_bods/templates/cove_bods/base.html:122
msgid "Running version "
msgstr "Versión en ejecución"

#: cove_bods/templates/cove_bods/explore.html:5
msgid "Load New File"
msgstr "Cargar archivo nuevo"
Expand Down Expand Up @@ -174,27 +199,48 @@ msgstr "Estadísticas "
msgid "Entity Statements"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:192
#: cove_bods/templates/cove_bods/explore.html:194
#: cove_bods/templates/cove_bods/explore.html:204
#, python-format
msgid " ... with type %(key)s"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:199
msgid "Person Statements"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:195
#: cove_bods/templates/cove_bods/explore.html:209
msgid "Ownership or Control Statements"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:198
#: cove_bods/templates/cove_bods/explore.html:212
msgid "Ownership or Control Statements where interested party is a person"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:202
#: cove_bods/templates/cove_bods/explore.html:216
msgid "Ownership or Control Statements where interested party is a entity"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:220
msgid "Ownership or Control Statements where interested party is unspecified"
msgstr ""

#: cove_bods/templates/cove_bods/explore.html:227
#, python-format
msgid " Interest statements with type %(key)s"
msgstr ""

#: cove_bods/views.py:55 cove_bods/views.py:66
#: src/libcove/libcove/lib/converters.py:182
#: src/libcove/libcove/lib/exceptions.py:21
#: src/libcove/libcove/lib/exceptions.py:38
msgid "Sorry, we can't process that data"
msgstr "Lo sentimos, no podemos procesar esos datos"

#: cove_bods/views.py:57 cove_bods/views.py:68
#: src/libcove/libcove/lib/converters.py:184
#: src/libcove/libcove/lib/exceptions.py:23
#: src/libcove/libcove/lib/exceptions.py:40
msgid "Try Again"
msgstr "Inténtelo de nuevo"

Expand All @@ -205,3 +251,33 @@ msgid ""
msgstr ""
"BODS JSON debe tener una lista al nivel más alto pero el JSON que ha "
"proporcionado no lo tiene."

#: src/libcove/libcove/lib/converters.py:185
msgid ""
"We think you tried to upload a JSON file, but it is not well formed JSON.\n"
"\n"
"Error message: {}"
msgstr ""
"Creemos que ha intentado subir un archivo JSON, pero el archivo no es JSON bien formado.\n"
"\n"
"Mensaje del error: {}"

#: src/libcove/libcove/lib/exceptions.py:24
msgid ""
"We did not recognise the file type.\n"
"\n"
"We can only process json, csv and xlsx files."
msgstr ""
"No hemos podido reconocer ese tipo de archivo.\n"
"\n"
"Sólo podemos procesar archivos json, csv y xlsx."

#: src/libcove/libcove/lib/exceptions.py:41
msgid ""
"We think you tried to supply a spreadsheet, but we failed to convert it.\n"
"\n"
"Error message: {}"
msgstr ""
"Creemos que ha tratado de suministrar una hoja de cálculo, pero no hemos podido convertirla.\n"
"\n"
"Mensaje del error: {}"
36 changes: 36 additions & 0 deletions cove_bods/templates/cove_bods/additional_checks_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,42 @@
{{ additional_check.seen_in_ownership_or_control_statement }}
</td>
</tr>
{% elif additional_check.type == 'duplicate_statement_id' %}
<tr>
<td>
{% trans 'This statement ID has been used more than once.' %}
</td>
<td>
{% trans 'Statement ID' %}: {{ additional_check.id }}
</td>
<td>
&nbsp;
</td>
</tr>
{% elif additional_check.type == 'person_birth_year_too_early' %}
<tr>
<td>
{% trans 'This person statement has a birthday that is to early.' %}
</td>
<td>
{% trans 'Year' %}: {{ additional_check.year }}
</td>
<td>
{{ additional_check.person_statement }}
</td>
</tr>
{% elif additional_check.type == 'person_birth_year_too_late' %}
<tr>
<td>
{% trans 'This person statement has a birthday that is to late.' %}
</td>
<td>
{% trans 'Year' %}: {{ additional_check.year }}
</td>
<td>
{{ additional_check.person_statement }}
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
Expand Down
29 changes: 29 additions & 0 deletions cove_bods/templates/cove_bods/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,23 @@ <h4 class="panel-title">
<p>
{% trans 'Entity Statements' %}: {{ statistics.count_entity_statements }}
</p>
{% for key, count in statistics.count_entity_statements_types.items %}
{% if count > 0 %}
<p>
{% blocktrans %} ... with type {{ key }}{% endblocktrans %}: {{ count }}
</p>
{% endif %}
{% endfor %}
<p>
{% trans 'Person Statements' %}: {{ statistics.count_person_statements }}
</p>
{% for key, count in statistics.count_person_statements_types.items %}
{% if count > 0 %}
<p>
{% blocktrans %} ... with type {{ key }}{% endblocktrans %}: {{ count }}
</p>
{% endif %}
{% endfor %}
<p>
{% trans 'Ownership or Control Statements' %}: {{ statistics.count_ownership_or_control_statement }}
</p>
Expand All @@ -202,6 +216,21 @@ <h4 class="panel-title">
{% trans 'Ownership or Control Statements where interested party is a entity' %}:
{{ statistics.count_ownership_or_control_statement_interested_party_with_entity }}
</p>
<p>
{% trans 'Ownership or Control Statements where interested party is unspecified' %}:
{{ statistics.count_ownership_or_control_statement_interested_party_with_unspecified }}
</p>

{% for key, count in statistics.count_ownership_or_control_statement_interest_statement_types.items %}
{% if count > 0 %}
<p>
{% blocktrans %} Interest statements with type {{ key }}{% endblocktrans %}: {{ count }}
</p>
{% endif %}
{% endfor %}

<p>
</p>
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Lock this version of dealer because later versions have a problem - middleware is of wrong style to use with MIDDLEWARE_CLASSES
dealer==2.0.5
Django<1.12
# Lock this version of jsonschema, as that's what some of our libraries lock
jsonschema<2.7
-e git+https://github.com/OpenDataServices/[email protected]#egg=flattentool
-e git+https://github.com/OpenDataServices/[email protected]#egg=libcove
-e git+https://github.com/openownership/lib-cove-bods.git@v0.2.0#egg=libcovebods
-e git+https://github.com/openownership/lib-cove-bods.git@v0.3.0#egg=libcovebods
-e git+https://github.com/OpenDataServices/[email protected]#egg=libcoveweb
Loading

0 comments on commit 59336b4

Please sign in to comment.