summaryrefslogtreecommitdiffstats
path: root/lib/common.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-22 01:32:16 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-22 01:32:16 (EDT)
commit64cf6bb223423578b4aba393727debf0bb7295bd (patch)
treec01233c27c71a9cec762934bb18e6dc791cfbb9c /lib/common.sh
parent1a2a04be263600a2c90a498ea9e443e48d894dd1 (diff)
Move common load/init logic into libopkhelper.
Diffstat (limited to 'lib/common.sh')
-rw-r--r--lib/common.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/common.sh b/lib/common.sh
index 14762db..b0c465c 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -48,3 +48,15 @@ _oh_return()
return ${1}
}
+
+oh_init()
+{
+ ob_use locale
+ ob_use output
+
+ # Since nothing other than opkhelper is supposed to use libopkhelper, we can
+ # do strange things like affecting application-wide locale settings from the
+ # library and assume that no one will play with them.
+ ob_set_locale_path '@@LOCALEDIR@@/%s/LC_MESSAGES/%s.ms'
+ ob_set_text_domain 'opkhelper'
+}