Skip to content

Commit

Permalink
fix(backend/steps/dnfdownloadapps): auto install fcitx5-chinese-addons
Browse files Browse the repository at this point in the history
fcitx5-table-extra requires fcitx5-chinese-addons, but the requires is
missing from Fedora's package, so we manually pull it here.
  • Loading branch information
madonuko committed Jan 17, 2025
1 parent b0fa32b commit 5514266
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/backend/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ macro_rules! im {
}

// lang → `InputMethod`
// TODO: add fcitx5-chinese-addons manually if fcitx5-table-extra (thanks Fedora definitely not a
// packaging issue)
// TODO: enable fcitx5 automatically?
// NOTE: some characters may not be displayed properly on your device, please make sure you have
// the corresponding fonts installed.
pub const IMS: phf::Map<&'static str, phf::Map<&'static str, InputMethod>> = phf::phf_map! {
Expand Down
7 changes: 7 additions & 0 deletions src/backend/steps/_05_dnfdownloadapps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ impl super::Step for DnfDownloadApps {
.map(|im| im.get_pkg().to_owned())
.unique(),
);
// Fedora didn't package `fcitx5-table-extra` properly, it's missing the
// `fcitx5-chinese-addons` dependency, so we manually add it here.
if settings.actions[1].contains(&"fcitx5-table-extra".to_owned())
&& !settings.actions[1].contains(&"fcitx5-chinese-addons".to_owned())
{
settings.actions[1].push("fcitx5-chinese-addons".to_owned());
}

Ok(())
}
Expand Down

0 comments on commit 5514266

Please sign in to comment.