From 595660e9e4641fc27becbd5bb6c1d8d968eb7403 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 24 May 2011 15:23:32 -0700 Subject: [PATCH] Tests for templateId and URL handling, some i18n for the RenderThingData macro. --- lib/WebGUI/Macro/RenderThingData.pm | 5 +- .../i18n/English/Macro_RenderThingData.pm | 18 +++ t/Macro/RenderThingData.t | 109 ++++++++++++++++++ 3 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 lib/WebGUI/i18n/English/Macro_RenderThingData.pm create mode 100644 t/Macro/RenderThingData.t diff --git a/lib/WebGUI/Macro/RenderThingData.pm b/lib/WebGUI/Macro/RenderThingData.pm index 197291276..f71cfc81d 100644 --- a/lib/WebGUI/Macro/RenderThingData.pm +++ b/lib/WebGUI/Macro/RenderThingData.pm @@ -11,8 +11,8 @@ package WebGUI::Macro::RenderThingData; #------------------------------------------------------------------- use strict; -use WebGUI::Group; use WebGUI::Asset::Template; +use WebGUI::International; use WebGUI::Asset::Wobject::Thingy; =head1 NAME @@ -39,6 +39,8 @@ Optional. Specifies the templateId or template url to use. If omitted, the def #------------------------------------------------------------------- sub process { my ($session, $thingDataUrl, $templateHint ) = @_; + my $i18n = WebGUI::International->new($session, 'Macro_RenderThingData'); + return $i18n->get('no template') if !$templateHint; my $uri = URI->new( $thingDataUrl ); @@ -55,7 +57,6 @@ sub process { my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint ); # FIX: Temporary solution (broken map due to template rendering