Commit 608be930 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

layout selection: Fix emoji and number

parent 36d4f672
......@@ -80,7 +80,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[
("us+dvorak_wide", include_str!("../data/keyboards/us+dvorak_wide.yaml")),
// Others
("number", include_str!("../data/keyboards/number.yaml")),
("number/us", include_str!("../data/keyboards/number/us.yaml")),
// Terminal
("terminal/fr", include_str!("../data/keyboards/terminal/fr.yaml")),
......@@ -89,7 +89,7 @@ const KEYBOARDS: &[(*const str, *const str)] = &[
("terminal/us_wide", include_str!("../data/keyboards/terminal/us_wide.yaml")),
// Overlays
("emoji", include_str!("../data/keyboards/emoji.yaml")),
("emoji/us", include_str!("../data/keyboards/emoji/us.yaml")),
];
pub fn get_keyboard(needle: &str) -> Option<&'static str> {
......@@ -108,6 +108,7 @@ pub fn get_keyboard(needle: &str) -> Option<&'static str> {
const OVERLAY_NAMES: &[*const str] = &[
"emoji",
"terminal",
];
pub fn get_overlays() -> Vec<&'static str> {
......@@ -171,7 +172,7 @@ mod test {
#[test]
fn check_overlays_present() {
for name in get_overlays() {
assert!(get_keyboard(name).is_some());
assert!(get_keyboard(&format!("{}/us", name)).is_some());
}
}
......
......@@ -91,11 +91,11 @@ foreach layout : [
'terminal/us_wide',
# Block: Not languages.
'emoji',
'number',
'emoji/us',
'number/us',
]
extra = []
if layout == 'emoji'
if layout.startswith('emoji/')
extra += ['allow_missing_return']
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment