translate-shell: add module (#3659)

This commit is contained in:
Mario Rodas 2023-05-11 04:21:18 -05:00 committed by GitHub
parent b365342adb
commit fa720861b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1 @@
{ translate-shell = ./translate-shell.nix; }

View file

@ -0,0 +1,27 @@
{ ... }:
{
programs.translate-shell = {
enable = true;
settings = {
verbose = true;
engine = "bing";
play = true;
hl = "en";
tl = [ "de" "fr" ];
};
};
test.stubs.translate-shell = { };
nmt.script = ''
assertFileContent home-files/.config/translate-shell/init.trans \
${builtins.toFile "translate-shell-expected-settings.trans" ''
{:engine "bing"
:hl "en"
:play true
:tl [ "de" "fr" ]
:verbose true
}''}
'';
}