Jifty
view release on metacpan or search on metacpan
lib/Jifty/Config.pm view on Meta::CPAN
return $guess;
}
=head2 update_config $CONFIG
Takes an application's configuration as a hashref. Right now, it just sets up
plugins that match an older jifty version's defaults
=cut
sub update_config {
my $self = shift;
my $config = shift;
my $version = $config->{'framework'}->{'ConfigFileVersion'};
my $plugins = ($config->{'framework'}->{'Plugins'} ||= []);
# This app configuration predates the plugin refactor
if ($version < 2) {
# These are the plugins which old apps expect because their
lib/Jifty/Plugin/PubSub/Subscriptions.pm view on Meta::CPAN
push @{$self->{store}{$self->{client_id}}}, \%args;
}
=head2 update_on topic => I<TOPIC> [, ...]
As L</add>, but defaults to refreshing the current region.
=cut
sub update_on {
my $self = shift;
my $region = Jifty->web->current_region;
unless ($region) {
warn "Jifty->subs->update_on called when not in a region";
return;
}
my %args = %{ $region->arguments };
delete $args{region};
delete $args{event};
lib/Jifty/Script/Po.pm view on Meta::CPAN
return 1;
}
=head2 update_catalogs
Extracts localizable messages from all files in your application, finds
all your message catalogs and updates them with new and changed messages.
=cut
sub update_catalogs {
my $self = shift;
my $podir = $self->{'podir'} || Jifty->config->framework('L10N')->{'PoDir'};
$self->extract_messages;
$self->update_catalog( File::Spec->catfile(
$podir, $self->pot_name . ".pot"
) );
if ($self->{'language'}) {
$self->update_catalog( File::Spec->catfile(
lib/Jifty/Script/Po.pm view on Meta::CPAN
}
}
=head2 update_catalog FILENAME
Reads C<FILENAME>, a message catalog and integrates new or changed
translations.
=cut
sub update_catalog {
my $self = shift;
my $translation = shift;
my $logger =Log::Log4perl->get_logger("main");
$logger->info( "Updating message catalog '$translation'");
$LMExtract->read_po($translation) if ( -f $translation && $translation !~ m/pot$/ );
my $orig_lexicon;
# Reset previously compiled entries before a new compilation
( run in 0.434 second using v1.01-cache-2.11-cpan-454fe037f31 )