Diff for "Translations/Specs/UpstreamImportIntoUbuntu/FixingIsImported/setCurrentTranslation"

Not logged in - Log In / Register

Differences between revisions 2 and 3
Revision 2 as of 2010-03-25 22:18:43
Size: 2936
Editor: danilo
Comment:
Revision 3 as of 2010-03-25 22:47:58
Size: 2943
Editor: jtv
Comment:
Deletions are marked like this. Additions are marked like this.
Line 78: Line 78:
 | T | upstream | B3 |  B6 | B8 | ∅ |  | T | upstream | B1⊕ | B4⊕ | B7⊕ | ∅ |

Setting a translation

Assumptions

We're not setting a translation that's identical to the current one.

We've checked that lock_timestamp is newer than the last update date.

A diverged message cannot be both the current Ubuntu message and the current upstream message. Those would be diverged in different templates.

When we look for an "identical" message, we look for ones that are either shared or diverged in the same template that we're looking at. We completely ignore messages that are diverged to other templates.

What happens to the existing current message

A: Deactivate & converge.

  • If there is already an identical shared message:
    • current.delete()
    else:
    • current.is_current = False current.potemplate = None

B: Deactivate.

  • current.is_current = False

What happens to the new current message

1. create TM 'new'

  • new.is_current = True

2. create TM 'new'

  • new.is_current = True new.potemplate = current.potemplate

3. create TM 'new'

  • new.is_current = True POLICY/PRIVILEGES determine if current.is_other goes into new.is_other

4. new.is_current = True

5. if new.is_current: pass

  • else: (2)

6. new.is_current = True

  • POLICY/PRIVILEGES determine if current.is_other goes into new.is_other

7. new.potemplate = None (watch for existing identical TM)

  • new.is_current = True

8. new.is_current = True

  • new.potemplate = None (watch for existing identical TM) POLICY/PRIVILEGES determine if current.is_other goes into new.is_other

⊕. MERGING POLICY determines if we need to do:

  • Get other, current, shared translation 'other' other.is_other = False new.is_other = True

Execution matrix

                +-------------------------------------+
                |     IDENTICAL EXISTING TM 'new'     |
                +------+--------+----------+----------+
                |      |        |          | upstream |
                | None | shared | diverged |  shared  |
 +---+----------+---------------+----------+----------+
 | C |  None    |  Z1⊕ |   Z4⊕  |    Z7⊕   |    Z4⊕   |
 | U +----------+------+--------+----------+----------+
 | R |  shared  |  B1  |   B4   |    B7    |    B4    |
 | R +----------+------+--------+----------+----------+
 | E | diverged |  A2  |   A5   |    A4    |    A5    |
 | N +----------+------+--------+----------+----------+
 | T | upstream |  B1⊕  |  B4⊕   |    B7⊕   |    ∅     |
 |   |  shared  |      |        |          |          |
 +---+----------+------+--------+----------+----------+

Notes

A diverged message can mask a similar shared message as well. We tried to take this into account throughout, and believe we covered it. Conditionals in the numbered parts ("what happens to the new current message") may warrant splitting rows or columns later.

Karma is being handled.

Translations/Specs/UpstreamImportIntoUbuntu/FixingIsImported/setCurrentTranslation (last edited 2010-06-19 03:51:36 by jtv)