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.
It's a simple patch changing all:
t('<p>blah...<small>text</small>...</p>')
to
'<p>' . t('blah...<small>text</small>...') . '</p>'
and more such. Bulky though. Applies to all core modules.
Comment | File | Size | Author |
---|---|---|---|
#33 | strip-html.patch | 8.67 KB | webchick |
#31 | modules_cleanup_t_strings_redo_2_0.patch | 45.52 KB | Gurpartap Singh |
#29 | modules_cleanup_t_strings_redo_2.patch | 45.51 KB | Gurpartap Singh |
#28 | modules_cleanup_t_strings_redo_1.patch | 46.17 KB | webchick |
#26 | modules_cleanup_t_strings_redo_0.patch | 47.12 KB | Gurpartap Singh |
Comments
Comment #1
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedComment #2
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedIncludes changes to install.php file.
Comment #3
webchickExcellent! :D Thanks so much, Gurpartap!
Also updating this to critical, as it's a string-freeze thing.
one coding-style issue I notice off the bat:
should be:
(no space before the '
')
There are some other inconsistencies which your patch has highlighted, I'll go through and make another attempt once you post your new patch to include install.php.
Comment #4
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedFixed all the inconsistencies as discussed on IRC, hopefully. (with coding-style).
Comment #5
webchickWow, great!!!
There are still a couple minor nits, but overall I think this sucker is ready to go:
install.php
I'd keep the
<ul>
in there, as it adds to the context (this is an unordered list, rather than an ordered one).Remove space after
<p>
aggregator.module
Ah, ok. This was my fault. I wasn't specific enough about removing \"s..
Stuff like:
and
The originals here are actually fine; we're only caring about \" stuff in t() functions; no translator will ever look at these strings, so they can stay escaped so that we don't need concatenation which is expensive.
comment.module
Since the double-quotes here aren't required (as they are in HTML), here's a place I would just re-word the string to say 'edit' instead of "edit"
drupal.module
This one is borderline, but since the
</p>
is in the string, I would include the<p>
in it too.I have to run now; can continue looking at this later tonight. I've incorporated these comments, though, so up through drupal.module should be fixed.
Comment #6
webchickmarking needs work, as the rest of this needs looking at. It's very close, though!
Comment #7
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedFixes all the above issues, plus reverts more changes as in 'aggregator.module' explanation above. Some more minor fixes. Needs review.
Comment #8
webchickGreat!!
filter.module
For this, I just turned "you've" into "you have" to eliminate the \'
I actually reverted this change; if people change "Abbrev." they are likely going to want to change the long version too.
search.module
Reverted this one too... Same thing as before; let's keep the
<ul>
in the string for context.system.module
oopsie. ;) Fixed.
same as before, broke "you'll" into "you will"
Other than those very, very minor things, I couldn't find anything else wrong with this patch. Rolled again, with these changes. I'd love for one more person to look at this, and then we can mark RTBC.
Comment #9
pwolanin CreditAttribution: pwolanin commentedmarked http://drupal.org/node/97897 and http://drupal.org/node/97894 as duplicates of this.
part of http://drupal.org/node/97889 is duplicative, but not all.
Comment #10
webchickThis one has a few changes that ChrisKennedy found: a double-space in filter.module (not by this patch, but might as well fix it), and a couple of instances where the closing
</p>
was put inside the t().Comment #11
webchickAh, uploaded too soon. :) There was also a grammatical error in user help:
"administrators to register a new users by hand"
changed to:
"administrators to register new users by hand"
Thanks, ChrisKennedy!
Comment #12
webchickBtw, one other thing Chris found was that the default values of certain variable_gets were untranslated. Threw t()s around:
theme.inc, comment.module, node.module, system.module, user.module
put t() around Anonymous.
user.module
enclosed in t()
aggregator.moule
Actually I removed the t() here, since all other instances of it werent' t()d and "Drupal" is "Drupal" in any language. ;)
drupal.module
t()ed and changed "web site" to "website" since that's the word we use everywhere (I know most style guides recommend "web site" or "Web site" but most *users* search for "website" and there are twice as many instances of "website" in core as "web site," so there you go.) I also went through core and changed any instances of "web site" to "website" (there were about 10 of these, vs. 30-something of "website")
Comment #13
webchickOne final push for the evening; this includes some minor fixes that neclimdul found... some strings that began with newlines, a couple places where "'something' blah" was done that could've just as easily been '"something" blah' so was switched, etc.
Comment #14
webchickBtw, could the next person who reviews this please start from the BOTTOM and work their way up? I have a feeling there might be things we're missing down there because we're just plain too tired by the time we get to like watchdog module. ;)
Comment #15
neclimdulin the function
contact_admin_edit()
there are a couple strings that could have their quotes swapped.Line 171:
Line 177:
Comment #16
Freso CreditAttribution: Freso commentedI'll look this over later, when I get back from school. There were a few minor things I noticed when I gave it a very, very brief look over right now, but I'll go into more details when I get back.
Comment #17
drummI'd like to suggest doing one patch at a time by type of change. Scanning through and looking at moving tags is easy, as is changing quotes. But looking at both at once with some more case changes is a bit overwhelming.
Comment #18
webchickOk, coming up.
Comment #19
webchickOk. I think all of these have been moved out into other patches. Renaming this one to be more accurate of what this started out being a patch about.
greggles has stepped up to take a look at the patch in #4 and strip out anything that doesn't fall under this purview. I'll take another quick look at the latest one and see if there's anything else that needs a patch rolled for it.
Comment #20
gregglesOk, here is an attempt at doing just the
and related kinds of changes. I tried to keep out any of the \' or \" changes and I used my best judgment on when to leave the
in the translation.
I found an error (somehow a 'p> got left in a string) and I almost certainly introduced some new errors.
Reviews requested.
Comment #21
gregglesAlso, the patch in #20 was based on Gurpartap's patch from #4 - that was Webchick's advice.
Comment #22
webchickIn looking through, I noticed a couple things still in this patch that were cleaned up in subsequent patches. Gimmie a few mins...
Comment #23
webchickI *think* that's all of them. Marking back for review.
Comment #24
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedTotal rewrite against current HEAD (after recent new t()s related commits). Please review, look fine though.
Comment #25
webchickThat stray 'p> is back in book.module again. haven't looked at the rest yet.
Comment #26
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedComment #27
webchickChecked over once more with a fine-toothed comb; looks good. marking RTBC.
Comment #28
webchickRe-roll. Book.module's hunk failed, but that's because the text there was rewritten so it's no longer needed.
Comment #29
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedApplies to latest HEAD changes. When is this going in? :P
Comment #30
drummNo longer applies and the first two chunks have spacing issues. (Always put a space between . and any non-quote.)
Comment #31
Gurpartap Singh CreditAttribution: Gurpartap Singh commentedFixed the above stated issue. There are no more such mistakes in it.
Comment #32
drummCommitted to HEAD, although all chunks did not apply.
Comment #33
webchickThanks, Neil!
Here's the remainder of those hunks that failed.
Comment #34
drummCommitted to HEAD.
Comment #35
(not verified) CreditAttribution: commented