mirror of
https://github.com/nix-community/home-manager
synced 2024-12-12 12:59:49 +01:00
e84811035d
The shell function `verboseEcho` can be used in its stead.
39 lines
1.4 KiB
Text
Executable file
39 lines
1.4 KiB
Text
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -I https://github.com/NixOS/nixpkgs/archive/05f0934825c2a0750d4888c4735f9420c906b388.tar.gz -i bash -p gettext
|
|
|
|
set -euo pipefail
|
|
shopt -s globstar
|
|
|
|
function run() {
|
|
packageName="$1"
|
|
output="$2"
|
|
domain="$3"
|
|
shift 3
|
|
|
|
xgettext -v --package-name="$packageName" \
|
|
--copyright-holder='Home Manager contributors' \
|
|
--msgid-bugs-address=https://github.com/nix-community/home-manager/issues \
|
|
-L Shell -k \
|
|
-k_i:1 --flag=_i:1:c-format \
|
|
-k_iError:1 --flag=_i:1:c-format \
|
|
-k_iWarn:1 --flag=_i:1:c-format \
|
|
-k_iNote:1 --flag=_i:1:c-format \
|
|
-k_iVerbose:1 --flag=_i:1:c-format \
|
|
-k_ip:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipError:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipWarn:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipNote:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
-k_ipVerbose:1,2 --flag=_ip:1:c-format --flag=_ip:2:c-format \
|
|
--add-comments=translators: \
|
|
-o "$output" -d "$domain" "$@"
|
|
}
|
|
|
|
run 'Home Manager' \
|
|
home-manager/po/home-manager.pot \
|
|
home-manager \
|
|
home-manager/home-manager home-manager/**/*.nix
|
|
|
|
run 'Home Manager Modules' \
|
|
modules/po/hm-modules.pot \
|
|
hm-modules \
|
|
modules/**/*.{nix,sh}
|