Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#7 | 1193832-gallery-list-title.patch | 1.22 KB | scroogie |
Gallery List P2.PNG | 27.31 KB | dddave | |
Gallery List P1.PNG | 63.89 KB | dddave |
Comments
Comment #1
dddave CreditAttribution: dddave commentedThis problem doesn`t occur with "My Galleries" which translates as expected to "Meine Galerien". What makes "Gallery list" so special?
Comment #2
justintime CreditAttribution: justintime commentedWell, 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?
Comment #3
dddave CreditAttribution: dddave commentedI 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).
Comment #4
justintime CreditAttribution: justintime commentedHmm, 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().
Comment #5
dddave CreditAttribution: dddave commentedCommenting 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?
Comment #6
justintime CreditAttribution: justintime commented@scroogie is more i18n knowledgeable than I am -- perhaps he can weigh in on this one?
Comment #7
scroogie CreditAttribution: scroogie commentedThe 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
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.
Comment #8
dddave CreditAttribution: dddave commentedApplied the patch and it seems to fix the problem.
Comment #9
justintime CreditAttribution: justintime commentedJust 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.
Comment #10
dddave CreditAttribution: dddave commentedAs 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.
Comment #11
scroogie CreditAttribution: scroogie commentedOh, I'm sorry. Apparently this fix was part of commit 5bf0327
http://drupalcode.org/project/node_gallery.git/blobdiff/6f4a4cd934b9bfa3...