summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-01-26 13:24:33 -0500
committerJoey Hess <joey@gnu.kitenet.net>2009-01-26 13:24:33 -0500
commit98f0d672dfcbc178b80a2d5f9a8b2f2633c8f039 (patch)
tree8f38b89b481bad7f48f13de84a0b00e39d40e48c /IkiWiki
parentc5642119f7fafdafdaff05c0d37e787de221e9e2 (diff)
remove unnecessary parens
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 91bf8872f..1955ac304 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -709,7 +709,7 @@ sub istranslatablefile ($) {
my $file=shift;
return 0 unless defined $file;
- return 0 if (defined pagetype($file) && pagetype($file) eq 'po');
+ return 0 if defined pagetype($file) && pagetype($file) eq 'po';
return 0 if $file =~ /\.pot$/;
return 0 unless -e "$config{srcdir}/$file"; # underlay dirs may be read-only
return 1 if pagespec_match(pagename($file), $config{po_translatable_pages});
@@ -727,19 +727,19 @@ sub istranslatable ($) {
sub _istranslation ($) {
my $page=shift;
- $page='' unless (defined $page && length $page);
+ $page='' unless defined $page && length $page;
my $hasleadingslash = ($page=~s#^/##);
my $file=$pagesources{$page};
- return 0 unless (defined $file
+ return 0 unless defined $file
&& defined pagetype($file)
- && pagetype($file) eq 'po');
+ && pagetype($file) eq 'po';
return 0 if $file =~ /\.pot$/;
my ($masterpage, $lang) = ($page =~ /(.*)[.]([a-z]{2})$/);
- return 0 unless (defined $masterpage && defined $lang
+ return 0 unless defined $masterpage && defined $lang
&& length $masterpage && length $lang
&& defined $pagesources{$masterpage}
- && defined $config{po_slave_languages}{$lang});
+ && defined $config{po_slave_languages}{$lang};
return (maybe_add_leading_slash($masterpage, $hasleadingslash), $lang)
if istranslatable($masterpage);
@@ -792,7 +792,7 @@ sub otherlanguages ($) {
my $page=shift;
my %ret;
- return \%ret unless (istranslation($page) || istranslatable($page));
+ return \%ret unless istranslation($page) || istranslatable($page);
my $curlang=lang($page);
foreach my $lang
($config{po_master_language}{code}, keys %{$config{po_slave_languages}}) {
@@ -1161,7 +1161,7 @@ sub match_lang ($$;@) {
my $regexp=IkiWiki::glob2re($wanted);
my $lang=IkiWiki::Plugin::po::lang($page);
- if ($lang!~/^$regexp$/i) {
+ if ($lang !~ /^$regexp$/i) {
return IkiWiki::FailReason->new("file language is $lang, not $wanted");
}
else {