Removed svn:executable prop from some files.
authorparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Fri, 27 Jul 2007 16:17:45 +0000 (16:17 +0000)
committerparasti <parasti@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Fri, 27 Jul 2007 16:17:45 +0000 (16:17 +0000)
Changed language_init to check the NEVERBALL_LOCALE environment variable
and use the hard-coded default location as a fall-back.  Useful for
shell scripts.

git-svn-id: https://s.snth.net/svn/neverball/trunk@1083 78b8d119-cf0a-0410-b17c-f493084dd1d7

scripts/extractpo.sh [changed mode: 0755->0644]
scripts/import-metadada.sh [changed mode: 0755->0644]
share/i18n.c

old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index ba181a6..9478f1b 100644 (file)
@@ -32,11 +32,12 @@ static const char *languages[][2] = {
 
 void language_init(const char *domain, const char *locale_dir)
 {
-    setlocale(LC_ALL, "");
-    bindtextdomain(domain, locale_dir);
-    textdomain(domain);
+    char *dir = getenv("NEVERBALL_LOCALE");
 
+    setlocale(LC_ALL, "");
+    bindtextdomain(domain, dir ? dir : locale_dir);
     bind_textdomain_codeset(domain, "UTF-8");
+    textdomain(domain);
 }
 
 void language_set(int l)