Skip to content

Commit

Permalink
update allow to translate the category title on the frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
php-cuong committed Nov 28, 2017
1 parent a78f4c1 commit f5eb14e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion view/frontend/templates/category/categorySidebar.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<?php foreach($this->getFaqCategoriesList() as $fclist): ?>
<li class="item">
<a href="<?php echo $this->getFaqCategoryFullPath($fclist['identifier']); ?>">
<?php echo $fclist['title']; ?> <span class="count">(<?php echo $fclist['count']; ?>)</span>
<?php echo __($fclist['title']); ?> <span class="count">(<?php echo $fclist['count']; ?>)</span>
</a>
</li>
<?php endforeach; ?>
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/templates/category/view.phtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="faq-category">
<h2 class="faqcat-title first-title"><i></i>
<img src="<?php echo !empty($this->getFaqCategoryIcon()) ? $this->getFaqCategoryIcon() : $block->getViewFileUrl('PHPCuong_Faq::images/faq81x81.png'); ?>"/><?php echo $this->getFaqCategoryTitle(); ?> - <?php echo __('FAQ');?></h2>
<img src="<?php echo !empty($this->getFaqCategoryIcon()) ? $this->getFaqCategoryIcon() : $block->getViewFileUrl('PHPCuong_Faq::images/faq81x81.png'); ?>"/><?php echo __($this->getFaqCategoryTitle()); ?> - <?php echo __('FAQs');?></h2>
<?php if ($this->getFaqsList()): ?>
<ol class="items faqs-list">
<?php foreach($this->getFaqsList() as $faq): ?>
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/templates/faq/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</a>
<h3>
<a href="<?php echo $this->getFaqCategoryFullPath($category['identifier']); ?>">
<?php echo $category['title'];?>
<?php echo __($category['title']);?>
</a>
</h3>
</div>
Expand Down
2 changes: 1 addition & 1 deletion view/frontend/templates/question/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<?php echo ($this->getFaqCreated()) ? $this->getFaqCreated() : '' ; ?>
</span>
<span class="category">
<?php echo ($this->getFaqCategoryTitle())? __('Published in').' '.$this->getFaqCategoryTitle().' ' : ''; ?>
<?php echo ($this->getFaqCategoryTitle())? __('Published in').' '.__($this->getFaqCategoryTitle()).' ' : ''; ?>
</span>
<span class="viewed">
<i class="faq-iconeye"></i>
Expand Down
15 changes: 9 additions & 6 deletions view/frontend/web/css/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,14 @@
/* feed back */
.feedback .btn {
position: relative;
width: 60px;
padding: 4px;
min-width: 60px;
padding: 6px 12px;
}
.feedback .btn span:last-child {
margin-left: 20px;
margin-left: 3px;
}
.feedback .btn span:first-child {
position: absolute;
font-size: 16px;
font-size: 13px;
}
/* sider left category */
.block-faq-category .block-title {
Expand All @@ -67,6 +66,7 @@
}
.faqs-list .item {
border: 1px solid #e3e3e3;
margin-bottom: 15px;
}
.faqs-list .item.active {
a {
Expand Down Expand Up @@ -113,7 +113,7 @@
.faqs-list .item > a {
font-size: 14px;
line-height: 1.5;
font-weight: 600;
font-weight: 500;
color: #41362f;
padding: 10px 15px;
display: block;
Expand Down Expand Up @@ -210,6 +210,9 @@ h2.first-title {
text-decoration: none;
color: #198dd3 !important;
}
.category-list .category .block h3 a {
font-weight: 500;
}
.category-list .category .block a:last-child{
color: #333;
}
Expand Down

0 comments on commit f5eb14e

Please sign in to comment.