]> git.koha-community.org Git - koha.git/commit
Bug 22661: TinyMCE/WYSIWYG editor doesn't translate
authorOwen Leonard <oleonard@myacpl.org>
Mon, 7 Oct 2019 14:57:32 +0000 (14:57 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Sun, 3 Nov 2019 07:39:54 +0000 (07:39 +0000)
commit374f59f3cd7bebc9fe7d8c7fd8eae5afda769bf4
tree710c7f0c146fae94862f990932a0952abc5fa020
parent687d3035eec7a99d1737dfdcc460a16dd4e2d476
Bug 22661: TinyMCE/WYSIWYG editor doesn't translate

This patch updates the TinyMCE editor to the latest version (5.0.16) and
adds a translatable include file which will allow the TinyMCE interface
to show the same translation as Koha.

The configuration of the editor has been updated according to the new
version's requirements, keeping all the tools available we had before
and adding emoji support.

To test, apply the patch and enable the UseWYSIWYGinSystemPreferences
system preference.

TESTING THE UPGRADED EDITOR

 - Go to Administration -> System preferences -> OPAC.
 - Multiple instances of the TinyMCE editor should appear on the page:
   opaccredits, OpacCustomSearch, OpacLoginInstructions, etc.
 - Test adding and editing content to one or more of these editors.
   Confirm that the various editor tools work correctly.
 - Verify that changing the contents of any editor (including via paste)
   enables the corresponding "Save all X preferences" button.

 - Test the news editor under Tools -> News.

 - Test the library "OPAC info" editor in libraries administration:
   Administration -> Libraries -> Edit library -> OPAC info.

TESTING TRANSLATABILITY

 - Update a translation:

   > cd misc/translator
   > perl translate update fr-FR

 - Open the corresponding .po file for the staff client, e.g.
   misc/translator/po/fr-FR-staff-prog.po
 - Locate strings pulled from includes/str/tinymce_i18n.inc for
   translation, e.g.:

   #. SCRIPT
   #: intranet-tmpl/prog/en/includes/str/tinymce_i18n.inc:1
   #, fuzzy
   msgid "File"
   msgstr "Fichier :"

 - Edit the "msgstr" string however you want (it's just for testing) and
   remove the "fuzzy" line.
 - Install the updated translation:

   > perl translate install fr-FR

 - Go to Administration -> System preferences -> OPAC.
 - In each instance of the TinyMCE editor, the first menu item should
   have as its label the translation "msgstr" string you edited.

 - Check that the "About" page shows updated information about
   the TinyMCE version, 5.0.16.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
141 files changed:
koha-tmpl/intranet-tmpl/lib/tiny_mce/jquery.tinymce.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/langs/en.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/license.txt
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advhr/css/advhr.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advhr/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advhr/js/rule.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advhr/langs/en_dlg.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advhr/rule.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/css/advimage.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/editor_plugin_src.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/image.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/img/sample.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/js/image.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advimage/langs/en_dlg.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advlink/css/advlink.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advlink/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advlink/js/advlink.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advlink/langs/en_dlg.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/advlink/link.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/autoresize/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/charmap/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/code/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/contextmenu/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/emoticons/js/emojis.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/emoticons/js/emojis.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/emoticons/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/hr/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/image/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/link/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/lists/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/print/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/save/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/searchreplace/css/searchreplace.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/searchreplace/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/searchreplace/js/searchreplace.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/searchreplace/langs/en_dlg.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/searchreplace/searchreplace.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/cell.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/css/cell.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/css/row.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/css/table.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/editor_plugin.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/js/cell.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/js/merge_cells.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/js/row.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/js/table.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/langs/en_dlg.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/merge_cells.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/plugin.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/row.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/plugins/table/table.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/content/dark/content.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/content/default/content.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/content/document/content.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/content/writer/content.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide-dark/content.inline.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide-dark/content.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide-dark/content.mobile.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide-dark/skin.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide-dark/skin.mobile.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide/content.inline.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide/content.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide/content.mobile.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide/fonts/tinymce-mobile.woff [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide/skin.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/skins/ui/oxide/skin.mobile.min.css [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/about.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/anchor.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/charmap.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/color_picker.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/editor_template.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/image.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/colorpicker.jpg [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/flash.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/icons.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/iframe.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/pagebreak.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/quicktime.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/realmedia.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/shockwave.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/trans.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/video.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/img/windowsmedia.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/about.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/anchor.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/charmap.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/color_picker.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/image.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/link.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/js/source_editor.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/langs/en.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/langs/en_dlg.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/link.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/shortcuts.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/content.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/dialog.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/img/buttons.png [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/img/items.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/img/menu_check.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/img/progress.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/img/tabs.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/default/ui.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/highcontrast/content.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/highcontrast/dialog.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/highcontrast/ui.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/content.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/dialog.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/ui.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/ui_black.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/advanced/source_editor.htm [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/mobile/theme.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/silver/theme.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/editor_template.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/img/icons.gif [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/langs/en.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/skins/default/content.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/skins/default/ui.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/skins/o2k7/content.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/themes/simple/skins/o2k7/ui.css [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/tiny_mce.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/tiny_mce_gzip.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/tiny_mce_gzip.pl [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/tiny_mce_popup.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/tinymce.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/tiny_mce/utils/editable_selects.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/utils/form_utils.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/utils/mctabs.js [deleted file]
koha-tmpl/intranet-tmpl/lib/tiny_mce/utils/validate.js [deleted file]
koha-tmpl/intranet-tmpl/prog/en/includes/str/tinymce_i18n.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt