Closed Bug 1458347 Opened 6 years ago Closed 6 years ago

[checks] Replace Fluent checks with compare-locales checks

Categories

(Webtools Graveyard :: Pontoon, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: mathjazz)

Details

Attachments

(1 file)

We should remove all Fluent-specific checks that are covered by compare-locales now that we use it:
https://github.com/mozilla/pontoon/blob/508012b03bf5180dc694a8cb83da138678d0c5d8/pontoon/base/static/js/fluent_interface.js#L365
:Pike, as you can see from the link above, we run 4 different Fluent-specific checks. Which of them are covered by compare-locales?
Flags: needinfo?(l10n)
Clearly not Pike, but I have the feeling only the one marked as TODO can be removed (#2). All the others would either create Junk (not associated to a string ID), or an obsolete value (misspelled key).
We should keep the key check, 'cause the key is needed for compare-locales to be helpful. Also the Junk one.

The other ones can go, and I think the attributes one might even be wrong. I.e., it won't warn at all if one has attributes and the other doesn't at all, AFAICT.
Flags: needinfo?(l10n)
Thanks. Taking.
Assignee: nobody → m
Commit pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/429aeeb0ed88bd46705bdce890c251610421287e
Bug 1458347: Move Fluent checks to backend (#943)

Remove frontend Fluent checks that are already included in
compare-locales and move the rest to pontoon.checks.libraries.pontoon.

Also, changed the logic for switching between the rich and source
editor (works both ways now). That's needed, because on editor switch
we also run checks (to avoid losing content if it's broken). A message
is displayed when switching to rich editor not possible, because the
string is only supported in source editor.

Other enhancements:
* Add border on top of warning overlay (to distinc from fluent editor)
* Catch Esc event if translation textarea not focused
* No period at the end of failed check messages

Code changes:
* Created a perform_checks() AJAX view
* Factored out renderFailedChecks() function
* Unified compare-locales and translate toolkit library interfaces to
  always take locale.code as argument (instead of locale or
  locale.code).
* Special logic for detecting unsaved changes no longer needed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
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: