Skip to content

Commit

Permalink
Add russian translation.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed May 3, 2021
1 parent 22a537f commit 5053b0f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -69,7 +69,7 @@ return [

## Using translations

By default the package includes the translation into spanish, you just have to copy the root directory of the application, where the translations will be saved, for your convenience we have defined the aliases of `@translations` for this.
By default the package includes the translation into spanish and russian.

The translation is in the `/storage/translations` directory.

Expand All @@ -95,10 +95,10 @@ return [
Extractor::class => [
'__construct()' => [
'messageReader' => static fn (Aliases $aliases) => new \Yiisoft\Translator\Message\Php\MessageSource(
$aliases->get('@translations')
$aliases->get('@simple-view-bulma/translations')
),
'messageWriter' => static fn (Aliases $aliases) => new \Yiisoft\Translator\Message\Php\MessageSource(
$aliases->get('@translations')
$aliases->get('@simple-view-bulma/translations')
),
],
],
Expand Down
2 changes: 1 addition & 1 deletion config/common/simple-view-bulma.php
Expand Up @@ -9,7 +9,7 @@

return [
'categorySourceSimpleViewBulma' => static function (Aliases $aliases, MessageFormatterInterface $messageFormatter) {
$messageReader = new MessageSource($aliases->get('@translations'));
$messageReader = new MessageSource($aliases->get('@simple-view-bulma/storage/translations'));

return new CategorySource('simple-view-bulma', $messageReader, $messageFormatter);
},
Expand Down
12 changes: 12 additions & 0 deletions storage/translations/ru/simple-view-bulma.php
@@ -0,0 +1,12 @@
<?php
return [
'My Project' => 'Мой проект ',
'The page' => 'Страница ',
'not found' => 'не найден',
'The above error occurred while the Web server was processing your request' => 'Вышеупомянутая ошибка произошла, когда веб-сервер обрабатывал ваш запрос',
'Please contact us if you think this is a server error. Thank you' => 'Свяжитесь с нами, если вы считаете, что это ошибка сервера. Спасибо',
'Go Back Home' => 'Возвращайся домой',
'Hello!' => 'Привет! ',
"Let's start something great with <strong>Yii3</strong>!" => "Давайте начнем с <strong>Yii3</strong>!",
"Don't forget to check the guide." => "Не забудьте проверить руководство.",
];
1 change: 0 additions & 1 deletion tests/App/Runner/ApplicationRunner.php
Expand Up @@ -59,7 +59,6 @@ public function run(): void
$aliases->set('@assetsUrl', '/assets');
$aliases->set('@npm', '@root/vendor/npm-asset');
$aliases->set('@runtime', '@root/tests/_data/runtime');
$aliases->set('@translations', '@root/storage/translations');
$aliases->set('@simple-view-bulma', '@root');

// Register error handler with real container-configured dependencies.
Expand Down

0 comments on commit 5053b0f

Please sign in to comment.