nixos/fcitx5: fix quickphrase

This commit is contained in:
linsui 2024-12-28 15:10:34 +08:00
parent 9e09ce2d47
commit 6975dea4d3

View file

@ -117,9 +117,11 @@ in
i18n.inputMethod.fcitx5.addons = i18n.inputMethod.fcitx5.addons =
lib.optionals (cfg.quickPhrase != { }) [ lib.optionals (cfg.quickPhrase != { }) [
(pkgs.writeTextDir "share/fcitx5/data/QuickPhrase.mb" ( (pkgs.writeTextDir "share/fcitx5/data/QuickPhrase.mb" (
lib.mapAttrsToList ( lib.concatStringsSep "\n" (
name: value: "${name} ${builtins.replaceStrings [ "\\" "\n" ] [ "\\\\" "\\n" ] value}" lib.mapAttrsToList (
) cfg.quickPhrase name: value: "${name} ${builtins.replaceStrings [ "\\" "\n" ] [ "\\\\" "\\n" ] value}"
) cfg.quickPhrase
)
)) ))
] ]
++ lib.optionals (cfg.quickPhraseFiles != { }) [ ++ lib.optionals (cfg.quickPhraseFiles != { }) [