2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test iterative mode of msgfmt --desktop.
6 cat <<\EOF > mf.desktop
10 Comment[foo]=Already translated comment
11 Comment= \sThis is a \nmultiline comment; for testing
12 Keywords=Keyword1;Keyword2;Key\;word3;
16 # SOME DESCRIPTIVE TITLE.
17 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
18 # This file is distributed under the same license as the PACKAGE package.
19 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
24 "Project-Id-Version: PACKAGE VERSION\n"
25 "Report-Msgid-Bugs-To: \n"
26 "POT-Creation-Date: 2014-03-17 07:36+0900\n"
27 "PO-Revision-Date: 2014-03-17 08:40+0900\n"
28 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
29 "Language-Team: LANGUAGE <LL@li.org>\n"
32 "Content-Type: text/plain; charset=UTF-8\n"
33 "Content-Transfer-Encoding: 8bit\n"
44 "multiline comment; for testing"
50 msgid "Keyword1;Keyword2;Key\\;word3;"
51 msgstr "one;two;thr\\;ee;"
54 cat <<\EOF > mf.desktop.ok
59 Comment[foo]=Already translated comment
60 Comment[fr]=French \ncomment
61 Comment=\sThis is a \nmultiline comment; for testing
62 Keywords[fr]=one;two;thr\;ee;
63 Keywords=Keyword1;Keyword2;Key\;word3;
66 # Sanity checks for contradicting options.
68 ${MSGFMT} --desktop --template=mf.desktop -l fr fr.po \
69 >/dev/null 2>/dev/null \
72 ${MSGFMG} --desktop --template=mf.desktop fr.po -o mf.desktop.out \
73 >/dev/null 2>/dev/null \
76 # Proceed to the .desktop file generation.
78 ${MSGFMT} --desktop --template=mf.desktop -l fr fr.po -o mf.desktop.out \
82 ${DIFF} mf.desktop.ok mf.desktop.out