-
Notifications
You must be signed in to change notification settings - Fork 473
/
output_pot_file
executable file
·43 lines (37 loc) · 1.57 KB
/
output_pot_file
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
38
39
40
41
42
43
#!/bin/bash
# Copyright (C) 2024 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
set -e
set -o pipefail
TOP_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)
# shellcheck disable=SC2046 # We want splitting for the find commands
POT_FILE_CONTENT=$(
xgettext -w 80 --sort-output --force-po -L python --from-code=utf-8 \
--keyword=_l \
--keyword=Title:1,1t \
--keyword=Help:1,1t \
--keyword=Label:1,1t \
--keyword=Message:1,1t \
-o - \
$(find -L "${TOP_DIR}/packages" -type f -name "*.py" -not -path "*/tests/*" -not -path "*/test/*") \
$(find -L "${TOP_DIR}/cmk" -type f -name "*.py")
)
cat <<Header
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
msgid ""
msgstr ""
"Project-Id-Version: Checkmk user interface translation 0.1\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2011-05-13 09:42+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Header
printf "%s\n" "${POT_FILE_CONTENT}" | sed "0,/^$/d"