2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test of gettext facilities in the RST format.
7 # From the rstconv program itself.
8 rstconv.help='rstconv [-h|--help] Displays this help'#10+
9 'rstconv options Convert rst file'#10#10+
11 ' -i file Use specified file instead of stdin as input .rst (OPTIONAL)'#10+
12 ' -o file Write output to specified file (REQUIRED)'#10+
13 ' -f format Specifies the output format:'#10+
14 ' po GNU gettext .po (portable) format (DEFAULT)'#10
16 rstconv.InvalidOption='Invalid option - '
17 rstconv.OptionAlreadySpecified='Option has already been specified - '
18 rstconv.NoOutFilename='No output filename specified'
19 rstconv.InvalidOutputFormat='Invalid output format -'
22 : ${XGETTEXT=xgettext}
23 ${XGETTEXT} -o prog.tmp --omit-header --add-location prog.rst || exit 1
24 LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1
29 "rstconv [-h|--help] Displays this help\n"
30 "rstconv options Convert rst file\n"
33 " -i file Use specified file instead of stdin as input .rst (OPTIONAL)\n"
34 " -o file Write output to specified file (REQUIRED)\n"
35 " -f format Specifies the output format:\n"
36 " po GNU gettext .po (portable) format (DEFAULT)\n"
39 #: rstconv.InvalidOption
40 msgid "Invalid option - "
43 #: rstconv.OptionAlreadySpecified
44 msgid "Option has already been specified - "
47 #: rstconv.NoOutFilename
48 msgid "No output filename specified"
51 #: rstconv.InvalidOutputFormat
52 msgid "Invalid output format -"
57 ${DIFF} prog.ok prog.pot || exit 1
59 # The output of rstconv is slightly different:
60 # - ModuleName:ConstName instead of ModuleName.ConstName
61 # - no line wrapping in fpc versions < 2.6.0
62 # - extra newline at the end
65 if (${RSTCONV} -o prog.pot -i prog.rst) >/dev/null 2>&1; then
69 msgid "rstconv [-h|--help] Displays this help\nrstconv options Convert rst file\n\nOptions are:\n -i file Use specified file instead of stdin as input .rst (OPTIONAL)\n -o file Write output to specified file (REQUIRED)\n -f format Specifies the output format:\n po GNU gettext .po (portable) format (DEFAULT)\n"
72 #: rstconv:InvalidOption
73 msgid "Invalid option - "
76 #: rstconv:OptionAlreadySpecified
77 msgid "Option has already been specified - "
80 #: rstconv:NoOutFilename
81 msgid "No output filename specified"
84 #: rstconv:InvalidOutputFormat
85 msgid "Invalid output format -"
93 "rstconv [-h|--help] Displays this help\n"
94 "rstconv options Convert rst file\n"
97 " -i file Use specified file instead of stdin as input .rst (OPTIONAL)\n"
98 " -o file Write output to specified file (REQUIRED)\n"
99 " -f format Specifies the output format:\n"
100 " po GNU gettext .po (portable) format (DEFAULT)\n"
103 #: rstconv:InvalidOption
104 msgid "Invalid option - "
107 #: rstconv:OptionAlreadySpecified
108 msgid "Option has already been specified - "
111 #: rstconv:NoOutFilename
112 msgid "No output filename specified"
115 #: rstconv:InvalidOutputFormat
116 msgid "Invalid output format -"
122 ${DIFF} prog.ok1 prog.pot >/dev/null || ${DIFF} prog.ok2 prog.pot || exit 1