I found this translatable string in Menu Editor module: En. Translators have very little or no context to determine the meaning of this abbreviation. Add context to t()
For example:

t('En.', array(), array('context' => 'abbreviation En...'))
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

donquixote’s picture

I will be happy for a patch!
Maybe you find more places than this.

Sutharsan’s picture

Status: Active » Needs review
FileSize
953 bytes

This is the patch.

I don't mind making this small patch, if you give credit in your commit message as described in Commit messages - providing history and credit. For example: #1952872 by Sutharsan: Context added to t() for translation of abbreviations.

Sutharsan’s picture

[edit] Deleting duplicate comment.

donquixote’s picture

Thanks!
I usually try, sometimes forget..
But usually I will make it so that the person really shows as the commit author, whereas the comment only has the issue link.
Your name will suit this module nicely :)

'abbreviation Expanded'

is this standard practice for abbreviations, or just the closest you came up with?
I don't really mind but it is good to know :)

Sutharsan’s picture

I did not know you can change the commit author, but I see that the contributions get counted equally.

There is currently limited use of context (some 20 - 30 contexts defined). Personally I think because the barrier is too high. It requires investigation, creating a patch and discussing with maintainers ( ;) but true). This takes a lot of time and requires developer skills. So the current use is limited to draw any conclusions on what the standard practice is. I researched a little more on the current use of context. Most contexts are less verbose, so I did cut it down a bit.

donquixote’s picture

Ok, I am tempted to commit like this, but I am hesitating a bit by the noise that each translation change causes for translators.

It is unclear to me whether the context is meant for the human or for the machine.
Documentation is poor: http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7

donquixote’s picture

E.g. for the human I would prefer sth like
Abbr: "Description"

Sutharsan’s picture

Feel free to commit the #3 patch.

donquixote’s picture

Committed #5 to get your name in.
http://drupalcode.org/project/menu_editor.git/commitdiff/a33631434b2b788...

Then did some changes myself
http://drupalcode.org/project/menu_editor.git/commitdiff/f0db4d6be7b755b...

There is no right or wrong here, in the end I made a decision based on taste, and I hope that translators will be happy with it.

Btw, there is now a 7.x-1.0-beta1, and with some more testing and feedback we can get a stable out.

donquixote’s picture

Status: Needs review » Fixed

And of course this is fixed now.

Sutharsan’s picture

Thanks. I'm happy with any context what so ever, and time will tell what other translators think about it.

Status: Fixed » Closed (fixed)

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