imio.omnia.tinymce 1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- imio/omnia/tinymce/__init__.py +6 -0
- imio/omnia/tinymce/browser/__init__.py +0 -0
- imio/omnia/tinymce/browser/action.py +6 -0
- imio/omnia/tinymce/browser/configure.zcml +40 -0
- imio/omnia/tinymce/browser/controlpanel.py +93 -0
- imio/omnia/tinymce/browser/npm/package-lock.json +125 -0
- imio/omnia/tinymce/browser/npm/package.json +8 -0
- imio/omnia/tinymce/browser/overrides/.gitkeep +0 -0
- imio/omnia/tinymce/browser/resources/.env.example +13 -0
- imio/omnia/tinymce/browser/resources/.git +1 -0
- imio/omnia/tinymce/browser/resources/.gitignore +26 -0
- imio/omnia/tinymce/browser/resources/.gitlab-ci.yml +77 -0
- imio/omnia/tinymce/browser/resources/.storybook/main.js +124 -0
- imio/omnia/tinymce/browser/resources/.storybook/preview.js +8 -0
- imio/omnia/tinymce/browser/resources/CHANGELOG.md +19 -0
- imio/omnia/tinymce/browser/resources/CLAUDE.md +62 -0
- imio/omnia/tinymce/browser/resources/Makefile +28 -0
- imio/omnia/tinymce/browser/resources/README.md +327 -0
- imio/omnia/tinymce/browser/resources/dev/index.html +41 -0
- imio/omnia/tinymce/browser/resources/dev/vite.config.js +78 -0
- imio/omnia/tinymce/browser/resources/docs/images/example1.png +0 -0
- imio/omnia/tinymce/browser/resources/eslint.config.js +36 -0
- imio/omnia/tinymce/browser/resources/package-lock.json +4913 -0
- imio/omnia/tinymce/browser/resources/package.json +61 -0
- imio/omnia/tinymce/browser/resources/src/assets/ia-icon.svg +5 -0
- imio/omnia/tinymce/browser/resources/src/assets/omnia-icon.svg +10 -0
- imio/omnia/tinymce/browser/resources/src/client.js +239 -0
- imio/omnia/tinymce/browser/resources/src/config.js +220 -0
- imio/omnia/tinymce/browser/resources/src/plugin.js +158 -0
- imio/omnia/tinymce/browser/resources/src/shortcuts.js +92 -0
- imio/omnia/tinymce/browser/resources/src/ui/App.jsx +75 -0
- imio/omnia/tinymce/browser/resources/src/ui/FloatingPanel.jsx +375 -0
- imio/omnia/tinymce/browser/resources/src/ui/PanelHeader.jsx +15 -0
- imio/omnia/tinymce/browser/resources/src/ui/SidePanel.jsx +284 -0
- imio/omnia/tinymce/browser/resources/src/ui/StreamingText.jsx +143 -0
- imio/omnia/tinymce/browser/resources/src/ui/components.jsx +70 -0
- imio/omnia/tinymce/browser/resources/src/ui/mount.jsx +35 -0
- imio/omnia/tinymce/browser/resources/src/ui/omnia.css +35 -0
- imio/omnia/tinymce/browser/resources/src/utils.js +56 -0
- imio/omnia/tinymce/browser/resources/stories/FloatingPanel.stories.jsx +66 -0
- imio/omnia/tinymce/browser/resources/stories/SidePanel.stories.jsx +31 -0
- imio/omnia/tinymce/browser/resources/stories/StreamingText.stories.jsx +85 -0
- imio/omnia/tinymce/browser/resources/stories/TinyMCEEditor.stories.js +228 -0
- imio/omnia/tinymce/browser/resources/stories/TypingDots.stories.jsx +31 -0
- imio/omnia/tinymce/browser/resources/stories/mocks/editor.js +66 -0
- imio/omnia/tinymce/browser/resources/stories/mocks/omnia-client.js +99 -0
- imio/omnia/tinymce/browser/resources/stories/presets/accessibilite-reglement.html +49 -0
- imio/omnia/tinymce/browser/resources/stories/presets/ameliorer-communication.html +36 -0
- imio/omnia/tinymce/browser/resources/stories/presets/corriger-bulletin.html +186 -0
- imio/omnia/tinymce/browser/resources/stories/presets/long-cdld.html +12389 -0
- imio/omnia/tinymce/browser/resources/stories/presets/reduire-deliberation.html +87 -0
- imio/omnia/tinymce/browser/resources/stories/presets/traduire-guide.html +234 -0
- imio/omnia/tinymce/browser/resources/vite.config.js +27 -0
- imio/omnia/tinymce/browser/static/omnia-tinymce.css +1 -0
- imio/omnia/tinymce/browser/static/omnia-tinymce.js +22 -0
- imio/omnia/tinymce/browser/templates/omnia_config.pt +10 -0
- imio/omnia/tinymce/browser/viewlets.py +57 -0
- imio/omnia/tinymce/configure.zcml +42 -0
- imio/omnia/tinymce/interfaces.py +7 -0
- imio/omnia/tinymce/locales/README.rst +37 -0
- imio/omnia/tinymce/locales/__init__.py +0 -0
- imio/omnia/tinymce/locales/en/LC_MESSAGES/imio.omnia.tinymce.po +83 -0
- imio/omnia/tinymce/locales/fr/LC_MESSAGES/imio.omnia.tinymce.po +83 -0
- imio/omnia/tinymce/locales/imio.omnia.tinymce.pot +86 -0
- imio/omnia/tinymce/locales/update.py +74 -0
- imio/omnia/tinymce/locales/update.sh +12 -0
- imio/omnia/tinymce/permissions.zcml +10 -0
- imio/omnia/tinymce/profiles/default/actions.xml +13 -0
- imio/omnia/tinymce/profiles/default/browserlayer.xml +7 -0
- imio/omnia/tinymce/profiles/default/catalog.xml +4 -0
- imio/omnia/tinymce/profiles/default/metadata.xml +7 -0
- imio/omnia/tinymce/profiles/default/registry/main.xml +35 -0
- imio/omnia/tinymce/profiles/default/rolemap.xml +7 -0
- imio/omnia/tinymce/profiles/uninstall/browserlayer.xml +7 -0
- imio/omnia/tinymce/setuphandlers.py +45 -0
- imio/omnia/tinymce/testing.py +48 -0
- imio/omnia/tinymce/tests/__init__.py +0 -0
- imio/omnia/tinymce/tests/robot/test_example.robot +66 -0
- imio/omnia/tinymce/tests/test_robot.py +28 -0
- imio/omnia/tinymce/tests/test_setup.py +68 -0
- imio/omnia/tinymce/tests/test_viewlet.py +99 -0
- imio.omnia.tinymce-1.0-py3.12-nspkg.pth +2 -0
- imio_omnia_tinymce-1.0.dist-info/METADATA +294 -0
- imio_omnia_tinymce-1.0.dist-info/RECORD +90 -0
- imio_omnia_tinymce-1.0.dist-info/WHEEL +5 -0
- imio_omnia_tinymce-1.0.dist-info/entry_points.txt +5 -0
- imio_omnia_tinymce-1.0.dist-info/licenses/LICENSE.GPL +339 -0
- imio_omnia_tinymce-1.0.dist-info/licenses/LICENSE.rst +15 -0
- imio_omnia_tinymce-1.0.dist-info/namespace_packages.txt +2 -0
- imio_omnia_tinymce-1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
import json
|
|
3
|
+
|
|
4
|
+
from plone import api
|
|
5
|
+
from plone.app.layout.viewlets.common import ViewletBase
|
|
6
|
+
from plone.protect.authenticator import createToken
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class OmniaConfigViewlet(ViewletBase):
|
|
10
|
+
"""Inject omnia_* TinyMCE options from the Plone registry into the page."""
|
|
11
|
+
|
|
12
|
+
def get_config(self):
|
|
13
|
+
tmce_prefix = "imio.omnia.tinymce.browser.controlpanel.IOmniaTinyMCESettings"
|
|
14
|
+
|
|
15
|
+
def _get(key, default=None):
|
|
16
|
+
try:
|
|
17
|
+
return api.portal.get_registry_record(key)
|
|
18
|
+
except (KeyError, api.exc.InvalidParameterError):
|
|
19
|
+
return default
|
|
20
|
+
|
|
21
|
+
config = {}
|
|
22
|
+
|
|
23
|
+
# Point to the local proxy view instead of the external API.
|
|
24
|
+
# Credentials (application, municipality) stay server-side.
|
|
25
|
+
# We need the context path here so the proxy view can deduce the context safely.
|
|
26
|
+
config["omnia_base_url"] = f"{self.context.absolute_url()}/@@omnia-api"
|
|
27
|
+
|
|
28
|
+
config["omnia_auth_token"] = createToken()
|
|
29
|
+
|
|
30
|
+
# From IOmniaTinyMCESettings
|
|
31
|
+
enabled = _get(f"{tmce_prefix}.enabled_features")
|
|
32
|
+
if enabled is not None:
|
|
33
|
+
config["omnia_enabled_features"] = list(enabled)
|
|
34
|
+
config["omnia_toolbar"] = _get(f"{tmce_prefix}.show_toolbar", True)
|
|
35
|
+
config["omnia_context_menu"] = _get(f"{tmce_prefix}.show_context_menu", True)
|
|
36
|
+
config["omnia_shortcuts"] = _get(f"{tmce_prefix}.enable_shortcuts", True)
|
|
37
|
+
|
|
38
|
+
translate_langs = _get(f"{tmce_prefix}.translate_languages")
|
|
39
|
+
if translate_langs is not None:
|
|
40
|
+
config["omnia_translate_languages"] = list(translate_langs)
|
|
41
|
+
default_lang = _get(f"{tmce_prefix}.default_translate_language", "fr")
|
|
42
|
+
if default_lang:
|
|
43
|
+
config["omnia_default_translate_language"] = default_lang
|
|
44
|
+
|
|
45
|
+
panel_mode = _get(f"{tmce_prefix}.floating_panel_mode", "inline")
|
|
46
|
+
if panel_mode:
|
|
47
|
+
config["omnia_floating_panel_mode"] = panel_mode
|
|
48
|
+
panel_width = _get(f"{tmce_prefix}.floating_panel_width", "500")
|
|
49
|
+
if panel_width:
|
|
50
|
+
config["omnia_floating_panel_width"] = (
|
|
51
|
+
int(panel_width) if panel_width.isdigit() else panel_width
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
return config
|
|
55
|
+
|
|
56
|
+
def config_json(self):
|
|
57
|
+
return json.dumps(self.get_config())
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<configure
|
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
|
3
|
+
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
|
|
4
|
+
xmlns:i18n="http://namespaces.zope.org/i18n"
|
|
5
|
+
xmlns:plone="http://namespaces.plone.org/plone"
|
|
6
|
+
i18n_domain="imio.omnia.tinymce">
|
|
7
|
+
|
|
8
|
+
<i18n:registerTranslations directory="locales" />
|
|
9
|
+
|
|
10
|
+
<include package="imio.omnia.core" />
|
|
11
|
+
|
|
12
|
+
<!-- has to be loaded before permissions are used, so keep above views aso. -->
|
|
13
|
+
<include file="permissions.zcml" />
|
|
14
|
+
|
|
15
|
+
<include package=".browser" />
|
|
16
|
+
|
|
17
|
+
<genericsetup:registerProfile
|
|
18
|
+
name="default"
|
|
19
|
+
title="Omnia TinyMCE Plugin"
|
|
20
|
+
directory="profiles/default"
|
|
21
|
+
description="Installs the imio.omnia.tinymce add-on. This add-on provides a TinyMCE plugin for Omnia."
|
|
22
|
+
provides="Products.GenericSetup.interfaces.EXTENSION"
|
|
23
|
+
post_handler=".setuphandlers.post_install"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<genericsetup:registerProfile
|
|
27
|
+
name="uninstall"
|
|
28
|
+
title="imio.omnia.tinymce (uninstall)"
|
|
29
|
+
directory="profiles/uninstall"
|
|
30
|
+
description="Uninstalls the imio.omnia.tinymce add-on."
|
|
31
|
+
provides="Products.GenericSetup.interfaces.EXTENSION"
|
|
32
|
+
post_handler=".setuphandlers.uninstall"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<utility
|
|
36
|
+
factory=".setuphandlers.HiddenProfiles"
|
|
37
|
+
name="imio.omnia.tinymce-hiddenprofiles"
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
<!-- -*- extra stuff goes here -*- -->
|
|
41
|
+
|
|
42
|
+
</configure>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Adding and updating locales
|
|
2
|
+
---------------------------
|
|
3
|
+
|
|
4
|
+
For every language you want to translate into you need a
|
|
5
|
+
locales/[language]/LC_MESSAGES/collective.task.po
|
|
6
|
+
(e.g. locales/de/LC_MESSAGES/collective.task.po)
|
|
7
|
+
|
|
8
|
+
For German
|
|
9
|
+
|
|
10
|
+
.. code-block:: console
|
|
11
|
+
|
|
12
|
+
$ mkdir de
|
|
13
|
+
|
|
14
|
+
For updating locales
|
|
15
|
+
|
|
16
|
+
.. code-block:: console
|
|
17
|
+
|
|
18
|
+
$ ./bin/update_locale
|
|
19
|
+
|
|
20
|
+
Note
|
|
21
|
+
----
|
|
22
|
+
|
|
23
|
+
The script uses gettext package for internationalization.
|
|
24
|
+
|
|
25
|
+
Install it before running the script.
|
|
26
|
+
|
|
27
|
+
On macOS
|
|
28
|
+
--------
|
|
29
|
+
|
|
30
|
+
.. code-block:: console
|
|
31
|
+
|
|
32
|
+
$ brew install gettext
|
|
33
|
+
|
|
34
|
+
On Windows
|
|
35
|
+
----------
|
|
36
|
+
|
|
37
|
+
see https://mlocati.github.io/articles/gettext-iconv-windows.html
|
|
File without changes
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: imio.omnia.tinymce\n"
|
|
4
|
+
"POT-Creation-Date: 2026-03-23 00:00+0000\n"
|
|
5
|
+
"PO-Revision-Date: 2026-03-23 00:00+0000\n"
|
|
6
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
7
|
+
"Language-Team: English <en@li.org>\n"
|
|
8
|
+
"MIME-Version: 1.0\n"
|
|
9
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
10
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
11
|
+
"Plural-Forms: nplurals=1; plural=0\n"
|
|
12
|
+
"Language-Code: en\n"
|
|
13
|
+
"Language-Name: English\n"
|
|
14
|
+
"Preferred-Encodings: utf-8 latin1\n"
|
|
15
|
+
"Domain: imio.omnia.tinymce\n"
|
|
16
|
+
|
|
17
|
+
#: ../browser/controlpanel.py:67
|
|
18
|
+
msgid "Default translation language"
|
|
19
|
+
msgstr ""
|
|
20
|
+
|
|
21
|
+
#: ../browser/controlpanel.py:74
|
|
22
|
+
msgid "Display mode: inline near selection or centred with blur overlay."
|
|
23
|
+
msgstr ""
|
|
24
|
+
|
|
25
|
+
#: ../browser/controlpanel.py:44
|
|
26
|
+
msgid "Enable keyboard shortcuts"
|
|
27
|
+
msgstr ""
|
|
28
|
+
|
|
29
|
+
#: ../browser/controlpanel.py:16
|
|
30
|
+
msgid "Enabled features"
|
|
31
|
+
msgstr ""
|
|
32
|
+
|
|
33
|
+
#: ../browser/controlpanel.py:73
|
|
34
|
+
msgid "Floating panel mode"
|
|
35
|
+
msgstr ""
|
|
36
|
+
|
|
37
|
+
#: ../browser/controlpanel.py:81
|
|
38
|
+
msgid "Floating panel width"
|
|
39
|
+
msgstr ""
|
|
40
|
+
|
|
41
|
+
#: ../configure.zcml:25
|
|
42
|
+
msgid "Installs the imio.omnia.tinymce add-on."
|
|
43
|
+
msgstr ""
|
|
44
|
+
|
|
45
|
+
#: ../browser/controlpanel.py:51
|
|
46
|
+
msgid "Language codes available for translation."
|
|
47
|
+
msgstr ""
|
|
48
|
+
|
|
49
|
+
#: ../browser/controlpanel.py:17
|
|
50
|
+
msgid "Restrict to a subset of features. Leave empty for all features except generate."
|
|
51
|
+
msgstr ""
|
|
52
|
+
|
|
53
|
+
#: ../browser/controlpanel.py:39
|
|
54
|
+
msgid "Show context menu"
|
|
55
|
+
msgstr ""
|
|
56
|
+
|
|
57
|
+
#: ../browser/controlpanel.py:34
|
|
58
|
+
msgid "Show toolbar button"
|
|
59
|
+
msgstr ""
|
|
60
|
+
|
|
61
|
+
#: ../browser/controlpanel.py:89
|
|
62
|
+
msgid "TinyMCE Omnia settings"
|
|
63
|
+
msgstr ""
|
|
64
|
+
|
|
65
|
+
#: ../browser/controlpanel.py:50
|
|
66
|
+
msgid "Translation languages"
|
|
67
|
+
msgstr ""
|
|
68
|
+
|
|
69
|
+
#: ../configure.zcml:34
|
|
70
|
+
msgid "Uninstalls the imio.omnia.tinymce add-on."
|
|
71
|
+
msgstr ""
|
|
72
|
+
|
|
73
|
+
#: ../browser/controlpanel.py:82
|
|
74
|
+
msgid "Width in pixels (e.g. 500) or 'full' for full viewport width."
|
|
75
|
+
msgstr ""
|
|
76
|
+
|
|
77
|
+
#: ../configure.zcml:23
|
|
78
|
+
msgid "imio.omnia.tinymce"
|
|
79
|
+
msgstr ""
|
|
80
|
+
|
|
81
|
+
#: ../configure.zcml:32
|
|
82
|
+
msgid "imio.omnia.tinymce (uninstall)"
|
|
83
|
+
msgstr ""
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
msgid ""
|
|
2
|
+
msgstr ""
|
|
3
|
+
"Project-Id-Version: imio.omnia.tinymce\n"
|
|
4
|
+
"POT-Creation-Date: 2026-03-23 00:00+0000\n"
|
|
5
|
+
"PO-Revision-Date: 2026-03-23 00:00+0000\n"
|
|
6
|
+
"Last-Translator: Antoine Duchêne <antoine.duchene@imio.be>\n"
|
|
7
|
+
"Language-Team: French <fr@li.org>\n"
|
|
8
|
+
"MIME-Version: 1.0\n"
|
|
9
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
10
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
11
|
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
12
|
+
"Language-Code: fr\n"
|
|
13
|
+
"Language-Name: French\n"
|
|
14
|
+
"Preferred-Encodings: utf-8 latin1\n"
|
|
15
|
+
"Domain: imio.omnia.tinymce\n"
|
|
16
|
+
|
|
17
|
+
#: ../browser/controlpanel.py:67
|
|
18
|
+
msgid "Default translation language"
|
|
19
|
+
msgstr "Langue de traduction par défaut"
|
|
20
|
+
|
|
21
|
+
#: ../browser/controlpanel.py:74
|
|
22
|
+
msgid "Display mode: inline near selection or centred with blur overlay."
|
|
23
|
+
msgstr "Mode d'affichage : en ligne près de la sélection ou centré avec un flou en arrière-plan."
|
|
24
|
+
|
|
25
|
+
#: ../browser/controlpanel.py:44
|
|
26
|
+
msgid "Enable keyboard shortcuts"
|
|
27
|
+
msgstr "Activer les raccourcis clavier"
|
|
28
|
+
|
|
29
|
+
#: ../browser/controlpanel.py:16
|
|
30
|
+
msgid "Enabled features"
|
|
31
|
+
msgstr "Fonctionnalités activées"
|
|
32
|
+
|
|
33
|
+
#: ../browser/controlpanel.py:73
|
|
34
|
+
msgid "Floating panel mode"
|
|
35
|
+
msgstr "Mode du panneau flottant"
|
|
36
|
+
|
|
37
|
+
#: ../browser/controlpanel.py:81
|
|
38
|
+
msgid "Floating panel width"
|
|
39
|
+
msgstr "Largeur du panneau flottant"
|
|
40
|
+
|
|
41
|
+
#: ../configure.zcml:25
|
|
42
|
+
msgid "Installs the imio.omnia.tinymce add-on."
|
|
43
|
+
msgstr "Installe le module imio.omnia.tinymce."
|
|
44
|
+
|
|
45
|
+
#: ../browser/controlpanel.py:51
|
|
46
|
+
msgid "Language codes available for translation."
|
|
47
|
+
msgstr "Codes de langues disponibles pour la traduction."
|
|
48
|
+
|
|
49
|
+
#: ../browser/controlpanel.py:17
|
|
50
|
+
msgid "Restrict to a subset of features. Leave empty for all features except generate."
|
|
51
|
+
msgstr "Restreindre à un sous-ensemble de fonctionnalités. Laisser vide pour toutes les fonctionnalités sauf la génération."
|
|
52
|
+
|
|
53
|
+
#: ../browser/controlpanel.py:39
|
|
54
|
+
msgid "Show context menu"
|
|
55
|
+
msgstr "Afficher le menu contextuel"
|
|
56
|
+
|
|
57
|
+
#: ../browser/controlpanel.py:34
|
|
58
|
+
msgid "Show toolbar button"
|
|
59
|
+
msgstr "Afficher le bouton dans la barre d'outils"
|
|
60
|
+
|
|
61
|
+
#: ../browser/controlpanel.py:89
|
|
62
|
+
msgid "TinyMCE Omnia settings"
|
|
63
|
+
msgstr "Paramètres Omnia pour TinyMCE"
|
|
64
|
+
|
|
65
|
+
#: ../browser/controlpanel.py:50
|
|
66
|
+
msgid "Translation languages"
|
|
67
|
+
msgstr "Langues de traduction"
|
|
68
|
+
|
|
69
|
+
#: ../configure.zcml:34
|
|
70
|
+
msgid "Uninstalls the imio.omnia.tinymce add-on."
|
|
71
|
+
msgstr "Désinstalle le module imio.omnia.tinymce."
|
|
72
|
+
|
|
73
|
+
#: ../browser/controlpanel.py:82
|
|
74
|
+
msgid "Width in pixels (e.g. 500) or 'full' for full viewport width."
|
|
75
|
+
msgstr "Largeur en pixels (ex. 500) ou « full » pour la pleine largeur de la fenêtre."
|
|
76
|
+
|
|
77
|
+
#: ../configure.zcml:23
|
|
78
|
+
msgid "imio.omnia.tinymce"
|
|
79
|
+
msgstr ""
|
|
80
|
+
|
|
81
|
+
#: ../configure.zcml:32
|
|
82
|
+
msgid "imio.omnia.tinymce (uninstall)"
|
|
83
|
+
msgstr "imio.omnia.tinymce (désinstallation)"
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#--- PLEASE EDIT THE LINES BELOW CORRECTLY ---
|
|
2
|
+
#SOME DESCRIPTIVE TITLE.
|
|
3
|
+
#FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
4
|
+
msgid ""
|
|
5
|
+
msgstr ""
|
|
6
|
+
"Project-Id-Version: imio.omnia.tinymce\n"
|
|
7
|
+
"POT-Creation-Date: 2026-03-23 00:00+0000\n"
|
|
8
|
+
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
|
|
9
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
10
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
|
11
|
+
"MIME-Version: 1.0\n"
|
|
12
|
+
"Content-Type: text/plain; charset=utf-8\n"
|
|
13
|
+
"Content-Transfer-Encoding: 8bit\n"
|
|
14
|
+
"Plural-Forms: nplurals=1; plural=0\n"
|
|
15
|
+
"Language-Code: en\n"
|
|
16
|
+
"Language-Name: English\n"
|
|
17
|
+
"Preferred-Encodings: utf-8 latin1\n"
|
|
18
|
+
"Domain: imio.omnia.tinymce\n"
|
|
19
|
+
|
|
20
|
+
#: ../browser/controlpanel.py:67
|
|
21
|
+
msgid "Default translation language"
|
|
22
|
+
msgstr ""
|
|
23
|
+
|
|
24
|
+
#: ../browser/controlpanel.py:74
|
|
25
|
+
msgid "Display mode: inline near selection or centred with blur overlay."
|
|
26
|
+
msgstr ""
|
|
27
|
+
|
|
28
|
+
#: ../browser/controlpanel.py:44
|
|
29
|
+
msgid "Enable keyboard shortcuts"
|
|
30
|
+
msgstr ""
|
|
31
|
+
|
|
32
|
+
#: ../browser/controlpanel.py:16
|
|
33
|
+
msgid "Enabled features"
|
|
34
|
+
msgstr ""
|
|
35
|
+
|
|
36
|
+
#: ../browser/controlpanel.py:73
|
|
37
|
+
msgid "Floating panel mode"
|
|
38
|
+
msgstr ""
|
|
39
|
+
|
|
40
|
+
#: ../browser/controlpanel.py:81
|
|
41
|
+
msgid "Floating panel width"
|
|
42
|
+
msgstr ""
|
|
43
|
+
|
|
44
|
+
#: ../configure.zcml:25
|
|
45
|
+
msgid "Installs the imio.omnia.tinymce add-on."
|
|
46
|
+
msgstr ""
|
|
47
|
+
|
|
48
|
+
#: ../browser/controlpanel.py:51
|
|
49
|
+
msgid "Language codes available for translation."
|
|
50
|
+
msgstr ""
|
|
51
|
+
|
|
52
|
+
#: ../browser/controlpanel.py:17
|
|
53
|
+
msgid "Restrict to a subset of features. Leave empty for all features except generate."
|
|
54
|
+
msgstr ""
|
|
55
|
+
|
|
56
|
+
#: ../browser/controlpanel.py:39
|
|
57
|
+
msgid "Show context menu"
|
|
58
|
+
msgstr ""
|
|
59
|
+
|
|
60
|
+
#: ../browser/controlpanel.py:34
|
|
61
|
+
msgid "Show toolbar button"
|
|
62
|
+
msgstr ""
|
|
63
|
+
|
|
64
|
+
#: ../browser/controlpanel.py:89
|
|
65
|
+
msgid "TinyMCE Omnia settings"
|
|
66
|
+
msgstr ""
|
|
67
|
+
|
|
68
|
+
#: ../browser/controlpanel.py:50
|
|
69
|
+
msgid "Translation languages"
|
|
70
|
+
msgstr ""
|
|
71
|
+
|
|
72
|
+
#: ../configure.zcml:34
|
|
73
|
+
msgid "Uninstalls the imio.omnia.tinymce add-on."
|
|
74
|
+
msgstr ""
|
|
75
|
+
|
|
76
|
+
#: ../browser/controlpanel.py:82
|
|
77
|
+
msgid "Width in pixels (e.g. 500) or 'full' for full viewport width."
|
|
78
|
+
msgstr ""
|
|
79
|
+
|
|
80
|
+
#: ../configure.zcml:23
|
|
81
|
+
msgid "imio.omnia.tinymce"
|
|
82
|
+
msgstr ""
|
|
83
|
+
|
|
84
|
+
#: ../configure.zcml:32
|
|
85
|
+
msgid "imio.omnia.tinymce (uninstall)"
|
|
86
|
+
msgstr ""
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import pkg_resources
|
|
5
|
+
import subprocess
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
domain = 'imio.omnia.tinymce'
|
|
9
|
+
os.chdir(pkg_resources.resource_filename(domain, ''))
|
|
10
|
+
os.chdir('../../../')
|
|
11
|
+
target_path = 'src/imio/omnia/tinymce/'
|
|
12
|
+
locale_path = target_path + 'locales/'
|
|
13
|
+
i18ndude = './bin/i18ndude'
|
|
14
|
+
|
|
15
|
+
# ignore node_modules files resulting in errors
|
|
16
|
+
excludes = '"*.html *json-schema*.xml"'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def locale_folder_setup():
|
|
20
|
+
os.chdir(locale_path)
|
|
21
|
+
languages = [d for d in os.listdir('.') if os.path.isdir(d)]
|
|
22
|
+
for lang in languages:
|
|
23
|
+
folder = os.listdir(lang)
|
|
24
|
+
if 'LC_MESSAGES' in folder:
|
|
25
|
+
continue
|
|
26
|
+
else:
|
|
27
|
+
lc_messages_path = lang + '/LC_MESSAGES/'
|
|
28
|
+
os.mkdir(lc_messages_path)
|
|
29
|
+
cmd = 'msginit --locale={0} --input={1}.pot --output={2}/LC_MESSAGES/{3}.po'.format( # NOQA: E501
|
|
30
|
+
lang,
|
|
31
|
+
domain,
|
|
32
|
+
lang,
|
|
33
|
+
domain,
|
|
34
|
+
)
|
|
35
|
+
subprocess.call(
|
|
36
|
+
cmd,
|
|
37
|
+
shell=True,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
os.chdir('../../../../')
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _rebuild():
|
|
44
|
+
cmd = '{i18ndude} rebuild-pot --pot {locale_path}/{domain}.pot --exclude {excludes} --create {domain} {target_path}'.format( # NOQA: E501
|
|
45
|
+
i18ndude=i18ndude,
|
|
46
|
+
locale_path=locale_path,
|
|
47
|
+
domain=domain,
|
|
48
|
+
target_path=target_path,
|
|
49
|
+
excludes=excludes,
|
|
50
|
+
)
|
|
51
|
+
subprocess.call(
|
|
52
|
+
cmd,
|
|
53
|
+
shell=True,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _sync():
|
|
58
|
+
cmd = '{0} sync --pot {1}/{2}.pot {3}*/LC_MESSAGES/{4}.po'.format(
|
|
59
|
+
i18ndude,
|
|
60
|
+
locale_path,
|
|
61
|
+
domain,
|
|
62
|
+
locale_path,
|
|
63
|
+
domain,
|
|
64
|
+
)
|
|
65
|
+
subprocess.call(
|
|
66
|
+
cmd,
|
|
67
|
+
shell=True,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def update_locale():
|
|
72
|
+
locale_folder_setup()
|
|
73
|
+
_sync()
|
|
74
|
+
_rebuild()
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# i18ndude should be available in current $PATH (eg by running
|
|
3
|
+
# ``export PATH=$PATH:$BUILDOUT_DIR/bin`` when i18ndude is located in your buildout's bin directory)
|
|
4
|
+
#
|
|
5
|
+
# For every language you want to translate into you need a
|
|
6
|
+
# locales/[language]/LC_MESSAGES/imio.omnia.tinymce.po
|
|
7
|
+
# (e.g. locales/de/LC_MESSAGES/imio.omnia.tinymce.po)
|
|
8
|
+
|
|
9
|
+
domain=imio.omnia.tinymce
|
|
10
|
+
|
|
11
|
+
i18ndude rebuild-pot --pot $domain.pot --create $domain ../
|
|
12
|
+
i18ndude sync --pot $domain.pot */LC_MESSAGES/$domain.po
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<configure
|
|
2
|
+
xmlns="http://namespaces.zope.org/zope"
|
|
3
|
+
xmlns:zcml="http://namespaces.zope.org/zcml"
|
|
4
|
+
i18n_domain="plone">
|
|
5
|
+
|
|
6
|
+
<configure zcml:condition="installed AccessControl.security">
|
|
7
|
+
<!-- -*- extra stuff goes here -*- -->
|
|
8
|
+
</configure>
|
|
9
|
+
|
|
10
|
+
</configure>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<object name="portal_actions" meta_type="Plone Actions Tool"
|
|
3
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
|
|
4
|
+
|
|
5
|
+
<object name="omnia_controlpanel_tabs" meta_type="CMF Action Category">
|
|
6
|
+
<object name="imio.omnia.tinymce" meta_type="CMF Action">
|
|
7
|
+
<property name="title" i18n:translate="">TinyMCE</property>
|
|
8
|
+
<property name="url_expr">string:${portal_url}/@@omnia-tinymce-settings</property>
|
|
9
|
+
<property name="icon_expr">string:textarea-t</property>
|
|
10
|
+
</object>
|
|
11
|
+
</object>
|
|
12
|
+
|
|
13
|
+
</object>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<registry
|
|
3
|
+
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
4
|
+
i18n:domain="imio.omnia.tinymce">
|
|
5
|
+
|
|
6
|
+
<records interface="imio.omnia.tinymce.browser.controlpanel.IOmniaTinyMCESettings"/>
|
|
7
|
+
|
|
8
|
+
<!-- Enable the Omnia API proxy provided by imio.omnia.core -->
|
|
9
|
+
<record name="imio.omnia.IOmniaCoreSettings.enable_proxy">
|
|
10
|
+
<value>True</value>
|
|
11
|
+
</record>
|
|
12
|
+
|
|
13
|
+
<!-- Register omnia as a TinyMCE external plugin via plone.custom_plugins -->
|
|
14
|
+
<record name="plone.custom_plugins">
|
|
15
|
+
<value purge="false">
|
|
16
|
+
<element>omnia|++plone++imio.omnia.tinymce/omnia-tinymce.js</element>
|
|
17
|
+
</value>
|
|
18
|
+
</record>
|
|
19
|
+
|
|
20
|
+
<!-- Add "omnia" to the TinyMCE toolbar -->
|
|
21
|
+
<record name="plone.custom_buttons">
|
|
22
|
+
<value purge="false">
|
|
23
|
+
<element>omnia</element>
|
|
24
|
+
</value>
|
|
25
|
+
</record>
|
|
26
|
+
|
|
27
|
+
<!-- CSS-only bundle (JS is loaded by TinyMCE via plone.custom_plugins) -->
|
|
28
|
+
<records prefix="plone.bundles/omnia-tinymce"
|
|
29
|
+
interface="Products.CMFPlone.interfaces.IBundleRegistry">
|
|
30
|
+
<value key="csscompilation">++plone++imio.omnia.tinymce/omnia-tinymce.css</value>
|
|
31
|
+
<value key="enabled">True</value>
|
|
32
|
+
<value key="compile">False</value>
|
|
33
|
+
</records>
|
|
34
|
+
|
|
35
|
+
</registry>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
from Products.CMFPlone.interfaces import INonInstallable
|
|
3
|
+
from zope.interface import implementer
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@implementer(INonInstallable)
|
|
7
|
+
class HiddenProfiles(object):
|
|
8
|
+
|
|
9
|
+
def getNonInstallableProfiles(self):
|
|
10
|
+
"""Hide uninstall profile from site-creation and quickinstaller."""
|
|
11
|
+
return [
|
|
12
|
+
"imio.omnia.tinymce:uninstall",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
def getNonInstallableProducts(self):
|
|
16
|
+
"""Hide the upgrades package from site-creation and quickinstaller."""
|
|
17
|
+
return ["imio.omnia.tinymce.upgrades"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def post_install(context):
|
|
21
|
+
"""Post install script"""
|
|
22
|
+
# Do something at the end of the installation of this package.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def uninstall(context):
|
|
26
|
+
"""Uninstall script"""
|
|
27
|
+
from plone.registry.interfaces import IRegistry
|
|
28
|
+
from zope.component import getUtility
|
|
29
|
+
|
|
30
|
+
registry = getUtility(IRegistry)
|
|
31
|
+
|
|
32
|
+
# Remove omnia from custom_plugins
|
|
33
|
+
key = "plone.custom_plugins"
|
|
34
|
+
current = list(registry.get(key, []))
|
|
35
|
+
registry[key] = [p for p in current if not p.startswith("omnia|")]
|
|
36
|
+
|
|
37
|
+
# Remove omnia from custom_buttons
|
|
38
|
+
key = "plone.custom_buttons"
|
|
39
|
+
current = list(registry.get(key, []))
|
|
40
|
+
registry[key] = [p for p in current if p != "omnia"]
|
|
41
|
+
|
|
42
|
+
# Disable CSS bundle
|
|
43
|
+
bundle_key = "plone.bundles/omnia-tinymce.enabled"
|
|
44
|
+
if bundle_key in registry.records:
|
|
45
|
+
registry[bundle_key] = False
|