Page MenuHomeIn-Portal Phabricator

INP-1505 - Restore e-mail template translation sync code removed during merge
ClosedPublic

Authored by alex on Oct 8 2015, 6:22 AM.

Details

Test Plan
NOTE: Here is how it should work for both Phrases & E-mail Templates, but I'll explain using Phrases.
NOTE: Pick any phrase for tests and use it only.

Some common logic that is used:

  • the Translation in Sync and Translate From Language fields are never shown for primary language
  • the Source ... fields always show value (and have that language in title) from translation source language (if non set will fallback to primary)
  • each phrase have it's own translation state
  • saving phrase (even without translation change) would make it in sync automatically
  • saving as primary would force other translation of same phrase to look back into that language for original translation (during editing only, no effect when phrases are used on other pages)

Part 1

  1. create 2 more languages to result in 3 languages total
  2. show (via column picker) the Translation in Sync and Translate From Language columns in grid
  3. confirm, that for picked phrase:
    • Translation in Sync says Yes
    • Translate From Language is empty

Part 2

  1. select primary language in dropdown above the grid
  2. open picked phrase for editing
  3. confirm, that same language is auto-selected in editing form language dropdown
  4. confirm, that Translation in Sync field isn't shown
  5. confirm, that Source ... fields (see next part) are not shown
  6. change translation
  7. press Save
  8. confirm, that for that phrase record:
    • Translation in Sync says Yes
    • Translate From Language is empty

Part 3

  1. select non-primary language in dropdown above the grid
  2. open picked phrase for editing
  3. confirm, that same language is auto-selected in editing form language dropdown
  4. confirm, that Translation in Sync field is shown and has Yes value
  5. confirm, that below each translatable input/textarea there is another field added:
    • looks like label (might have grey background and black border for e-mail templates)
    • has title in this format: "Source {FieldTitle} (from {LanguageTitle}):"
      • {FieldTitle} is title of above shown field
      • {LanguageTitle} is primary language name
  6. change translation
  7. press Save
  8. confirm, that for that phrase record:
    • Translation in Sync says Yes
    • Translate From Language is empty

Part 4

  1. select primary language in dropdown above the grid
  2. open picked phrase for editing
  3. confirm, that same language is auto-selected in editing form language dropdown
  4. confirm, that Translation in Sync field isn't shown
  5. confirm, that Source ... fields are not shown
  6. change translation
  7. press Use as Primary
  8. confirm, that for that phrase record:
    • Translation in Sync says Yes
    • Translate From Langauge is empty
  9. for each non-primary language: select language in dropdown above the grid
  10. confirm, that for that phrase record:
    • Translation in Sync says No
    • Translate From Langauge says LanguageTitle (the LanguageTitle is name of primary language)

Part 5

  1. select non-primary language in dropdown above the grid
  2. open picked phrase for editing
  3. confirm, that same language is auto-selected in editing form language dropdown
  4. confirm, that Translation in Sync shows and has No value
  5. confirm, that below each translatable input/textarea there is another field added:
    • looks like label (might have grey background and black border for e-mail templates)
    • has title in this format: "Source {FieldTitle} (from {LanguageTitle}):"
      • {FieldTitle} is title of above shown field
      • {LanguageTitle} is primary language name
  6. change translation
  7. press Save
  8. confirm, that for that phrase record on that non-primary language:
    • Translation in Sync says Yes
    • Translate From Langauge is empty
  9. select other non-prmary language in dropdown above the grid
  10. confirm, that for that phrase record and other non-primary language:
    • Translation in Sync says No
    • Translate From Langauge says LanguageTitle (the LanguageTitle is name of primary language)

Part 6

  1. repeat Part 4 and Part 5, but this time press Use as Primary during phrase editing on non-primary language
  2. confirm, that in places where LangaugeTitle was used that language (for which Use as Primary was used):
    • is shown instead of primary language in "Source ..." field titles
    • used to get original translation in "Source ..." field values
    • shown as "Translate From Language" column/field value

Part 7

  1. disable Custom module
  2. start adding new phrase/e-mail template
  3. confirm, that Core module was selected automatically
  4. enable Custom module
  5. start adding new phrase/e-mail template
  6. confirm, that Custom module was selected automatically

Part 8

  1. change interface preset to simple
  2. confirm, that Translation in Sync and Translate From Language columns are hidden from grid
  3. confirm, that Translation in Sync and Source ... fields are hidden from editing form
  4. confirm, that Use as Primary button is hidden from editing form

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex updated this revision to Diff 372.Oct 8 2015, 6:22 AM
alex retitled this revision from to INP-1505 - Restore e-mail template translation sync code removed during merge.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1505.
alex edited the test plan for this revision. (Show Details)Oct 8 2015, 6:23 AM
alex edited edge metadata.
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)Oct 8 2015, 6:38 AM
glebs accepted this revision.Oct 16 2015, 2:28 AM
glebs edited edge metadata.
This revision is now accepted and ready to land.Oct 16 2015, 2:28 AM
This revision was automatically updated to reflect the committed changes.