Skip to content

Commit

Permalink
Merge pull request #1235 from OpenDataServices/895-oneOf-messages
Browse files Browse the repository at this point in the history
[#895] Better oneOf validation messages for records
  • Loading branch information
Bjwebb authored Oct 22, 2019
2 parents c683954 + eea0de0 commit 13c77e1
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 141 deletions.
135 changes: 71 additions & 64 deletions cove_360/locale/en/LC_MESSAGES/django.po

Large diffs are not rendered by default.

135 changes: 71 additions & 64 deletions cove_360/locale/es/LC_MESSAGES/django.po

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cove_iati/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: 2019-08-29 07:16+0000\n"
"POT-Creation-Date: 2019-10-11 11:39+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
16 changes: 13 additions & 3 deletions cove_ocds/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: 2019-08-29 07:16+0000\n"
"POT-Creation-Date: 2019-10-11 11:39+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 @@ -1018,11 +1018,21 @@ msgstr ""
msgid "Spreadsheet Location of first 3 errors"
msgstr ""

#: cove_ocds/templates/cove_ocds/validation_table.html:65
#: cove_ocds/templates/cove_ocds/validation_table.html:28
msgid ""
"(Assuming these are embedded releases, because they have an <code>id</code>)."
msgstr ""

#: cove_ocds/templates/cove_ocds/validation_table.html:30
msgid ""
"(Assuming these are linked releases, because they lack an <code>id</code>)."
msgstr ""

#: cove_ocds/templates/cove_ocds/validation_table.html:70
msgid "Path:"
msgstr ""

#: cove_ocds/templates/cove_ocds/validation_table.html:66
#: cove_ocds/templates/cove_ocds/validation_table.html:71
msgid "Line:"
msgstr ""

Expand Down
24 changes: 20 additions & 4 deletions cove_ocds/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
# Eduardo Gomez <[email protected]>, 2019
# Bibiana Cristòfol <[email protected]>, 2019
# Amy Guy <[email protected]>, 2019
# Romina Fernandez <[email protected]>, 2019
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-22 14:56+0000\n"
"POT-Creation-Date: 2019-10-11 11:39+0000\n"
"PO-Revision-Date: 2017-04-03 14:36+0000\n"
"Last-Translator: Amy Guy <[email protected]>, 2019\n"
"Last-Translator: Romina Fernandez <[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 @@ -1154,11 +1155,26 @@ msgstr "3 primeros ejemplos"
msgid "Spreadsheet Location of first 3 errors"
msgstr " Ubicación de los 3 primeros errores en la hoja de cálculo"

#: cove_ocds/templates/cove_ocds/validation_table.html:65
#: cove_ocds/templates/cove_ocds/validation_table.html:28
msgid ""
"(Assuming these are embedded releases, because they have an "
"<code>id</code>)."
msgstr ""
"(Asumiendo que estas son entregas ('releases') embebidas, porque tienen un "
"<code>id</code>)."

#: cove_ocds/templates/cove_ocds/validation_table.html:30
msgid ""
"(Assuming these are linked releases, because they lack an <code>id</code>)."
msgstr ""
"(Asumiendo que estas son entregas ('releases') enlazadas, porque no tienen "
"un <code>id</code>)."

#: cove_ocds/templates/cove_ocds/validation_table.html:70
msgid "Path:"
msgstr "Ruta:"

#: cove_ocds/templates/cove_ocds/validation_table.html:66
#: cove_ocds/templates/cove_ocds/validation_table.html:71
msgid "Line:"
msgstr "Línea:"

Expand Down
5 changes: 5 additions & 0 deletions cove_ocds/templates/cove_ocds/validation_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
{% if error.message_type in common_error_types %}
<a href="{% url 'common_errors' %}#{{error.message_type}}" target="_blank">(more info)</a>
{% endif %}
{% if error.assumption == 'embedded_releases' %}
{% trans '(Assuming these are embedded releases, because they have an <code>id</code>).' %}
{% elif error.assumption == 'linked_releases' %}
{% trans '(Assuming these are linked releases, because they lack an <code>id</code>).' %}
{% endif %}
</p>
{% if 'schema_title' in error %}
<div class="well well-sm">
Expand Down
2 changes: 1 addition & 1 deletion cove_ocds/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
METRICS_EXT = 'https://raw.githubusercontent.com/open-contracting/ocds_metrics_extension/master/extension.json'
CODELIST_EXT = 'https://raw.githubusercontent.com/INAImexico/ocds_extendedProcurementCategory_extension/0ed54770c85500cf21f46e88fb06a30a5a2132b1/extension.json'
UNKNOWN_URL_EXT = 'http://bad-url-for-extensions.com/extension.json'
NOT_FOUND_URL_EXT = 'http://example.com/extension.json'
NOT_FOUND_URL_EXT = 'https://standard.open-contracting.org/latest/en/404.json'


def test_get_releases_aggregates():
Expand Down
1 change: 0 additions & 1 deletion cove_ocds/tests_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def test_500_error(server_url, browser):
'Get a copy of the schema with extension patches applied',
'The following extensions failed',
"Invalid code found in scale",
'is not valid under any of the given schemas',
'/records/compiledRelease/tender/targets',
'The schema version specified in the file is 1.1',
'/records/releases/tender/targets'], ['checked against a schema with no extensions'], True),
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Django<1.12
-e git+https://github.com/OpenDataServices/[email protected]#egg=flattentool
-e git+https://github.com/open-contracting/[email protected]#egg=libcoveocds
-e git+https://github.com/OpenDataServices/[email protected]#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@v0.8.0#egg=libcove
-e git+https://github.com/OpenDataServices/lib-cove.git@v0.11.0#egg=libcove
django-bootstrap3
django-debug-toolbar
requests
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Django==1.11.24 # rq.filter: <1.12
-e git+https://github.com/OpenDataServices/flatten-tool.git@511cc6d1ee83d77aa7a1efe965eb3dd7e4940c1b#egg=flattentool
-e git+https://github.com/open-contracting/lib-cove-ocds.git@4fbdd620f40698e1566deae159e356250ed869cf#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@62663c3dd6f71c57d53dc5ea7a285210b140f4ab#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@61ed8d096817c52a845ac7b1e84ae5b11e19af77#egg=libcove
-e git+https://github.com/OpenDataServices/lib-cove.git@b6323033a8634f03121b099937551e8003bb66d9#egg=libcove
django-bootstrap3==11.1.0
django-debug-toolbar==2.0
requests==2.22.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Django==1.11.24 # rq.filter: <1.12
-e git+https://github.com/OpenDataServices/flatten-tool.git@511cc6d1ee83d77aa7a1efe965eb3dd7e4940c1b#egg=flattentool
-e git+https://github.com/open-contracting/lib-cove-ocds.git@4fbdd620f40698e1566deae159e356250ed869cf#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@62663c3dd6f71c57d53dc5ea7a285210b140f4ab#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@61ed8d096817c52a845ac7b1e84ae5b11e19af77#egg=libcove
-e git+https://github.com/OpenDataServices/lib-cove.git@b6323033a8634f03121b099937551e8003bb66d9#egg=libcove
django-bootstrap3==11.1.0
django-debug-toolbar==2.0
requests==2.22.0
Expand Down

0 comments on commit 13c77e1

Please sign in to comment.