Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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...'))
Comment | File | Size | Author |
---|---|---|---|
#5 | menu_editor-add-t-context-5.patch | 914 bytes | Sutharsan |
#3 | menu_editor-add-t-context-2.patch | 953 bytes | Sutharsan |
#2 | menu_editor-add-t-context-2.patch | 953 bytes | Sutharsan |
Comments
Comment #1
donquixote CreditAttribution: donquixote commentedI will be happy for a patch!
Maybe you find more places than this.
Comment #2
Sutharsan CreditAttribution: Sutharsan commentedThis 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.
Comment #3
Sutharsan CreditAttribution: Sutharsan commented[edit] Deleting duplicate comment.
Comment #4
donquixote CreditAttribution: donquixote commentedThanks!
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 :)
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 :)
Comment #5
Sutharsan CreditAttribution: Sutharsan commentedI 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.
Comment #6
donquixote CreditAttribution: donquixote commentedOk, 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
Comment #7
donquixote CreditAttribution: donquixote commentedE.g. for the human I would prefer sth like
Abbr: "Description"
Comment #8
Sutharsan CreditAttribution: Sutharsan commentedFeel free to commit the #3 patch.
Comment #9
donquixote CreditAttribution: donquixote commentedCommitted #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.
Comment #10
donquixote CreditAttribution: donquixote commentedAnd of course this is fixed now.
Comment #11
Sutharsan CreditAttribution: Sutharsan commentedThanks. I'm happy with any context what so ever, and time will tell what other translators think about it.