When I go to user's Subscriptions > taxonomy (user//subscriptions/taxa) page of a Spanish site, the vocabulary names show in English, though the names have been translated.

CommentFileSizeAuthor
#24 Translate-strings-1786506-24.patch5.48 KBLarsKramer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

salvis’s picture

But the terms are ok?

Is the vocabulary name translated on the taxonomy/term/% pages?

What mechanism are you using for translating the vocabulary names?

a6hiji7’s picture

I have used i18n for the vocabulary translations. The terms are ok, but I should mention that I have used translated terms i.e. the English term "Members" has a corresponding Spanish term "Meimbros". I have overriden the term pages with a view. The vocabulary translation is working in that page.

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

The vocabulary names are not translated on the admin/structure/taxonomy page either. I think this is an issue with the i18n module.

If you can be more specific as to what Subscriptions would need to do, I'll certainly consider it.

a6hiji7’s picture

I would like to know whether this IS a bug in this module or is a bug in another module. Or am I doing something wrong?

salvis’s picture

Category: bug » feature

I honestly don't know.

I have no idea whether i18n actually tries to translate vocabulary names or not. If you can point me to a place in core where i18n successfully translates vocabulary names, that might help.

Generally if a contrib module offers a functionality, such as translating things, it's that module's job to implement it. However, for major contribs, if it needs a little help, we'll surely try to accommodate it.

So, this issue is more a request for a missing feature than a bug report, and the i18n maintainers are in the best position to evaluate what's needed.

a6hiji7’s picture

Well you could be right. The issue could be with i18n, I am not sure. It may well be similar in nature to another issue that I had created - http://drupal.org/node/1682714.

drupalfan81’s picture

I am having the same issue. All my vocabulary terms are show up translated on my edit and view pages, but the actual vocabulary NAME is not getting translated. I have translated the string in translate strings, but it continues to show the English original name for that vocabulary. I am using Faceted search module to display the taxonomy in a navigational menu, so these vocabulary names absolutely must be translated.

Is this a limitation of Drupal? I don't understand, did you guys make any progress with this?

salvis’s picture

I am using Faceted search module to display the taxonomy in a navigational menu, so these vocabulary names absolutely must be translated.

Now this is completely unrelated to Subscriptions and it strengthens my suspicion that it's a i18n issue. Please move this there.

drupalfan81’s picture

....

drupalfan81’s picture

...

salvis’s picture

Status: Postponed (maintainer needs more info) » Active

@drupalfan81: Please stop abusing this thread now!

drupalfan81’s picture

you're not very helpful @Salvis. I was just trying to help the community find a solution to this bug. It seems you are being a bit counter productive to that process. But I have since moved the issue to the i18n thread. But the guy over there is about as helpful as you are. He's saying it's not an issue with his module and is pointing the finger back at you.

Hopefully someone will come along that will need this fix and know more about reading the module code than I and solve it and share with the community.

salvis’s picture

@drupalfan81:

you're not very helpful @Salvis. I was just trying to help the community find a solution to this bug. It seems you are being a bit counter productive to that process. But I have since moved the issue to the i18n thread. But the guy over there is about as helpful as you are. He's saying it's not an issue with his module and is pointing the finger back at you.

Hopefully someone will come along that will need this fix and know more about reading the module code than I and solve it and share with the community.

You come in here and hijack this thread for your issue with Faceted search module (#7), which is completely unrelated to Subscriptions. This issue queue is about the Subscriptions module and nothing else. You're not even using Subscriptions. Your "help" is out of place here.

If we'd be able to actually do something about this issue here in Subscriptions (see #5), this would do nada for your problem with Faceted search.

What is it that you don't understand about this situation?

drupalfan81’s picture

I WAS using subscriptions on this site that was in question and it wasn't working. I am using subscriptions on other sites I maintain (only in English) and they work fine. I never intended to hijack this thread, I was simply asking if the original poster happened to figure out why his terms were not translating. We are both experiencing the same issue on both of our sites. The issue with the language not translating was not limited to just the pages that were used for subscriptions, but also on the standard taxonomy pages. I was simply adding additional information (in case it was helpful). i.e. that I was using faceted search and it was also not showing up translated there.

How is it that you didn't get that from my original post:

"I am having the same issue. All my vocabulary terms are show up translated on my edit and view pages, but the actual vocabulary NAME is not getting translated (this part was assumed we were talking about on the subscriptions tax page as I am posting on this thread right?). I have translated the string in translate strings, but it continues to show the English original name for that vocabulary. I am using Faceted search module to display the taxonomy in a navigational menu, so these vocabulary names absolutely must be translated.

Is this a limitation of Drupal? I don't understand, did you guys make any progress with this?"

You should try being a nicer person. I was simple looking for help, wasn't attempting to steal the conversation or cause problems. Yet you came off very offensive and unhelpful. When you don't treat people as equals you can usually expect to get nada in return.

salvis’s picture

The issue with the language not translating was not limited to just the pages that were used for subscriptions, but also on the standard taxonomy pages.

This is an obvious indication that it cannot be fixed in Subscriptions.

I was simply adding additional information (in case it was helpful). i.e. that I was using faceted search and it was also not showing up translated there.

The Subscriptions queue is not the place to gather information about an issue that is not related to Subscriptions. You are not helping, you are polluting.

You should try being a nicer person. I was simple looking for help, wasn't attempting to steal the conversation or cause problems. Yet you came off very offensive and unhelpful. When you don't treat people as equals you can usually expect to get nada in return.

I am a nice and helpful person. If you read the beginning of this thread then you realize that my #8 was nice and to the point — the full amount of help that I'm able to give on this subject. Yet you continue to provoke me and waste my time with stuff that is outside of my court.

Whatever you were attempting to do or not do and why you decided to come back in #12 after three months, you've thoroughly messed up this thread.

#12:

But I have since moved the issue to the i18n thread. But the guy over there is about as helpful as you are.

Maybe you should consider the possibility that the problem is on your side...

In the past six years I've spent thousands of hours of my free time working for Drupal without earning a single buck with it. That's my free choice. And my free choice is also that I won't spend any more of my free time with you. Please leave my queue and don't come back.

drupalfan81’s picture

Sorry I have seemed to upset you. Was never my intention. The reason I posted was to see if the problem was related to this issue. A simple, no, your issue is different, look in this direction, or I would post a open issue with X module. Polite and helpful would have been nice, and there would have been no need for the banter back and forth. In the end the issue was a bug with faceted search. I posted on another thread where someone was also experiencing the same issue and we found it had to do with the faceted search module. Sometimes when you have a problem you don't know where the issue is stemming from, that would take a more experienced developer (like you).

So a user may post in the wrong thread, it would be helpful to just nicely inform them that the issue they are calling out is not related, and offer them a new direction to head in to find their solution. Another developer was that nice person and found out that the issue was with a bad line of code in the faceted search module and provided a fix. This helped me and several others that were experiencing the same issue.

Again, didn't mean to offend, was just here looking for help and answers. And greatly appreciate the work you have done for the community and the development scene. Guess we both just caught each other on bad days when patience was running thin.

Good luck to you!

webdrips’s picture

I can confirm that everything on my site with respect to taxonomy terms and content types has been translated and works properly throughout the rest of the site. However, only on the following two subscription-generated pages am I seeing issues:

  1. /user/uid/subscriptions/type: content type names in table not translated
  2. /user/uid/subscriptions/taxa: only the fieldset titles of the taxonomy vocabularies have issues (see HTML below); the taxonomy terms within the table in the fieldset are translated just fine with the latest dev version of i18n

BTW: just upgraded to the very latest dev version of i18n that says it fixes all label translation issues and probably adds in some patches I was using, but still no dice.

Here't the HTML output referenced in #2 above:

<a class="fieldset-title" href="#">
  <span class="fieldset-legend-prefix element-invisible">隐藏</span>
  Community Forum
</a>

I can provide a screenshot or two if if will help.

"Community Forum" should say "论坛" like it does elsewhere on the site. The

salvis’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

We need someone who actually uses i18n to investigate this.

I don't know what would be needed to get these items translated, and I don't have enough experience with i18n to work on this.

LarsKramer’s picture

There is some information here: Using the i18n API from other modules

It appears i18n_string_translate($name, $string, $options) should be called before displaying the string.

I don't know so much about coding though, so I am unsure about what to put as the $name parameter when calling that function.

LarsKramer’s picture

I forgot to say in my previous comment that in order to get translation of the content type names at all (for example on the create content-page), not only should the i18n "String Translation" module be enabled, but also the i18n "Multilingual content" module.

LarsKramer’s picture

Title: Vocabulary name not translated » Vocabulary and content type names not translated

The @name parameter mentioned in #20 might be what can be seen on the "Translate interface" page in the string column (below the actual string). So for example in the case of Drupals built-in "Basic page", the @name parameter should possibly be "node:type:page:name". I will see if I can get time later today to experiment with the code.

LarsKramer’s picture

I can now confirm that inserting the following piece of code after line 288 in the "subscriptions_content.admin.inc" file makes the translated content type names appear at the user subscriptions interface page:

if (module_exists('i18n_string')) {
  $type_name = i18n_string_translate("node:type:$type->type:name", $type->name);
 }

I guess similar modifications could be done for the general administrative configuration page, and the emails, and for the taxonomy part.

When I get time, I will continue with this and see if I can upload a patch to be reviewed.

LarsKramer’s picture

Assigned: Unassigned » LarsKramer
Status: Postponed (maintainer needs more info) » Active

I managed to have both vocabulary and content type names translated on all configuration pages. I still need to do some work with the mails, and some further testing.

LarsKramer’s picture

Title: Vocabulary and content type names not translated » Translate names of vocabularies, terms and content types
Status: Active » Needs review
FileSize
5.48 KB

Changed title to reflect this is a feature request.
Here is a patch that translates strings on the following pages:

  • user subscriptions form: content types and vocabularies
  • administrative configuration: content types and vocabularies
  • node subscription forms: content types and terms

Some work was already done in #1683186: Translate taxonomy terms on the User subscriptions page.
As mentioned in a previous comment, I don't have much coding experience. So please review carefully. In one case I removed a check_plain function, because apparently it was not needed.

I used the function i18n_string_translate, whereas in #1683186: Translate taxonomy terms on the User subscriptions page i18n_string is used. I don't know which is better, but followed the guidelines in paged linked to from comment #19

salvis’s picture

Thank you for your work on this, LarsKramer, and sorry for taking so long to reply.

Now we need reviews by people who use translated names — please...

salvis’s picture

Any reviewers out there?

Status: Needs review » Needs work

The last submitted patch, 24: Translate-strings-1786506-24.patch, failed testing.