Closed
Bug 416446
Opened 17 years ago
Closed 17 years ago
Make PluralForm more useful for extensions and delay importing strings for perf
Categories
(Core :: Internationalization: Localization, defect)
Core
Internationalization: Localization
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: Mardak, Assigned: Mardak)
Details
(Keywords: dev-doc-complete, perf)
Attachments
(1 file, 1 obsolete file)
8.23 KB,
patch
|
smontagu
:
review+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
Extensions will have troubles using PluralForm because it uses the browser's plural rule, but if the extension isn't localized to the same rule, there'll be issues. So instead, we can provide a "makeGet" method that basically creates a "PluralForm" for an input plural rule. Now extensions can specify their own plural rule number.
Also, we can avoid loading the pluralRule string until we really need to on first access to help perf.
Assignee | ||
Comment 1•17 years ago
|
||
Plus testcase! :)
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #302205 -
Flags: review?(smontagu)
Attachment #302205 -
Flags: review?(l10n)
Comment 2•17 years ago
|
||
Comment on attachment 302205 [details] [diff] [review]
v1
Not going to get to review this, canceling the request.
Attachment #302205 -
Flags: review?(l10n)
Assignee | ||
Comment 3•17 years ago
|
||
Comment on attachment 302205 [details] [diff] [review]
v1
r?sdwilsh as this code was going to be in toolkit/ download stuff originally. So perhaps smontagu can give an official r+ if sdwilsh r+s.
Attachment #302205 -
Flags: review?(sdwilsh)
Comment 4•17 years ago
|
||
Comment on attachment 302205 [details] [diff] [review]
v1
r=sdwilsh, but how about makeGetter instead?
Attachment #302205 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 5•17 years ago
|
||
(In reply to comment #4)
> (From update of attachment 302205 [details] [diff] [review])
> r=sdwilsh, but how about makeGetter instead?
Sure.
r?smontagu for official review to land
Also reordered the return value to be get then numForms to be more consistent with what the consumer probably wants, so the second thing can be easily dropped off.
Attachment #302205 -
Attachment is obsolete: true
Attachment #305292 -
Flags: review?(smontagu)
Attachment #305292 -
Flags: approval1.9?
Attachment #302205 -
Flags: review?(smontagu)
Updated•17 years ago
|
Attachment #305292 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 6•17 years ago
|
||
Added section http://developer.mozilla.org/en/docs/Localization_and_Plurals#Developing_with_PluralForm
Keywords: dev-doc-complete
Comment 7•17 years ago
|
||
Comment on attachment 305292 [details] [diff] [review]
v1.1
a1.9+=damons
Attachment #305292 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 8•17 years ago
|
||
Checking in intl/locale/src/PluralForm.jsm;
/cvsroot/mozilla/intl/locale/src/PluralForm.jsm,v <-- PluralForm.jsm
new revision: 1.5; previous revision: 1.4
done
RCS file: /cvsroot/mozilla/intl/locale/tests/unit/test_pluralForm_makeGetter.js,v
done
Checking in intl/locale/tests/unit/test_pluralForm_makeGetter.js;
/cvsroot/mozilla/intl/locale/tests/unit/test_pluralForm_makeGetter.js,v <-- test_pluralForm_makeGetter.js
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
Assignee | ||
Comment 9•17 years ago
|
||
Sheppy: Should there be a link to Localization_and_Plurals from either/both of these pages?
http://developer.mozilla.org/en/docs/JavaScript_modules
http://developer.mozilla.org/en/docs/Firefox_3_for_developers#For_XUL_and_extension_developers
I added this section for this bug:
http://developer.mozilla.org/en/docs/Localization_and_Plurals#Developing_with_PluralForm
You need to log in
before you can comment on or make changes to this bug.
Description
•