summaryrefslogtreecommitdiffstats
path: root/src/locale.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/locale.sh')
-rw-r--r--src/locale.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/locale.sh b/src/locale.sh
index 1437bb8..7ec9359 100644
--- a/src/locale.sh
+++ b/src/locale.sh
@@ -22,6 +22,24 @@
DEFAULT_LOCALE='en_US'
+_try_load_locale()
+{
+ local localedir="${1}"
+ local locale="${2}"
+ shift 2
+ local ms=
+
+ for ms in "${localedir}/${locale}/LC_MESSAGES/${TEXTDOMAIN}.ms" \
+ "${localedir}/${locale}.ms"; do
+ if [ -f "${ms}" ]; then
+ . "${ms}"
+ return 0
+ fi
+ done
+
+ return 1
+}
+
load_locale()
{
local localedir=
@@ -68,21 +86,3 @@ get_msg()
return 0
}
-
-_try_load_locale()
-{
- local localedir="${1}"
- local locale="${2}"
- shift 2
- local ms=
-
- for ms in "${localedir}/${locale}/LC_MESSAGES/${TEXTDOMAIN}.ms" \
- "${localedir}/${locale}.ms"; do
- if [ -f "${ms}" ]; then
- . "${ms}"
- return 0
- fi
- done
-
- return 1
-}