- Timestamp:
- 12/28/15 15:45:11 (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/Makefile.PL
r1435 r1546 15 15 requires 'Catalyst::Plugin::Session::State::Cookie' => '0'; 16 16 requires 'Catalyst::Plugin::Prototype' => '0'; 17 requires 'Catalyst::Plugin::I18N' => '0'; 17 18 requires 'Catalyst::View::TT' => '0'; 18 19 requires 'LATMOS::Accounts' => '0'; … … 32 33 33 34 sub postamble { 35 my @po = map { m:lib/LATMOS/Accounts/Web/I18N/([^\.]+)\.po$:; $1 } 36 glob('lib/LATMOS/Accounts/Web/I18N/*.po'); 37 38 my $makepo = join("\n\n", map { 39 " 40 lib/LATMOS/Accounts/Web/I18N/$_.po: lib/LATMOS/Accounts/Web/I18N/messages.pot 41 \t[ -f lib/LATMOS/Accounts/Web/I18N/$_.po ] || msginit --no-translator --input=lib/LATMOS/Accounts/Web/I18N/messages.pot --output= --locale=$_ 42 \tmsgmerge -U lib/LATMOS/Accounts/Web/I18N/$_.po lib/LATMOS/Accounts/Web/I18N/messages.pot 43 44 " 45 } @po 46 ); 47 48 $makepo .= "\n\npo: " . join(' ', map { "lib/LATMOS/Accounts/Web/I18N/$_.po" } @po) . "\n"; 49 34 50 <<EOF; 35 # .PHONY .= svnmanifest 51 .PHONY: lib/LATMOS/Accounts/Web/I18N/messages.pot 52 53 pot: lib/LATMOS/Accounts/Web/I18N/messages.pot 54 55 lib/LATMOS/Accounts/Web/I18N/messages.pot: 56 \tcat MANIFEST | egrep '^(lib|root/html)' | xargs xgettext.pl -o lib/LATMOS/Accounts/Web/I18N/messages.pot 57 58 $makepo 36 59 37 60 svnmanifest: -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm
r1534 r1546 24 24 Prototype 25 25 XMLRPC 26 I18N 26 27 /; 27 28 -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Root.pm
r1544 r1546 31 31 sub begin : Private { 32 32 my ( $self, $c ) = @_; 33 34 my ($locale) = split(';', $c->req->header('Accept-Language') || ''); 35 if (my $plocale = ($c->req->param('locale')|| $c->session->{'locale'})) { 36 $c->session->{'locale'} = $locale = $plocale; 37 } 38 $c->languages($locale ? [ $locale ] : ''); 33 39 34 40 if ($c->user_exists) { -
trunk/LATMOS-Accounts-Web/root/html/includes/defs.tt
r1162 r1546 1 [% MACRO l(text, args) BLOCK; 2 c.localize(text, args); 3 END; %] 1 4 2 5 [% perm_denied = BLOCK %] -
trunk/LATMOS-Accounts-Web/root/html/includes/wrapper.tt
r1485 r1546 45 45 46 46 <h1 style=""> 47 Gestion informatique47 [% l('IT management') %] 48 48 [% IF c.config.company %] 49 49 - [% c.config.company | html %] -
trunk/LATMOS-Accounts/MANIFEST
r1520 r1546 103 103 lib/LATMOS/Accounts/Bases/Zimbra/User.pm 104 104 lib/LATMOS/Accounts/Cli.pm 105 lib/LATMOS/Accounts/I18N/fr.po 106 lib/LATMOS/Accounts/I18N/messages.pot 105 107 lib/LATMOS/Accounts/Log.pm 106 108 lib/LATMOS/Accounts/Mail.pm -
trunk/LATMOS-Accounts/Makefile.PL
r1445 r1546 73 73 DESTINSTALLMAN5DIR => '$(DESTDIR)$(INSTALLMAN5DIR)', 74 74 DESTINSTALLMAN8DIR => '$(DESTDIR)$(INSTALLMAN8DIR)', 75 LOCALEDIR => '/usr/share/locale', 75 76 INST_MAN5DIR => 'blib/man5', 76 77 INST_MAN8DIR => 'blib/man8', … … 96 97 97 98 sub postamble { 99 100 my @po = map { m:lib/LATMOS/Accounts/I18N/([^\.]+)\.po$:; $1 } 101 glob('lib/LATMOS/Accounts/I18N/*.po'); 102 103 my $makepo = join("\n\n", map { 104 " 105 lib/LATMOS/Accounts/I18N/$_.po: lib/LATMOS/Accounts/I18N/messages.pot 106 \t[ -f lib/LATMOS/Accounts/I18N/$_.po ] || msginit --no-translator --input=lib/LATMOS/Accounts/I18N/messages.pot --output= --locale=$_ 107 \tmsgmerge -U lib/LATMOS/Accounts/I18N/$_.po lib/LATMOS/Accounts/I18N/messages.pot 108 109 " 110 } @po 111 ); 112 113 $makepo .= "\n\npo: " . join(' ', map { "lib/LATMOS/Accounts/I18N/$_.po" } @po) . "\n"; 114 98 115 <<EOF; 99 116 #.PHONY .= svnmanifest 117 118 pot: lib/LATMOS/Accounts/I18N/messages.pot 119 120 lib/LATMOS/Accounts/I18N/messages.pot: 121 \tcat MANIFEST | egrep '^(lib|bin)' | xargs xgettext.pl -o lib/LATMOS/Accounts/I18N/messages.pot 122 123 $makepo 100 124 101 125 bin/la-sql-upgrade: bin/la-sql-upgrade.in … … 158 182 my $section = $self->SUPER::install(); 159 183 160 $section =~ s/(^install ::.*)/$1 install_config install_templates install_data /m;184 $section =~ s/(^install ::.*)/$1 install_config install_templates install_data install_po/m; 161 185 $section =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR) \$(INST_MAN8DIR) \$(DESTINSTALLMAN8DIR)/g; 162 186 … … 179 203 $(ABSPERLRUN) -MExtUtils::Install -e 'install({ sqldata => @ARGV })' \\ 180 204 $(DESTDIR)$(DATADIR) 205 206 install_po :: 207 install -d $(DESTDIR)$(LOCALEDIR)/LATMOS::Accounts 208 $(ABSPERLRUN) -MExtUtils::Install -e 'install({ "lib/LATMOS/Accounts/I18N" => @ARGV })' \\ 209 $(DESTDIR)$(LOCALEDIR)/LATMOS::Accounts 181 210 ]; 182 211 -
trunk/LATMOS-Accounts/bin/la-query
r1045 r1546 6 6 use Getopt::Long; 7 7 use Pod::Usage; 8 use LATMOS::Accounts::I18N; 8 9 9 10 =head1 NAME … … 115 116 my $LA = LATMOS::Accounts->new($config, noacl => 1); 116 117 my $labase = $LA->base($base); 117 $labase && $labase->load or die "Cannot load base";118 $labase && $labase->load or die N("Cannot load base %s\n", $base); 118 119 119 120 $labase->unexported($nounexp ? 0 : 1); -
trunk/LATMOS-Accounts/latmos-accounts.spec.in
r1376 r1546 35 35 BuildRequires: perl(HTTP::Cookies) 36 36 BuildRequires: perl(XML::XPath) 37 BuildRequires: perl(Locale::gettext) 37 38 38 39 Requires: perl(Mail::Sendmail) … … 98 99 %perl_vendorlib/* 99 100 %_datadir/latmos-accounts 101 %_datadir/locale/* -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm
r1527 r1546 10 10 use LATMOS::Accounts::Log; 11 11 use LATMOS::Accounts::Acls; 12 use LATMOS::Accounts::I18N; 12 13 13 14 our $VERSION = '5.0.11'; -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r1545 r1546 384 384 my ($self, $otype, $id, %data) = @_; 385 385 "$id" or do { 386 $self->log(LA_ERR, "Cannot create %s object with empty id",386 $self->log(LA_ERR, _("Cannot create %s object with empty id"), 387 387 $otype); 388 388 return;
Note: See TracChangeset
for help on using the changeset viewer.