Skip to content

Commit c8b540e

Browse files
committed
fluent-langneg 0.12.0
1 parent ab44ba0 commit c8b540e

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
-
66

7+
## fluent-langneg 0.12.0 (January 28, 2020)
8+
9+
- Update `unic-langid` to 0.8.
10+
711
## fluent-langneg 0.11.1 (November 17, 2019)
812

913
- Improve handling of `und` in requested to match Unicode TR35.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "fluent-langneg"
33
description = """
44
A library for language and locale negotiation.
55
"""
6-
version = "0.11.1"
6+
version = "0.12.0"
77
authors = ["Zibi Braniecki <gandalf@mozilla.com>"]
88
homepage = "http://projectfluent.org/"
99
license = "Apache-2.0"
@@ -19,13 +19,13 @@ coveralls = { repository = "projectfluent/fluent-langneg-rs", branch = "master",
1919
maintenance = { status = "actively-developed" }
2020

2121
[dependencies]
22-
unic-langid = "0.7"
22+
unic-langid = "0.8"
2323

2424
[dev-dependencies]
2525
serde = { version = "1.0", features = ["derive"] }
2626
serde_json = "1.0"
27-
unic-langid = { version = "0.7", features = ["macros"] }
28-
unic-locale = { version = "0.7", features = ["macros"] }
27+
unic-langid = { version = "0.8", features = ["macros"] }
28+
unic-locale = { version = "0.8", features = ["macros"] }
2929
criterion = "0.3"
3030

3131
[[bench]]

src/negotiate/likely_subtags.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl MockLikelySubtags for LanguageIdentifier {
1919
"zh-GB" => "zh-Hant-GB",
2020
"zh-US" => "zh-Hant-US",
2121
_ => {
22-
let lang = self.get_language();
22+
let lang = self.language();
2323

2424
for subtag in REGION_MATCHING_KEYS {
2525
if lang == *subtag {
@@ -31,13 +31,13 @@ impl MockLikelySubtags for LanguageIdentifier {
3131
}
3232
};
3333
let langid: LanguageIdentifier = extended.parse().expect("Failed to parse langid.");
34-
self.set_language(langid.get_language()).unwrap();
35-
if let Some(subtag) = langid.get_script() {
34+
self.set_language(langid.language()).unwrap();
35+
if let Some(subtag) = langid.script() {
3636
self.set_script(subtag).unwrap();
3737
} else {
3838
self.clear_script();
3939
}
40-
if let Some(subtag) = langid.get_region() {
40+
if let Some(subtag) = langid.region() {
4141
self.set_region(subtag).unwrap();
4242
} else {
4343
self.clear_region();

src/negotiate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ pub fn filter_matches<'a, R: 'a + AsRef<LanguageIdentifier>, A: 'a + AsRef<Langu
181181

182182
// Per Unicode TR35, 4.4 Locale Matching, we don't add likely subtags to
183183
// requested locales, so we'll skip it from the rest of the steps.
184-
if req.get_language() == "und" {
184+
if req.language() == "und" {
185185
continue;
186186
}
187187

0 commit comments

Comments
 (0)