API page: http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/t/7

Describe the problem you have found:

The D6 documentation about the t() function clearly describes the usage of the different placeholder types ! @ and %. This information is no longer available in the D7 documentation. This could be seen as basic Drupal knowledge but if its documented for D6 then i think it should also be documented for D7 in the same way.

Adding the info from the D6 page (copy-paste) should do just fine in this case.

Regards,
Eric Mulder

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs review
FileSize
1.95 KB

I was confused by this at one point too. In D7. the t() documentation now references format_string(), which includes documentation for the allowed key patterns. Perhaps we just need to clarify this?

xjm’s picture

Title: Documentation problem with t » t() documentation does not clearly indicate that $args options are documented in format_string() docs
jhodgdon’s picture

Status: Needs review » Needs work
Issue tags: +Needs backport to D7

That doc change looks good. But:

+ *   An associative array of replacements to make after translation.  Based

two spaces after the .

xjm’s picture

Status: Needs work » Needs review
FileSize
623 bytes
1.95 KB

Grr, bad thumbs.

Here's a reroll without the extra space.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to 8.x, thanks! Moving back to 7.x.

xjm’s picture

Status: Patch (to be ported) » Reviewed & tested by the community
FileSize
1.93 KB

Straight backport.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x. Thanks!

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