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

Commit 2aa7181

Browse filesBrowse files
committed
Fixes according to feedback
1 parent a325a44 commit 2aa7181
Copy full SHA for 2aa7181

File tree

2 files changed

+2
-14
lines changed
Filter options

2 files changed

+2
-14
lines changed

‎src/Symfony/Component/Translation/Formatter/IntlMessageFormatter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Formatter/IntlMessageFormatter.php
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
1616
* @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
1717
*/
18-
class IntlMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface
18+
class IntlMessageFormatter implements MessageFormatterInterface
1919
{
2020
/**
2121
* {@inheritdoc}
@@ -38,12 +38,4 @@ public function format($message, $locale, array $parameters = array())
3838

3939
return $message;
4040
}
41-
42-
/**
43-
* {@inheritdoc}
44-
*/
45-
public function choiceFormat($message, $number, $locale, array $parameters = array())
46-
{
47-
return $this->format($message, $locale, $parameters);
48-
}
4941
}

‎src/Symfony/Component/Translation/Translator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Translator.php
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,17 +205,13 @@ public function trans($id, array $parameters = array(), $domain = null, $locale
205205
*/
206206
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null)
207207
{
208-
if (!$this->formatter instanceof ChoiceMessageFormatterInterface) {
209-
throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter)));
210-
}
211-
212208
if (null === $domain) {
213209
$domain = 'messages';
214210
}
215211

216212
$formatter = $this->getFormatter($domain);
217213
if (!$formatter instanceof ChoiceMessageFormatterInterface) {
218-
throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', get_class($formatter)));
214+
throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($formatter)));
219215
}
220216

221217
$id = (string) $id;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.