keymanapp / keymanapp/keyman

bug(linux): wrong normalization in `findBestTag` method

Open
#15,476 4 comments 0 reactions 0 assignees View on GitHub
bug linux/ m:bcp47
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

It seems that [CanonicalLanguageTagUtils.findBestTag](https://github.com/keymanapp/keyman/blob/951793ea84aae5ecf49a821a9b515ca30625c0b1/linux/keyman-config/keyman_config/canonical_language_code_utils.py#L48) doesn't work quite right in some cases. This can cause keyboards to not show up because the system doesn't recognize the bcp47 tag.

`ang-Latf-GB` should result in `ang-Latf` but gets returned unchanged.

To reproduce: install the [blackletter.kmp.zip](https://github.com/user-attachments/files/24763090/blackletter.kmp.zip) keyboard.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.