internationalize all static labels

This commit is contained in:
Colin Kuskie 2005-12-06 04:36:30 +00:00
parent ccd865f353
commit dbf160f417
2 changed files with 109 additions and 19 deletions

View file

@ -314,7 +314,7 @@ sub www_compare {
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub www_copy { sub www_copy {
return "This asset may not be copied."; return WebGUI::International::get('no copy','Asset_Matrix');
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
@ -448,13 +448,13 @@ sub www_editListing {
$f->text( $f->text(
-name=>"productName", -name=>"productName",
-value=>$listing->{productName}, -value=>$listing->{productName},
-label=>"Product Name", -label=>WebGUI::International::get('product name','Asset_Matrix'),
-maxLength=>25 -maxLength=>25
); );
$f->text( $f->text(
-name=>"versionNumber", -name=>"versionNumber",
-value=>$listing->{versionNumber}, -value=>$listing->{versionNumber},
-label=>"Version/Model Number" -label=>WebGUI::International::get('version number','Asset_Matrix'),
); );
$f->url( $f->url(
-name=>"productUrl", -name=>"productUrl",
@ -464,23 +464,23 @@ sub www_editListing {
$f->text( $f->text(
-name=>"manufacturerName", -name=>"manufacturerName",
-value=>$listing->{manufacturerName}, -value=>$listing->{manufacturerName},
-label=>"Manufacturer Name" -label=>WebGUI::International::get('manufacturer name','Asset_Matrix'),
); );
$f->url( $f->url(
-name=>"manufacturerUrl", -name=>"manufacturerUrl",
-value=>$listing->{manufacturerUrl}, -value=>$listing->{manufacturerUrl},
-label=>"Manufacturer URL" -label=>WebGUI::International::get('manufacturer url','Asset_Matrix'),
); );
$f->textarea( $f->textarea(
-name=>"description", -name=>"description",
-value=>$listing->{description}, -value=>$listing->{description},
-label=>"Description" -label=>WebGUI::International::get('description','Asset_Matrix'),
); );
if ($self->canEdit) { if ($self->canEdit) {
$f->selectBox( $f->selectBox(
-name=>"maintainerId", -name=>"maintainerId",
-value=>[$listing->{maintainerId}], -value=>[$listing->{maintainerId}],
-label=>"Listing Maintainer", -label=>WebGUI::International::get('listing maintainer','Asset_Matrix'),
-options=>WebGUI::SQL->buildHashRef("select userId,username from users order by username") -options=>WebGUI::SQL->buildHashRef("select userId,username from users order by username")
); );
} }
@ -645,17 +645,17 @@ sub www_editField {
$f->text( $f->text(
-name=>"name", -name=>"name",
-value=>$field->{name}, -value=>$field->{name},
-label=>"Name" -label=>WebGUI::International::get('name','Asset_Matrix'),
); );
$f->text( $f->text(
-name=>"label", -name=>"label",
-value=>$field->{label}, -value=>$field->{label},
-label=>"Label" -label=>WebGUI::International::get('label','Asset_Matrix'),
); );
$f->selectBox( $f->selectBox(
-name=>"fieldType", -name=>"fieldType",
-value=>[$field->{fieldType}], -value=>[$field->{fieldType}],
-label=>"Type", -label=>WebGUI::International::get('type','Asset_Matrix'),
-options=>{ -options=>{
goodBad=>"Good Bad", goodBad=>"Good Bad",
text=>"Text", text=>"Text",
@ -667,12 +667,12 @@ sub www_editField {
$f->textarea( $f->textarea(
-name=>"description", -name=>"description",
-value=>$field->{description}, -value=>$field->{description},
-label=>"Description" -label=>WebGUI::International::get('description','Asset_Matrix'),
); );
$f->text( $f->text(
-name=>"defaultValue", -name=>"defaultValue",
-value=>$field->{defaultValue}, -value=>$field->{defaultValue},
-label=>"Default Value" -label=>WebGUI::International::get('default value','Asset_Matrix'),
); );
my %cats; my %cats;
foreach my $category ($self->getCategories) { foreach my $category ($self->getCategories) {
@ -681,7 +681,7 @@ sub www_editField {
$f->selectBox( $f->selectBox(
-name=>"category", -name=>"category",
-value=>[$field->{category}], -value=>[$field->{category}],
-label=>"Category", -label=>WebGUI::International::get('category','Asset_Matrix'),
-options=>\%cats -options=>\%cats
); );
$f->submit; $f->submit;
@ -990,23 +990,23 @@ sub www_viewDetail {
-extras=>'class="content"', -extras=>'class="content"',
-name=>"from", -name=>"from",
-value=>$session{user}{email}, -value=>$session{user}{email},
-label=>"Your Email Address" -label=>WebGUI::International::get('your email','Asset_Matrix'),
); );
$f->selectBox( $f->selectBox(
-name=>"subject", -name=>"subject",
-extras=>'class="content"', -extras=>'class="content"',
-options=>{ -options=>{
"Report an error."=>"Report an error.", WebGUI::International::get('report error','Asset_Matrix')=>"Report an error.",
"General comment."=>"General comment." WebGUI::International::get('general comment','Asset_Matrix')=>"General comment.",
}, },
-label=>"Type of Request" -label=>WebGUI::International::get('request type','Asset_Matrix'),
); );
$f->textarea( $f->textarea(
-rows=>4, -rows=>4,
-extras=>'class="content"', -extras=>'class="content"',
-columns=>35, -columns=>35,
-name=>"body", -name=>"body",
-label=>"Comment" -label=>WebGUI::International::get('comment','Asset_Matrix'),
); );
$f->submit( $f->submit(
-extras=>'class="content"', -extras=>'class="content"',
@ -1073,7 +1073,7 @@ sub www_viewDetail {
$f->submit( $f->submit(
-extras=>'class="ratingForm"', -extras=>'class="ratingForm"',
-value=>"Rate", -value=>"Rate",
-label=>'<a href="'.$self->formatURL("rate",$listingId).'">Show Ratings</a>' -label=>'<a href="'.$self->formatURL("rate",$listingId).'">'.WebGUI::International::get('show ratings','Asset_Matrix').'</A>'
); );
if ($hasRated) { if ($hasRated) {
$var{'ratings'} = $ratingsTable; $var{'ratings'} = $ratingsTable;

View file

@ -765,6 +765,96 @@ our $I18N = {
lastUpdated => 1133758944, lastUpdated => 1133758944,
}, },
'product name' => {
message => q|Product Name|,
lastUpdated => 1133758944,
},
'version number' => {
message => q|Version/Model Number|,
lastUpdated => 1133758944,
},
'manufacturer name' => {
message => q|Manufacturer Name|,
lastUpdated => 1133758944,
},
'manufacturer url' => {
message => q|Manufacturer URL|,
lastUpdated => 1133758944,
},
'description' => {
message => q|Description|,
lastUpdated => 1133758944,
},
'listing maintainer' => {
message => q|Listing Maintainer|,
lastUpdated => 1133758944,
},
'name' => {
message => q|Name|,
lastUpdated => 1133758944,
},
'label' => {
message => q|Label|,
lastUpdated => 1133758944,
},
'type' => {
message => q|Type|,
lastUpdated => 1133758944,
},
'default value' => {
message => q|Default Value|,
lastUpdated => 1133758944,
},
'category' => {
message => q|Category|,
lastUpdated => 1133758944,
},
'your email' => {
message => q|Your Email Address|,
lastUpdated => 1133758944,
},
'report error' => {
message => q|Report an error.|,
lastUpdated => 1133758944,
},
'general comment' => {
message => q|General comment.|,
lastUpdated => 1133758944,
},
'request type' => {
message => q|Type of Request|,
lastUpdated => 1133758944,
},
'comment' => {
message => q|Comment|,
lastUpdated => 1133758944,
},
'show ratings' => {
message => q|Show Ratings|,
lastUpdated => 1133758944,
},
'no copy' => {
message => q|This asset may not be copied.|,
lastUpdated => 1133758944,
},
}; };
1; 1;