Skip to content

Commit 63a48af

Browse files
author
Craig Cornelius
authored
NodeJS likely subtags. Move some failures to unsupported (#454)
* NodeJS likely subtags. Move some failures to unsupported * Fix Node likely_subtags with unsupported + fix for data generator
1 parent 47427d4 commit 63a48af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

executors/node/likely_subtags.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ module.exports = {
2929
} else if (test_option === 'minimizeFavorRegion' ||
3030
test_option === 'minimize') {
3131
result_locale = intl_locale.minimize().baseName;
32+
// Unlikely subtags: lang is "und", result is same as input, and favor region
33+
if (result_locale == locale && locale.split('-')[0] == 'und' &&
34+
test_option == 'minimizeFavorRegion') {
35+
// TODO: set unsupported as function taking test option and unsupported field.
36+
return_json['error_detail'] = test_option;
37+
return_json['error_type'] = 'unsupported';
38+
return_json['unsupported'] = 'UND not supported with these options';
39+
}
3240
} else {
3341
return_json['error_detail'] = test_option;
3442
return_json['error_type'] = 'unsupported';
@@ -40,4 +48,5 @@ module.exports = {
4048
}
4149
return return_json;
4250
}
51+
4352
}

0 commit comments

Comments
 (0)