Skip to content

Commit

Permalink
Fix more i18n issues with the RenderThingData macro. Addresses bug #1…
Browse files Browse the repository at this point in the history
…2141
  • Loading branch information
perlDreamer committed May 25, 2011
1 parent 926cfd1 commit 90b37da
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/changelog/7.x.x.txt
@@ -1,4 +1,5 @@
7.10.18
- fixed #12141: Macro_RenderThingData (bad tags) nothing to translate

7.10.17
- fixed: Forced to use a PayDriver even with a balance of 0 in the cart.
Expand Down
4 changes: 2 additions & 2 deletions lib/WebGUI/Macro/RenderThingData.pm
Expand Up @@ -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;
}
Expand Down
10 changes: 8 additions & 2 deletions lib/WebGUI/i18n/English/Macro_RenderThingData.pm
Expand Up @@ -4,13 +4,19 @@ use strict;
our $I18N = {

'bad tags' => {
message => q||,
message => q|RenderThingData: Thingy output contains script tags.|,
lastUpdated => 1306275259,
},

'no template' => {
message => q|RenderThingData: Please specify a template.|,
lastUpdated => 1149177662,
lastUpdated => 1306337467,
},

'bad url' => {
message => q|Bad URL: |,
lastUpdated => 1306337468,
context => q|A URL with missing parameters or one that does not refer to a Thingy asset.|,
},

};
Expand Down

0 comments on commit 90b37da

Please sign in to comment.