summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/locale.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index 97cff119d..d31755e23 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -831,7 +831,7 @@ function locale_translate_delete($lid) {
function locale_add_language($langcode, $name, $native, $direction = LANGUAGE_RTL, $domain = '', $prefix = '', $verbose = TRUE) {
// Default prefix on language code.
if (empty($prefix)) {
- $prefix = $code;
+ $prefix = $langcode;
}
db_query("INSERT INTO {languages} (language, name, native, direction, domain, prefix) VALUES ('%s', '%s', '%s', %d, '%s', '%s')", $langcode, $name, $native, $direction, $domain, $prefix);
@@ -839,7 +839,7 @@ function locale_add_language($langcode, $name, $native, $direction = LANGUAGE_RT
// Add empty translations for strings (to optimize locale())
$result = db_query("SELECT lid FROM {locales_source}");
while ($string = db_fetch_object($result)) {
- db_query("INSERT INTO {locales_target} (lid, language, translation) VALUES (%d,'%s', '')", $string->lid, $code);
+ db_query("INSERT INTO {locales_target} (lid, language, translation) VALUES (%d,'%s', '')", $string->lid, $langcode);
}
// Set message depending on the verbosity required.
@@ -1130,7 +1130,7 @@ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NUL
// Some real string to import
else {
- $comments = _locale_import_shorten_comments($value['#']);
+ $comments = _locale_import_shorten_comments(empty($value['#']) ? array() : $value['#']);
// Handle a translation for some plural string
if (strpos($value['msgid'], "\0")) {