File: update-po.sh

package info (click to toggle)
tuxmath 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 19,340 kB
  • ctags: 1,707
  • sloc: ansic: 18,792; sh: 4,416; makefile: 783; xml: 51; sed: 16
file content (12 lines) | stat: -rwxr-xr-x 579 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# Create a 'source' file holding all the strings from the menus.
# That file (menu_strings) is listed in po/POTFILES.in so the strings will go into
# tuxmath.pot and subsequently into the individual po files for translation.
# NOTE this script needs to be kept in the same dir as the menu files

rm -f ./menu_strings
sed -n 's/^.*title=\("[^"]*"\).*$/_(\1)/p' main_menu.xml | sort | uniq > title_strings
sed -n 's/^.*desc=\("[^"]*"\).*$/_(\1)/p' main_menu.xml | sort | uniq > desc_strings
cat title_strings desc_strings > menu_strings
rm -f title_strings desc_strings