Closed Bug 1147526 Opened 10 years ago Closed 10 years ago

Port Bug 1147311: migrateUI() should migrate font.language.group to a supported value

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(thunderbird38+ fixed)

RESOLVED FIXED
Thunderbird 38.0
Tracking Status
thunderbird38 + fixed

People

(Reporter: aleth, Assigned: aleth)

References

Details

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached patch migratelangggroup.diff (obsolete) — Splinter Review
Comment on attachment 8583243 [details] [diff] [review] migratelangggroup.diff Review of attachment 8583243 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/modules/mailMigrator.js @@ +310,5 @@ > foStream.QueryInterface(Ci.nsISafeOutputStream).finish(); > foStream.close(); > } > > + if (currentUIVersion < 11) { Please add a comment before this line documenting what this migration does and why. As all other versions above do. You have some comment later in the code so it could be moved here and completed.
Attachment #8583243 - Flags: feedback+
Status: NEW → ASSIGNED
(In reply to :aceman from comment #2) > Please add a comment before this line documenting what this migration does > and why. As all other versions above do. You have some comment later in the > code so it could be moved here and completed. This was just a straight port of the m-c patch. I didn't request review because bug 1147311 has not been checked in yet.
Attached patch migratelangggroup.diff v2 (obsolete) — Splinter Review
Matches version that is going to land on m-c, with comment moved as recommended by aceman.
Attachment #8583243 - Attachment is obsolete: true
Attachment #8584095 - Flags: review?(acelists)
Comment on attachment 8584095 [details] [diff] [review] migratelangggroup.diff v2 Review of attachment 8584095 [details] [diff] [review]: ----------------------------------------------------------------- This works for me feature-wise. ::: mail/base/modules/mailMigrator.js @@ +310,5 @@ > foStream.QueryInterface(Ci.nsISafeOutputStream).finish(); > foStream.close(); > } > > + // Latin language groups were consolidated. Please make this more explaining, like "Several Latin language groups were consolidated into x-western". @@ +318,5 @@ > + group = Services.prefs.getComplexValue("font.language.group", > + Ci.nsIPrefLocalizedString); > + } catch (ex) {} > + if (group && > + ["tr", "x-baltic", "x-central-euro"].some(g => g == group.data)) { Would [].contains(group.data) work and be more readable?
Attachment #8584095 - Flags: review?(acelists) → feedback+
(In reply to :aceman from comment #5) > Would [].contains(group.data) work and be more readable? Sorry, [].includes().
Amended comment. > @@ +318,5 @@ > > + group = Services.prefs.getComplexValue("font.language.group", > > + Ci.nsIPrefLocalizedString); > > + } catch (ex) {} > > + if (group && > > + ["tr", "x-baltic", "x-central-euro"].some(g => g == group.data)) { > > Would [].contains(group.data) work and be more readable? Apart from the fact that I really dislike changing ported code as it makes future comparisons with m-c much harder, Array.includes is nightly-only.
Attachment #8584095 - Attachment is obsolete: true
Attachment #8584118 - Flags: review?(acelists)
Comment on attachment 8584118 [details] [diff] [review] migratelangggroup.diff v3 Review of attachment 8584118 [details] [diff] [review]: ----------------------------------------------------------------- They could have at least used .indexOf(). This .some() construct seems unnecessarily complicated.
Attachment #8584118 - Flags: review?(mkmelin+mozilla)
Attachment #8584118 - Flags: review?(acelists)
Attachment #8584118 - Flags: feedback+
Comment on attachment 8584118 [details] [diff] [review] migratelangggroup.diff v3 Review of attachment 8584118 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thx! r=mkmelin
Attachment #8584118 - Flags: review?(mkmelin+mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
Comment on attachment 8584118 [details] [diff] [review] migratelangggroup.diff v3 [Approval Request Comment] [Feature/regressing bug #]: 756022 [User impact if declined]: This prevents possible old pref values in affected locales
Attachment #8584118 - Flags: approval-comm-aurora?
Attachment #8584118 - Flags: approval-comm-aurora? → approval-comm-aurora+
Target Milestone: Thunderbird 39.0 → Thunderbird 38.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: