Jump to content

Problem - Mixed translations


PZag

Recommended Posts

Hi, everyone!

 

I have a strange problem I can not solve. In the Front office the Block cart is translated mixed. When you are in Bulgarian language is OK and shows "Кошница е празна" , but when the menu is turned in English, it shows "Shopping cart е празна" . I tried to make a changes in .tpl files and translation too, but the result is the same.

 

Can anyone help me?

 

Thanks in advance.

 

Regards, 

Link to comment
Share on other sites

It's OK about the replies and I thank you again for the help. This is the content of the file:

 

<!-- Block user information module HEADER -->
<div id="header_user" {if $PS_CATALOG_MODE}class="header_user_catalog"{/if}>
<ul id="header_nav">
{if !$PS_CATALOG_MODE}
<li id="shopping_cart">
<a href="{$link->getPageLink($order_process, true)|escape:'html'}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'}
<span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span>
<span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span>
<span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}">
{if $cart_qties > 0}
{if $priceDisplay == 1}
{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
{else}
{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}
{/if}
{/if}
</span>
<span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='is empty' mod='blockuserinfo'}</span>
</a>
</li>
{/if}
<li id="your_account"><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" rel="nofollow">{l s='Your Account' mod='blockuserinfo'}</a></li>
</ul>
<p id="header_user_info">
{l s='Welcome' mod='blockuserinfo'}
{if $logged}
<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow">{$cookie->customer_firstname}</a>
<a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a>
{else}
<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
{/if}
</p>
</div>
<!-- /Block user information module HEADER -->
 
Regards,
Peter
Link to comment
Share on other sites

It means "is empty" . It have to be in english but it's not. At the beginning of the project it was mixed at all. I mean that when you turn  in bulgarian language the site, the Cart  was written "Кошница is empty" (Кошница means Shopping cart) and when you turn in english language the site, the Cart was written "Shopping bag е празна" . I fixed it in bulgarian by the translation and now is OK. But the english version is not as you can see and I don't know where is the problem. 

Link to comment
Share on other sites

This is the  code from blockuserinfo.php: 

public function hookTop($params)
{
if (!$this->active)
return;
 
$this->smarty->assign(array(
'cart' => $this->context->cart,
'cart_qties' => $this->context->cart->nbProducts(),
'logged' => $this->context->customer->isLogged(),
'customerName' => ($this->context->customer->logged ? $this->context->customer->firstname.' '.$this->context->customer->lastname : false),
'firstName' => ($this->context->customer->logged ? $this->context->customer->firstname : false),
'lastName' => ($this->context->customer->logged ? $this->context->customer->lastname : false),
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order'
));
return $this->display(__FILE__, 'blockuserinfo.tpl');
}
 
Note: But this code is from: /public_html/modules/blockuserinfo , not from: /public_html/themes/MY_THEME/modules/blockuserinfo if it is important. In the second directory there isn't blockuserinfo.php . There is only blockuserinfo.tpl . May be the note is a little silly but I don't know and a decided to mentioned it.
 
Regards,
Peter
Link to comment
Share on other sites

The code that I attached before is from blockuserinfo.php file, which is in the original folder.

 

Now I will attach the code of blockuserinfo.tpl file if you need from. It is from the theme that I am using:

 

<!-- Block user information module HEADER -->
<div id="header_user" {if $PS_CATALOG_MODE}class="header_user_catalog"{/if}>
<ul id="header_nav">
{if !$PS_CATALOG_MODE}
<li id="shopping_cart">
<a href="{$link->getPageLink($order_process, true)|escape:'html'}" title="{l s='View my shopping cart' mod='blockuserinfo'}" rel="nofollow">{l s='Cart' mod='blockuserinfo'}
<span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='Product' mod='blockuserinfo'}</span>
<span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='Products' mod='blockuserinfo'}</span>
<span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}">
{if $cart_qties > 0}
{if $priceDisplay == 1}
{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
{convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
{else}
{assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
{convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}
{/if}
{/if}
</span>
<span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='is empty' mod='blockuserinfo'}</span>
</a>
</li>
{/if}
<li id="your_account"><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" rel="nofollow">{l s='Your Account' mod='blockuserinfo'}</a></li>
</ul>
<p id="header_user_info">
{l s='Welcome' mod='blockuserinfo'}
{if $logged}
<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}" class="account" rel="nofollow">{$cookie->customer_firstname}</a>
<a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout" rel="nofollow">{l s='Log out' mod='blockuserinfo'}</a>
{else}
<a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='Login to your customer account' mod='blockuserinfo'}" class="login" rel="nofollow">{l s='Login' mod='blockuserinfo'}</a>
{/if}
</p>
</div>
<!-- /Block user information module HEADER -->
Link to comment
Share on other sites

The problem is solved finilly. But unfortunately I don't know what was the problem to share. Everything became OK when I have updated the theme with new one version. If someone has any idea, please share. :) The most important that the problem is done. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...