Index: faq.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/faq/Attic/faq.admin.inc,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 faq.admin.inc
--- faq.admin.inc 5 Sep 2008 12:45:04 -0000 1.1.2.4
+++ faq.admin.inc 25 Oct 2008 22:03:35 -0000
@@ -313,7 +313,7 @@ function faq_weight_settings_form($form_
if (!taxonomy_term_count_nodes($term->tid, 'faq')) {
continue;
}
- $options[$term->tid] = $term->name;
+ $options[$term->tid] = faq_tt("taxonomy:term:$term->tid:name", $term->name);
$form['choose_cat']['faq_category'] = array(
'#type' => 'select',
'#title' => t('Choose a category'),
Index: faq.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/faq/faq.module,v
retrieving revision 1.1.4.52.2.82
diff -u -p -r1.1.4.52.2.82 faq.module
--- faq.module 25 Oct 2008 20:38:49 -0000 1.1.4.52.2.82
+++ faq.module 25 Oct 2008 22:03:35 -0000
@@ -399,7 +399,7 @@ function faq_page($tid = 0) {
if (!empty($tid) && $term = taxonomy_get_term($tid)) {
$title = variable_get('faq_title', 'Frequently Asked Questions');
if (arg(0) == 'faq' && is_numeric(arg(1))) {
- drupal_set_title(check_plain($title . ($title ? ' - ' : '') . $term->name));
+ drupal_set_title(check_plain($title . ($title ? ' - ' : '') . faq_tt("taxonomy:term:$term->tid:name", $term->name)));
}
if ($category_display == 'hide_qa') {
drupal_add_js(drupal_get_path('module', 'faq') .'/faq.js', 'module');
@@ -669,7 +669,7 @@ function faq_block($op = 'list', $delta
$block['subject'] = t('FAQ Categories');
$items = array();
foreach ($terms as $name => $tid) {
- $items[] = l($name, 'faq/'. $tid);
+ $items[] = l(faq_tt("taxonomy:term:$tid:name", $name), 'faq/'. $tid);
}
$list_style = variable_get('faq_category_listing', 'ul');
$block['content'] = theme('item_list', $items, NULL, $list_style);
@@ -829,7 +829,7 @@ function _get_indented_faq_terms($vid, $
$desc = '';
if (!empty($term->description)) {
$desc = '
';
- $desc .= check_markup($term->description) ."
";
+ $desc .= check_markup(faq_tt("taxonomy:term:$term->tid:description", $term->description)) ."";
}
// See if this term has any nodes itself, should it be a link?
@@ -849,14 +849,14 @@ function _get_indented_faq_terms($vid, $
if ($hide_child_terms) {
$count = $tree_count;
}
- $cur_item = $term_image . l($term->name, $path) ." ($count) ". $desc;
+ $cur_item = $term_image . l(faq_tt("taxonomy:term:$term->tid:name", $term->name), $path) ." ($count) ". $desc;
}
else {
- $cur_item = $term_image . l($term->name, $path) . $desc;
+ $cur_item = $term_image . l(faq_tt("taxonomy:term:$term->tid:name", $term->name), $path) . $desc;
}
}
else {
- $cur_item = $term_image . check_plain($term->name) . $desc;
+ $cur_item = $term_image . check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name)) . $desc;
}
$cur_item .= '';
@@ -1190,8 +1190,8 @@ function faq_view_child_category_headers
$term_image = taxonomy_image_display($child_term->tid, array('class' => 'faq_tax_image'));
}
- $term_vars['link'] = l($child_term->name, "faq/$child_term->tid");
- $term_vars['description'] = check_markup($child_term->description);
+ $term_vars['link'] = l(faq_tt("taxonomy:term:$child_term->tid:name", $child_term->name), "faq/$child_term->tid");
+ $term_vars['description'] = check_markup(faq_tt("taxonomy:term:$child_term->tid:description", $child_term->description));
$term_vars['count'] = $term_node_count;
$term_vars['term_image'] = $term_image;
$child_categories[] = $term_vars;
@@ -1238,10 +1238,10 @@ function faq_set_breadcrumb($term = NULL
$breadcrumb = array();
if (module_exists("taxonomy") && $term) {
- $breadcrumb[] = l($term->name, 'faq/'. $term->tid);
+ $breadcrumb[] = l(faq_tt("taxonomy:term:$term->tid:name", $term->name), 'faq/'. $term->tid);
while ($parents = taxonomy_get_parents($term->tid)) {
$term = array_shift($parents);
- $breadcrumb[] = l($term->name, 'faq/'. $term->tid);
+ $breadcrumb[] = l(faq_tt("taxonomy:term:$term->tid:name", $term->name), 'faq/'. $term->tid);
}
}
$breadcrumb[] = l(variable_get('faq_title', 'Frequently Asked Questions'), 'faq');
@@ -1263,3 +1263,10 @@ function faq_preprocess_page(&$variables
$variables['breadcrumb'] = theme('breadcrumb', faq_set_breadcrumb($term));
}
}
+
+/**
+ * Helper function for when i18ntaxonomy module is not installed.
+ */
+function faq_tt($string_id, $default, $language = NULL) {
+ return function_exists('tt') ? tt($string_id, $default, $language) : $default;
+}
Index: includes/faq.hide_answer.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/faq/includes/Attic/faq.hide_answer.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 faq.hide_answer.inc
--- includes/faq.hide_answer.inc 12 Jun 2008 11:16:30 -0000 1.1.2.1
+++ includes/faq.hide_answer.inc 25 Oct 2008 22:03:35 -0000
@@ -86,16 +86,16 @@ function template_preprocess_faq_categor
// Configure header.
$variables['category_depth'] = $term->depth;
- $variables['category_name'] = check_plain($term->name);
+ $variables['category_name'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
if ($category_display == 'hide_qa') {
- $variables['header_title'] = l($term->name, "faq/$term->tid");
+ $variables['header_title'] = l(faq_tt("taxonomy:term:$term->tid:name", $term->name), "faq/$term->tid");
}
else {
- $variables['header_title'] = check_plain($term->name);
+ $variables['header_title'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
}
// Configure category description.
- $variables['description'] = check_markup($term->description);
+ $variables['description'] = check_markup(faq_tt("taxonomy:term:$term->tid:description", $term->description));
// Get list of sub-categories if necessary.
$child_categories = array();
Index: includes/faq.new_page.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/faq/includes/Attic/faq.new_page.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 faq.new_page.inc
--- includes/faq.new_page.inc 12 Jun 2008 11:16:30 -0000 1.1.2.1
+++ includes/faq.new_page.inc 25 Oct 2008 22:03:35 -0000
@@ -73,14 +73,14 @@ function template_preprocess_faq_categor
// Configure header.
$variables['category_depth'] = $term->depth;
if ($category_display == 'hide_qa') {
- $variables['header_title'] = l($term->name, "faq/$term->tid");
+ $variables['header_title'] = l(faq_tt("taxonomy:term:$term->tid:name", $term->name), "faq/$term->tid");
}
else {
- $variables['header_title'] = check_plain($term->name);
+ $variables['header_title'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
}
// Configure category description.
- $variables['description'] = check_markup($term->description);
+ $variables['description'] = check_markup(faq_tt("taxonomy:term:$term->tid:description", $term->description));
// Get list of sub-categories if necessary.
$child_categories = array();
Index: includes/faq.questions_inline.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/faq/includes/Attic/faq.questions_inline.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 faq.questions_inline.inc
--- includes/faq.questions_inline.inc 12 Jun 2008 11:16:30 -0000 1.1.2.1
+++ includes/faq.questions_inline.inc 25 Oct 2008 22:03:35 -0000
@@ -103,14 +103,14 @@ function template_preprocess_faq_categor
// Configure header.
$variables['category_depth'] = $term->depth;
if ($category_display == 'hide_qa') {
- $variables['header_title'] = l($term->name, "faq/$term->tid");
+ $variables['header_title'] = l(faq_tt("taxonomy:term:$term->tid:name", $term->name), "faq/$term->tid");
}
else {
- $variables['header_title'] = check_plain($term->name);
+ $variables['header_title'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
}
// Configure category description.
- $variables['description'] = check_markup($term->description);
+ $variables['description'] = check_markup(faq_tt("taxonomy:term:$term->tid:description", $term->description));
// Get list of sub-categories if necessary.
$child_categories = array();
Index: includes/faq.questions_top.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/faq/includes/Attic/faq.questions_top.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 faq.questions_top.inc
--- includes/faq.questions_top.inc 12 Jun 2008 11:16:30 -0000 1.1.2.1
+++ includes/faq.questions_top.inc 25 Oct 2008 22:03:35 -0000
@@ -99,16 +99,16 @@ function template_preprocess_faq_categor
// Configure header.
$variables['category_depth'] = $term->depth;
- $variables['category_name'] = check_plain($term->name);
+ $variables['category_name'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
if ($category_display == 'hide_qa') {
- $variables['header_title'] = l($term->name, "faq/$term->tid");
+ $variables['header_title'] = l(faq_tt("taxonomy:term:$term->tid:name", $term->name), "faq/$term->tid");
}
else {
- $variables['header_title'] = check_plain($term->name);
+ $variables['header_title'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
}
// Configure category description.
- $variables['description'] = check_markup($term->description);
+ $variables['description'] = check_markup(faq_tt("taxonomy:term:$term->tid:description", $term->description));
// Get list of sub-categories if necessary.
$child_categories = array();
@@ -236,7 +236,7 @@ function template_preprocess_faq_categor
}
$variables['use_teaser'] = $teaser;
$variables['nodes'] = $nodes;
- $variables['category_name'] = check_plain($term->name);
+ $variables['category_name'] = check_plain(faq_tt("taxonomy:term:$term->tid:name", $term->name));
$variables['category_depth'] = $term->depth;
$variables['display_header'] = FALSE;
$variables['answer_category_name'] = variable_get('faq_answer_category_name', FALSE);