aboutsummaryrefslogtreecommitdiffstats
path: root/check_trans.pl
diff options
context:
space:
mode:
authorPeter Karlsson <peterk>2002-06-15 00:30:26 +0000
committerPeter Karlsson <peterk>2002-06-15 00:30:26 +0000
commit87ac4668b971f763cfc8caff31bdd79787e165e2 (patch)
tree8009cd7902ff2cf34163dec49d8d192afd1ec768 /check_trans.pl
parent91ff361a455f15833848b240f30b621e3c47dd4f (diff)
Fix problem with diff not being created from the correct directory when
dealing with translations from non-English sources. CVS version numbers check_trans.pl: 1.50 -> 1.51
Diffstat (limited to 'check_trans.pl')
-rwxr-xr-xcheck_trans.pl17
1 files changed, 13 insertions, 4 deletions
diff --git a/check_trans.pl b/check_trans.pl
index f50a03c26ee..6c366a81eff 100755
--- a/check_trans.pl
+++ b/check_trans.pl
@@ -431,7 +431,7 @@ sub get_diff_txt {
sub check_file {
my ($name, $revision, $mtime, $translator) = @_;
$revision ||= 'n/a';
- my ($oldr, $oldname, $original);
+ my ($oldr, $oldname, $original, $fromname);
warn "Checking $name, English revision $revision\n" if $opt_v;
my $docname = $name;
$docname =~ s#^$langto/##;
@@ -471,7 +471,7 @@ sub check_file {
warn "Translated by $translator\n" if $opt_v and $translator;
warn "Original is $original\n" if $opt_v and $original;
if ($original) {
- my ($fromname, $fromdir);
+ my ($fromdir);
$fromname = $name;
$fromname =~ s{^[^/]+}{$original};
$fromdir = $fromname;
@@ -541,8 +541,17 @@ sub check_file {
# Return if we're up-to-date or the original is missing
return if (defined($oldr) && ($oldr eq $revision || $revision eq 'n/a'));
- $oldname = $name;
- $oldname =~ s/^$to/$from/;
+ if ($original)
+ {
+ # Source is non-English, use name we set up above
+ $oldname = $fromname;
+ }
+ else
+ {
+ # Source is English
+ $oldname = $name;
+ $oldname =~ s/^$to/$from/;
+ }
my @logrev = split(/\./, $oldr);
$logrev[$#logrev] ++;

© 2014-2024 Faster IT GmbH | imprint | privacy policy