? ?
avatar dennisbuijsgmailcom
dennisbuijsgmailcom
20 Sep 2015

Steps to reproduce the issue

Hi

When I am using a menu item of com_users for people to login and I use in the menu title for instance COM_COMMUNITY_LOGIN it is not translated, i see COM_COMMUNITY_LOGIN in the page title and in the breadcrumbs.

Expected result

The translated text.

Changes that I made to fix this issue:

1: In components\com_users_views\login\view.html.php line 100:
$title = ($this->params->get('page_title', '');
Changed into:
$title = JText::_($this->params->get('page_title', ''));
This must be done for all menu items of com_users.

2: In modules/mod_breadcrumbs/helper.php at line 55:
$crumbs[$i]->name = stripslashes(htmlspecialchars($items[$i]->name, ENT_COMPAT, 'UTF-8'));
Change into
$crumbs[$i]->name = stripslashes(htmlspecialchars(JText::_($items[$i]->name), ENT_COMPAT, 'UTF-8'));

screen shot 2015-09-20 at 05 03 08

Best regards
Dennis

Actual result

System information (as much as possible)

Additional comments

screen shot 2015-09-20 at 05 03 10

avatar dennisbuijsgmailcom dennisbuijsgmailcom - open - 20 Sep 2015
avatar roland-d roland-d - change - 20 Sep 2015
Labels Added: ?
avatar richard67
richard67 - comment - 20 Sep 2015

Why should a general feature like using langauge strings in menu item titles be limited to com_users only just because this is your use case? It would cause an inconsistency in behavior of menu item titles, which could confuse backend users. It would make sense to establish language text resolving in menu item titles, but then for ALL menu item types. But this would be a big thing. For your use case you could simply make a template override, I think.
Is just my opinion, having experience with inconsistent user interfaces caused by punctual costumer requirements not being generalized by the engineers and so ending up with different logic for sloghtly different use cases of in general the same thing.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7914.

avatar dennisbuijsgmailcom
dennisbuijsgmailcom - comment - 20 Sep 2015

Hi Richard

Thanks for the quick reply. Yes, I understand your issue and I agree with you on this point, if it is changed then it must be changed everywhere and this is a bigger pease of work.

In many third party components I see this behaviour, so I thought I send the question in the community.

If I am right, otherwise tell me, I can only change component/module template php files like 'view/login/tmpl/default.php' and not 'view/login/view.html.php'.

Best regards
Dennis


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7914.

avatar richard67
richard67 - comment - 20 Sep 2015

Well, you could have separate menu items for each of your 3 content languages, and hard-code the title ;-)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7914.

avatar dennisbuijsgmailcom
dennisbuijsgmailcom - comment - 20 Sep 2015

Hi Richard

Yes, this is a solution and also the normal working method I normaly use, only for this and a few others I done it differently.

Thanks for the support, have a nice Sunday :-)

Best regards
Dennis


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7914.

avatar infograf768
infograf768 - comment - 21 Sep 2015

Also, translation of an inexisting constant forces the creation of a new string for each language possible via Languages->overrides. Not really convenient. Whether the site is multilingual or not.
Add to that the alias automatic creation...

I guess this can be closed.

avatar brianteeman brianteeman - change - 12 Nov 2015
Title
Using language translation item in the user login menu title
Using language translation item in the user login menu title
avatar brianteeman brianteeman - close - 12 Nov 2015
avatar brianteeman brianteeman - change - 12 Nov 2015
The description was changed
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-11-12 12:18:16
Closed_By brianteeman
avatar brianteeman brianteeman - close - 12 Nov 2015
avatar brianteeman
brianteeman - comment - 12 Nov 2015

Closing


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7914.

Add a Comment

Login with GitHub to post a comment