aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-08-23 12:35:50 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-08-23 12:35:50 +0000
commit17e6894fb95e77e43eeca2e229142d910edaf73e (patch)
tree6c4082eff9282b2b4671386287531aa30705f57d
parentfed3d61c23582242c3fc50489d9024a16fa77b18 (diff)
downloadrpm-setup-17e6894fb95e77e43eeca2e229142d910edaf73e.tar
rpm-setup-17e6894fb95e77e43eeca2e229142d910edaf73e.tar.gz
rpm-setup-17e6894fb95e77e43eeca2e229142d910edaf73e.tar.bz2
rpm-setup-17e6894fb95e77e43eeca2e229142d910edaf73e.tar.xz
rpm-setup-17e6894fb95e77e43eeca2e229142d910edaf73e.zip
- dont tag C lang
- tag full lang, not only before '_'
-rw-r--r--find-lang.pl15
1 files changed, 7 insertions, 8 deletions
diff --git a/find-lang.pl b/find-lang.pl
index 57f4b7a..7c277dd 100644
--- a/find-lang.pl
+++ b/find-lang.pl
@@ -37,28 +37,27 @@ File::Find::find(
-f $File::Find::name or return;
debug("next file is %s", $file);
my ($pkg, $lang, $parent);
- if ($file =~ m:^((.*/share/locale)/([^/_@]+)[^/]*).*/([^/]+)\.mo:) {
+ if ($file =~ m:^((.*/share/locale)/([^/@]+)[^/]*).*/([^/]+)\.mo:) {
if ($withoutmo) {
return;
}
($pkg, $lang, $parent) = ($4, $3, $2);
- } elsif ($file =~ m:^(.*/gnome/help/([^/]+))/([^/_]+).*$:) {
+ } elsif ($file =~ m:^(.*/gnome/help)/([^/]+)/([^/]+).*$:) {
if (!$withgnome) {
return;
}
($pkg, $lang, $parent) = ($2, $3, $1);
- print "$pkg, $lang, $parent\n";
- } elsif ($file =~ m:^(.*/doc/kde/HTML)/([^/_@]+)[^/]*/([^/]+)/.*$:) {
+ } elsif ($file =~ m:^(.*/doc/kde)/HTML/([^/@]+)[^/]*/([^/]+)/.*$:) {
if (!$withkde) {
return;
}
($pkg, $lang, $parent) = ($2, $3, $1);
- } elsif ($file =~ m:^(.*/doc/HTML)/([^/_@]+)[^/]*/([^/_]+).*$:) {
+ } elsif ($file =~ m:^(.*/doc)/HTML/([^/@]+)[^/]*/([^/_]+).*$:) {
if (!$withhtml) {
return;
}
($pkg, $lang, $parent) = ($3, $2, $1);
- } elsif ($file =~ m:^(/+usr/share/man)/([^/@\.]+)[^/]*/man[^/]+/([^/.]+)\.\d[^/]*$:) {
+ } elsif ($file =~ m:^(/+usr/share)/man/([^/@\.]+)[^/]*/man[^/]+/([^/.]+)\.\d[^/]*$:) {
if (!$withman) {
return;
}
@@ -85,9 +84,9 @@ foreach my $f (sort keys %finallist) {
my ($lang, @otherlang) = keys %{ $finallist{$f}{'lang'} || {}};
my $l = sprintf("%s%s%s",
$finallist{$f}{'dir'} ? '%dir ' : '',
- @otherlang == 0 && $lang && !$finallist{$f}{'dir'}
+ @otherlang == 0 && $lang && !$finallist{$f}{'dir'} && $lang ne 'C'
? "%lang($lang) "
- : '', # skeep if multiple lang
+ : '', # skip if multiple lang, 'C' or dir
$f
);
debug('OUT: %s', $l);