summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/node/node.admin.inc6
-rw-r--r--modules/system/page.tpl.php6
-rw-r--r--modules/translation/translation.module5
3 files changed, 11 insertions, 6 deletions
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index f4b7e85aa..d665233c5 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -380,16 +380,18 @@ function node_admin_nodes() {
'#submit' => array('node_admin_nodes_submit'),
);
+ $languages = language_list();
$destination = drupal_get_destination();
$nodes = array();
while ($node = db_fetch_object($result)) {
$nodes[$node->nid] = '';
- $form['title'][$node->nid] = array('#value' => l($node->title, 'node/'. $node->nid) .' '. theme('mark', node_mark($node->nid, $node->changed)));
+ $options = empty($node->language) ? array() : array('language' => $languages[$node->language]);
+ $form['title'][$node->nid] = array('#value' => l($node->title, 'node/'. $node->nid, $options) .' '. theme('mark', node_mark($node->nid, $node->changed)));
$form['name'][$node->nid] = array('#value' => check_plain(node_get_types('name', $node)));
$form['username'][$node->nid] = array('#value' => theme('username', $node));
$form['status'][$node->nid] = array('#value' => ($node->status ? t('published') : t('not published')));
if ($multilanguage) {
- $form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : module_invoke('locale', 'language_name', $node->language));
+ $form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : t($languages[$node->language]->name));
}
$form['operations'][$node->nid] = array('#value' => l(t('edit'), 'node/'. $node->nid .'/edit', array('query' => $destination)));
}
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php
index cbbd84a40..8a110e18a 100644
--- a/modules/system/page.tpl.php
+++ b/modules/system/page.tpl.php
@@ -32,6 +32,8 @@
* path, whether the user is logged in, and so on.
*
* Site identity:
+ * - $front_page: The URL of the front page. Use this instead of $base_path,
+ * when linking to the front page. This includes the language domain or prefix.
* - $logo: The path to the logo image, as defined in theme configuration.
* - $site_name: The name of the site, empty when display has been disabled
* in theme settings.
@@ -89,7 +91,7 @@
<div id="logo-title">
<?php if (!empty($logo)): ?>
- <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
+ <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
</a>
<?php endif; ?>
@@ -97,7 +99,7 @@
<div id="name-and-slogan">
<?php if (!empty($site_name)): ?>
<h1 id="site-name">
- <a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
+ <a href="<?php print $front_page ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
</h1>
<?php endif; ?>
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index 466bedb63..a26b3973c 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -164,11 +164,12 @@ function translation_link($type, $node = NULL, $teaser = FALSE) {
if ($type == 'node' && ($node->tnid) && $translations = translation_node_get_translations($node->tnid)) {
// Do not show link to the same node.
unset($translations[$node->language]);
- $languages = locale_language_list('native');
+ $languages = language_list();
foreach ($translations as $language => $translation) {
$links["node_translation_$language"] = array(
- 'title' => $languages[$language],
+ 'title' => $languages[$language]->native,
'href' => "node/$translation->nid",
+ 'language' => $languages[$language],
'attributes' => array('title' => $translation->title, 'class' => 'translation-link')
);
}