]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki.pm
web commit by JoshTriplett
[git.ikiwiki.info.git] / IkiWiki.pm
index 8a3c817558781433931e4dd15b3a2bb5e3745df0..10d178f3efddc531ab766b413d371ee4aa8789e8 100644 (file)
@@ -56,6 +56,8 @@ sub defaultconfig () { #{{{
        wrappermode => undef,
        svnrepo => undef,
        svnpath => "trunk",
+       gitorigin_branch => "origin",
+       gitmaster_branch => "master",
        srcdir => undef,
        destdir => undef,
        pingurl => [],
@@ -838,8 +840,15 @@ sub gettext { #{{{
        # Only use gettext in the rare cases it's needed.
        if (exists $ENV{LANG} || exists $ENV{LC_ALL} || exists $ENV{LC_MESSAGES}) {
                if (! $gettext_obj) {
-                       eval q{use Locale::gettext ''};
-                       $gettext_obj=Locale::gettext->domain('ikiwiki');
+                       $gettext_obj=eval q{
+                               use Locale::gettext q{textdomain};
+                               Locale::gettext->domain('ikiwiki')
+                       };
+                       if ($@) {
+                               print STDERR "$@";
+                               $gettext_obj=undef;
+                               return shift;
+                       }
                }
                return $gettext_obj->get(shift);
        }