- Timestamp:
- 12/28/15 17:45:18 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 deleted
- 9 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/I18N/fr.po
r1546 r1549 1 # SOME DESCRIPTIVE TITLE. 2 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 # This file is distributed under the same license as the PACKAGE package. 4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 5 # 6 #, fuzzy 7 msgid "" 8 msgstr "" 9 "Project-Id-Version: 1\n" 10 "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 "Last-Translator: Olivier Thauvin <olivier.thauvin@latmos.ipsl.fr\n" 13 "Language-Team: LANGUAGE <LL@li.org>\n" 14 "Language: \n" 15 "MIME-Version: 1.0\n" 16 "Content-Type: text/plain; charset=UTF-8\n" 17 "Content-Transfer-Encoding: 8bit\n" 18 1 19 #: root/html/includes/wrapper.tt:47 2 20 msgid "IT management" -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r1530 r1549 323 323 if ($label) { 324 324 return $label; 325 } elsif (my $hash = LATMOS::Accounts::Web->config->{attrs}{$attr}) {326 return $hash->{label};327 325 } else { 328 return $attr; 326 my $oattr = $self->base->attribute($self->otype, $attr); 327 return $oattr->{label} ? $oattr->{label}->() : $attr; 329 328 } 330 329 } -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrFormsA.pm
r1530 r1549 89 89 ($hint ? sprintf('title="%s"', $self->escape($hint)) : ''), 90 90 $self->escape($self->htmlname), 91 $self->escape($self-> hconfig('label')|| $self->htmlname),91 $self->escape($self->{label} || $self->htmlname), 92 92 ); 93 93 } -
trunk/LATMOS-Accounts/MANIFEST
r1547 r1549 104 104 lib/LATMOS/Accounts/Cli.pm 105 105 lib/LATMOS/Accounts/I18N.pm 106 lib/LATMOS/Accounts/I18N/fr.po107 lib/LATMOS/Accounts/I18N/messages.pot108 106 lib/LATMOS/Accounts/Log.pm 109 107 lib/LATMOS/Accounts/Mail.pm … … 145 143 man/man8/latmos-accounts.pod 146 144 patchset/no_useless_load.patch 145 po/fr.po 146 po/messages.pot 147 147 sample/allowed_values.ini 148 148 sample/la-allowed-values.ini -
trunk/LATMOS-Accounts/Makefile.PL
r1546 r1549 98 98 sub postamble { 99 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"; 100 my $makepo = ''; 101 my @po; 102 103 foreach (glob('po/*.po')) { 104 my ($po) = $_ =~ m:([^/\.]+)\.po$:; 105 push (@po, $po); 106 107 $makepo .= 108 109 " 110 po/$po.po: po/messages.pot 111 \t[ -f po/$po.po ] || msginit --no-translator --input=po/messages.pot --output= --locale=$_ 112 \tmsgmerge -U po/$po.po po/messages.pot 113 114 po/$po/LC_MESSAGES/linkaccounts.mo: po/$po.po 115 \tinstall -d po/$po/LC_MESSAGES 116 \tmsgfmt -o \$@ \$< 117 \n" 118 } 119 120 $makepo .= "\n\npo: " . join(' ', map { "po/$_.po" } @po) . "\n"; 121 $makepo .= "\n\nmo: " . join(' ', map { "po/$_/LC_MESSAGES/linkaccounts.mo" } @po) . "\n"; 114 122 115 123 <<EOF; 116 #.PHONY .= svnmanifest117 118 pot: lib/LATMOS/Accounts/I18N/messages.pot119 120 lib/LATMOS/Accounts/I18N/messages.pot:121 \tcat MANIFEST | egrep '^(lib|bin)' | xargs xgettext.pl -o lib/LATMOS/Accounts/I18N/messages.pot124 .PHONY: po/messages.pot 125 126 pot: po/messages.pot 127 128 po/messages.pot: 129 \tcat MANIFEST | egrep '^(lib|bin)' | xargs xgettext.pl -o po/messages.pot 122 130 123 131 $makepo … … 182 190 my $section = $self->SUPER::install(); 183 191 184 $section =~ s/(^install ::.*)/$1 install_config install_templates install_data install_ po/m;192 $section =~ s/(^install ::.*)/$1 install_config install_templates install_data install_mo/m; 185 193 $section =~ s/\$\(INST_BIN\) \$\(DESTINSTALL(\w*)BIN\)/$& \$(INST_MAN5DIR) \$(DESTINSTALLMAN5DIR) \$(INST_MAN8DIR) \$(DESTINSTALLMAN8DIR)/g; 186 194 … … 204 212 $(DESTDIR)$(DATADIR) 205 213 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 214 install_mo: mo 215 install -d $(DESTDIR)$(LOCALEDIR) 216 for i in po/*/LC_MESSAGES/linkaccounts.mo; do \\ 217 install -d po/$$i $(DESTDIR)$(LOCALEDIR)/$$i; \\ 218 done 210 219 ]; 211 220 -
trunk/LATMOS-Accounts/bin/la-query
r1546 r1549 116 116 my $LA = LATMOS::Accounts->new($config, noacl => 1); 117 117 my $labase = $LA->base($base); 118 $labase && $labase->load or die N("Cannot load base %s\n", $base);118 $labase && $labase->load or die l("Cannot load base %s\n", $base); 119 119 120 120 $labase->unexported($nounexp ? 0 : 1); -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r1546 r1549 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, l("Cannot create %s object with empty id"), 387 387 $otype); 388 388 return; -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r1526 r1549 13 13 use DateTime::TimeZone; 14 14 use base qw(LATMOS::Accounts::Bases::Sql::objects); 15 use LATMOS::Accounts::I18N; 15 16 16 17 our $VERSION = (q$Rev$ =~ /^Rev: (\d+) /)[0]; … … 194 195 formopts => { rawvalue => 1, }, 195 196 monitored => 1, 197 label => sub { l('Locked') }, 196 198 }, 197 199 expire => { … … 493 495 }, 494 496 manager => { 497 label => l('Manager'), 495 498 reference => 'user', 496 499 ro => 1, -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/I18N.pm
r1548 r1549 19 19 20 20 @ISA = qw(Exporter); 21 @EXPORT = qw(N);22 @EXPORT_OK = qw(N);21 @EXPORT = 'l'; 22 @EXPORT_OK = 'l'; 23 23 24 24 my $init; 25 25 26 26 if (!$init) { 27 POSIX::setlocale(POSIX::LC_ALL(), ""); 28 Locale::gettext::bind_textdomain_codeset('LATMOS::Accounts', 'UTF-8'); 27 #POSIX::setlocale(POSIX::LC_ALL(), ""); 28 if (-d 'po') { 29 Locale::gettext::bindtextdomain('linkaccounts', 'po') 30 } 31 Locale::gettext::bind_textdomain_codeset('linkaccounts', 'UTF-8'); 29 32 $init = 1; 30 33 } … … 32 35 =head1 FUNCTIONS 33 36 34 =head2 N($text, @args)37 =head2 l($text, @args) 35 38 36 39 Return the translate messsage, using printf. … … 38 41 =cut 39 42 43 sub l { 44 my ($text, @args) = @_; 45 my $trans = Locale::gettext::dgettext('linkaccounts', $text || ''); 40 46 41 sub N {42 my ($text, @args) = @_;43 my $trans = Locale::gettext::dgettext('LATMOS::Accounts', $text || '');44 47 return sprintf($trans || $text, @args); 45 48 } -
trunk/LATMOS-Accounts/po/messages.pot
r1548 r1549 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: PACKAGE VERSION\n"10 "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"9 "Project-Id-Version: 1\n" 10 "POT-Creation-Date: 2015-12-28 17:00+01\n" 11 11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"12 "Last-Translator: Olivier Thauvin <olivier.thauvin@latmos.ipsl.fr\n" 13 13 "Language-Team: LANGUAGE <LL@li.org>\n" 14 14 "MIME-Version: 1.0\n" 15 "Content-Type: text/plain; charset= CHARSET\n"15 "Content-Type: text/plain; charset=UTF-8\n" 16 16 "Content-Transfer-Encoding: 8bit\n" 17 17 … … 19 19 msgid "Cannot create %s object with empty id" 20 20 msgstr "" 21 22 #. ($base) 23 #: bin/la-query:117 24 msgid "Cannot load base %s\n" 25 msgstr "" 26 27 #: lib/LATMOS/Accounts/Bases/Sql/User.pm:197 28 msgid "Locked" 29 msgstr "" 30 31 #: lib/LATMOS/Accounts/Bases/Sql/User.pm:497 32 msgid "Manager" 33 msgstr ""
Note: See TracChangeset
for help on using the changeset viewer.