If you have a multilingual site and you visit a users subscriptions page: http://mysite/fra/user/1/subscriptions/taxa, the terms will not be shown in the proper language.

Comments

joel_osc’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

Here is a patch that will address the issue.

karing’s picture

Status: Needs review » Reviewed & tested by the community

Thank you - looks great. I installed it - working fine.

salvis’s picture

Title: User subscriptions not translated for taxonomy terms » Translate taxonomy terms on the User subscriptions page
Category: bug » feature
Status: Reviewed & tested by the community » Fixed

This is a feature request, not a bug, because i18n_string() is not part of core.

Pushed to the -dev version, thanks!

What about the terms on the node subscribe form? Do they need similar treatment?

joel_osc’s picture

Yes it looks like they will too...I didn't see it because the site we are working on has this issue #1575838: Add support to allow making term subscribe options visible for hidden term fields which we are still trying to track down. If we figure out the second issue then I will be able to create and test a patch for terms on the node page as well. I believe the code will look like this:

105                 if (!in_array($term->vid, $vids_to_omit)) {
106                   $tid = $term->tid;
107                   $term_name = function_exists('i18n_string') ? i18n_string('taxonomy:term:' . $term->tid . ':    name', $term->name, array('langcode' => $GLOBALS['language']->language)) : $term->name;
108                   $options['tid'][] = array(
109                     'name' => t('To content in %term', array('%term' => $term_name)),
110                     'params' => array('module' => 'node', 'field' => 'tid', 'value' => $tid),
111                     'link' => 'taxa/' . $tid,
112                   );
113                   $options['tid'][] = array(
114                     'name' => t('To content in %term by %name', array('%term' => $term_name, '%name' => ($node    ->uid ? check_plain($node->name) : variable_get('anonymous', '???')))),
115                     'params' => array('module' => 'node', 'field' => 'tid', 'value' => $tid, 'author_uid' => $    node->uid),
116                     'link' => 'taxa/' . $tid . '/' . $node->uid,
117                   );
salvis’s picture

Status: Fixed » Needs work

Ok, let's keep it open for a second round then.

LarsKramer’s picture

Could we move this to #1786506: Translate names of vocabularies, terms and content types? and close this issue?

salvis’s picture

Status: Needs work » Closed (fixed)

I agree.