Drupal plugin overwrites translations when it should not.

Description

The Drupal plugin will look for existing published translations and send then to Zanata (as long as it is configured to do so). The translations are always sent in fuzzy state since there is no way to tell whether they are out of date.

The translations sent by the Drupal plugin must never replace existing translations in Zanata. It appears as though some translations from the Drupal plugin may have replaced existing translations, so we should test this case specifically, to determine whether a fix is needed.

To reproduce

Requiremes:

  • Drupal server with the plugin configured to send translations to Zanata

  • At least one document on the server (small is preferred for quicker testing)

Steps

  1. Create a translation job in Drupal to translate a document to 1 language

  2. Fully translate the document in Zanata to the job's target language

  3. Fetch translations for the Drupal translation job (this should publish the translated document)

  4. Edit the published translations document in Drupal to make the text distinct enough to easily tell it from the translations in Zanata

  5. Create another translation job in Drupal for the same document and language

Expected

  • Drupal plugin sends translations to Zanata

  • Zanata does not accept the translations sent from Drupal

Actual

  • Drupal sends all translations to Zanata

  • Zanata accepts all translations

Requirements (to implement)

  1. Add a configuration option

    • Type: boolean

    • Label: "Send translations to Zanata if they are found"

    • Description: "Check for translated documents when a translation job is created, and send the translations to Zanata. Translations will only be sent for strings that have not started translation in Zanata."

  2. When job is "Submit to translator", check for translations in Drupal only if the new configuration option is TRUE

  3. Only send translation strings for Zanata if the translation is currently in state Untranslated in Zanata.

    • Fetch a list of translation status from Zanata (may be full translations, or just the status if that is available on the REST API)

    • Filter translation status from Zanata to get a list of resId that are UNTRANSLATED

    • Send translations from Drupal that match the filtered list of resId only.

Environment

None

Activity

Show:

Former user 12 July 2016 at 06:26

Verified that existing translations are overwritten by Drupal (as fuzzy). See linked issue for images and other tidbits.

Ready for Release

Details

Assignee

Reporter

Tested Version/s

Story Points

Components

Sprint

Priority

More fields

Created 11 July 2016 at 03:56
Updated 4 August 2016 at 00:17
Resolved 3 August 2016 at 00:12