Closed Bug 1237667 Opened 9 years ago Closed 7 years ago

[translate][sync] Run compare-locales checks and display errors

Categories

(Webtools Graveyard :: Pontoon, defect, P2)

defect

Tracking

(firefox46 affected)

RESOLVED INCOMPLETE
Tracking Status
firefox46 --- affected

People

(Reporter: flod, Assigned: jotes)

References

Details

Attachments

(2 files, 1 obsolete file)

Currently quality checks are performed when a localizer submits a string, but it would be helpful to have a filter that let you go through the strings with failing checks.
Implementation note: to implement this, we'll have to store quality check errors in the database.
Priority: -- → P3
Summary: Add a filter to view strings failing quality checks → [translate] Add a filter to view strings failing quality checks
Priority: P3 → P2
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/21acbbda328fc849f9d2487e408500d72843a605 Bug 1237667 - Update to latest fluent (#627) * Bump python-fluent to 0.4.1 * Bump fluent-syntaxt.js to 0.5.0 * Add docs for updating fluent * Update code to reflect fluent AST and API changes
Assignee: nobody → poke+bugzilla
Depends on: 1385234
Summary: [translate] Add a filter to view strings failing quality checks → [translate][sync] Run compare-locales checks and display errors
To clarify changes to the title - we should run compare-locales checks whenever a translation is stored in a DB: - translate UI: single submission - translate UI: mass actions (e.g. search & replace) - sync - file upload In translate UI, we should prevent submission of translations with errors and show them to the user instantly. On sync and file upload, we should import translations with errors and mark them as such (in the dashboard, string list, filters). We should also run checks across all strings that are already in the DB using a DB migration.
Attached file WIP pull request
Attaching the pull request that we had last summer.
So, as we discussed during watercooling meeting I'm planning to rebase this PR against the current codebase and see how much We're able to use from this patch. :Axel Do you think It's a good plan to use compare-locales 2.6.3 or should I use the current master/trunk? I remember discussions about compare-locales 3.0 but that was a while ago.
Flags: needinfo?(axel)
>=2.7 is good. 3.0 is probably going to be a bigger fish.
Flags: needinfo?(axel)
I've glanced a bit at the code. I don't have good suggestions on how to split the code up, the initial commit is already pretty big. Maybe the fuzzy changes and just the data model can land ahead of time. As for the integration with compare-locales. getChecker() now doesn't need the references ahead of time, you can check needs_references on the resulting checker. The mock entities probably need to be replaced with actual entities, the current code often does code branches based on python type. There's more in bug 1432178, so I would surely wait for that and the c-l release that comes with it. That'd be my current observations.
Thanks :Pike, I'll start from rebase then update the code related to c-l integration.
:mathazz, :pike So after some work on the rebase, I've (probably) started to have general grasp how to split this pull request into smaller ones. My initial suggestion: * Pr 1: create Django app called "errorchecks", add code responsible for the integration with c-l with tests and add validation in Pontoon translate vie (with possibility to skip warnings) for translators. That would be a good case to check if integration with c-l works okay and doesn't introduce unnecessary DB changes. * Pr 2: add models, save errors to database when somebody decides to force-submit translation. * Pr 3: save errors during the sync process. If you feel that We should change order or scope of those PRs - I'm open to hear your thoughts/suggestions/preferences/wisdom :D My general goal is to make smaller and review-able changes with the full test coverage.
Flags: needinfo?(m)
Flags: needinfo?(l10n)
Sounds good to me.
Flags: needinfo?(l10n)
LGTM.
Flags: needinfo?(m)
Whiteboard: l10n-docs-needed
Depends on: 1455283
Comment on attachment 8969712 [details] [review] Link to GitHub pull-request: https://github.com/mozilla/pontoon/pull/931 Wrong bug number in commit message. Sorry for the noise.
Attachment #8969712 - Attachment is obsolete: true
Whiteboard: l10n-docs-needed
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: