follow up from http://drupal.org/node/299706

hass:
>There are many translation bugs inside and strings that are not t'ified.

me:
>I do. What strings do you talk about hass?

>I've already noticed the inside of t(), is there anything else?

>@Untranslated strings: Note that the value of 'help' properties shouldn't be t'ified by modules - it's done by rules. This is necessary to >prevent caching of translated strings - analogous to the titles of drupal menu item

Comments

fago’s picture

grml.
>I've already noticed the inside of t(), is there anything else?
This is referring to a "pre" tag.

hass’s picture

1. Yes, t() is missing on help text's. If you do not add t() around all strings, POTX module is not able to find and extract the string and then we are not able to translate them! Not sure what the caching issue is here, but this is for sure the wrong way.
2. Additional some other t() contain invalid constructs like t('Foo\'s.'). This must be changed to t("Foo's.").
3. There was something else I cannot remember...

hass’s picture

3. There was some wrong l() constructs inside that contained context sensitive strings.

fago’s picture

Title: rules integration: make sure t() is used correctly » make sure t() is used correctly
Status: Active » Needs review
StatusFileSize
new4.45 KB

ad 1)
Hm, I know it's odd. I think it would be hard to improve potx for specific rules api support like it is for hook_menu. So I'll have a look at how to improve this generally for rules later on.

2: got it.
3: I am not sure about that, I've used t("devel.module's") now? So now it's context sensitive.. previously it was untranslated. We could just link devel.module to fix that? However it looks a bit strange when "'s" isn't linked.

Point 3 and the pre tag issue stem from a description copied from content.admin.inc, so I've fixed it there too. -> Patch attached.

fago’s picture

StatusFileSize
new7.19 KB

ok, I took a look at 1) and reworked the rules UI to directly get help strings from hook implementations - so we can use t() there now. also see http://groups.drupal.org/node/15540.

ad 3) I changed the patch to link to "devel.module" (still untranslated) and moved the ' into t(). I think it's the best way to deal with it.

updated patch attached.

hass’s picture

Status: Needs review » Needs work

Regarding the wrong use of l(), open http://api.drupal.org/api/function/t/6 and jump to Here is an example of incorrect usage of t():, please. The rest look good.

hass’s picture

Status: Needs work » Needs review
StatusFileSize
new6.61 KB

Here is the fixed patch.

fago’s picture

Status: Needs review » Reviewed & tested by the community

oh, I should have read that more carefully before, sry. Thanks for pointing me at it.
content.admin.inc got already fixed in the meantime: http://drupal.org/node/312546 - so this patch just removes an useless url() call there. Marking it rtbc now.

Note: I don't commit it myself, as it touches content.admin.inc too.

karens’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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