add frontend ticket translations
This commit is contained in:
@@ -43,6 +43,7 @@ return [
|
||||
'.hgignore',
|
||||
'.hgkeep',
|
||||
'/messages',
|
||||
'node_modules'
|
||||
],
|
||||
|
||||
// 'php' output format is for saving messages to php files.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return [
|
||||
'Bérlet kártya nem üres vagy hibás kártyaszám' => 'Bérlet kártya nem üres vagy hibás kártyaszám',
|
||||
'Password' => 'Jelszó',
|
||||
'Update customer:' => 'Jelszó újra',
|
||||
'Update customer:' => 'Vendég módosítása:',
|
||||
'Address' => 'Cím',
|
||||
'Birthdate' => 'Születésnap',
|
||||
'Card number' => 'Kártyaszám',
|
||||
|
||||
44
common/messages/hu/common/ticket.php
Normal file
44
common/messages/hu/common/ticket.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yii message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Are you sure you want to delete this item?' => 'Biztosan törölni szeretné a bérletet?',
|
||||
'Comment' => 'Megjegyzés',
|
||||
'Create' => 'Mentés',
|
||||
'Create Ticket' => 'Új bérlet',
|
||||
'Create and add to cart' => 'Mentés és kosárba helyezés',
|
||||
'Created At' => 'Hozzáadva',
|
||||
'Delete' => 'Törlés',
|
||||
'End' => 'Érvényesség vége',
|
||||
'Id Account' => 'Kassza',
|
||||
'Id Discount' => 'Kedvezmény',
|
||||
'Id Ticket' => 'Bérlet',
|
||||
'Id Ticket Type' => 'Bérlet típus',
|
||||
'Id User' => 'Felhasználó',
|
||||
'Max Usage Count' => 'Max alkalmak',
|
||||
'Price Brutto' => 'Bruttó ár',
|
||||
'Reset' => '',
|
||||
'Search' => 'Keresés',
|
||||
'Start' => 'Érvényesség kezdete',
|
||||
'Status' => 'Státusz',
|
||||
'Tickets' => 'Bérletek',
|
||||
'Update' => 'Módosítás',
|
||||
'Update {modelClass}: ' => '{modelClass} módosítva: ',
|
||||
'Updated At' => 'Módosítás',
|
||||
'Usage Count' => 'Felhasznált alkalmak',
|
||||
];
|
||||
21
common/messages/hu/frontend/card.php
Normal file
21
common/messages/hu/frontend/card.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yii message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Search' => 'Keresés',
|
||||
];
|
||||
27
common/messages/hu/frontend/ticket.php
Normal file
27
common/messages/hu/frontend/ticket.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* Message translations.
|
||||
*
|
||||
* This file is automatically generated by 'yii message' command.
|
||||
* It contains the localizable messages extracted from source code.
|
||||
* You may modify this file by translating the extracted messages.
|
||||
*
|
||||
* Each array element represents the translation (value) of a message (key).
|
||||
* If the value is empty, the message is considered as not translated.
|
||||
* Messages that no longer need translation will have their translations
|
||||
* enclosed between a pair of '@@' marks.
|
||||
*
|
||||
* Message string can be used with plural forms format. Check i18n section
|
||||
* of the guide for details.
|
||||
*
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Cart' => 'Kosár',
|
||||
'Invalid discount' => 'Érvénytelen kedvezmény',
|
||||
'Invalid ticket type' => 'Érvénytelen bérlet típus',
|
||||
'Invalid transfer' => 'Érvénytelen transfer',
|
||||
'The requested card does not exist.' => 'A megadott bérlet kártya nem található',
|
||||
'Ticket added to customer' => 'Bérlet hozzárendelve vendéghez',
|
||||
'Update ticket' => 'Bérlet módosítása',
|
||||
];
|
||||
@@ -17,11 +17,12 @@
|
||||
* NOTE: this file must be saved in UTF-8 encoding.
|
||||
*/
|
||||
return [
|
||||
'Are you sure you want to delete this item?' => '',
|
||||
'Are you sure you want to delete this item?' => 'Biztosan törölni szeretné a bérletet?',
|
||||
'Reset' => '',
|
||||
'Ticket' => 'Bérlet',
|
||||
'Create' => 'Mentés',
|
||||
'Create Transfer' => 'Új pénzmozgás',
|
||||
'Delete' => 'Törlés',
|
||||
'Reset' => '',
|
||||
'Search' => 'Keresés',
|
||||
'Termékeladás' => 'Termékeladás',
|
||||
'Transfers' => 'Pénzmozgások',
|
||||
|
||||
@@ -92,6 +92,7 @@ class Customer extends \yii\db\ActiveRecord
|
||||
'created_at' => Yii::t('common/customer', 'Created At'),
|
||||
'updated_at' => Yii::t('common/customer', 'Updated At'),
|
||||
'customerCardNumber' => Yii::t('common/customer', 'Card number'),
|
||||
'cardNumber' => Yii::t('common/customer', 'Card number'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -82,9 +82,12 @@ class Transfer extends \yii\db\ActiveRecord
|
||||
public function getProduct(){
|
||||
return $this->hasOne( Product::className(), ["id_product" =>"id_object" ] );
|
||||
}
|
||||
public function getTicket(){
|
||||
return $this->hasOne( Ticket::className(), ["id_ticket" =>"id_object" ] );
|
||||
}
|
||||
|
||||
public function getAccount(){
|
||||
return $this->hasOne( Account::className(), ["id_account" =>"id_account" ] );
|
||||
return $this->hasOne( Account::className(), ["id_account" =>"id_account" ] ) ;
|
||||
}
|
||||
|
||||
public function getCurrency(){
|
||||
@@ -206,14 +209,18 @@ class Transfer extends \yii\db\ActiveRecord
|
||||
'product_name' => function ($transfer) {
|
||||
$result = "";
|
||||
if ( $transfer->type == Transfer::TYPE_TICKET ){
|
||||
$result = $transfer->ticket->type->name;
|
||||
$result = $transfer->ticket->ticketTypeName;
|
||||
}else{
|
||||
$result = $transfer->product->name;
|
||||
}
|
||||
return $result;
|
||||
},
|
||||
'category' => function ($transfer) {
|
||||
return $transfer->product->productCategoryName;
|
||||
if ( $transfer->type == Transfer::TYPE_TICKET ){
|
||||
return Yii::t('frontend/transfer','Ticket');
|
||||
}else{
|
||||
return $transfer->product->productCategoryName;
|
||||
}
|
||||
},
|
||||
],
|
||||
]);
|
||||
@@ -225,8 +232,8 @@ class Transfer extends \yii\db\ActiveRecord
|
||||
|
||||
$query = Transfer::find();
|
||||
|
||||
// $query->innerJoinWith('userSoldItem');
|
||||
$query->andWhere(['transfer.id_user' => $user->id ]);
|
||||
$query->innerJoinWith('userSoldItem');
|
||||
$query->andWhere(['user_sold_item.id_user' => $user->id ]);
|
||||
$transfers = $query->all();
|
||||
|
||||
return $transfers;
|
||||
|
||||
Reference in New Issue
Block a user