Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Locale.fromSubtags and support for scriptCode. #6518

Merged
merged 27 commits into from
Oct 29, 2018
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e042526
Add Locale.fromComponents.
hugovdm Oct 12, 2018
4013600
Change toString from underscores to dashes. Expand the unit tests.
hugovdm Oct 12, 2018
813998d
Rename 'fromComponents' to 'create'. Change variants from String to L…
hugovdm Oct 15, 2018
fe5e110
Use default for language parameter. Use hashCode/hashList.
hugovdm Oct 15, 2018
fb72be0
Have toString() stick with old (underscore) behaviour.
hugovdm Oct 15, 2018
c6a8b96
Demonstrate empty-list bug in assert code.
hugovdm Oct 15, 2018
af40b72
Fix empty-list assert bug.
hugovdm Oct 15, 2018
488cf31
Add ignores for lint issues. Unsure about 71340 though.
hugovdm Oct 15, 2018
829af35
Fix operator== via _listEquals.
hugovdm Oct 16, 2018
c749663
Remove length-checking asserts: we're anyway not checking characters …
hugovdm Oct 16, 2018
04c52e9
Documentation update.
hugovdm Oct 16, 2018
58bfdc6
Change reasoning for ignore:prefer_initializing_formals.
hugovdm Oct 16, 2018
bc4cc07
Try 'fromSubtags' as new constructor name.
hugovdm Oct 17, 2018
a8b2797
Documentation improvements based on Pull Request review.
hugovdm Oct 17, 2018
d6f06f5
Assert-fail for invalid-length subtags and drop bad subtags in produc…
hugovdm Oct 18, 2018
8948502
Revert "Assert-fail for invalid-length subtags and drop bad subtags i…
hugovdm Oct 19, 2018
20e8bd7
Re-fix Locale.toString() for variants=[].
hugovdm Oct 19, 2018
9911dfd
Tear out variants, in case we want to have one fewer pointer in the f…
hugovdm Oct 19, 2018
cb81b55
Make named parameters' names consistent with member names.
hugovdm Oct 19, 2018
5e0def8
Also remove _listEquals: no longer in use.
hugovdm Oct 22, 2018
9f6e3e0
Merge branch 'master' into fromComponents
hugovdm Oct 23, 2018
97ab4fe
Lint fix.
hugovdm Oct 23, 2018
5f625ae
Fix code review nits.
hugovdm Oct 24, 2018
3b87068
Lint fix for assert, and a couple more not-zero-length-string asserts.
hugovdm Oct 24, 2018
df46762
Code Review: two of three nits addressed...
hugovdm Oct 26, 2018
57b068e
Review fix: change 'should' to 'must' for subtag prescriptions.
hugovdm Oct 26, 2018
6f07e8d
Assert-check that countryCode is never ''.
hugovdm Oct 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class Locale {
String region,
List<String> variants,
}) : _languageCode = language,
scriptCode = script, // ignore: prefer_initializing_formals, https://github.com/dart-lang/sdk/issues/34797
scriptCode = script, // ignore: prefer_initializing_formals, parameter name and member name are different.
hugovdm marked this conversation as resolved.
Show resolved Hide resolved
_countryCode = region,
_variants = variants;

Expand Down