Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linux): allow installation of arbitrary language tag for package #8598

Closed
mcdurdin opened this issue Apr 17, 2023 · 0 comments · Fixed by #9756
Closed

feat(linux): allow installation of arbitrary language tag for package #8598

mcdurdin opened this issue Apr 17, 2023 · 0 comments · Fixed by #9756
Assignees
Milestone

Comments

@mcdurdin
Copy link
Member

mcdurdin commented Apr 17, 2023

Keyman for Windows allows the user to specify an arbitrary language tag for a package (in Keyman Configuration post-installation, or via API), but Keyman for Linux will fallback to the default language for the keyboard if it cannot find a matching canonical language tag.

It appears from the command line that you can do, for example:

km-package-install -p sil_ethiopic -l mul

But that doesn't work -- it just installs under am (Amharic). Also, I don't think it is sufficient to return the original language id if no matching better canonical tag is found in:

def _normalize_language(self, supportedLanguages, language):
if len(supportedLanguages) <= 0:
return ''
if not language:
return language
language = CanonicalLanguageCodeUtils.findBestTag(language, False, True)
for supportedLanguage in supportedLanguages:
id = CanonicalLanguageCodeUtils.findBestTag(supportedLanguage['id'], False, True)
if id == language:
return id
return None

Because the ibus registration still only happens for the languages defined in the package. So we'd also need to be registering the 'new' language tag with ibus.

Fixing this may help with #7548

@ermshiperete ermshiperete added this to the 17.0 milestone Apr 17, 2023
@ermshiperete ermshiperete modified the milestones: 17.0, A17S14 May 26, 2023
@mcdurdin mcdurdin modified the milestones: A17S14, A17S15 Jun 10, 2023
@mcdurdin mcdurdin modified the milestones: A17S15, A17S16 Jun 26, 2023
@mcdurdin mcdurdin modified the milestones: A17S16, A17S17 Jul 10, 2023
@mcdurdin mcdurdin modified the milestones: A17S17, A17S18 Jul 24, 2023
@mcdurdin mcdurdin modified the milestones: A17S18, A17S19 Aug 6, 2023
@darcywong00 darcywong00 modified the milestones: A17S19, A17S22 Aug 7, 2023
@mcdurdin mcdurdin modified the milestones: A17S22, A17S23 Oct 1, 2023
ermshiperete added a commit that referenced this issue Oct 13, 2023
- during installation add to the list of custom keyboards if necessary
- during uninstallation remove from the list of custom keyboards
- if list of custom keyboards has invalid values, remove those before
  saving the list

Closes #8598.
ermshiperete added a commit that referenced this issue Oct 13, 2023
- during installation add to the list of custom keyboards if necessary
- during uninstallation remove from the list of custom keyboards
- if list of custom keyboards has invalid values, remove those before
  saving the list

Closes #8598.
ermshiperete added a commit that referenced this issue Oct 13, 2023
- during installation add to the list of custom keyboards if necessary
- during uninstallation remove from the list of custom keyboards
- if list of custom keyboards has invalid values, remove those before
  saving the list

Closes #8598.
@mcdurdin mcdurdin modified the milestones: A17S23, A17S24 Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants