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 $definition = shift;
push(@{$definition}, {
assetName=>WebGUI::International::get('asset label',"Asset_ZipArchive"),
assetName=>WebGUI::International::get('assetName',"Asset_ZipArchive"),
tableName=>'ZipArchiveAsset',
className=>'WebGUI::Asset::File',
properties=>{

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -79,15 +79,15 @@ sub _getHelpName {
my $file = shift;
my $helpName;
if ($file =~ /^Asset_/) {
$helpName = WebGUI::International::get('assetName',$file);
$helpName = 'assetName';
}
elsif ($file =~ /^Macro_/) {
$helpName = WebGUI::International::get('macroName',$file);
$helpName = 'macroName';
}
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
},
'9' => {
'assetName' => {
message => q|In/Out Board|,
lastUpdated =>1091624565
},

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -30,11 +30,11 @@ our $I18N = {
lastUpdated => 1106762088
},
'asset label' => {
message => q|Zip Archive|,
context => q|label for Asset Manager, getName|,
lastUpdated => 1121703035,
},
'assetName' => {
message => q|Zip Archive|,
context => q|label for Asset Manager, getName|,
lastUpdated => 1121703035,
},
'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|,

View file

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