Revert "Scan for language files during bootstrap instead of using a hard-coded list."
authorArt Cancro <ajc@uncensored.citadel.org>
Sun, 26 Feb 2012 20:15:23 +0000 (15:15 -0500)
committerArt Cancro <ajc@uncensored.citadel.org>
Sun, 26 Feb 2012 20:15:23 +0000 (15:15 -0500)
This reverts commit 018a1f2aef63580bceba968c91255f7c6aea0c1c.

webcit/.gitignore
webcit/gettext.c
webcit/mk_module_init.sh

index 042f838f2b67e6a88b083b95c8d7fe28f76430a5..2be77a2f282fe9c78f6dda262b9cb7abe2415447 100644 (file)
@@ -13,7 +13,6 @@ ical_maps.c
 locale/
 modules_init.c
 modules_init.h
-language_list.c
 po/Makefile
 setup
 sysdep.h
index 1e51e93acfc075106e1b5af2bd01205bbc5b300a..4df641a28e7ce01f4eb1a8fda82878ae59140fa1 100644 (file)
 #define SEARCH_LANG 20         /* how many langs should we parse? */
 
 #ifdef ENABLE_NLS
-#include "language_list.h"
+/* actual supported locales */
+const char *AvailLang[] = {
+       "C",
+       "bg_BG",
+       "cs_CZ",
+       "en_US",
+       "da_DK",
+       "de_DE",
+       "el_GR",
+       "en_GB",
+       "es_ES",
+       "et_EE",
+       "fi_FI",
+       "fr_FR",
+       "hu_HU",
+       "it_IT",
+       "nl_NL",
+       "pt_BR",
+       "ru_RU",
+       "zh_CN",
+       "he_IL",
+       "kk_KK",
+       "ro_RO",
+       "sl_SL",
+       "tr_TR",
+       ""
+};
 
 const char **AvailLangLoaded;
 long nLocalesLoaded = 0;
@@ -286,7 +312,12 @@ void initialize_locales(void) {
                        wc_locales[0]
                );
                if (wc_locales[nLocalesLoaded] == NULL) {
-                       syslog(1, "locale for %s disabled: %s", AvailLang[i], strerror(errno));
+                       syslog(1, "locale for %s disabled: %s (domain: %s, path: %s)",
+                               AvailLang[i],
+                               strerror(errno),
+                               textdomain(NULL),
+                               bindtextdomain(textdomain(NULL), NULL)
+                       );
                }
                else {
                        syslog(3, "Found locale: %s", AvailLang[i]);
index 6f6871bf20d147cf90d2461659b463677cb735fd..ae1cd375133a4c594c57fc073610fed36459eab6 100755 (executable)
@@ -26,7 +26,6 @@ H_FILE="$CUR_DIR/modules_init.h"
 MOD_FILE="$CUR_DIR/Make_modules"
 SRC_FILE="$CUR_DIR/Make_sources"
 U_FILE="$CUR_DIR/modules_upgrade.c"
-L_FILE="$CUR_DIR/language_list.h"
 
 /usr/bin/printf "Scanning extension modules for entry points.\n"
 
@@ -502,25 +501,3 @@ cat <<EOF  >> $H_FILE
 #endif /* MODULES_INIT_H */
 
 EOF
-
-
-### Now see what language modules we have installed ###
-/usr/bin/printf "Scanning language modules.\n"
-
-cat >$L_FILE <<EOF
-/* This file is generated automatically by mk_module_init.sh
- * Editing it by hand would be an exercise in futility.
- */
-const char *AvailLang[] = {
-        "C",
-EOF
-
-for x in po/webcit/*.po
-do
-       echo \  \"`basename $x | sed s/\.po\$//g`\",
-done >>$L_FILE
-
-cat >>$L_FILE <<EOF
-        ""
-};
-EOF