File: compile.tcl

package info (click to toggle)
coccinella 0.96.20-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 13,184 kB
  • sloc: tcl: 124,744; xml: 206; makefile: 66; sh: 62
file content (16 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# The next line restarts using wish \
exec tclsh "$0" "$@"

### Convert gettext .po source files to "compiled" Tcl msgcat .msg files  

# Put contents of the file LINGUAS into variable "linguas"
set fp [open "LINGUAS" r]
set linguas [read $fp]
close $fp

# Execute compile command for each language code
foreach lang $linguas {
	# Create ../msgs/lang.msg file with all translated strings found in ./lang.po
	exec msgfmt --tcl -l $lang -d ../msgs/ ./$lang.po
}