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

Marking copied from original strings enhancement #296

Open
vlad-timotei opened this issue Aug 26, 2021 · 0 comments
Open

Marking copied from original strings enhancement #296

vlad-timotei opened this issue Aug 26, 2021 · 0 comments

Comments

@vlad-timotei
Copy link
Collaborator

vlad-timotei commented Aug 26, 2021

Following these steps

  1. Select desired strings
  2. Bulk actions > Copy from original
  3. Apply

the expected result should be

  • copying the original translation - works
  • marking the strings that have been affected - works partially

(Note the background color being changed or not after bulk action.)

Marking string copied from original if:

  • string is untranslated - works
    gd_issue_mark_copy_1

  • string has any other previous state - doesn't work.
    gd_issue_mark_copy_3
    This is because the background color is already present. This can be fixed by adding !important here:

    GlotDict/css/style.css

    Lines 9 to 11 in bc2cf68

    table.translations tr.preview.has-original-copy, #legend .has-original-copy {
    background: #e5f5fa;
    }

  • string changes status in case automatic submission is enabled - doesn't work.
    gd_issue_mark_copy_2
    This is supposed to be handled by this line of code, just that row is the current row id, and that changes after saving, so it doesn't affect the new row.

    jQuery('#preview-' + row).addClass('has-original-copy');

    I don't have a fix for the last scenario, maybe something with Mutations Observer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant