I am currently testing my German translation and it seems to be more or less ready to go. However the infamous "Gallery List" makes trouble again. The string is correctly translated (see pic 2) but only displays in English. Ideas?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dddave’s picture

This problem doesn`t occur with "My Galleries" which translates as expected to "Meine Galerien". What makes "Gallery list" so special?

justintime’s picture

Well, I think I have an idea on how to fix it, but I can't for the life of me explain why "My Galleries" is translating but "Gallery List" is not. I hate to ask this, but you have cleared all caches a time or two, right?

dddave’s picture

I flushed like a pro. ;)

Could it be that the fact that we tie the Gallery list view to a certain url collides with how languages are negotiated?

I am going to test some different set-ups and report back.

Edit: tested different settings for content selection and language negotiation but to no avail. BUT I can confirm that the conflict stems from the fact that the view is tied to the /galleries url. Changing the view to display at /galleries to the "My galleries" display breaks the latter too (which works perfectly when visiting from the "My Galleries" link).

justintime’s picture

Hmm, out of curiosity, what happens when you comment out line 135 in node_gallery.pages.inc? It's the one that calls drupal_set_title().

dddave’s picture

Commenting out the line seems to help. The correct title is displayed (side-effect: NG now ignores the setting which display to use at /galleries and always uses the gallery list display.

Did you see my edit in #3?

justintime’s picture

Category: support » bug

@scroogie is more i18n knowledgeable than I am -- perhaps he can weigh in on this one?

scroogie’s picture

Status: Active » Needs review
FileSize
1.22 KB

The simple explanation is that drupal_set_title does not translate the titles. views_get_view just loads the View, it does not execute it, thus the title is untranslated here as well. So a simple fix is to change it to

drupal_set_title(t($title));

The problem is that this is user input, so we should check_plain() or filter_xss() or something.

To be honest, I'm not really convinced that this is the right way for setting the title, as it's hidden in the Views UI instead of being in the NG UI, but I already wrote that in #1043532 and we discuss it for the next version.

dddave’s picture

Applied the patch and it seems to fix the problem.

justintime’s picture

Just a note here that I'm not wanting to commit this until we get #1043532: Breadcrumbs use hardcoded strings instead of menu entries resolved. It's close, and I have a feeling that the outcome there will perhaps impact this issue as well.

dddave’s picture

As long as it gets fixed for NG3.0 I am fine. I am going to upload the de.po immediately after I checked the strings in the 3.0 release.

scroogie’s picture

Status: Needs review » Fixed

Oh, I'm sorry. Apparently this fix was part of commit 5bf0327

http://drupalcode.org/project/node_gallery.git/blobdiff/6f4a4cd934b9bfa3...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.