Closed Bug 977770 Opened 10 years ago Closed 10 years ago

Count the times users manually adjust the offered translation pair


(Firefox :: Translations, defect)

Not set



Firefox 33
Tracking Status
firefox32 --- verified
firefox33 --- verified


(Reporter: MarcoM, Assigned: asaf)



(Whiteboard: [translation])


(1 file, 1 obsolete file)

Breaking down Story into multiple smaller, easier-to-estimate bugs.  These individual bugs are dependencies which block the completion of the whole story.  The team provides point estimates to each of the individual bugs instead of the entire story.
Whiteboard: p=0 [qa-] → [translation] p=0 [qa-]
Summary: Story Breakdown - Count the times users manually adjust the offered translation pair → Count the times users manually adjust the offered translation pair
Assignee: nobody → smacleod
Whiteboard: [translation] p=0 [qa-] → [translation] p=1 s=it-30c-29a-28b.3 [qa-]
Whiteboard: [translation] p=1 s=it-30c-29a-28b.3 [qa-] → [translation] p=1 s=it-31c-30a-29b.1 [qa-]
Whiteboard: [translation] p=1 s=it-31c-30a-29b.1 [qa-] → [translation] p=1 s=it-31c-30a-29b.2 [qa-]
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Whiteboard: [translation] p=1 s=it-31c-30a-29b.2 [qa-] → [translation] p=1 s=it-31c-30a-29b.3 [qa-]
Whiteboard: [translation] p=1 s=it-31c-30a-29b.3 [qa-] → [translation] p=1 s=it-32c-31a-30b.1 [qa-]
Mass move of translation bugs to the new Translation component.
Component: Firefox Operations → Translation
Product: Tracking → Firefox
Version: --- → unspecified
Whiteboard: [translation] p=1 s=it-32c-31a-30b.1 [qa-] → [translation] p=1 s=it-32c-31a-30b.2 [qa-]
Whiteboard: [translation] p=1 s=it-32c-31a-30b.2 [qa-] → [translation] p=1 s=it-32c-31a-30b.3 [qa-]
Depends on: 978158
No longer depends on: 978158
Bug 978158 introduces a "recordLanguageChange()" method which can be called to record the data for this.
Marco, can you please update the backlog and assign this bug to Mano? Steven is out for some training in Toronto this week. Thanks!
Assignee: smacleod → mano
Hardware: x86_64 → All
(In reply to Tim Taubert [:ttaubert] from comment #3)
> Marco, can you please update the backlog and assign this bug to Mano? Steven
> is out for some training in Toronto this week. Thanks!
Flags: needinfo?(mmucci)
Iteration 32.3 Backlog updated with Mano assigned to Bug 977770.
Flags: needinfo?(mmucci)
Depends on: 978158
Hi Tim, based on today's update meeting you will confirm if this bug should be removed from the current iteration based on the progress made on the dependent Bug 978158.
Flags: needinfo?(ttaubert)
I'll land bug 978158 later today.
Flags: needinfo?(ttaubert)
From bug 973294 comment #3:

> 1. How many times the user changed the language pair before selecting
> "Translate" for the first time 
> 2. How frequently users must try a different pair other than the one
> initially suggested by Firefox after they have accepted Firefox's initial
> offer of translation without making changes to the suggested pair.

To differentiate between those two cases we can pass a boolean flag to .recordLanguageChange().
Whiteboard: [translation] p=1 s=it-32c-31a-30b.3 [qa-] → [translation] p=1 s=33.1 [qa-]
1. Per both its documentation and its internals, recordLanguageChange should only be called for recording a change to the source language. There's no equivalent method for recording a change to the target language. Indeed, a change to the target language reflects a completely different issue (which is not nearly as important or problematic). So I suggest either morphing this bug to cover just the source-language case, or to introduce another method for recording target language changes (either way, recordLanaguageChange should be renamed).

2. Rather than writing a whole new test, I'm going to patch Tim's test from bug 973292 once it lands.
Mano, did you mean to request review on this patch?
Flags: needinfo?(mano)
Iteration: --- → 33.2
Points: --- → 1
QA Whiteboard: [qa-]
Whiteboard: [translation] p=1 s=33.1 [qa-] → [translation]
Attached patch patchSplinter Review
Attachment #8437475 - Attachment is obsolete: true
Attachment #8445071 - Flags: review?(felipc)
Flags: needinfo?(mano)
Comment on attachment 8445071 [details] [diff] [review]

Review of attachment 8445071 [details] [diff] [review]:

only nits

::: browser/components/translation/Translation.jsm
@@ +127,5 @@
> +    if (this.state == Translation.STATE_OFFER) {
> +      if (this.detectedLanguage != aFrom)
> +        TranslationHealthReport.recordDetectedLanguageChange(true);
> +    }
> +    else {

else in the same line as closing brace, like } else {

@@ +329,5 @@
> +  },
> +
> +  /**
> +   * Record a change of the target language in the health report. This should
> +   * only be called when actually executing a translation not every time the

"executing a translation, not every time the user changes the language in the UI" (missing the comma and there was an extra in)

::: browser/components/translation/test/browser_translation_fhr.js
@@ +35,5 @@
>        deniedOffers: day.get("deniedTranslationOffer") || 0,
> +      showOriginal: day.get("showOriginalContent") || 0,
> +      detectedLanguageChangedBefore: day.get("detectedLanguageChangedBefore") || 0,
> +      detectedLanguageChangeAfter: day.get("detectedLanguageChangedAfter") || 0,
> +      targetdLanguageChange: day.get("targetLanguageChanged") || 0

misspelled variable: targetdLanguageChange

@@ +136,5 @@
> +    simulateUserSelectInMenulist(fromLangMenulist, "de");
> +
> +    // Selecting the same item shouldn't count.
> +    simulateUserSelectInMenulist(fromLangMenulist, "de");
> +    


@@ +154,5 @@
> +  }
> +  yield MetricsChecker.checkAdditions({
> +    detectedLanguageChangedBefore: 4,
> +    detectedLanguageChangeAfter: 8,
> +    targetdLanguageChange: 12

Attachment #8445071 - Flags: review?(felipc) → review+
Whiteboard: [translation] → [translation][qa-]
QA has verified the previous FHR bugs we had, so unless there's a specific reason that makes this one hard to verify, I think it's a qa+.
Whiteboard: [translation][qa-] → [translation][qa+]
QA Whiteboard: [qa-] → [qa+]
Whiteboard: [translation][qa+] → [translation]
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Hi Florin, can a contact be assigned to this bug for QA verification.
Flags: needinfo?(florin.mezei)
Comment on attachment 8445071 [details] [diff] [review]

[Approval Request Comment]
Bug caused by (feature/regressing bug #): This bug is part of the automatic translation feature, which we want to A/B with a subset of Aurora 32 users.
User impact if declined: Data about users correcting the detected language won't be collected
Testing completed (on m-c, etc.): landed on m-c
Risk to taking this patch (and alternatives if risky): small
String or IDL/UUID changes made by this patch: none
Attachment #8445071 - Flags: approval-mozilla-aurora?
Flags: needinfo?(florin.mezei)
QA Contact: bogdan.maris
Attachment #8445071 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Tested on Windows 7 64bit, Windows 8.1 64bit Surface Pro 2, Mac OS X 10.9.3 and Ubuntu 14.04 32bit using latest Nightly and latest Aurora. Verified that the count for "detectedLanguageChangedAfter", "detectedLanguageChangedBefore" and "targetLanguageChanged" is working correctly.
QA Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.