add frontend ticket translations

This commit is contained in:
2015-10-09 08:12:39 +02:00
parent 11e7c85cf3
commit fda450b801
21 changed files with 227 additions and 57 deletions

View File

@@ -43,6 +43,7 @@ return [
'.hgignore',
'.hgkeep',
'/messages',
'node_modules'
],
// 'php' output format is for saving messages to php files.

View File

@@ -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',

View 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',
];

View 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',
];

View 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',
];

View File

@@ -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',

View File

@@ -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'),
];
}

View File

@@ -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;