There is an untranslated string at Node overview page for node which are sources for the translation. The string "(source)" is not parsed through t().

Attaching a fix, should probably be backported to 6.x too.

CommentFileSizeAuthor
#2 translation_source.patch864 bytesmeba
translation_source.patch860 bytesmeba

Comments

gábor hojtsy’s picture

Status: Needs review » Needs work

This is both coding style violating for D7 and D6, although since coding style around . changed, it needs different patches for D6 and D7. D6 uses '. and .' (sticks dots to the strings and uses a space at the other side of the dot), D7 uses ' . and . ' (has a space on both sides of the dot).

meba’s picture

Status: Needs work » Needs review
StatusFileSize
new864 bytes

fixing

damien tournoud’s picture

Status: Needs review » Needs work

I'm not sure about this. We should do:

$language_name = t('%language (source)', array('%language' => $language_name));

Because (1) I'm pretty sure some languages will require to invert the language and the source, (2) it's good practice to put as much context as possible in source strings, and just 'source' is too small not to collide with other use-cases.

meba’s picture

This was my idea, however I wanted to keep bold text as it's good for UI, but HTML is not good for localized strings, so...Any other suggestions? Gabor?

damien tournoud’s picture

Sorry, I missed the <strong> tags. Just do that:

$language_name = t('<strong>%language</strong> (source)', array('%language' => $language_name));

The fact that HTML is not good for localized strings is just an urban myth. There is no point in removing semantically-relevant tags from the strings, especially when it's at the cost of removing context from the strings by breaking them into pieces.

meba’s picture

Status: Needs work » Closed (duplicate)

Marking as duplicate of #312982: Fix for one untranslatable string, this issue is older, but the new one has proper patch.