Closed Bug 1357822 Opened 7 years ago Closed 7 years ago

Port bug 1356263 and bug 1313625 to C-C: Remove use of nsILocaleService/getApplicationLocale() - tweaks after removal of nsIScriptableDateFormat

Categories

(Thunderbird :: General, enhancement, P3)

52 Branch
enhancement

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 57.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

Details

Attachments

(1 file, 1 obsolete file)

From bug 1356263 comment 4:
> https://dxr.mozilla.org/comm-central/search?q=getApplicationLocale
You seem to only have one use of this in StringBundle.js. You should switch to Services.locale.getAppLocaleAsLangTag.

> https://dxr.mozilla.org/comm-central/search?q=getSystemLocale
You seem to really only have one use of this in navigator.js - you should switch it to mozIOSPreferences systemLocale attribute.

Aryx, would like to take this?
Flags: needinfo?(aryx.bugmail)
Jorg, this is becoming a bit more urgent as with the 57 window opening, I'd like to start working on bug 1356263.

It seems to me after a brief search, that Tb has no uses of the APIs left (the webspeech is also m-c, and I'll remove it in the patch in bug 1356263).

Can you confirm that it's ok for me to start working on removing nsILocaleService, nsLocaleService, nsILocale and nsLocale?
Flags: needinfo?(jorgk)
(In reply to :aceman from comment #1)
> From bug 1356263 comment 4:
> > https://dxr.mozilla.org/comm-central/search?q=getApplicationLocale
> You seem to only have one use of this in StringBundle.js. You should switch
> to Services.locale.getAppLocaleAsLangTag.

mailnews/base/util/StringBundle.js is unnecessary to use nsILocaleService.  Services.strings.createBundle has only 1 parameter.
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #2)
> Can you confirm that it's ok for me to start working on removing
> nsILocaleService, nsLocaleService, nsILocale and nsLocale?
Sure, go for it, I'm here to fix things if they break in TB.
Flags: needinfo?(jorgk)
Flags: needinfo?(aryx.bugmail)
Attached patch 1357822-nsILocaleService.patch (obsolete) — Splinter Review
Bug 1356263 is on autoland, so we need to hurry.

FRG, I'm not going to do the SM part here:
https://dxr.mozilla.org/comm-central/source/suite/browser/navigator.js#2629
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Flags: needinfo?(frgrahl)
Attachment #8893707 - Flags: review?(acelists)
> FRG, I'm not going to do the SM part here:

Thanks for the heads up. Need to take care of some other things too. Keeping the needinfo to not forget this one.
Bug 1356263 had landed and it's causing C++ bustage in nsMsgDBView.h:
  static nsDateFormatSelector  m_dateFormatDefault;
  static nsDateFormatSelector  m_dateFormatThisWeek;
  static nsDateFormatSelector  m_dateFormatToday;

I'll look into it.
Comment on attachment 8893707 [details] [diff] [review]
1357822-nsILocaleService.patch

Review of attachment 8893707 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.
Attachment #8893707 - Flags: review?(acelists) → review+
OK, all we need to do is add mozilla::

Patch coming.
Summary: Remove use of nsLocaleService, nsILocaleService, nsLocale, and nsPosixLocale from TB → Port bug 1356263 and bug 1313625 to C-C: Remove use of nsILocaleService/getApplicationLocale() - tweaks after removal of nsIScriptableDateFormat
Sorry for lumping to ports into the same bug. This compiles so far.
Attachment #8893707 - Attachment is obsolete: true
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/4b99bbec6414
Port bug 1356263: remove nsILocaleService/use of getApplicationLocale(); Port bug 1313625: add namespace to date/time format. r=aceman
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Second and third bustage of the day, times are getting tough :-(
Target Milestone: --- → Thunderbird 57.0
Sorry to hear that Jorg!

It may come as a consolation to you that this is probably the end of Locale related changes for quite a while! We have the new API ready and complete with all features and old APIs removed. :)

Thank you so much for your help with getting it working for Tb and Sm!
... and FF, you forgot: Bug 1383463, bug 1351427, bug 1355465.

One personal comment: Why doesn't anyone fix bug 1355977? That's ten lines at most and it's ugly.
Jorg: I didn't! I just meant in this bug for the removal of the old APIs. You've helped a lot during the whole process. Thank you:)

> Why doesn't anyone fix bug 1355977? That's ten lines at most and it's ugly.

Lower priority than other things I guess.
Attachment #8893955 - Flags: review+
Flags: needinfo?(frgrahl)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: