I see.  So 1714 is an incorrect use of maketext.  What maketext does (more
or less) is take in string literals and puts them all in a big file (all of
the .po files in Localize for example).  Then someone comes along and
manually translates all of the strings in that file.  Then whenever that
language is selected maketext returns the translated string.  The upshot of
all of this is that maketext is not compatible with standard latex variable
interpolation.  It has its own way of doing that.  Something like:

print "Foobar $thing stuff\n";

would have to be

print $r->maketext("Foobar [_1] stuff\n", $thing);

Here $thing would be some programmatic variable.  It would not be another
literal string if you wanted that literal string to be translated.  It
*could* be another string that was constructed using maketext but that has
its own problems because it makes the translation table have a bunch of
sentence fragments and that can be hard for localization volunteers to work
with.  I may not be explaining it super well so check out
http://perldoc.perl.org/Locale/Maketext.html#HOW-TO-USE-MAKETEXT if this
isn't making sense.

Geoff.


On Sat, May 3, 2014 at 10:57 PM, cmhughes <notifications@github.com> wrote:

> In lib/WeBWorK/ContentGenerator/Problem.pm:
>
> > @@ -1463,7 +1666,39 @@ sub output_summary{
> >  			# don't show correct answers
> >  			# don't show attempt results (correctness)
> >  			# show attempt previews
> > -	}
> > +    } elsif ($showMeAnother and $showMeAnotherIsPossible){
> > +        # the feedback varies a little bit if Check Answers is available or not
> > +        my $checkAnswersAvailable = ('SMAcheckAnswers' ~~ @{$ce->{pg}->{options}->{showMeAnother}}) ?
>
> Line 1714 is an example of what I mean.
>
> I tried to use maketext whenever I outputted to the screen - it sounds
> like I missed a few occurrences, though.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/openwebwork/webwork2/pull/342/files#r12259412>
> .
>