po: Better fix for missing underlay translation problem.
If a page is taken from the underlay, and one of the specified languages does not have po files in the underlay, it would create a broken link to the translated version of the page for that language. With this change, there's no broken link.master
parent
1be07eae46
commit
4ff3e2a540
|
@ -891,7 +891,7 @@ sub percenttranslated ($) {
|
||||||
my $page=shift;
|
my $page=shift;
|
||||||
|
|
||||||
$page=~s/^\///;
|
$page=~s/^\///;
|
||||||
return gettext("0") unless istranslation($page);
|
return gettext("N/A") unless istranslation($page);
|
||||||
my $file=srcfile($pagesources{$page});
|
my $file=srcfile($pagesources{$page});
|
||||||
my $masterfile = srcfile($pagesources{masterpage($page)});
|
my $masterfile = srcfile($pagesources{masterpage($page)});
|
||||||
my %options = (
|
my %options = (
|
||||||
|
@ -934,7 +934,7 @@ sub otherlanguagesloop ($) {
|
||||||
master => 1,
|
master => 1,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
elsif (istranslation($otherpage)) {
|
||||||
push @ret, {
|
push @ret, {
|
||||||
url => urlto_with_orig_beautiful_urlpath($otherpage, $page),
|
url => urlto_with_orig_beautiful_urlpath($otherpage, $page),
|
||||||
code => $lang,
|
code => $lang,
|
||||||
|
|
|
@ -307,7 +307,8 @@ pages as edit links, as if those pages do not exist.
|
||||||
That's really confusing, especially as clicking such a link
|
That's really confusing, especially as clicking such a link
|
||||||
brings up an edit form to create a new, english page.
|
brings up an edit form to create a new, english page.
|
||||||
|
|
||||||
This is with po_link_to=current or negotiated. With default, it doesn't happen..
|
This is with po_link_to=current or negotiated. With default, it doesn't
|
||||||
|
happen.. --[[Joey]]
|
||||||
|
|
||||||
Double commits of po files
|
Double commits of po files
|
||||||
--------------------------
|
--------------------------
|
||||||
|
@ -321,7 +322,7 @@ and then committed again. The second commit makes this change:
|
||||||
+"Content-Transfer-Encoding: ENCODING\n"
|
+"Content-Transfer-Encoding: ENCODING\n"
|
||||||
|
|
||||||
Same thing happens when a change to an existing page triggers a po file
|
Same thing happens when a change to an existing page triggers a po file
|
||||||
update.
|
update. --[[Joey]]
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
Loading…
Reference in New Issue