HomePhabricator

Enable publish button when the preference is not to use initial translation

Authored by santhosh.

Description

Enable publish button when the preference is not to use initial translation

The translation weight was taken using $.data, which does not reflect the
updated values. If there is no initial translation, the initial value
is 0 and causing progress calculation understands it as 0 translation
permanently.
Changed the translation weight reading to .attr method and
fixed the issue.

Testplan:
Choose a translation where the direction of source and target differs.
page=גבעת+יערים&from=he&to=en is an example.
Click on some sections and start typing in the blank translation sections
You should notice the publish button enabled.

Bug: T103555
Change-Id: I1ec868e270fa65485fa8e21268f8e46a163e9178