? ? Success

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
11 Aug 2016

When you go to edit a template there is no indicator which templateyou are editing. This PR adds the name of the template to the titlebar

Before

oy n

After

rrlf

avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2016
Category Administration Components Language & Strings
avatar brianteeman brianteeman - open - 11 Aug 2016
avatar brianteeman brianteeman - change - 11 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Aug 2016
Labels Added: ? ?
avatar C-Lodder C-Lodder - test_item - 11 Aug 2016 - Tested successfully
avatar C-Lodder
C-Lodder - comment - 11 Aug 2016

I have tested this item successfully on d0cef9f


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

avatar C-Lodder
C-Lodder - comment - 11 Aug 2016

Would it not be better to use $this->template->name instead of $this->template->element?

avatar brianteeman
brianteeman - comment - 11 Aug 2016

Weird I was certain I tried that and it didnt work but it does so i have made that change

avatar smz
smz - comment - 11 Aug 2016

May I suggest:

JToolbarHelper::title(JText::_('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE') . ' - ' . ucfirst($this->template->name), 'eye thememanager');

so that you (and all translators around the world) don't need to modify the language string?

avatar mbabker
mbabker - comment - 11 Aug 2016

so that you (and all translators around the world) don't need to modify the language string?

While that's the quickest and easiest solution, technically it's not correct as it will always append the template name to the end of the translated text. It'd be more correct to sprintf it into the string but that gets into creating a new string or changing an existing one and the hassle that comes with doing such a thing.

avatar smz
smz - comment - 11 Aug 2016

as it will always append the template name to the end of the translated text

Isn't that exactly what this PR is about?

avatar smz
smz - comment - 11 Aug 2016

ah... RTL languages??

avatar mbabker
mbabker - comment - 11 Aug 2016

It adds it to the title and it will always read correctly in English. Can the same be said for other languages in the way this is done?

avatar smz
smz - comment - 11 Aug 2016

Then I think a NEW string (mind B/C...) and a sprintf is the only correct solution: you're right! (as always, damn! ? )

avatar brianteeman
brianteeman - comment - 11 Aug 2016

Why did I listen and try to make you happy and make the change ;(

I did try a sprintf but never got it to work - I need to try that again

avatar smz
smz - comment - 11 Aug 2016

Why did I listen and try to make you happy and make the change ;(

It was anyway wrong, I think...

avatar mbabker
mbabker - comment - 11 Aug 2016

JText::sprintf('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE', ucfirst($this->template->name)); should be all you need (not looking at commit history to see what you tried)

avatar smz
smz - comment - 11 Aug 2016

Shouldn't it be:

sprintf(JText::_('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE_NEW'), ucfirst($this->template->name));

(forgetting about the eye thing for a moment...) ?

avatar smz
smz - comment - 11 Aug 2016

... or we have our own method?

avatar mbabker
mbabker - comment - 11 Aug 2016

We have our own method.

avatar brianteeman brianteeman - change - 11 Aug 2016
The description was changed
avatar brianteeman
brianteeman - comment - 11 Aug 2016

Thanks @mbabker I found the syntax error I made when I tried it - should be correct now I hope

avatar smz
smz - comment - 11 Aug 2016

I have the strong feeling you are breaking B/C by changing the COM_TEMPLATES_MANAGER_VIEW_TEMPLATE string that way: 3rd party developers could have used it in a different context.

avatar smz
smz - comment - 11 Aug 2016

... and the code will (probably) generate an error for languages that have not yet translated the string with the addition of the %s formatting string.

avatar brianteeman
brianteeman - comment - 11 Aug 2016

how?
anyway there is no b/c policy on language strings

avatar smz
smz - comment - 11 Aug 2016

please read above, we crossed our posting...

avatar C-Lodder
C-Lodder - comment - 11 Aug 2016

@brianteeman - Didn't you once tell me we had to keep language strings that are no longer used? lol

avatar brianteeman
brianteeman - comment - 11 Aug 2016

@C-Lodder yes we have to keep unused strings and I disagree with that policy
@smz Please dont waste my time with speculation. test it first and then you will see that if a language string has not been updated with the %s then there is no error at all
cmra

avatar jeckodevelopment jeckodevelopment - test_item - 11 Aug 2016 - Tested successfully
avatar jeckodevelopment
jeckodevelopment - comment - 11 Aug 2016

I have tested this item successfully on acae0f1


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

avatar smz
smz - comment - 11 Aug 2016

OK, I tested and indeed there is no error if the conversion string is missing from the sprintf, agreed.

Anyway I still think that you should have used a different string constant because if anybody had (rightfully) used that string constant in his/her extension he/she will not only have a different (but equivalent) string displayed, but one with the conversion string displayed "as is": ugly as hell.

On a personal note, can't you refrain from being rude? Was your comment about me "wasting your time" necessary at all?

avatar brianteeman
brianteeman - comment - 11 Aug 2016

Thanks for testing Luca

On 11 August 2016 at 20:48, Sergio Manzi notifications@github.com wrote:

OK, I tested and indeed there is no error if the conversion string is
missing from the sprintf, agreed.

Anyway I still think that you should have used a different string constant
because if anybody had (rightfully) used that string constant in
his/her extension he/she will not only have a different (but equivalent)
string displayed, but one with the conversion string displayed "as is":
ugly as hell.

On a personal note, can't you refrain from being rude? Was your comment
about me "wasting your time" necessary at all?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11560 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8XlZaQn0wdv4pOGM5DX2_1yX9bTvks5qe3yCgaJpZM4JiQd8
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar 1apweb 1apweb - test_item - 12 Aug 2016 - Tested successfully
avatar 1apweb
1apweb - comment - 12 Aug 2016

I have tested this item successfully on acae0f1


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

avatar zero-24 zero-24 - change - 12 Aug 2016
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 12 Aug 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 12 Aug 2016
Labels Added: ?
avatar truptikagathara truptikagathara - test_item - 13 Aug 2016 - Tested successfully
avatar truptikagathara
truptikagathara - comment - 13 Aug 2016

I have tested this item successfully on acae0f1


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

avatar wilsonge wilsonge - change - 13 Aug 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-13 18:08:11
Closed_By wilsonge
avatar brianteeman brianteeman - change - 13 Aug 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment