Fallback to base layout for the selected language if variant cannot be found
Most languages have several keyboard layout variants, but so far squeekboard only ships the base variant. For example, when trying to use the "French (alt.)" variant, here's the output from squeekboard:
avril 28 19:53:57 pinephone sm.puri.OSK0.desktop[2006]: Debug: Tried file "/home/debian/.local/share/squeekboard/keyboards/fr+oss.yaml", but it's missing: Aucun fichier ou dossier de ce type (os error 2)
avril 28 19:53:57 pinephone sm.puri.OSK0.desktop[2006]: Warning: Failed to load layout from Resource: fr+oss: Missing resource, skipping
avril 28 19:53:57 pinephone sm.puri.OSK0.desktop[2006]: Debug: Tried file "/home/debian/.local/share/squeekboard/keyboards/us.yaml", but it's missing: Aucun fichier ou dossier de ce type (os error 2)
avril 28 19:53:57 pinephone sm.puri.OSK0.desktop[2006]: Info: Loaded layout Resource: us
As the fr+oss
layout can't be found, squeekboard falls back to the us
layout, even though the fr
layout if present. In that case, it should try loading the base layout for the selected language (by discarding every character starting with the + sign), and load the fr
layout.
(I'd have gladly solved this issue, but Rust remains mysterious to me)