Skip to content

Commit f6da3a8

Browse files
author
Igor Chepurnoy
committed
add uk translation, update composer.json
1 parent 571b77c commit f6da3a8

File tree

5 files changed

+64
-18
lines changed

5 files changed

+64
-18
lines changed

composer.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"name": "yii2mod/yii2-settings",
33
"description": "Simple Yii2 settings extension",
44
"type": "yii2-extension",
5-
"keywords": [
6-
"yii2",
7-
"extension"
8-
],
5+
"keywords": ["yii2", "settings", "config", "storage"],
96
"license": "MIT",
107
"authors": [
118
{
@@ -14,7 +11,7 @@
1411
}
1512
],
1613
"require": {
17-
"yiisoft/yii2": "*",
14+
"yiisoft/yii2": ">=2.0.8",
1815
"yii2mod/yii2-editable": "*",
1916
"yii2mod/yii2-enum": "*"
2017
},

messages/config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . '..',
66
// array, required, list of language codes that the extracted messages
77
// should be translated to. For example, ['zh-CN', 'de'].
8-
'languages' => ['en', 'ru'],
8+
'languages' => ['en', 'ru', 'uk'],
99
// string, the name of the function for translating messages.
1010
// Defaults to 'Yii::t'. This is used as a mark to find the messages to be
1111
// translated. You may use a string for single function name or an array for

messages/ru/yii2mod.settings.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
'Float' => 'Число с плавающей точкой',
4646
'Null' => 'Null',
4747
'Setting has been created.' => 'Настройка была сохранена.',
48-
'Setting has been updated.' => 'Настройка был обновлена.',
49-
'Setting has been deleted.' => 'Настройка был удалена.',
48+
'Setting has been updated.' => 'Настройка была обновлена.',
49+
'Setting has been deleted.' => 'Настройка была удалена.',
5050
'The requested page does not exist.' => 'Ошибка 404 - страница не найдена!'
5151
];

messages/uk/yii2mod.settings.php

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* Message translations.
4+
*
5+
* This file is automatically generated by 'yii message' command.
6+
* It contains the localizable messages extracted from source code.
7+
* You may modify this file by translating the extracted messages.
8+
*
9+
* Each array element represents the translation (value) of a message (key).
10+
* If the value is empty, the message is considered as not translated.
11+
* Messages that no longer need translation will have their translations
12+
* enclosed between a pair of '@@' marks.
13+
*
14+
* Message string can be used with plural forms format. Check i18n section
15+
* of the guide for details.
16+
*
17+
* NOTE: this file must be saved in UTF-8 encoding.
18+
*/
19+
return [
20+
'ID' => 'ID',
21+
'Type' => 'Тип',
22+
'Section' => 'Розділ',
23+
'Key' => 'Ключ',
24+
'Value' => 'Значення',
25+
'Status' => 'Статус',
26+
'Created date' => 'Дата створення',
27+
'Updated date' => 'Дата поновлення',
28+
'Settings' => 'Налаштування',
29+
'Create Setting' => 'Створити Налаштування',
30+
'Select Type' => 'Виберіть Тип',
31+
'Select Section' => 'Виберіть Розділ',
32+
'Select Status' => 'Виберіть Статус',
33+
'Actions' => 'Дії',
34+
'Active' => 'Включений',
35+
'Inactive' => 'Вимкнений',
36+
'Update Setting: {0} -> {1}' => 'Редагування Настройки: {0} -> {1}',
37+
'Update Setting' => 'Редагування Настройки',
38+
'Update' => 'Редагувати',
39+
'Create' => 'Створити',
40+
'Delete' => 'Видалити',
41+
'Go Back' => 'Повернутися',
42+
'String' => 'Строка',
43+
'Integer' => 'Ціле число',
44+
'Boolean' => '0 или 1',
45+
'Float' => 'Число з плаваючою комою',
46+
'Null' => 'Null',
47+
'Setting has been created.' => 'Налаштування було створено.',
48+
'Setting has been updated.' => 'Налаштування було оновлено.',
49+
'Setting has been deleted.' => 'Налаштування було видалено.',
50+
'The requested page does not exist.' => 'Помилка 404 - сторінка не знайдена!'
51+
];

migrations/m150227_114524_init.php

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?php
22

3-
use yii\db\Schema;
43
use yii\db\Migration;
54

65
/**
76
* Class m150227_114524_init
8-
* Init settings table
97
*/
108
class m150227_114524_init extends Migration
119
{
@@ -21,14 +19,14 @@ public function up()
2119
}
2220

2321
$this->createTable('{{%Setting}}', [
24-
'id' => Schema::TYPE_PK,
25-
'type' => Schema::TYPE_STRING . '(10) NOT NULL',
26-
'section' => Schema::TYPE_STRING . ' NOT NULL',
27-
'key' => Schema::TYPE_STRING . ' NOT NULL',
28-
'value' => Schema::TYPE_TEXT . ' NOT NULL',
29-
'status' => Schema::TYPE_SMALLINT . ' NOT NULL',
30-
'createdAt' => Schema::TYPE_INTEGER . ' NOT NULL',
31-
'updatedAt' => Schema::TYPE_INTEGER . ' NOT NULL',
22+
'id' => $this->primaryKey(),
23+
'type' => $this->string(10)->notNull(),
24+
'section' => $this->string()->notNull(),
25+
'key' => $this->string()->notNull(),
26+
'value' => $this->text()->notNull(),
27+
'status' => $this->boolean(),
28+
'createdAt' => $this->integer()->notNull(),
29+
'updatedAt' => $this->integer()->notNull()
3230
], $tableOptions);
3331
}
3432

0 commit comments

Comments
 (0)