summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-06-08 18:27:40 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-06-08 18:33:54 -0400
commit5418385336e7eeab79166e7ddccefa6bdea8c759 (patch)
tree31fe6e4d56ea579c340e56bdce374d56dabc349a /debian
parent331cc6cca10cc01dd9730865c5078a24be3deedb (diff)
Optimise use of gettext, and avoid ugly warnings if Locale::gettext is not available.
The test suite was emitting a lot of ugly gettext warnings; setting LC_ALL didn't solve the problem for all locale setups (since ikiwiki remaps it to LANG, and ikiwiki didn't know about the C locale). People also seem generally annoyed by the messages when Locale::Gettext is not installed, and I suspect will be generally happier if it just silently doesn't localize. The optimisation came about when I noticed that the gettext sub was doing rather a lot of work each call just to see if localisation is needed. We can avoid that work by caching, and the best thing to cache is a version of the gettext sub that does exactly the right thing. This was slightly complicated by the locale setting, which might need to override the original locale (or lack thereof) after gettext has been called. So it needs to invalidate the cache in that case. It used to do it via a global variable, which I am happy to have also gotten rid of.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
1 files changed, 2 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 7f8257813..126c1826b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,8 @@ ikiwiki (3.15) UNRELEASED; urgency=low
name, to support several cases including mercurial's long user
names on the RecentChanges page, and urls with spaces being handled
by the 404 plugin.
+ * Optimise use of gettext, and avoid ugly warnings if Locale::gettext
+ is not available. Closes: #532285
-- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400