#define SEARCH_LANG 20 /* how many langs should we parse? */
#ifdef ENABLE_NLS
-/* 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",
- ""
-};
+#include "language_list.h"
const char **AvailLangLoaded;
long nLocalesLoaded = 0;
wc_locales[0]
);
if (wc_locales[nLocalesLoaded] == NULL) {
- syslog(1, "locale for %s disabled: %s (domain: %s, path: %s)",
- AvailLang[i],
- strerror(errno),
- textdomain(NULL),
- bindtextdomain(textdomain(NULL), NULL)
- );
+ syslog(1, "locale for %s disabled: %s", AvailLang[i], strerror(errno));
}
else {
syslog(3, "Found locale: %s", AvailLang[i]);
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"
#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