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.
Please, see attached patch.
Comment | File | Size | Author |
---|---|---|---|
#12 | theme_node_lang_2.patch | 616 bytes | markus_petrux |
#4 | theme_node_lang_1.patch | 592 bytes | chx |
#3 | theme_node_lang_0.patch | 583 bytes | markus_petrux |
theme_node_lang.patch | 529 bytes | markus_petrux | |
Comments
Comment #1
nsk CreditAttribution: nsk commentedI had a look on the patch and it looks ok. I am marking it for review for now, then if another contributor agrees I think it can be committed as it is.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedSorry, the patch needs work.
it should be
t('
%title
by %name', array('%title' => check_plain($node->title), '%name' => theme('username', $node));
and the other place needs also work.
Comment #3
markus_petrux CreditAttribution: markus_petrux commentedSweet! Patch reworked.
Comment #4
chx CreditAttribution: chx commentedPatch rerolled so it conforms to our standards.
Comment #5
Bèr Kessels CreditAttribution: Bèr Kessels commentedI tested the patch and can confirm it works. Though some themes don't use this (bluebeach did not honour it, it seems).
Comment #6
markus_petrux CreditAttribution: markus_petrux commentedbluebeach is not on the drupal repository. Anyway, this would only affects themes that do not override the theme_node method.
Comment #7
Dries CreditAttribution: Dries commentedI don't see why we put
<h2 class="title">%title</h2>
inside the t() function. Translations should not be used to modify HTML code.Comment #8
markus_petrux CreditAttribution: markus_petrux commentedhmm... I could re-work the first one, using t('by') w/o spaces.
Better approach or ... ?
Comment #9
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedDries, there is no way to avoid that. the intend is not to change the markup, the intend is to make a proper sentence for translation.
Comment #10
Dries CreditAttribution: Dries commentedInstead of writing:
maybe you can write:
Maybe?
Comment #11
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedyep, good idea
Comment #12
markus_petrux CreditAttribution: markus_petrux commentedI like it, Makes sense.
Comment #13
Dries CreditAttribution: Dries commentedCommitted to HEAD. Thanks.
Comment #14
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedI think your patch should look like this:
instead of what you did.. this is the way we consistently use in core, so without the <h2>-tags. Setting back to 'code needs work'..
Comment #15
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedsorry, stefan, the patch that went in was better.
Comment #16
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedKilles, I'll agree about the fact it's better but now we have to change all the translatable strings once again to make them all consistent. Or do you think we should wait untill after 4.7 is released?
Comment #17
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedthere were two strings added. I will regenerate the pot files or the next beta or rc.
Comment #18
(not verified) CreditAttribution: commented