add translations for sell product

This commit is contained in:
rocho 2015-10-06 11:38:43 +02:00
parent 8fbe963379
commit 48e392b4fd
11 changed files with 251 additions and 19 deletions

View File

@ -0,0 +1,26 @@
<?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 [
'Created At' => 'Létrehozás ideje',
'Currency' => 'Valuta',
'Id Currency' => 'Valuta',
'Name' => 'Név',
'Rate' => 'Árfolyam',
'Updated At' => 'Módosítás ideje',
];

View File

@ -17,11 +17,9 @@
* NOTE: this file must be saved in UTF-8 encoding.
*/
return [
'Bérlet kártya nem üres vagy hibás kártyaszám' => '',
'Man' => 'Férfi',
'Password' => '',
'Unknown sex' => 'Nincs megadva',
'Woman' => 'Nő',
'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',
'Address' => 'Cím',
'Birthdate' => 'Születésnap',
'Card number' => 'Kártyaszám',
@ -40,13 +38,16 @@ return [
'Id Proposer' => 'Ajánló',
'Id User' => 'Admin',
'Image' => 'Kép',
'Man' => 'Férfi',
'Name' => 'Név',
'Phone' => 'Telefon',
'Search' => 'Keresés',
'Sex' => 'Nem',
'Tax Number' => 'Adószám',
'Unknown sex' => 'Nincs megadva',
'Update' => 'Módosítás',
'Update {modelClass}: ' => '{modelClass} módosítása:',
'Updated At' => 'Módosítás ideje',
'Woman' => 'Nő',
'Zip' => 'Irsz.',
];

View File

@ -17,9 +17,7 @@
* NOTE: this file must be saved in UTF-8 encoding.
*/
return [
'Details' => 'Részletek',
'Procurement' => 'Beszerzés',
'Product' => 'Termék',
'Sold: {product}' => 'Eladva: {product}',
'Active' => 'Aktív',
'All' => 'Mind',
'Barcode' => 'Vonalkód',
@ -27,12 +25,15 @@ return [
'Create Product' => 'Új termék',
'Created At' => 'Létrehozás ideje',
'Description' => 'Leírás',
'Details' => 'Részletek',
'Id Account' => 'Kassza',
'Id Product' => 'Termék',
'Id Product Category' => 'Termék kategória',
'Inactive' => 'Inaktív',
'Max 255 character' => 'Max 255 karakter',
'Name' => 'Név',
'Procurement' => 'Beszerzés',
'Product' => 'Termék',
'Product Number' => 'Termék szám',
'Products' => 'Termékek',
'Profit Margins' => 'Haszonkulcs',

View File

@ -0,0 +1,35 @@
<?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 [
'Comment' => 'Megjegyzés',
'Count' => 'Mennyiség',
'Created At' => 'Dátum',
'Id Currency' => 'Valuta',
'Id Discount' => 'Kedvezmény',
'Id Object' => 'Termék',
'Id Transfer' => 'Pénzmozgás',
'Id User' => 'Felhasználó',
'Item Price' => 'Termék ár',
'Money' => 'Ár',
'Money Currency' => 'Ár valuta',
'Rate' => 'Árfolyam',
'Status' => 'Státusz',
'Type' => 'Típus',
'Updated At' => 'Módosíáts',
];

View File

@ -0,0 +1,23 @@
<?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 [
'Id Transfer' => 'Pénzmozgás',
'Id User' => 'Felhasználó',
'Id User Sold Item' => 'Eladá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 [
'Create' => 'Mentés',
'Create Currency' => 'Új valuta',
'Currencies' => 'Valuták',
'Reset' => 'Reset',
'Search' => 'Keresés',
'Update' => 'Módosítá',
'Update {modelClass}: ' => 'Módosítás {modelClass}: ',
];

View File

@ -0,0 +1,30 @@
<?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 [
'Adatlap' => 'Adatlap',
'Are you sure you want to delete this item?' => 'Biztosan törölni szeretné ezt a vendéget?',
'Befizetések' => 'Befizetések',
'Create' => 'Mentés',
'Create Customer' => 'Új vendég',
'Customers' => 'Vendégek',
'Delete' => 'Törlés',
'Reset' => '',
'Search' => 'Keresés',
'Update' => 'Módosítás',
];

View File

@ -0,0 +1,53 @@
<?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 [
'Account' => 'Kassza',
'Barcode or product code' => 'Vonalkód vagy termék kód',
'Comment' => 'Megjegyzés',
'Discount' => 'Kedvezmény',
'Product' => 'Termék',
'Are you sure you want to delete this item?' => 'Biztosan törölni szeretné ezt a vendéget?',
'Barcode' => 'Vonalkód',
'Cart' => 'Kosár',
'Count' => 'Mennyiség',
'Create' => 'Mentés',
'Create Product' => 'Új termék',
'Currency' => 'Valuta',
'Currency not found' => 'Valuta nem található',
'Delete' => 'Törlés',
'Discount not found' => 'Kedvezmény nem található',
'Item Price' => 'Termék ár',
'Name' => 'Név',
'Paid' => 'Fizetve',
'Price' => 'Ár',
'Product name' => 'Termék név',
'Product not found!' => 'Termék nem található',
'Product number' => 'Termák kód',
'Products' => 'Termékek',
'Reset' => 'Reset',
'Sale Price' => 'Eladási ár',
'Search' => 'Keresés',
'Sell product' => 'Termék eladás',
'Sell product and add to total' => 'Termék eladás és kosárba helyezés',
'Stock' => 'Raktáron',
'Stock {stock} lower then {count}!' => 'Raktáron {stock} kevesebb mint {count}!',
'Total Price' => 'Összesen',
'Update' => 'Módosítás',
'Update {modelClass}: ' => 'Módosítás {modelClass}: ',
];

View File

@ -0,0 +1,31 @@
<?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?' => '',
'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',
'Update' => 'Módosítás',
'Update {modelClass}: ' => '{modelClass} módosítás: ',
'pieces' => 'db',
];

View File

@ -32,7 +32,7 @@ class ProductLookupForm extends Model
public function attributeLabels()
{
return [
'verifyCode' => 'Verification Code',
'filter_text' => Yii::t('frontend/product','Barcode or product code') ,
];
}

View File

@ -64,6 +64,21 @@ class ProductSaleForm extends Model
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id_product' => Yii::t("frontend/product", "Product"),
'count' => Yii::t("frontend/product", "Count"),
'id_currency' => Yii::t("frontend/product", "Currency"),
'id_account' => Yii::t("frontend/product", "Account"),
'id_discount' => Yii::t("frontend/product", "Discount"),
'comment' => Yii::t("frontend/product", "Comment"),
];
}
public function validateProduct($attribute,$params){
$this->product = Product::findOne($this->id_product);
@ -104,16 +119,6 @@ class ProductSaleForm extends Model
}
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'verifyCode' => 'Verification Code',
];
}
public function save(){
if ( $this->validate() ){