I18n the RSS tab for the RSS Feed role. Provide a way for additional tabs to be i18n'ed, like Subscribable.

This commit is contained in:
Colin Kuskie 2011-11-23 17:21:58 -08:00
parent 288adcfd17
commit ce15690523
2 changed files with 40 additions and 6 deletions

View file

@ -504,6 +504,28 @@ sub addEditSaveButtons {
return $form->addFieldAt( $buttonGroup, 0 );
}
#----------------------------------------------------------------------------
=head2 addEditSaveTabs ( form )
Add the tabs to the form for editing or saving the asset's properties.
This is broken out so that additional tabs with i18n'ed labels can be
added by subclasses or by Roles.
=cut
sub addEditSaveTabs {
my ( $self, $form ) = @_;
my $session = $self->session;
my $i18n = WebGUI::International->new($session, "Asset");
# Not using loop to maintain correct order
$form->addTab( name => "properties", label => $i18n->get("properties") );
$form->addTab( name => "display", label => $i18n->get(105) );
$form->addTab( name => "security", label => $i18n->get(107) );
$form->addTab( name => "meta", label => $i18n->get("Metadata") );
return $form;
}
#-------------------------------------------------------------------
=head2 addMissing ( url )
@ -1085,11 +1107,7 @@ sub getEditForm {
###
# Create the main tabset
# Not using loop to maintain correct order
$f->addTab( name => "properties", label => $i18n->get("properties") );
$f->addTab( name => "display", label => $i18n->get(105) );
$f->addTab( name => "security", label => $i18n->get(107) );
$f->addTab( name => "meta", label => $i18n->get("Metadata") );
$self->addEditSaveTabs($f);
###
# Asset ID and class name

View file

@ -121,6 +121,22 @@ These methods are available from this class:
=cut
#----------------------------------------------------------------------------
=head2 addEditSaveTabs ( form )
Add the tab for the RSS feed configuration data.
=cut
override addEditSaveTabs => sub {
my ( $self, $form ) = @_;
$form = super();
my $i18n = WebGUI::International->new($self->session, 'Role_RssFeed');
$form->addTab( name => "rss", label => $i18n->get("RSS tab") );
return $form;
};
#-------------------------------------------------------------------
=head2 dispatch ( )