From 74ab43c37dcedacee93e832546d85413fdeabccd Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Thu, 11 Feb 2021 13:08:09 +0000 Subject: [PATCH] templates: Make sure all text in templates is translated https://github.com/open-contracting/cove-ocds/issues/144 --- cove_ocds/locale/en/LC_MESSAGES/django.po | 206 +++++++++++++++++- .../cove_ocds/additional_checks_table.html | 2 +- .../templates/cove_ocds/explore_base.html | 48 ++-- .../templates/cove_ocds/explore_record.html | 12 +- .../templates/cove_ocds/explore_release.html | 4 +- cove_ocds/templates/cove_ocds/input.html | 2 +- .../templates/cove_ocds/validation_table.html | 4 +- cove_ocds/views.py | 2 + 8 files changed, 243 insertions(+), 37 deletions(-) diff --git a/cove_ocds/locale/en/LC_MESSAGES/django.po b/cove_ocds/locale/en/LC_MESSAGES/django.po index 0fc9b93c..012203e8 100644 --- a/cove_ocds/locale/en/LC_MESSAGES/django.po +++ b/cove_ocds/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-10 16:08+0000\n" +"POT-Creation-Date: 2021-02-11 13:07+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -63,6 +63,10 @@ msgid "" "entirety (key and value) from the data" msgstr "" +#: cove_ocds/templates/cove_ocds/additional_checks_table.html:22 +msgid "see all" +msgstr "" + #. Translators: Label of a button that triggers search #: cove_ocds/templates/cove_ocds/base.html:53 #: cove_ocds/templates/cove_ocds/explore_base.html:52 @@ -258,10 +262,62 @@ msgstr "" msgid "Load New File" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:24 +msgid "Schema" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:29 +#, python-format +msgid "" +"Your data specifies a version %(unrecognized_version_data)s " +"which is not recognised. For that reason, it's been checked against the " +"current default version." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:32 +#, python-format +msgid "" +"This data has been checked against OCDS " +"%(release_or_record)s package schema version %(version_used_display)s." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:32 +msgid "" +"You can choose a different version of the schema to check and explore your " +"data." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:34 +msgid "Check and explore same data against a different version of the schema" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:37 +msgid "" +"Switching the schema version will result in changes to CoVE output and " +"conversions. If you revisit or share this URL, the lastest version selected " +"will be used to check your data" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:64 msgid "Convert" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:71 +msgid "" +"There were conversion warnings when " +"processing your file. The converted data may not represent your data as you " +"want it to be." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:74 +msgid "We have tried to convert your JSON into a spreadsheet format." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:74 +#: cove_ocds/templates/cove_ocds/explore_base.html:98 +msgid "The results can be seen below." +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:81 #: cove_ocds/templates/cove_ocds/explore_base.html:86 #: cove_ocds/templates/cove_ocds/explore_base.html:112 @@ -272,6 +328,10 @@ msgstr "" msgid "The JSON could not be converted to Spreadsheet due to the error:" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:98 +msgid "We have tried to convert your data into JSON format." +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:124 msgid "Convert to Spreadsheet" msgstr "" @@ -280,10 +340,59 @@ msgstr "" msgid "Schema Extensions" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:151 +msgid "" +"Your data has been checked against schema version 1.0 and " +"includes extensions but extensions were not introduced in the schema until " +"version 1.1." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:154 +msgid "Your data contains the following schema extensions" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:154 +msgid ", but it wasn't possible to fetch them" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:160 +msgid "release schema" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:177 +msgid "The following extensions failed:" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:187 +msgid "" +"Only those extensions successfully fetched were applied to extend the schema." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:189 +msgid "All the extensions above were applied to extend the schema." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:191 +msgid "Get a copy of the schema with extension patches applied" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:193 +msgid "" +"None of the extensions above could be applied. Your data has been checked " +"against a schema with no extensions." +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:206 msgid "Conversion Errors" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:211 +#: cove_ocds/templates/cove_ocds/explore_base.html:233 +msgid "" +"In order to check your data we need to convert it. During that conversion we " +"found the following issues:" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:228 msgid "Conversion Errors (titles)" msgstr "" @@ -321,6 +430,12 @@ msgstr "" msgid "Structure Warnings" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:326 +#: cove_ocds/templates/cove_ocds/explore_base.html:348 +msgid "" +"Fixing the following issues will improve the interoperability of your data." +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:343 #: cove_ocds/templates/cove_ocds/explore_base.html:481 #: cove_ocds/templates/cove_ocds/explore_base.html:484 @@ -331,6 +446,25 @@ msgstr "" msgid "Codelist Errors" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:370 +msgid "" +"The fields below use closed codelists. When using these fields, you " +"must use one of the pre-defined codelist values. If you use a " +"value that is not on the relevant codelist, your data will not pass " +"structural checks. Where you see + or - this indicates that the codelist has " +"been modified with these additions (+) or subtractions (-) by one or more " +"extensions." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:374 +msgid "" +"You may need to create a mapping between your local codes and the OCDS " +"closed codelists to address these errors. In most cases, there will be a " +"‘detail’ field where you can also include your local codes. If you have " +"already completed a mapping, please review the spelling and capitalisation " +"used in these closed codelist fields." +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:385 msgid "Additional Fields" msgstr "" @@ -348,6 +482,27 @@ msgstr "" msgid "Additional Codelist Values" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_base.html:407 +msgid "" +"Your data contains a number of fields that use an open codelist. You should " +"use values from the codelist whenever possible, but if the codelist does not " +"provide the values you need, you are permitted to add additional values. The " +"values below do not appear in the codelist; you should check that you " +"intended these as additional values. Where you see + or - this indicates " +"that the codelist has been modified with these additions (+) or subtractions " +"(-) by one or more extensions." +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_base.html:413 +msgid "" +"Make sure you list the definition of any additional codelist values you " +"include within your publication policy, and if you " +"believe they should be added as recommended values in the open codelist, " +"please suggest this via the OCDS issue tracker." +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_base.html:423 msgid "Additional Checks" msgstr "" @@ -447,11 +602,20 @@ msgstr "" msgid "structural checks against " msgstr "" +#: cove_ocds/templates/cove_ocds/explore_record.html:25 +msgid "OCDS record package schema version" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_record.html:26 #: cove_ocds/templates/cove_ocds/explore_release.html:24 msgid "See Structural Errors below." msgstr "" +#: cove_ocds/templates/cove_ocds/explore_record.html:30 +#: cove_ocds/templates/cove_ocds/explore_release.html:33 +msgid "At a glance" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_record.html:34 #, python-format msgid "This file contains %(count)s record." @@ -544,6 +708,18 @@ msgstr "" msgid "Is structurally correct?" msgstr "" +#: cove_ocds/templates/cove_ocds/explore_record.html:105 +#: cove_ocds/templates/cove_ocds/explore_record.html:167 +#: cove_ocds/templates/cove_ocds/explore_record.html:168 +msgid "No" +msgstr "" + +#: cove_ocds/templates/cove_ocds/explore_record.html:105 +#: cove_ocds/templates/cove_ocds/explore_record.html:167 +#: cove_ocds/templates/cove_ocds/explore_record.html:168 +msgid "Yes" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_record.html:115 msgid "Number of records" msgstr "" @@ -561,6 +737,10 @@ msgstr "" msgid "Showing the first %(releases_or_records_table_length)s records." msgstr "" +#: cove_ocds/templates/cove_ocds/explore_record.html:157 +msgid "release count" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_record.html:185 #: cove_ocds/templates/cove_ocds/explore_release.html:428 msgid "Explore your data:" @@ -589,6 +769,10 @@ msgid "" "this feature to check whether any fields have changed unexpectedly." msgstr "" +#: cove_ocds/templates/cove_ocds/explore_release.html:23 +msgid "OCDS release package schema version" +msgstr "" + #: cove_ocds/templates/cove_ocds/explore_release.html:28 msgid "Failed to apply " msgstr "" @@ -912,6 +1096,10 @@ msgstr "" msgid "Procuring Entity:" msgstr "" +#: cove_ocds/templates/cove_ocds/input.html:6 +msgid "Loading" +msgstr "" + #: cove_ocds/templates/cove_ocds/input.html:13 msgid "Link" msgstr "" @@ -1139,6 +1327,10 @@ msgstr "" msgid "Spreadsheet Location of first 3 errors" msgstr "" +#: cove_ocds/templates/cove_ocds/validation_table.html:25 +msgid "(more info)" +msgstr "" + #: cove_ocds/templates/cove_ocds/validation_table.html:28 msgid "" "(Assuming these are embedded releases, because they have an id)." @@ -1157,6 +1349,18 @@ msgstr "" msgid "Line:" msgstr "" +#: cove_ocds/templates/cove_ocds/validation_table.html:83 +msgid "Sheet" +msgstr "" + +#: cove_ocds/templates/cove_ocds/validation_table.html:83 +msgid "Row" +msgstr "" + +#: cove_ocds/templates/cove_ocds/validation_table.html:83 +msgid "Column" +msgstr "" + #: cove_ocds/views.py:66 cove_ocds/views.py:77 cove_ocds/views.py:95 msgid "Sorry, we can't process that data" msgstr "" diff --git a/cove_ocds/templates/cove_ocds/additional_checks_table.html b/cove_ocds/templates/cove_ocds/additional_checks_table.html index ed5dd9a5..899b5436 100644 --- a/cove_ocds/templates/cove_ocds/additional_checks_table.html +++ b/cove_ocds/templates/cove_ocds/additional_checks_table.html @@ -19,7 +19,7 @@
  • {{ value.json_location }}
  • {% endfor %} {% if values|length > 3 %} -
  • see all
  • +
  • {% trans "see all" %}
  • {% endif %} diff --git a/cove_ocds/templates/cove_ocds/explore_base.html b/cove_ocds/templates/cove_ocds/explore_base.html index 97f3e6b0..da02eac7 100644 --- a/cove_ocds/templates/cove_ocds/explore_base.html +++ b/cove_ocds/templates/cove_ocds/explore_base.html @@ -21,20 +21,20 @@
    -

    Schema

    +

    {% trans "Schema" %}

    {% if unrecognized_version_data %}
    -  Your data specifies a version {{unrecognized_version_data}} which is not recognised. For that reason, it's been checked against the current default version. +  {% blocktrans %}Your data specifies a version {{unrecognized_version_data}} which is not recognised. For that reason, it's been checked against the current default version.{% endblocktrans %}
    {% endif %} -

    This data has been checked against OCDS {% if releases %}release {% endif %}{% if records %}record {% endif %}package schema version {{ version_used_display }}. You can choose a different version of the schema to check and explore your data.

    +

    {% blocktrans %}This data has been checked against OCDS {{ release_or_record }} package schema version {{ version_used_display }}.{% endblocktrans %} {% blocktrans %}You can choose a different version of the schema to check and explore your data.{% endblocktrans %}


    - Check and explore same data against a different version of the schema + {% blocktrans %}Check and explore same data against a different version of the schema{% endblocktrans %}
    - Switching the schema version will result in changes to CoVE output and conversions. If you revisit or share this URL, the lastest version selected will be used to check your data + {% blocktrans %}Switching the schema version will result in changes to CoVE output and conversions. If you revisit or share this URL, the lastest version selected will be used to check your data{% endblocktrans %}


    @@ -68,10 +68,10 @@

    {% if conversion_warning_messages or conversion_warning_messages_titles %} -

    There were conversion warnings when processing your file. The converted data may not represent your data as you want it to be.

    +

    {% blocktrans %}There were conversion warnings when processing your file. The converted data may not represent your data as you want it to be.{% endblocktrans %}

    {% endif %} {% if conversion == 'flatten' %} -

    We have tried to convert your JSON into a spreadsheet format.

    The results can be seen below.

    +

    {% trans "We have tried to convert your JSON into a spreadsheet format." %}

    {% trans "The results can be seen below." %}

    • {{JSON}} ({{original}}) {{original_file.size|filesizeformat }} @@ -95,7 +95,7 @@

      {% endif %} {% elif conversion == 'unflatten' %} -

      We have tried to convert your data into JSON format.

      The results can be seen below.

      +

      {% blocktrans %}We have tried to convert your data into JSON format.{% endblocktrans %}

      {% blocktrans %}The results can be seen below.{% endblocktrans %}

      • @@ -148,16 +148,16 @@

        {% if extensions and version_used_display == "1.0" %}
        -  Your data has been checked against schema version 1.0 and includes extensions but extensions were not introduced in the schema until version 1.1. +  {% blocktrans %}Your data has been checked against schema version 1.0 and includes extensions but extensions were not introduced in the schema until version 1.1.{% endblocktrans %}
        {% endif %} -

        Your data contains the following schema extensions{% if not extensions.is_extended_schema %} but it wasn't possible to fetch them{% endif %}:

        +

        {% blocktrans %}Your data contains the following schema extensions{% endblocktrans %}{% if not extensions.is_extended_schema %}{% blocktrans %}, but it wasn't possible to fetch them{% endblocktrans %}{% endif %}:

        {% if ext_errors %} - {% if extensions.is_extended_schema %}

        The following extensions failed:{% endif %} + {% if extensions.is_extended_schema %}

        {% blocktrans %}The following extensions failed:{% endblocktrans %}{% endif %}

          {% for ext_descriptor_url, error in ext_errors.items %}
        • {{ext_descriptor_url}}   

          {{error}}

        • @@ -184,13 +184,13 @@

          {% if extensions.is_extended_schema %} {% if ext_errors %} -

          Only those extensions successfully fetched were applied to extend the schema.

          +

          {% blocktrans %}Only those extensions successfully fetched were applied to extend the schema.{% endblocktrans %}

          {% else %} -

          All the extensions above were applied to extend the schema.

          +

          {% blocktrans %}All the extensions above were applied to extend the schema.{% endblocktrans %}

          {% endif %} -  Get a copy of the schema with extension patches applied +  {% blocktrans %}Get a copy of the schema with extension patches applied{% endblocktrans %} {% else %} -

          None of the extensions above could be applied. Your data has been checked against a schema with no extensions.

          +

          {% blocktrans %}None of the extensions above could be applied. Your data has been checked against a schema with no extensions.{% endblocktrans %}

          {% endif %}

        @@ -208,7 +208,7 @@

    {% if file_type == 'xlsx' or file_type == 'csv' %} -

    In order to check your data we need to convert it. During that conversion we found the following issues:

    +

    {% blocktrans %}In order to check your data we need to convert it. During that conversion we found the following issues:{% endblocktrans %}

    {% endif %}
      {% for warning_message in conversion_warning_messages %} @@ -230,7 +230,7 @@

    {% if file_type == 'xlsx' or file_type == 'csv' %} -

    In order to check your data we need to convert it. During that conversion we found the following issues:

    +

    {% blocktrans %}In order to check your data we need to convert it. During that conversion we found the following issues:{% endblocktrans %}

    {% endif %}
      {% for warning_message in conversion_warning_messages_titles %} @@ -323,7 +323,7 @@

    -

    Fixing the following issues will improve the interoperability of your data.

    +

    {% blocktrans %}Fixing the following issues will improve the interoperability of your data.{% endblocktrans %}


    {% with structure_warnings=structure_warnings %} {% if structure_warnings.missing_ids %} @@ -345,7 +345,7 @@

    -

    Fixing the following issues will improve the interoperability of your data.

    +

    {% blocktrans %}Fixing the following issues will improve the interoperability of your data.{% endblocktrans %}


    {% with conformance_errors=conformance_errors %} {% if conformance_errors.ocds_prefixes_bad_format %} @@ -367,11 +367,11 @@

    - The fields below use closed codelists. When using these fields, you must use one of the pre-defined codelist values. If you use a value that is not on the relevant codelist, your data will not pass structural checks. Where you see + or - this indicates that the codelist has been modified with these additions (+) or subtractions (-) by one or more extensions. + {% blocktrans %}The fields below use closed codelists. When using these fields, you must use one of the pre-defined codelist values. If you use a value that is not on the relevant codelist, your data will not pass structural checks. Where you see + or - this indicates that the codelist has been modified with these additions (+) or subtractions (-) by one or more extensions.{% endblocktrans %} {% with additional_codelist_values=additional_closed_codelist_values %}
    {% include "additional_codelist_values.html" %}
    {% endwith %} - You may need to create a mapping between your local codes and the OCDS closed codelists to address these errors. In most cases, there will be a ‘detail’ field where you can also include your local codes. If you have already completed a mapping, please review the spelling and capitalisation used in these closed codelist fields. + {% blocktrans %}You may need to create a mapping between your local codes and the OCDS closed codelists to address these errors. In most cases, there will be a ‘detail’ field where you can also include your local codes. If you have already completed a mapping, please review the spelling and capitalisation used in these closed codelist fields.{% endblocktrans %}
    @@ -404,13 +404,13 @@

    - Your data contains a number of fields that use an open codelist. You should use values from the codelist whenever possible, but if the codelist does not provide the values you need, you are permitted to add additional values. The values below do not appear in the codelist; you should check that you intended these as additional values. Where you see + or - this indicates that the codelist has been modified with these additions (+) or subtractions (-) by one or more extensions. + {% blocktrans %}Your data contains a number of fields that use an open codelist. You should use values from the codelist whenever possible, but if the codelist does not provide the values you need, you are permitted to add additional values. The values below do not appear in the codelist; you should check that you intended these as additional values. Where you see + or - this indicates that the codelist has been modified with these additions (+) or subtractions (-) by one or more extensions.{% endblocktrans %}
    {% with additional_codelist_values=additional_open_codelist_values %} {% include "additional_codelist_values.html" %} {% endwith%}
    - Make sure you list the definition of any additional codelist values you include within your publication policy, and if you believe they should be added as recommended values in the open codelist, please suggest this via the OCDS issue tracker. + {% blocktrans %}Make sure you list the definition of any additional codelist values you include within your publication policy, and if you believe they should be added as recommended values in the open codelist, please suggest this via the OCDS issue tracker.{% endblocktrans %}
    {% endif %} diff --git a/cove_ocds/templates/cove_ocds/explore_record.html b/cove_ocds/templates/cove_ocds/explore_record.html index 0e685cb2..5cafdd61 100644 --- a/cove_ocds/templates/cove_ocds/explore_record.html +++ b/cove_ocds/templates/cove_ocds/explore_record.html @@ -22,12 +22,12 @@

    {% trans 'Headlines' %}

    {% else %} {% trans "Passed " %} {% endif %} - {% blocktrans %}structural checks against {% endblocktrans %}OCDS record package schema version {{ version_used_display }}. + {% blocktrans %}structural checks against {% endblocktrans %}{% blocktrans %}OCDS record package schema version{% endblocktrans %} {{ version_used_display }}. {% if validation_errors %}
    {% blocktrans %}See Structural Errors below.{% endblocktrans %}{% endif %}
    - At a glance + {% trans "At a glance" %}
    • {% if records_aggregates.count %} @@ -102,7 +102,7 @@

      {% trans 'Headlines' %}

      {% trans 'Is structurally correct?' %}

    - {% if validation_errors %}No{% else %}Yes{% endif %} + {% if validation_errors %}{% trans "No" %}{% else %}{% trans "Yes" %}{% endif %}
    @@ -154,7 +154,7 @@

    ocid - release count + {% trans "release count" %} compiledRelease versionedRelease @@ -164,8 +164,8 @@

    {{ record.ocid }} {{ record.releases|length }} - {% if record.compiledRelease %}Yes{% else %}No{% endif %} - {% if record.versionedRelease %}Yes{% else %}No{% endif %} + {% if record.compiledRelease %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %} + {% if record.versionedRelease %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %} {% endfor %} diff --git a/cove_ocds/templates/cove_ocds/explore_release.html b/cove_ocds/templates/cove_ocds/explore_release.html index 27d9d9ef..bb109691 100644 --- a/cove_ocds/templates/cove_ocds/explore_release.html +++ b/cove_ocds/templates/cove_ocds/explore_release.html @@ -20,7 +20,7 @@

    {% trans 'Headlines' %}

    {% else %} {% trans "Passed " %} {% endif %} - {% blocktrans %}structural checks against {% endblocktrans %}OCDS release package schema version {{ version_used_display }}. + {% blocktrans %}structural checks against {% endblocktrans %}{% blocktrans %}OCDS release package schema version{% endblocktrans %} {{ version_used_display }}. {% if validation_errors %}
    {% blocktrans %}See Structural Errors below.{% endblocktrans %}{% endif %}
    {% if extensions and extensions.invalid_extension %} @@ -30,7 +30,7 @@

    {% trans 'Headlines' %}

    {% endif %}
    - At a glance + {% trans "At a glance" %}
      {% if ra.release_count %}
    • diff --git a/cove_ocds/templates/cove_ocds/input.html b/cove_ocds/templates/cove_ocds/input.html index d8200a9b..7490788d 100644 --- a/cove_ocds/templates/cove_ocds/input.html +++ b/cove_ocds/templates/cove_ocds/input.html @@ -3,7 +3,7 @@ {% load i18n %} {% block content %} - +
      {% if 'url' in input_methods %}
      diff --git a/cove_ocds/templates/cove_ocds/validation_table.html b/cove_ocds/templates/cove_ocds/validation_table.html index 0d09be81..1002b39f 100644 --- a/cove_ocds/templates/cove_ocds/validation_table.html +++ b/cove_ocds/templates/cove_ocds/validation_table.html @@ -22,7 +22,7 @@

      {{ error | html_error_msg }} {% if error.message_type in common_error_types %} - (more info) + {% trans "(more info)" %} {% endif %} {% if error.assumption == 'embedded_releases' %} {% trans '(Assuming these are embedded releases, because they have an id).' %} @@ -80,7 +80,7 @@

      {{ error.schema_title }}

        {% for value in values|slice:":3" %} -
      • Sheet: {{value.sheet}} Row: {{value.row_number}} {% if value.header %} Column: {{value.header}} {% endif %}
      • +
      • {% trans "Sheet" %}: {{value.sheet}} {% trans "Row" %}: {{value.row_number}} {% if value.header %} {% trans "Column" %}: {{value.header}} {% endif %}
      • {% endfor %}
      diff --git a/cove_ocds/views.py b/cove_ocds/views.py index c67fae10..d8cea9b0 100644 --- a/cove_ocds/views.py +++ b/cove_ocds/views.py @@ -243,6 +243,7 @@ def explore_ocds(request, pk): db_data.save() if "records" in json_data: + context["release_or_record"] = "record" ocds_show_schema = SchemaOCDS(record_pkg=True) ocds_show_deref_schema = ocds_show_schema.get_schema_obj(deref=True) template = "cove_ocds/explore_record.html" @@ -255,6 +256,7 @@ def explore_ocds(request, pk): json_data, ocds_show_deref_schema ) else: + context["release_or_record"] = "release" ocds_show_schema = SchemaOCDS(record_pkg=False) ocds_show_deref_schema = ocds_show_schema.get_schema_obj(deref=True) template = "cove_ocds/explore_release.html"