Hello all.

This isn't secret, that translators run into problems with different translations same words.
For example, in Russian language, the word "Enabled" may be translated both as "Включено" (near synonym "turned on") and "Разрешено" (near synonym "allowed") in depends of context. Other example, the word "Category" used with such words as 'feed' and 'contact' should be translated differently!
Drupal uses gettext, but it doesn't allow to translate one word differently.

My idea consists in t() function modification.
t() function must analyse its call place and get translation string with such place's marker.

For example.

Let t() function called from aggregator module as t('Category')

First, with help PHP debug_backtrace() function, it determines filename and line number from which it was been called. Let this filename is 'arrgerator.module' and line number is 123. Next, t() function find msgid in form 'aggregator.module|123|Category' (Of course, other delimiter may be selected). If such msgid string found, t() function uses translation for the string. If not, t() function find simple 'Category' and uses its translation.

So, in one side, only t() function need to be changed, in other side, this feature provides more flexible interface to translate same words depends of context.

What you think about?