Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Translation] Fixed the addition of the fallbackLocale catalogue to the current locale catalogue. #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
3 commits merged into from
Feb 27, 2011
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Translation] Modified Translation unit test "testTransWithFallbackLo…
…cale"

Now the test shows the behavior when is requested a translation to an undefined locale catalogue and, therefore, the fallbacklocale catalogue must be queried. The original test function only checks the step to reach the language catalog not to the fallbacklocale one (even the fallbacklocale isn't set). This test gives error in the current version of symfony/symfony.
  • Loading branch information
Cristian Gonzalez committed Feb 27, 2011
commit db1ea0d2e1147631d21a87f2eb58c6e7a00334a0
4 changes: 3 additions & 1 deletion 4 tests/Symfony/Tests/Component/Translation/TranslatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ public function testSetFallbackLocale()

public function testTransWithFallbackLocale()
{
$translator = new Translator('en_US', new MessageSelector());
$translator = new Translator('fr_FR', new MessageSelector());
$translator->addLoader('array', new ArrayLoader());
$translator->addResource('array', array('foo' => 'foofoo'), 'en_US');
$translator->addResource('array', array('bar' => 'foobar'), 'en');

$translator->setFallbackLocale('en');

$this->assertEquals('foobar', $translator->trans('bar'));
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.