Skip to content

Commit

Permalink
添加中文翻译文件
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Mar 3, 2017
1 parent 43ec6a2 commit 92efc85
Show file tree
Hide file tree
Showing 14 changed files with 269 additions and 49 deletions.
251 changes: 230 additions & 21 deletions app/appfront/languages/zh_CN/appfront.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,237 @@
* @license http://www.fecshop.com/license/
*/
return [
'fecshop' => 'zh_CN app fecshop',
'Follow Us'=> '关注我们',
'Follow us in social media'=> '在社交平台关注我们',
'Sign up for newsletter'=> '订阅邮件',
'General Links'=> '文字条款',
'Enter your email adress'=>'输入您的邮箱',
'fecshop' => 'zh_CN app fecshop',
'Follow Us' => '关注我们',
'Follow us in social media' => '在社交平台关注我们',
'Sign up for newsletter' => '订阅邮件',
'General Links' => '文字条款',
'Enter your email adress' =>'输入您的邮箱',

'Contact Us'=> '联系我们',
'FAQ'=> '常见问题',
'Return Policy'=> '退款条约',
'Privacy Policy'=> '隐私条约',
'About Us'=> '关于我们',
'My Favorite'=> '我的收藏',
'My Reviews'=> '我的评论',
'My Order'=> '我的订单',
'My Account'=> '我的账户',
'Site Map'=> '网站地图',
'Follow'=> '关注我们',
'Follow'=> '关注我们',
'Follow'=> '关注我们',
'Follow'=> '关注我们',
'Follow'=> '关注我们',
'Contact Us' => '联系我们',
'FAQ' => '常见问题',
'Return Policy' => '退款条约',
'Privacy Policy' => '隐私条约',
'About Us' => '关于我们',
'My Favorite' => '我的收藏',
'My Reviews' => '我的评论',
'My Order' => '我的订单',
'My Account' => '我的账户',
'Site Map' => '网站地图',
'Follow' => '关注我们',
'Welcome!' => '欢迎您!',
'Logout' => '退出',
'Sign In / Join Free' => '登录账户',
'My Account' => '我的账户',
'My Orders' => '我的订单',
'My Favorites' => '我的收藏',
'Product Review' => '我的评论',
'Products keyword' => '搜索产品',
'custom menu' => '自定义菜单',
'my custom menu 2' => '我的自定义菜单2',
'my custom menu 3' => '我的自定义菜单3',
'Home' => '首页',
'best seller' => '热销产品',
'featured products' => '特色产品',
'more' => '更多',
'Sort By' => '排序',
'Hot' => '销量',
'Review' => '评论',
'Favorite' => '收藏',
'New' => '上架时间',
'$ Low to High' => '¥ 价格由低到高',
'$ High to Low' => '¥ 价格由高到低',
'Refine By' => '过滤选项',
'clear all' => '清空所有过滤',

'color' => '颜色',
'size' => '尺码',

'one-color' => '单色',
'red' => '红色',
'white' => '白色',
'black' => '黑色',
'blue' => '蓝色',
'green' => '绿色',
'yellow' => '黄色',
'gray' => '灰色',
'khaki' => '黄褐色',


'ivory' => '象牙色',
'beige' => '米色',
'orange' => '橙色',
'cyan' => '青色',
'leopard' => '豹纹',
'camouflage' => '伪装色',
'silver' => '银白色',
'pink' => '粉红色',
'purple' => '紫色',
'brown' => '棕色',

'golden' => '金色',
'multicolor' => '彩色',
'white & blue' => '白 & 蓝',
'white & black' => '白 & 黑',



'price' => '产品价格',
'Newsletter' => '订阅邮件',
'All rights reserved' => '保留所有权利',
'Copyright Notice' => '版权声明',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',
'Follow' => '关注我们',

];
3 changes: 3 additions & 0 deletions app/appfront/modules/Customer/controllers/AjaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ public function actionIndex(){
$result_arr['favorite'] = false;
$result_arr['favorite_product_count'] = 0;
$product_id = Yii::$app->request->get('product_id');
$customer_name = '';
if(!Yii::$app->user->isGuest){
$identity = Yii::$app->user->identity;
$customer_name = $identity['firstname'].' '.$identity['lastname'];
$result_arr['customer_name'] = $customer_name;
$result_arr['favorite_product_count'] = $identity['favorite_product_count'] ? $identity['favorite_product_count'] : 0;
$result_arr['loginStatus'] = true;
if($product_id){
Expand Down
7 changes: 3 additions & 4 deletions app/appfront/theme/base/front/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ address, article, aside, audio, canvas, details, figcaption, figure, footer, hea


.pro-content {
height: 496px;
margin-top: 14px;
width: 100%;
}
Expand All @@ -433,7 +432,7 @@ address, article, aside, audio, canvas, details, figcaption, figure, footer, hea

.scrollBox {
float: right;
height: 496px;
height: 572px;
position: relative;
width: 1200px;
}
Expand Down Expand Up @@ -2702,9 +2701,9 @@ color:#cc0000;
font-size: 18px;
}

.sectionBox_h{text-transform:Uppercase}



.sectionBox_h.featured{margin-top:20px 0 0 }



6 changes: 4 additions & 2 deletions app/appfront/theme/base/front/assets/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ $(document).ready(function(){
url:loginInfoUrl,
success:function(data, textStatus){
welcome = $('.welcome_str').val();
logoutStr = $('.logoutStr').val();
if(data.loginStatus){
str = '<span id="welcome">'+welcome+'</span>';
customer_name = data.customer_name;
str = '<span id="welcome">'+welcome+' '+customer_name+',</span>';
str += '<span id="js_isNotLogin">';
str += '<a href="'+logoutUrl+'" rel="nofollow">Logout</a>';
str += '<a href="'+logoutUrl+'" rel="nofollow">'+logoutStr+'</a>';
str += '</span>';
$(".login-text").html(str);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$attrUrlStr = Yii::$service->url->category->attrValConvertUrlStr($attr);
if(is_array($filter) && !empty($filter)){
echo '<div class="filter_attr">';
echo '<div class="filter_attr_title">'.$attr.'</div>';
echo '<div class="filter_attr_title">'.Yii::$service->page->translate->__($attr).'</div>';
echo '<div class="filter_attr_info">';
foreach($filter as $item){
$val = $item['_id'];
Expand All @@ -26,7 +26,7 @@
$urlInfo = Yii::$service->url->category->getFilterChooseAttrUrl($attrUrlStr,$val,'p');
$url = $urlInfo['url'];
$selected = $urlInfo['selected'] ? 'class="checked"' : '';
echo '<a '.$selected.' href="'.$url.'">'.$val.'('.$count.')</a><br/>';
echo '<a '.$selected.' href="'.$url.'">'.Yii::$service->page->translate->__($val).'('.$count.')</a><br/>';
}
}
echo '</div>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$attrUrlStr = Yii::$service->url->category->attrValConvertUrlStr($attr);
if(is_array($filter) && !empty($filter)){
echo '<div class="filter_attr">';
echo '<div class="filter_attr_title">'.$attr.'</div>';
echo '<div class="filter_attr_title">'.Yii::$service->page->translate->__($attr).'</div>';
echo '<div class="filter_attr_info">';
foreach($filter as $item){
$val = $item['val'];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php if(isset($parentThis['refine_by_info']) && is_array($parentThis['refine_by_info']) && !empty($parentThis['refine_by_info'])){ ?>
<div class="filter_refine_by">
<div class="filter_attr_title">Refine By</div>
<div class="filter_attr_title"><?= Yii::$service->page->translate->__('Refine By'); ?></div>
<div class="filter_refine_by_content">
<?php foreach($parentThis['refine_by_info'] as $one){ ?>
<?php $name = $one['name']; ?>
<?php $url = $one['url']; ?>
<div><a href="<?= $url ?>"><i class="closeBtn c_tagbg"></i><span><?= $name ?></span></a></div>
<div><a href="<?= $url ?>"><i class="closeBtn c_tagbg"></i><span><?= Yii::$service->page->translate->__($name); ?></span></a></div>
<?php } ?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

<?php $frontSort = $query_item['frontSort']; ?>
<?php if(is_array($frontSort) && !empty($frontSort)){ ?>
<b>Sort By:</b>
<b><?= Yii::$service->page->translate->__('Sort By'); ?>:</b>
<select class="product_sort">
<?php foreach($frontSort as $np){ ?>
<?php $selected = $np['selected'] ? 'selected="selected"' : ''; ?>
<?php $url = $np['url']; ?>
<option <?= $selected; ?> url="<?= $url; ?>" value="<?= $np['value']; ?>"><?= $np['label']; ?></option>
<option <?= $selected; ?> url="<?= $url; ?>" value="<?= $np['value']; ?>"><?= Yii::$service->page->translate->__($np['label']); ?></option>
<?php } ?>
</select>
<?php } ?>
Expand Down
5 changes: 3 additions & 2 deletions app/appfront/theme/base/front/cms/home/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="main container">
<?= Yii::$service->cms->staticblock->getStoreContentByIdentify('home-big-img','appfront') ?>
<div class="mt10">
<h4 class="sectionBox_h"><span>BEST SELLER</span><em><a href="">MORE</a></em></h4>
<h4 class="sectionBox_h best_seller"><span><?= Yii::$service->page->translate->__('best seller'); ?></span><em><a href=""><?= Yii::$service->page->translate->__('more'); ?></a></em></h4>
<div class="pro-content">
<?php
$parentThis['products'] = $bestSellerProducts;
Expand All @@ -23,8 +23,9 @@
</div>

</div>
<div class="clear"></div>
<div class="mt10" style="margin-top:34px;">
<h4 class="sectionBox_h"><span>FEATURED PRODUCTS</span><em><a href="">MORE</a></em></h4>
<h4 class="sectionBox_h featured"><span><?= Yii::$service->page->translate->__('featured products'); ?></span><em><a href=""><?= Yii::$service->page->translate->__('more'); ?></a></em></h4>
<div class="pro-content">
<?php
$parentThis['products'] = $bestFeaturedProducts;
Expand Down
1 change: 1 addition & 0 deletions app/appfront/theme/base/front/widgets/breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<?php foreach($items as $item){ $i++; ?>
<?php ($i == $count) ? ($str = '') : ($str = '>') ?>
<?php $name = isset($item['name']) ? $item['name'] : ''; ?>
<?php $name = Yii::$service->page->translate->__($name); ?>
<?php $url = isset($item['url']) ? $item['url'] : ''; ?>
<?php if($name){ ?>
<?php if($url){ ?>
Expand Down
Loading

0 comments on commit 92efc85

Please sign in to comment.