Welcome to mirror list, hosted at ThFree Co, Russian Federation.

add_new_language.sh « locale « ui - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 29c9e346e9044496813006485232ba4071b1665a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

messagetemplate=frontend.pot

[[ $1 ]] || {
	echo "Specify language code"
	exit 1
}

[ -f $messagetemplate ] && {
	mkdir -p $1/LC_MESSAGES
	msginit --no-translator --no-wrap --locale=$1 --input=frontend.pot \
	-o $1/LC_MESSAGES/frontend.po || exit 1
	echo "frontend.mo" >> $1/LC_MESSAGES/.gitignore
	git add $1
} || {
	echo "po template $messagetemplate missing"
	exit 1
}