No Code Attached Yet J4 Issue
avatar brianteeman
brianteeman
11 Mar 2019

Steps to reproduce the issue

Enable debug language
All strings should be wrapped in **
Observe how many of the button are wrapped in ?? indicating untranslated but they are
I don't know if its a bug in the debug code or what

Examples

image

image

image

avatar brianteeman brianteeman - open - 11 Mar 2019
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Mar 2019
avatar SharkyKZ
SharkyKZ - comment - 11 Mar 2019

It means the string is translated multiple times.

avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Mar 2019
Status New Discussion
avatar infograf768
infograf768 - comment - 12 Mar 2019

For Preview, it is quite simple

It is first translated in
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Toolbar/ToolbarButton.php#L121
as every toolbar button by default

Then it is translated again in
https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_content/View/Article/HtmlView.php#L197-L200

This one can be solved here by modifying this last one to

				$url = PreviewHelper::url($this->item);
				$toolbar->preview($url, 'JGLOBAL_PREVIEW')
					->bodyHeight(80)
					->modalWidth(90);

to get
Screen Shot 2019-03-12 at 07 04 19

I could not find a way for Change Status

avatar hardik-codes
hardik-codes - comment - 12 Mar 2019

Started working on this.

avatar puneeth2001
puneeth2001 - comment - 12 Mar 2019

@SharkyKZ are you sure that this is being caused by repetition of strings, I can find the repetetion
in the 'preview' thing as @infograf768 said but couldn't find the repetetion in case of Change Status.

avatar puneeth2001
puneeth2001 - comment - 12 Mar 2019

image
I found these being called only once, i.e. in plugins/sampledata/blog/blog.php

avatar SharkyKZ
SharkyKZ - comment - 12 Mar 2019

Site menus are not translatable.

are you sure that this is being caused by repetition of strings

Yes, it's because Joomla\CMS\Toolbar\Button\DropdownButton::prepareOptions() calls parent::prepareOptions() which translates the string and then uses the options to create a new button. But new button expects an untranslated string.

$button = new BasicButton($this->getName(), $this->getText(), $options);

avatar infograf768
infograf768 - comment - 12 Mar 2019

Indeed
$this->getText() also uses Text::_

avatar puneeth2001
puneeth2001 - comment - 12 Mar 2019

ok I get it thanks.

avatar infograf768
infograf768 - comment - 13 Mar 2019

Preview double translation now solved:
#24178

Remains Change Status if it can be done.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Mar 2019

@infograf768 Issue stay open?

avatar infograf768
infograf768 - comment - 13 Mar 2019

remains the Change Status issue to solve, if possible.

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Mar 2019
Category com_languages
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar brianteeman
brianteeman - comment - 2 Jun 2019

@infograf768

Preview double translation now solved:
#24178

That's not the right PR?

avatar brianteeman brianteeman - change - 7 Jun 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-06-07 07:28:36
Closed_By brianteeman
avatar brianteeman brianteeman - close - 7 Jun 2019
avatar infograf768 infograf768 - change - 7 Jun 2019
Status Closed New
Closed_Date 2019-06-07 07:28:36
Closed_By brianteeman
avatar infograf768
infograf768 - comment - 7 Jun 2019

The right PR was #24173

Reopening as Change Status issue is not solved yet.

avatar infograf768 infograf768 - reopen - 7 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Jun 2019
Status New Discussion
avatar brianteeman brianteeman - change - 23 Feb 2022
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2022-02-23 20:21:59
Closed_By brianteeman
Labels Added: No Code Attached Yet
Removed: ?
avatar brianteeman brianteeman - close - 23 Feb 2022
avatar brianteeman
brianteeman - comment - 23 Feb 2022

Closing - not worth keeping it open for this edge case.

Add a Comment

Login with GitHub to post a comment