GtkTable -> GtkGrid
[pspp] / src / ui / gui / gen-dot-desktop.sh
1 #!/bin/sh
2
3 TRANSLATE ()
4 {
5     echo "$1";
6 }
7
8 extract_string ()
9 {
10   msggrep -K -F -e "$2" $top_builddir/$1 2> /dev/null | msgattrib --translated --no-fuzzy | awk -F \" '/^msgstr "/{print $2}' | grep -v '^$' 
11 }
12
13
14 GenericName=`TRANSLATE "Statistical Software"`
15 Comment=`TRANSLATE "Analyze statistical data with a free alternative to SPSS"`
16
17
18 printf "# Generated from $0        -*- buffer-read-only: t -*-\n\n"
19
20 printf '[Desktop Entry]\n';
21 printf 'Name=GNU PSPP\n';
22 printf "GenericName=$GenericName\n"
23
24 for pfile in $POFILES; do 
25     lang=${pfile%%.po}
26     lang=${lang##po/}
27     xlate=`extract_string $pfile "$GenericName"`
28     if test -z "$xlate"; then continue; fi
29     printf "GenericName[$lang]=$xlate\n";
30 done
31
32
33 printf "Comment=$Comment\n"
34
35 for pfile in $POFILES; do 
36     lang=${pfile%%.po}
37     lang=${lang##po/}
38     xlate=`extract_string $pfile "$Comment"`
39     if test -z "$xlate"; then continue; fi
40     printf "Comment[$lang]= $xlate\n";
41 done
42
43 printf 'Exec=psppire %%F\n'
44 printf 'Icon=pspp%s\n'
45 printf 'Terminal=false%s\n'
46 printf 'Type=Application%s\n'
47 printf 'Categories=GTK;Education;Science;Math;%s\n'
48 printf 'MimeType=application/x-spss-sav;application/x-spss-por;%s\n'
49 printf 'StartupNotify=false%s\n'
50