Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
de674e6d
Commit
de674e6d
authored
Nov 04, 2013
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed deprecated locale_fallback setting
parent
24bce51f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
src/Silex/Provider/TranslationServiceProvider.php
src/Silex/Provider/TranslationServiceProvider.php
+0
-7
tests/Silex/Tests/Provider/TranslationServiceProviderTest.php
...s/Silex/Tests/Provider/TranslationServiceProviderTest.php
+0
-9
No files found.
src/Silex/Provider/TranslationServiceProvider.php
View file @
de674e6d
...
...
@@ -33,14 +33,7 @@ class TranslationServiceProvider implements ServiceProviderInterface
}
$translator
=
new
Translator
(
$app
,
$app
[
'translator.message_selector'
]);
// Handle deprecated 'locale_fallback'
if
(
isset
(
$app
[
'locale_fallback'
]))
{
$app
[
'locale_fallbacks'
]
=
(
array
)
$app
[
'locale_fallback'
];
}
$translator
->
setFallbackLocales
(
$app
[
'locale_fallbacks'
]);
$translator
->
addLoader
(
'array'
,
new
ArrayLoader
());
$translator
->
addLoader
(
'xliff'
,
new
XliffFileLoader
());
...
...
tests/Silex/Tests/Provider/TranslationServiceProviderTest.php
View file @
de674e6d
...
...
@@ -104,15 +104,6 @@ class TranslationServiceProviderTest extends \PHPUnit_Framework_TestCase
$this
->
assertEquals
(
$expected
,
$result
);
}
public
function
testBackwardCompatiblityForFallback
()
{
$app
=
$this
->
getPreparedApp
();
$app
[
'locale_fallback'
]
=
'de'
;
$result
=
$app
[
'translator'
]
->
trans
(
'key1'
,
array
(),
null
,
'ru'
);
$this
->
assertEquals
(
'The german translation'
,
$result
);
}
public
function
testFallbacks
()
{
$app
=
$this
->
getPreparedApp
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment