User tests: Successful: Unsuccessful:
Category | ⇒ | Administration Components Language & Strings |
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Would it not be better to use $this->template->name
instead of $this->template->element
?
Weird I was certain I tried that and it didnt work but it does so i have made that change
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?
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.
as it will always append the template name to the end of the translated text
Isn't that exactly what this PR is about?
ah... RTL languages??
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?
Then I think a NEW string (mind B/C...) and a sprintf is the only correct solution: you're right! (as always, damn!
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
Why did I listen and try to make you happy and make the change ;(
It was anyway wrong, I think...
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)
Shouldn't it be:
sprintf(JText::_('COM_TEMPLATES_MANAGER_VIEW_TEMPLATE_NEW'), ucfirst($this->template->name));
(forgetting about the eye thing for a moment...) ?
... or we have our own method?
We have our own method.
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.
... 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.
how?
anyway there is no b/c policy on language strings
please read above, we crossed our posting...
@brianteeman - Didn't you once tell me we had to keep language strings that are no longer used? lol
I have tested this item
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?
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/
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
I have tested this item
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 |
Labels |
Removed:
?
|
I have tested this item✅ successfully on d0cef9f
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11560.