Great module, thanks !
I'm working on a french localization, and I get galleries titles like "AUser's Galleries" ; the problem is that the "'s" is hardcoded and cannot be translated (my need is: "Galeries de AUser") :
function node_gallery_list_galleries_title($account, $content_type = NULL) {
...
$name = $user->uid == $account->uid ? "My" : $account->name . '\'s'; // Line 1204
...
return t('@user @gallery Galleries', array('@user' => $name, '@gallery' => $gallery_name)); // Line 1206
The available string for localization is '@user @gallery Galleries'
, so there's no way to process the "'s". Moreover the apostrophe is shown encoded ('
is written) because the placeholder, beginning by @, requires sanitization, and the simple quote is in the value...
I also noticed that when I click in the breadcrumb's link "AUser's galleries", for instance having a path /galleries/3
, the second argument received in the above function is ''
(an empty string), whereas it is supposed to be NULL in the code.
I'm working on a patch, coming soon...
Comment | File | Size | Author |
---|---|---|---|
#1 | node_gallery-hardcoded_localization_of_s-1874348-1.patch | 1.58 KB | pverrier |
Comments
Comment #1
pverrier CreditAttribution: pverrier commentedHere's the patch.
Comment #2
zengenuity CreditAttribution: zengenuity commentedThanks! I'm away on vacation for the next week, but will review the patch when I get back.
Comment #3
zengenuity CreditAttribution: zengenuity commentedPatch looks good. Committed to dev: http://drupalcode.org/project/node_gallery.git/commit/f6078b0
Comment #4
pverrier CreditAttribution: pverrier commentedThanks!
Comment #6
jackc2015 CreditAttribution: jackc2015 commentedThank you so much pverrier for the patch!
It resolved this issue as well
http://drupal.org/node/1254722
Comment #7
pverrier CreditAttribution: pverrier commentedHappy to help!