Kdyby / Translation

Integration of Symfony/Translation into Nette Framework
https://packagist.org/packages/kdyby/translation
Other
88 stars 84 forks source link

Translator: keeps domain in untranslated message #48

Closed vojtech-dobes closed 10 years ago

vojtech-dobes commented 10 years ago

Fixes #19.

fprochazka commented 10 years ago

This is not a good solution, because the mechanism for detecting if the message was translated is also not reliable.

vysinsky commented 10 years ago

Maybe not good solution, but translator should not change string if it is not translated. We got into problem when we has string 'N.v.t' in selectbox - it displayed only 'v.t.' (took 'N' as domain) which is really wrong.

fprochazka commented 10 years ago

@vysinsky you can $control->setTranslator(NULL) on the select (or on the entire form)

Unfortunatelly, this pullrequest doesn't solve anything, it only complicates the problem.

vojtech-dobes commented 10 years ago

What would be your approach? What needs to be fixed first?

vysinsky commented 10 years ago

Ok, setting translator to NULL is possible solution. But I still think translator should NOT change strings which are not translated. It is quite wtf if you see 'user.login' in template and you have to search in 'messages' file, 'forms' file etc. - domain should stay in string as is passed to translate method.

fprochazka commented 10 years ago

@vysinsky I completely agree.

@vojtech-dobes

TomasVotruba commented 10 years ago

This would be great ASAP. Can I help somehow?

fprochazka commented 10 years ago

Closing in favour of #51