Run language detection before offering a translation (dxomark.com website detected as being French)
Categories
(Firefox :: Translations, defect, P3)
Tracking
()
People
(Reporter: aros, Assigned: gregtatum)
References
(Blocks 2 open bugs)
Details
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•1 year ago
|
||
I've forgotten to specify the exact URL, it's https://www.dxomark.com/smartphones/#sort-camera
![]() |
||
Updated•1 year ago
|
Comment 2•1 year 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•1 year ago
|
Assignee | ||
Comment 3•1 year 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•1 year ago
|
Assignee | ||
Comment 5•1 year 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•19 days ago
|
Assignee | ||
Comment 11•19 days ago
|
||
Assignee | ||
Comment 12•15 hours 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•15 hours ago
|
||
Description
•