diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2018-12-25 22:41:19 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2018-12-25 22:41:19 (EST) |
commit | 8d5bfc4679824ca505f5982ee602e5b79774f890 (patch) | |
tree | 6503e59fb9c27431cc5ae6ef738cf1c766b58611 /lib/locale.sh | |
parent | 83463846ac7c239bf8dbd35f077cd4194d50323f (diff) |
libopkbuild: Move function definitions before points of use
Diffstat (limited to 'lib/locale.sh')
-rw-r--r-- | lib/locale.sh | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/locale.sh b/lib/locale.sh index c1fae2d..f168037 100644 --- a/lib/locale.sh +++ b/lib/locale.sh @@ -32,6 +32,24 @@ ob_get_text_domain() return 0 } +_ob_try_load_messages() +{ + local locale= + local ms= + + locale="${1}" + ms="$(printf "${_OB_LOCALE_PATH}" \ + "${locale}" "${_OB_TEXT_DOMAIN}")" + + if [ -f "${ms}" ]; then + . "${ms}" + else + return 1 + fi + + return 0 +} + ob_set_text_domain() { if [ ${#} -eq 1 ]; then @@ -96,21 +114,3 @@ ob_get_msg() return 0 } - -_ob_try_load_messages() -{ - local locale= - local ms= - - locale="${1}" - ms="$(printf "${_OB_LOCALE_PATH}" \ - "${locale}" "${_OB_TEXT_DOMAIN}")" - - if [ -f "${ms}" ]; then - . "${ms}" - else - return 1 - fi - - return 0 -} |