Jifty

 view release on metacpan or  search on metacpan

lib/Jifty/Config.pm  view on Meta::CPAN

590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
    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

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
    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

116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    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

155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
    }
}
 
=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.324 second using v1.01-cache-2.11-cpan-454fe037f31 )