Run language detection before offering a translation (dxomark.com website detected as being French)
Categories
(Firefox :: Translations, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox137 | --- | fixed |
People
(Reporter: aros, Assigned: gregtatum)
References
(Blocks 2 open bugs)
Details
(Keywords: perf-alert)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
Firefox needlessly offers to translate it from French to English which doesn't make any sense.
I'm using Firefox 118.0.2 (the official build) under Linux.
| Reporter | ||
Comment 1•2 years ago
|
||
I've forgotten to specify the exact URL, it's https://www.dxomark.com/smartphones/#sort-camera
Updated•2 years ago
|
Comment 2•2 years ago
|
||
view-source:https://www.dxomark.com/smartphones/#sort-camera
See the first two lines are
<!DOCTYPE html>
<html lang="fr">
So this is a problem with the website that the owners would need to fix.
| Reporter | ||
Updated•2 years ago
|
| Assignee | ||
Comment 3•2 years ago
•
|
||
In the translations meeting we discussed a change in strategy to address issues like this.
Our new language detection strategy will be:
- If there is no language tag - run language detection
- If the language tag should not offer a translation - do not run language detection
- If the language tag should offer a translation - run the language detection as well
Then if language detection runs:
- langtag is empty: use language detection result
- langtag and detection agree: offer translation
- langtag and detection disagree: do not offer translation
a. If langtag or detected language are supported, still show the translations icon without pop-up When pop-up is opened, show "Choose a language" as the from-language.
b. If neither langtag nor detected language are supported, do not show the icon.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 5•2 years ago
|
||
It would be worth verifying the fix on this case as well: Bug 1859081
Comment 6•1 year ago
|
||
(In reply to Greg Tatum [:gregtatum] from comment #3)
In the translations meeting we discussed a change in strategy to address issues like this.
Our new language detection strategy will be:
- If there is no language tag - run language detection
- If the language tag should not offer a translation - do not run language detection
- If the language tag should offer a translation - run the language detection as well
Then if language detection runs:
- langtag is empty: use language detection result
- langtag and detection agree: offer translation
- langtag and detection disagree: do not offer translation
a. If langtag or detected language are supported, still show the translations icon without pop-up When pop-up is opened, show "Choose a language" as the from-language.
I found this "bug" while trying to report Firefox stable&nightly suggesting to translate from Italian to English (my locale) at https://fing.com
When I check the page source first lines are:
<!DOCTYPE html>
<html lang="it" class="sk-device--desktop" data-lang="it">
which is clearly a bug at website and reported. However, it also means the detection does detect it as Italian as well.
Comment 7•1 year ago
|
||
Snapshot of https://fing.com ' curl https://www.fing.com >fing.html' ( current UNIX time 1709783987 )
| Assignee | ||
Updated•11 months ago
|
| Assignee | ||
Comment 11•11 months ago
|
||
| Assignee | ||
Comment 12•10 months ago
|
||
We developed the new translations codebase using an "s" at the end, and
retained the old translations code under "translation". At this point
I'm unifying it so that it's all under "translations", which involves a
rename of the existing code. This way we will be consistent in our
naming practice.
| Assignee | ||
Comment 13•10 months ago
|
||
Comment 14•10 months ago
|
||
Comment 15•10 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/6161eefa0f56
https://hg.mozilla.org/mozilla-central/rev/4cb35ecb38ab
https://hg.mozilla.org/mozilla-central/rev/751dd406e9d9
Comment 16•10 months ago
|
||
| Assignee | ||
Comment 17•10 months ago
•
|
||
The page for rasterflood_gradient doesn't include a language tag, which means that translations code will run on the page. However we disabled the translation behavior in automation to reduce false positives like this. If I had a performance profile for it I could confirm. Edit: investigating in Bug 1951367
Comment 18•10 months ago
|
||
(In reply to Pulsebot from comment #14)
Pushed by gtatum@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6161eefa0f56
Move cld2 from toolkit/component/translation to translations;
r=translations-reviewers,zeid,frontend-codestyle-reviewers,nordzilla
https://hg.mozilla.org/integration/autoland/rev/4cb35ecb38ab
Modernize the languge detector code; r=translations-reviewers,nordzilla
https://hg.mozilla.org/integration/autoland/rev/751dd406e9d9
Do not offer a translation when the lang tag and identified language
mismatch; r=translations-reviewers,nordzilla
Perfherder has detected a browsertime performance change from push 751dd406e9d909f414c8d4263352f7f90983fa1c.
Improvements:
| Ratio | Test | Platform | Options | Absolute values (old vs new) | Performance Profiles |
|---|---|---|---|---|---|
| 10% | vpl-vp9 estimatedFirstFrameLatency | macosx1470-64-shippable | cold fission webrender | 183.75 -> 164.92 | |
| 10% | vpl-vp9 firstFrame | macosx1470-64-shippable | cold fission webrender | 183.75 -> 164.92 | |
| 10% | facebook-nav.landing FirstVisualChange | linux1804-64-shippable-qr | cold fission webrender | 791.50 -> 712.37 | |
| 8% | facebook-nav.landing ContentfulSpeedIndex | linux1804-64-shippable-qr | cold fission webrender | 868.47 -> 795.62 | |
| 8% | facebook-nav.landing PerceptualSpeedIndex | linux1804-64-shippable-qr | cold fission webrender | 880.96 -> 813.24 | |
| ... | ... | ... | ... | ... | ... |
| 5% | vpl-h264 firstFrame | linux1804-64-shippable-qr | cold fission webrender | 171.73 -> 162.71 | Before/After |
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.
You can run these tests on try with ./mach try perf --alert 44129
For more information on performance sheriffing please see our FAQ.
Description
•