diff --git a/README.md b/README.md index 5c03654..09a960b 100644 --- a/README.md +++ b/README.md @@ -40,19 +40,7 @@ Addition module description you can see in my [Personal site](https://pack-devel Via composer: -`composer require itstructure/yii2-admin-module ~1.8.1` - -or in section **require** of composer.json file set the following: - -```json -"require": { - "itstructure/yii2-admin-module": "~1.8.1" -} -``` - -and command `composer install`, if you install yii2 project extensions first, - -or command `composer update`, if all yii2 project extensions are already installed. +`composer require itstructure/yii2-admin-module ~1.8.2` ## Usage diff --git a/changelog.md b/changelog.md index a64fd5f..258d11d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ ### CHANGE LOG: +**1.8.2 August 1, 2020:** +- Set translates for labels of `Language` model. + **1.8.1 June 22, 2020:** - Modify README syntax. diff --git a/src/messages/ru-RU/main.php b/src/messages/ru-RU/main.php index a3fac42..e29b108 100644 --- a/src/messages/ru-RU/main.php +++ b/src/messages/ru-RU/main.php @@ -1,7 +1,7 @@ 'ID', + 'ID' => 'Идентификатор', 'Home' => 'Домой', 'Actions' => 'Действия', 'Create' => 'Создать', diff --git a/src/models/Language.php b/src/models/Language.php index 1985b84..ba871dc 100644 --- a/src/models/Language.php +++ b/src/models/Language.php @@ -2,6 +2,7 @@ namespace Itstructure\AdminModule\models; +use Itstructure\AdminModule\Module; use Itstructure\AdminModule\interfaces\ModelInterface; use Itstructure\FieldWidgets\interfaces\{LanguageListInterface, LanguageFieldInterface}; @@ -101,13 +102,13 @@ public function rules() public function attributeLabels() { return [ - 'id' => 'ID', - 'shortName' => 'Short name', - 'name' => 'Name', - 'locale' => 'Locale', - 'default' => 'Default', - 'created_at' => 'Created At', - 'updated_at' => 'Updated At', + 'id' => Module::t('main', 'ID'), + 'shortName' => Module::t('languages', 'Short name'), + 'name' => Module::t('languages', 'Language name'), + 'locale' => Module::t('languages', 'Locale'), + 'default' => Module::t('languages', 'Set this language as default'), + 'created_at' => Module::t('main', 'Created date'), + 'updated_at' => Module::t('main', 'Updated date'), ]; }