Working on the translation to Dutch of the module through https://localize.drupal.org/translate/projects/flickr, I had some feedback to add a context to t('at') that is used in the photo caption. E.g. 'Taken 2 years ago at Jordaan, Amsterdam, Holland by Bobby Solo' should get translated as 'Genomen 2 jaar geleden in Jordaan, Amsterdam, Holland door Bobby Solo'.
Obviously translation of the word 'at' depends on the context, thus the advise.
Furthermore we should check if we can leave the sentence intact and use placeholders instead, like:
t('Taken @time_ago at !location by !owner', array('@time_ago' => $taken, '!location' => $location, '!owner' => $username), array('context' => 'Location')),
Not sure about this as the word 'by' could even be a different context. Better to leave it separated in this case?
Comment | File | Size | Author |
---|---|---|---|
#1 | add_translation_context_to_string-2294741-1.patch | 1.01 KB | lolandese |
Comments
Comment #1
lolandese CreditAttribution: lolandese commentedComment #2
Sutharsan CreditAttribution: Sutharsan commentedUsing a full string with placeholders is highly preferred by translators. And more, for right to left languages it is even the only way to get a proper sentence.
Comment #3
lolandese CreditAttribution: lolandese commented#2514968: Use placeholders in strings instead of concatenation is a better solution. It would make the translation context obsolete as adding placeholders makes the string unique amongst others.