Changeset 1549 for trunk/LATMOS-Accounts/Makefile.PL
- Timestamp:
- 12/28/15 17:45:18 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.