1*946379e7Schristos#!/bin/sh 2*946379e7Schristos 3*946379e7Schristos# Test Java support: --add-comments option. 4*946379e7Schristos 5*946379e7Schristostmpfiles="" 6*946379e7Schristostrap 'rm -fr $tmpfiles' 1 2 3 15 7*946379e7Schristos 8*946379e7Schristostmpfiles="$tmpfiles xg-j-5.java" 9*946379e7Schristoscat <<EOF > xg-j-5.java 10*946379e7Schristos// This comment will not be extracted. 11*946379e7SchristosSystem.out.println(gettext("help")); 12*946379e7Schristos// TRANSLATORS: This is an extracted comment. 13*946379e7SchristosSystem.out.println(gettext("me")); 14*946379e7Schristos/* Not extracted either. */ 15*946379e7SchristosSystem.out.println(gettext("Hey Jude")); 16*946379e7Schristos/* TRANSLATORS: 17*946379e7Schristos Nickname of the Beatles 18*946379e7Schristos*/ 19*946379e7SchristosSystem.out.println(gettext("The Fabulous Four")); 20*946379e7Schristos/* TRANSLATORS: The strings get concatenated. */ 21*946379e7SchristosSystem.out.println(gettext("there is not enough" + 22*946379e7Schristos" room on a single line for this entire long, " // confusing, eh? 23*946379e7Schristos+ "verbose string")); 24*946379e7SchristosEOF 25*946379e7Schristos 26*946379e7Schristostmpfiles="$tmpfiles xg-j-5.po" 27*946379e7Schristos: ${XGETTEXT=xgettext} 28*946379e7Schristos${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \ 29*946379e7Schristos -d xg-j-5 xg-j-5.java 30*946379e7Schristostest $? = 0 || { rm -fr $tmpfiles; exit 1; } 31*946379e7Schristos 32*946379e7Schristostmpfiles="$tmpfiles xg-j-5.ok" 33*946379e7Schristoscat <<EOF > xg-j-5.ok 34*946379e7Schristosmsgid "help" 35*946379e7Schristosmsgstr "" 36*946379e7Schristos 37*946379e7Schristos#. TRANSLATORS: This is an extracted comment. 38*946379e7Schristosmsgid "me" 39*946379e7Schristosmsgstr "" 40*946379e7Schristos 41*946379e7Schristosmsgid "Hey Jude" 42*946379e7Schristosmsgstr "" 43*946379e7Schristos 44*946379e7Schristos#. TRANSLATORS: 45*946379e7Schristos#. Nickname of the Beatles 46*946379e7Schristos#. 47*946379e7Schristosmsgid "The Fabulous Four" 48*946379e7Schristosmsgstr "" 49*946379e7Schristos 50*946379e7Schristos#. TRANSLATORS: The strings get concatenated. 51*946379e7Schristosmsgid "" 52*946379e7Schristos"there is not enough room on a single line for this entire long, verbose " 53*946379e7Schristos"string" 54*946379e7Schristosmsgstr "" 55*946379e7SchristosEOF 56*946379e7Schristos 57*946379e7Schristos: ${DIFF=diff} 58*946379e7Schristos${DIFF} xg-j-5.ok xg-j-5.po 59*946379e7Schristosresult=$? 60*946379e7Schristos 61*946379e7Schristosrm -fr $tmpfiles 62*946379e7Schristos 63*946379e7Schristosexit $result 64