Kdyby / Translation

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

What should happen when translating absolute message and providing $domain at same time? #127

Closed JanMikes closed 7 years ago

JanMikes commented 8 years ago

I was thinking, what should be the result, when trying something like this:

$translator->translate("//messages.someMessage", NULL, [], "something");

Should the result be same as {_messages.something.someMessage}?

Imho throwing exception could be solution as well, what do you think @fprochazka ?

fprochazka commented 7 years ago

Throwing and exception seems reasonable.

fprochazka commented 7 years ago

This might be a BC Break, but IMHO better to break it than having undefined behaviour. It can be always defined later :)

fprochazka commented 7 years ago

@Lexinek thank you for reporting this!