aboutsummaryrefslogtreecommitdiffstats
path: root/find-lang.pl
diff options
context:
space:
mode:
Diffstat (limited to 'find-lang.pl')
-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);