forked from nix-community/home-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xgettext
executable file
·37 lines (32 loc) · 1.23 KB
/
xgettext
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /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_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 \
--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}