Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure all text that might appear in cove-ocds is translated into Spanish #144

Closed
3 tasks done
Bjwebb opened this issue Jan 22, 2021 · 4 comments
Closed
3 tasks done
Assignees

Comments

@Bjwebb
Copy link
Contributor

Bjwebb commented Jan 22, 2021

As we did for cove-oc4ids last year open-contracting/cove-oc4ids#59 (so a lot of the work has been done).

  • Marking any missing sentences in cove-ocds as translatable.
  • Pulling in the correct translated version of the schema.
  • Adding translatable strings to lib-cove-web for any English validation messages that weren’t already covered for lib-cove-oc4ids (list to check).

Decide whether to translate ocds-show (I would guess probably not, since it's archived).

@Bjwebb
Copy link
Contributor Author

Bjwebb commented Feb 12, 2021

I've taken the list of valdiator functions that we didn't translate for OC4IDS, and broken it down into categories.

Unlike for OC4IDS, I've not compared the list to our schemas, because extensions in OCDS can have arbitary JSON schema.

Contain 0 error messages:
        u"allOf": _validators.allOf,
        u"patternProperties": _validators.patternProperties,

Just 1 error message:
        u"anyOf": _validators.anyOf,
        u"minItems": _validators.minItems,
        u"minLength": _validators.minLength,
        u"maxItems": _validators.maxItems,
        u"maxLength": _validators.maxLength,
        u"maxProperties": _validators.maxProperties,
        u"multipleOf": _validators.multipleOf,
        u"not": _validators.not_,
        u"type": _validators.type,
        u"format": _validators.format,
        
More than 1 error message: 
        u"additionalItems": _validators.additionalItems,
        u"additionalProperties": _validators.additionalProperties,
        u"maximum": _legacy_validators.maximum_draft3_draft4,
        u"minimum": _legacy_validators.minimum_draft3_draft4,
        u"oneOf": _validators.oneOf,
        u"dependencies": _validators.dependencies,

The first category requires nothing to be done.

The second category should be fairly easy, as we just need to insert the same translated message every time. (As we already do for these cases.)

The third category probably requires us to swap in a modified function in lib-cove, in order to return more information on the validation error object. (As we already do for uniqueness: lib-cove, lib-cove-web.)

My next step will be to write some extended test data that uses all the different validators.

@Bjwebb
Copy link
Contributor Author

Bjwebb commented Feb 17, 2021

Here's my extended test data, which uses a newly written test extension:

{
        "version": "1.1",
        "extensions": ["https://bjwebb.co.uk/paste/extension_tmp/extension.json"],
        "releases": [{
                "json_schema_example_fields": {
                        "minimum": 1,
                        "minimum2": 2,
                        "maximum": 3,
                        "maximum2": 2,
                        "minItems": ["a"],
                        "maxItems": ["a", "a", "a"],
                        "minLength": "a",
                        "maxLength": "aaa",
                        "maxProperties": {"a":1, "b":2, "c": 3},
                        "multipleOf": 2,
                        "not": "a",
                        "anyOf": "a",
                        "allOf": "a",
                        "oneOf": "a",
                        "oneOf2": 1,
                        "additionalItems": ["a", "a"],
                        "additionalProperties": {"a": 1},
                        "additionalProperties2": {"a": 1},
                        "dependencies": {"b": 1}
                }
        }]
}

I've got all of these translateable locally now. Here's a screenshot with a "pseudo" translation:

Screenshot from 2021-02-17 17-56-24

Tomorrow I will:

  • Tidy up and push what I've done
  • Ensure all types and formats are handled
  • Pull in the correct translated version of the schema

Bjwebb added a commit to OpenDataServices/lib-cove that referenced this issue Feb 18, 2021
on each ValidationError, so that we can replace the message with a
translation in lib-cove-web.

open-contracting/cove-ocds#144
Bjwebb added a commit to OpenDataServices/lib-cove-web that referenced this issue Feb 18, 2021
Bjwebb added a commit to open-contracting/lib-cove-ocds that referenced this issue Feb 18, 2021
on each ValidationError, so that we can replace the message with
a translation in cove_ocds.

open-contracting/cove-ocds#144
Bjwebb added a commit to OpenDataServices/lib-cove that referenced this issue Feb 18, 2021
on each ValidationError, so that we can replace the message with a
translation in lib-cove-web.

open-contracting/cove-ocds#144
Bjwebb added a commit to OpenDataServices/lib-cove that referenced this issue Feb 18, 2021
on each ValidationError, so that we can replace the message with a
translation in lib-cove-web.

open-contracting/cove-ocds#144
Bjwebb added a commit to OpenDataServices/lib-cove that referenced this issue Feb 18, 2021
on each ValidationError, so that we can replace the message with a
translation in lib-cove-web.

open-contracting/cove-ocds#144
Bjwebb added a commit to OpenDataServices/lib-cove-web that referenced this issue Feb 18, 2021
@Bjwebb
Copy link
Contributor Author

Bjwebb commented Feb 18, 2021

I pushed my work so far, its across 4 different repos, so we have 4 different PRs:

Next steps:

  • Do plurals properly
  • Add my extended schema as a test
  • Check if anything else is missing from the pseudo transactions, including uploading some data that will trigger additional checks
  • Pulling in the correct translated version of the schema.

Bjwebb added a commit to OpenDataServices/lib-cove-web that referenced this issue Feb 19, 2021
Bjwebb added a commit to OpenDataServices/lib-cove that referenced this issue Feb 19, 2021
on each ValidationError, so that we can replace the message with a
translation in lib-cove-web.

open-contracting/cove-ocds#144
Bjwebb added a commit that referenced this issue Feb 24, 2021
Bjwebb added a commit to OpenDataServices/lib-cove that referenced this issue Feb 25, 2021
on each ValidationError, so that we can replace the message with a
translation in lib-cove-web.

open-contracting/cove-ocds#144
Bjwebb added a commit to open-contracting/lib-cove-ocds that referenced this issue Feb 25, 2021
Bjwebb added a commit to OpenDataServices/lib-cove-web that referenced this issue Mar 24, 2021
Bjwebb added a commit that referenced this issue Mar 25, 2021
The Spanish translations are now complete.

#144
Bjwebb added a commit to open-contracting/lib-cove-ocds that referenced this issue Mar 25, 2021
Bjwebb added a commit that referenced this issue Mar 26, 2021
(to pull in changes relating to Spanish translations)

#144
Bjwebb added a commit that referenced this issue Mar 26, 2021
(fixes earlier commit by adding the Spanish translations)

#144
Bjwebb added a commit that referenced this issue Mar 26, 2021
(fixes earlier commit by adding the Spanish translations)

#144
Bjwebb added a commit that referenced this issue Mar 26, 2021
@Bjwebb
Copy link
Contributor Author

Bjwebb commented Mar 30, 2021

These changes are now live https://standard.open-contracting.org/review/

@Bjwebb Bjwebb closed this as completed Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant