File: update-locale.sh

package info (click to toggle)
gnome-shell-extension-tiling-assistant 53-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,552 kB
  • sloc: javascript: 7,577; xml: 266; sh: 93; makefile: 41
file content (22 lines) | stat: -rwxr-xr-x 563 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh

set -ex

mainpot=translations/main.pot
pot=${EXTENSION_UUID}.pot

cp $mainpot ${EXTENSION_UUID}/$pot

for i in translations/*; do
	locale_lang=$(echo $i | sed s/'^translations'/'locale'/ | cut -d'.' -f1)
	if [ "$locale_lang" != "locale/main" ]; then
		mkdir -p ${EXTENSION_UUID}/$locale_lang/LC_MESSAGES
		cp -f $i ${EXTENSION_UUID}/$locale_lang/LC_MESSAGES/${EXTENSION_UUID}.po
		cd ${EXTENSION_UUID}
		po=$locale_lang/LC_MESSAGES/${EXTENSION_UUID}.po
		echo $po
		msgmerge --backup=off -U $po $pot
		msgfmt $po -o ${po%po}mo
		cd ..
	fi
done