Skip to content

Commit 28a0cb9

Browse files
author
Zibi Braniecki
committed
Do not attempt to pass likelySubtags to filterMatches. (Fixes #122)
1 parent d762685 commit 28a0cb9

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

fluent-langneg/src/negotiate_languages.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ function GetOption(options, property, type, values, fallback) {
4343
* a string with BCP47 locale ID to be used
4444
* as a last resort locale.
4545
*
46-
* likelySubtags:
47-
* a key-value map of locale keys to their most expanded variants.
48-
* For example:
49-
* 'en' -> 'en-Latn-US',
50-
* 'ru' -> 'ru-Cyrl-RU',
51-
*
5246
*
5347
* It returns an Array of strings with BCP47 locale IDs sorted according to the
5448
* user preferences.
@@ -76,8 +70,6 @@ export default function negotiateLanguages(
7670
) {
7771

7872
const defaultLocale = GetOption(options, 'defaultLocale', 'string');
79-
const likelySubtags = GetOption(
80-
options, 'likelySubtags', 'object', undefined);
8173
const strategy = GetOption(options, 'strategy', 'string',
8274
['filtering', 'matching', 'lookup'], 'filtering');
8375

@@ -94,7 +86,7 @@ export default function negotiateLanguages(
9486

9587
const supportedLocales = filterMatches(
9688
resolvedReqLoc,
97-
resolvedAvailLoc, strategy, likelySubtags
89+
resolvedAvailLoc, strategy
9890
);
9991

10092
if (strategy === 'lookup') {

0 commit comments

Comments
 (0)