WebGUI/Operation/Help.pm, refactor _getHelpName

All other files, make sure that either assetName, macroName or topicName is defined
in the i18n file.  Make sure that all Assets have assetName defined in their
definition sub.
This commit is contained in:
Colin Kuskie 2005-12-10 23:33:25 +00:00
parent cd3f607f45
commit f5347b1314
15 changed files with 31 additions and 29 deletions

View file

@ -106,7 +106,7 @@ sub definition {
my $class = shift; my $class = shift;
my $definition = shift; my $definition = shift;
push(@{$definition}, { push(@{$definition}, {
assetName=>WebGUI::International::get('asset label',"Asset_ZipArchive"), assetName=>WebGUI::International::get('assetName',"Asset_ZipArchive"),
tableName=>'ZipArchiveAsset', tableName=>'ZipArchiveAsset',
className=>'WebGUI::Asset::File', className=>'WebGUI::Asset::File',
properties=>{ properties=>{

View file

@ -68,6 +68,7 @@ sub definition {
push(@{$definition}, { push(@{$definition}, {
tableName=>'InOutBoard', tableName=>'InOutBoard',
className=>'WebGUI::Asset::Wobject::InOutBoard', className=>'WebGUI::Asset::Wobject::InOutBoard',
assetName=>WebGUI::International::get('assetName',"Asset_InOutBoard"),
icon=>'iob.gif', icon=>'iob.gif',
properties=>{ properties=>{
statusList => { statusList => {
@ -142,11 +143,6 @@ sub getEditForm {
} }
#-------------------------------------------------------------------
sub getName {
return WebGUI::International::get(9,"Asset_InOutBoard");
}
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub view { sub view {
my $self = shift; my $self = shift;

View file

@ -24,6 +24,7 @@ sub definition {
push (@{$definition}, { push (@{$definition}, {
tableName=>'IndexedSearch', tableName=>'IndexedSearch',
className=>'WebGUI::Asset::Wobject::IndexedSearch', className=>'WebGUI::Asset::Wobject::IndexedSearch',
assetName=>WebGUI::International::get('assetName',"Asset_IndexedSearch"),
properties=>{ properties=>{
templateId=>{ templateId=>{
fieldType=>"template", fieldType=>"template",
@ -213,11 +214,6 @@ sub getIcon {
return $session{config}{extrasURL}.'/assets/search.gif'; return $session{config}{extrasURL}.'/assets/search.gif';
} }
#-------------------------------------------------------------------
sub getName {
return WebGUI::International::get(17,"Asset_IndexedSearch");
}
#------------------------------------------------------------------- #-------------------------------------------------------------------
sub view { sub view {
my $self = shift; my $self = shift;

View file

@ -64,7 +64,7 @@ sub definition {
push(@{$definition}, { push(@{$definition}, {
tableName=>'MultiSearch', tableName=>'MultiSearch',
className=>'WebGUI::Asset::Wobject::MultiSearch', className=>'WebGUI::Asset::Wobject::MultiSearch',
assetName=>$i18n->get('MultiSearch'), assetName=>$i18n->get('assetName'),
icon=>'multiSearch.gif', icon=>'multiSearch.gif',
autoGenerateForms=>1, autoGenerateForms=>1,
properties=>$properties properties=>$properties

View file

@ -303,7 +303,7 @@ sub definition {
tableName=>'StockData', tableName=>'StockData',
className=>'WebGUI::Asset::Wobject::StockData', className=>'WebGUI::Asset::Wobject::StockData',
icon=>'stockData.gif', icon=>'stockData.gif',
assetName=>WebGUI::International::get("app_name","Asset_StockData"), assetName=>WebGUI::International::get("assetName","Asset_StockData"),
properties=>$properties properties=>$properties
}); });
return $class->SUPER::definition($definition); return $class->SUPER::definition($definition);

View file

@ -66,7 +66,7 @@ sub definition {
push(@{$definition}, { push(@{$definition}, {
tableName=>'WeatherData', tableName=>'WeatherData',
className=>'WebGUI::Asset::Wobject::WeatherData', className=>'WebGUI::Asset::Wobject::WeatherData',
assetName=>$i18n->get("WeatherData"), assetName=>$i18n->get("assetName"),
icon=>'weatherData.gif', icon=>'weatherData.gif',
autoGenerateForms=>1, autoGenerateForms=>1,
properties=>$properties properties=>$properties

View file

@ -79,15 +79,15 @@ sub _getHelpName {
my $file = shift; my $file = shift;
my $helpName; my $helpName;
if ($file =~ /^Asset_/) { if ($file =~ /^Asset_/) {
$helpName = WebGUI::International::get('assetName',$file); $helpName = 'assetName';
} }
elsif ($file =~ /^Macro_/) { elsif ($file =~ /^Macro_/) {
$helpName = WebGUI::International::get('macroName',$file); $helpName = 'macroName';
} }
else { else {
$helpName = WebGUI::International::get('topicName',$file); $helpName = 'topicName';
} }
return $helpName; return WebGUI::International::get($helpName,$file);
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------

View file

@ -139,7 +139,7 @@ A variable that returns the HTML necessary to create a Traditional Pagination Ba
lastUpdated =>1091624565 lastUpdated =>1091624565
}, },
'9' => { 'assetName' => {
message => q|In/Out Board|, message => q|In/Out Board|,
lastUpdated =>1091624565 lastUpdated =>1091624565
}, },

View file

@ -21,7 +21,7 @@ our $I18N = {
lastUpdated => 1067346336 lastUpdated => 1067346336
}, },
'17' => { 'assetName' => {
message => q|Search|, message => q|Search|,
lastUpdated => 1066593262 lastUpdated => 1066593262
}, },

View file

@ -855,6 +855,11 @@ our $I18N = {
lastUpdated => 1133758944, lastUpdated => 1133758944,
}, },
'assetName' => {
lastUpdated => 1134256651,
message => q|Matrix|
},
}; };
1; 1;

View file

@ -7,7 +7,7 @@ our $I18N = {
lastUpdated => 1133619940, lastUpdated => 1133619940,
}, },
'MultiSearch' => { 'assetName' => {
message => q|MultiSearch|, message => q|MultiSearch|,
lastUpdated => 1133619940, lastUpdated => 1133619940,
}, },

View file

@ -12,7 +12,7 @@ our $I18N = {
lastUpdated => 1121703035, lastUpdated => 1121703035,
}, },
'app_name' => { 'assetName' => {
message => q|Stock Data|, message => q|Stock Data|,
lastUpdated => 1119068745 lastUpdated => 1119068745
}, },
@ -509,4 +509,4 @@ our $I18N = {
}; };
1; 1;

View file

@ -32,7 +32,7 @@ our $I18N = {
lastUpdated => 1133619940, lastUpdated => 1133619940,
}, },
'WeatherData' => { 'assetName' => {
message => q|WeatherData|, message => q|WeatherData|,
lastUpdated => 1133619940, lastUpdated => 1133619940,
}, },

View file

@ -30,11 +30,11 @@ our $I18N = {
lastUpdated => 1106762088 lastUpdated => 1106762088
}, },
'asset label' => { 'assetName' => {
message => q|Zip Archive|, message => q|Zip Archive|,
context => q|label for Asset Manager, getName|, context => q|label for Asset Manager, getName|,
lastUpdated => 1121703035, lastUpdated => 1121703035,
}, },
'show page description' => { 'show page description' => {
message => q|Enter the name of the file which serves as the "base" file for this archive. This is the page which will initially be served up|, message => q|Enter the name of the file which serves as the "base" file for this archive. This is the page which will initially be served up|,

View file

@ -18,6 +18,11 @@ to the file is required. A URL to the file will not work.
lastUpdated => 1134252720, lastUpdated => 1134252720,
}, },
'macroName' => {
message => q|FetchMimeType|,
lastUpdated => 1134256852
},
}; };
1; 1;