Skip to content

Commit ccbff3d

Browse files
authored
Rust likely_subtags: categorize"minimizeFavorRegion" as "unsupported" (#114)
* Rust number format: mark scientific as unsupported * Reformat numberfmt.rs * ICU4X: move 'minimizeFavorRegion' requests to 'unsupported' * Format rust source
1 parent 2f9c0ab commit ccbff3d

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

executors/rust/src/likelysubtags.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ pub fn run_likelysubtags_test(json_obj: &Value) -> Result<Value, String> {
2323

2424
let mut locale = Locale::from_str(locale_str).unwrap();
2525

26+
if test_option == &"minimizeFavorRegion" {
27+
// This option is not yet supported.
28+
return Ok(json!({
29+
"label": label,
30+
"error_detail": {"option": test_option},
31+
"unsupported": "minimizeFavorRegion",
32+
"error_type": "unsupported",
33+
}));
34+
}
35+
2636
if test_option == &"minimize" {
2737
lc.minimize(&mut locale);
2838
} else if test_option == &"maximize" {

schema/check_schemas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def main(args):
9090
"error_info": str(err)
9191
})
9292
if not result:
93-
schema_errors.append([schema_file_path, result, err, file_path])
94-
logging.error('Bad Schema at %s', schema_file_path)
93+
schema_errors.append([schema_file, result, err, file_path])
94+
logging.error('Bad Schema at %s', schema_file)
9595
schema_count += 1
9696

9797
ok = val_schema.save_schema_validation_summary(validation_status)

schema/likely_subtags/result_schema.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,27 @@
112112
"error_message": {
113113
"description": "What went wrong",
114114
"type": "string"
115+
},
116+
"error_detail": {
117+
"description": "more information on the failure",
118+
"type": "object",
119+
"properties": {
120+
"option": {
121+
"description": "Parameters causing the failure",
122+
"type": "string",
123+
"enum": ["minimizeFavorRegion"]
124+
}
125+
}
126+
},
127+
"error_type": {
128+
"description": "",
129+
"type": "string",
130+
"enum": ["unsupported"]
115131
}
116132
},
117133
"required": [
118134
"label"
119-
]
135+
]
120136
}
121137
}
122138
}

0 commit comments

Comments
 (0)