Skip to content
Permalink
Browse files

I18n the RSS tab for the RSS Feed role. Provide a way for additional …

…tabs to be i18n'ed, like Subscribable.
  • Loading branch information...
perlDreamer committed Nov 24, 2011
1 parent 288adcf commit ce156905236bc893761a77a4f02991b80873bff0
Showing with 40 additions and 6 deletions.
  1. +23 −5 lib/WebGUI/Asset.pm
  2. +17 −1 lib/WebGUI/Role/Asset/RssFeed.pm
@@ -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
@@ -121,7 +121,23 @@ 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 ( )

0 comments on commit ce15690

Please sign in to comment.
You can’t perform that action at this time.