Fix more i18n issues with the RenderThingData macro. Addresses bug #12141

This commit is contained in:
Colin Kuskie 2011-05-25 08:49:12 -07:00
parent 926cfd18e4
commit 90b37da740
3 changed files with 11 additions and 4 deletions

View file

@ -51,13 +51,13 @@ sub process {
my $thing = WebGUI::Asset::Wobject::Thingy->newByUrl( $session, $uri->path );
# TODO: i18n
return ( "Bad URL: " . $thingDataUrl ) if !$thing || !$thingId || !$thingDataId;
return ( $i18n->get('bad url') . $thingDataUrl ) if !$thing || !$thingId || !$thingDataId;
# Render
my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint );
# FIX: Temporary solution (broken map due to template rendering <script> tags)
return "RenderThingData: Contained bad tags!" if $output =~ /script>/;
return $i18n->get('bad tags') if $output =~ /script>/;
return $output;
}