?
avatar infograf768
infograf768
23 Dec 2016

Some recent PRs changed the parameters in TinyMCE

When editing the plugin itself, the TinyMCE toolbar buttons are translated by a bunch of new ini files. Example:
PLG_TINY_TOOLBAR_BUTTON_PRINT="Print"

Here, the back-end is set to French and I added in fr-FR tiny lang strings the string
PLG_TINY_TOOLBAR_BUTTON_PRINT="Imprimer"
screen shot 2016-12-23 at 09 35 34

Until there, no issue.

But when using the editor, automatic language detection is broken. The lang js files ( in ROOT/media/editors/tinymce/langs/ are not used anymore.
Example when admin is set to French language:

screen shot 2016-12-23 at 09 34 43

THis is a release blocker

avatar infograf768 infograf768 - open - 23 Dec 2016
avatar joomla-cms-bot joomla-cms-bot - change - 23 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Dec 2016
avatar infograf768 infograf768 - change - 23 Dec 2016
The description was changed
avatar infograf768 infograf768 - edited - 23 Dec 2016
avatar AlexRed
AlexRed - comment - 23 Dec 2016

I can confirm the language problem after you save for the first time the editor plugin settings.

avatar Fedik
Fedik - comment - 23 Dec 2016

@infograf768 thanks for ping, I try check it tomorrow

avatar infograf768
infograf768 - comment - 23 Dec 2016

@jeckodevelopment
Please mark this as Release Blocker. Thanks.

avatar infograf768
infograf768 - comment - 23 Dec 2016

@Fedik
can't you use the existing .js lang files instead of adding all these new ini strings?
When editing the plugin itself, the lang would be forced, if it exists, to the admin language used, and default to English.
And we would recover the automatic language change as well as the forced language when using the editor.

avatar Fedik
Fedik - comment - 23 Dec 2016

In the plugin editor hard to use existing TinyMCE js, because it not a real TinyMCE, it a fake TinyMCE panel. That why I have added all these new ini strings.

avatar infograf768
infograf768 - comment - 23 Dec 2016

Although it is a fake, is'nt it possible to use the js files and replace the method public static function getKnownButtons() by the values from these files + check which admin language is used?
That would really help by not maintaining 2 groups of translations with same values.

avatar Fedik
Fedik - comment - 23 Dec 2016

It is not impossible, but complicated 😉
And I thought about it first, but the problem in the language file structure, it not just a JSON string. So for use it need to do some "hacks", and this gives no guarantee that it will work good in the future, after some TinyMCE upgrade or something.

avatar infograf768
infograf768 - comment - 23 Dec 2016

Although it is complicated, I guess something has to be done. And it has to be done out of Tiny itself to indeed let modify as fit for future Tiny upgrades.
By curiosity, I tried to find strings for the fake editor Heading
Edit Insert View Format Table Tools
are not Translatable

avatar zero-24 zero-24 - change - 23 Dec 2016
Labels Added: ?
avatar zero-24 zero-24 - labeled - 23 Dec 2016
avatar ggppdk
ggppdk - comment - 23 Dec 2016

The problem is only when editing the tinyMCE 'editor' plugin
(and in it, only at its toolbar layout configuration)

This new feature of graphical toolbar editing is great. The alternative is not having it ?

Maybe this is acceptable to add an inline message:

Drag and drop the buttons below to configure the toolbar layouts of tinyMCE,
There are 3 toobar (sets) that can be configured, each can be have a different access: e.g public, registered
Please note the the display of the layout is currently not translated

Then remove the release blocker,
and leave this for the future implementation without a "release blocker" label
when someone has time to implement translation file usage

avatar AlexRed
AlexRed - comment - 23 Dec 2016

For the inline message,

"There are 3 toolbar (sets)" but you can add more in the advanced setting.
Also I suggest to write the toolbar layouts of tinyMCE is a DEMO and the setting below have no effect on this but only in the real tinyMCE editor interface.

But for me the automatic language detection is broken also in the real tinyMCE editor interface after you save for the first time the editor plugin settings.

avatar ggppdk
ggppdk - comment - 23 Dec 2016

But for me the automatic language detection is broken also in the real tinyMCE editor interface after you save for the first time the editor plugin settings.

aaa, i confirm it, after saving the tinyMCE editor plugin,
the editor toolbar of tinyMCE in all forms (article form, category form, etc) is no longer tranlated,

This last one , is a real issue, hopefully it is a lot easier / less work to fix that the toolbar translation inside tinyMCE editor plugin

avatar infograf768
infograf768 - comment - 23 Dec 2016

Always believe Grand'Pa :)

avatar Fedik
Fedik - comment - 25 Dec 2016

for Regression please test #13366

avatar AlexRed
AlexRed - comment - 25 Dec 2016

#13366 ok for me for the language in the real editor, but not in the demo editor in the plugin setting

avatar Fedik
Fedik - comment - 25 Dec 2016

for the translation of the buttons in the TinyMCE builder, please test #13368 (it not Regression)

avatar zero-24 zero-24 - change - 25 Dec 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-12-25 15:35:52
Closed_By zero-24
avatar zero-24 zero-24 - close - 25 Dec 2016
avatar zero-24 zero-24 - change - 16 Oct 2017
Labels Removed: ?
avatar zero-24 zero-24 - unlabeled - 16 Oct 2017

Add a Comment

Login with GitHub to post a comment