@@ -28,6 +28,7 @@ discard block |
||
| 28 | 28 | * |
| 29 | 29 | * @param string $format The format of the loader |
| 30 | 30 | * @param LoaderInterface $loader |
| 31 | + * @return void |
|
| 31 | 32 | */ |
| 32 | 33 | function addLoader($format, LoaderInterface $loader); |
| 33 | 34 | |
@@ -46,6 +47,7 @@ discard block |
||
| 46 | 47 | * @param string $domain |
| 47 | 48 | * @param MessageCatalogue $catalogue |
| 48 | 49 | * @throws LoaderNotFoundException |
| 50 | + * @return void |
|
| 49 | 51 | */ |
| 50 | 52 | function loadResource($format, $resource, $domain, MessageCatalogue $catalogue); |
| 51 | 53 | |
@@ -65,9 +65,9 @@ |
||
| 65 | 65 | return NULL; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $s = strtolower($header); // case insensitive |
|
| 69 | - $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ |
|
| 70 | - rsort($langs); // first more specific |
|
| 68 | + $s = strtolower($header); // case insensitive |
|
| 69 | + $s = strtr($s, '_', '-'); // cs_CZ means cs-CZ |
|
| 70 | + rsort($langs); // first more specific |
|
| 71 | 71 | preg_match_all('#(' . implode('|', $langs) . ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches); |
| 72 | 72 | |
| 73 | 73 | if (!$matches[0]) { |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | return NULL; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - $short = array_map(function ($locale) { |
|
| 90 | + $short = array_map(function($locale) { |
|
| 91 | 91 | return substr($locale, 0, 2); |
| 92 | 92 | }, $translator->getAvailableLocales()); |
| 93 | 93 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | |
| 259 | 259 | $this->beforeCompileLogging($config); |
| 260 | 260 | |
| 261 | - $registerToLatte = function (Nette\DI\ServiceDefinition $def) { |
|
| 261 | + $registerToLatte = function(Nette\DI\ServiceDefinition $def) { |
|
| 262 | 262 | $def |
| 263 | 263 | ->addSetup('?->onCompile[] = function($engine) { Kdyby\Translation\Latte\TranslateMacros::install($engine->getCompiler()); }', array('@self')) |
| 264 | 264 | ->addSetup('addFilter', array('translate', array($this->prefix('@helpers'), 'translate'))) |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | */ |
| 473 | 473 | public static function register(Nette\Configurator $configurator) |
| 474 | 474 | { |
| 475 | - $configurator->onCompile[] = function ($config, Nette\DI\Compiler $compiler) { |
|
| 475 | + $configurator->onCompile[] = function($config, Nette\DI\Compiler $compiler) { |
|
| 476 | 476 | $compiler->addExtension('translation', new TranslationExtension()); |
| 477 | 477 | }; |
| 478 | 478 | } |
@@ -155,8 +155,7 @@ |
||
| 155 | 155 | $panel[] = $this->renderResources($this->ignoredResources); |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - return empty($panel) ? '' : |
|
| 159 | - '<h1>Missing translations: ' . count(array_unique($this->untranslated, SORT_REGULAR)) . |
|
| 158 | + return empty($panel) ? '' : '<h1>Missing translations: ' . count(array_unique($this->untranslated, SORT_REGULAR)) . |
|
| 160 | 159 | ', Resources: ' . count(Nette\Utils\Arrays::flatten($this->resources)) . '</h1>' . |
| 161 | 160 | '<div class="nette-inner tracy-inner kdyby-TranslationPanel" style="min-width:500px">' . implode($panel) . '</div>' . |
| 162 | 161 | '<style> |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | |
| 243 | 243 | |
| 244 | 244 | /** |
| 245 | - * @param \Exception|\Throwable $e |
|
| 245 | + * @param \Exception $e |
|
| 246 | 246 | */ |
| 247 | 247 | public function choiceError($e, $domain) |
| 248 | 248 | { |
@@ -359,6 +359,7 @@ discard block |
||
| 359 | 359 | /** |
| 360 | 360 | * Returns link to editor. |
| 361 | 361 | * @author David Grudl |
| 362 | + * @param string $text |
|
| 362 | 363 | * @return Nette\Utils\Html|string |
| 363 | 364 | */ |
| 364 | 365 | private static function editorLink($file, $line, $text = NULL) |