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:
parent
cd3f607f45
commit
f5347b1314
15 changed files with 31 additions and 29 deletions
|
|
@ -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=>{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ our $I18N = {
|
|||
lastUpdated => 1067346336
|
||||
},
|
||||
|
||||
'17' => {
|
||||
'assetName' => {
|
||||
message => q|Search|,
|
||||
lastUpdated => 1066593262
|
||||
},
|
||||
|
|
|
|||
|
|
@ -855,6 +855,11 @@ our $I18N = {
|
|||
lastUpdated => 1133758944,
|
||||
},
|
||||
|
||||
'assetName' => {
|
||||
lastUpdated => 1134256651,
|
||||
message => q|Matrix|
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ our $I18N = {
|
|||
lastUpdated => 1133619940,
|
||||
},
|
||||
|
||||
'MultiSearch' => {
|
||||
'assetName' => {
|
||||
message => q|MultiSearch|,
|
||||
lastUpdated => 1133619940,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ our $I18N = {
|
|||
lastUpdated => 1133619940,
|
||||
},
|
||||
|
||||
'WeatherData' => {
|
||||
'assetName' => {
|
||||
message => q|WeatherData|,
|
||||
lastUpdated => 1133619940,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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|,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue