Jifty
view release on metacpan or search on metacpan
lib/Jifty/Config.pm view on Meta::CPAN
590591592593594595596597598599600601602603604605606607608609610
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
87888990919293949596979899100101102103104105106107
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
116117118119120121122123124125126127128129130131132133134135136
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
155156157158159160161162163164165166167168169170171172173174175
}
}
=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 )