You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,3 +60,55 @@ The project is licensed under GPLv2.
60
60
## Credits and Acknowledgements 🙏
61
61
62
62
Crafted with care by **Generated using [Cookieplone (0.8.1)](https://github.com/plone/cookieplone) and [cookiecutter-plone (f3a6293)](https://github.com/plone/cookiecutter-plone/commit/f3a6293bd1d64bcb7ff67e4ae53fc4ee5223e7c1) on 2024-11-30 11:19:21.252928**. A special thanks to all contributors and supporters!
63
+
64
+
## Adding a New Tool
65
+
66
+
If you would like to add a new translation tool, follow these steps:
67
+
68
+
1.**Create a New Directory for the Translation Tool**
69
+
70
+
- Create a new directory for the translation tool inside the `src` folder of your Plone add-on:
- Inside the new directory, add the following files:
74
+
-`__init__.py`
75
+
-`utility.py`
76
+
-`configure.zcml`
77
+
78
+
- The `__init__.py` file should be empty. For the other files, follow the structure of the already implemented tools with the same filenames.
79
+
80
+
- Note: The `available_languages` method in the `utility.py` file can return an empty array. In this case, it will be assumed that the tool can translate between any languages.
81
+
82
+
2.**Update the Add-on Configuration**
83
+
84
+
- Register the new tool in your add-on's main `configure.zcml` file:
Inside the controlpanel folder [collective.translators/src/collective/translators/controlpanel] open "controlpanel.py" and add the configuration of your tool's controlpanel and the adapter. Then, register the adapter and the view in the configure.zcml file within the same folder. Now open the "controlpanel.xml" at [collective.translators/src/collective/translators/profiles/default/controlpanel.xml] and add the configlet.
112
+
113
+
5.**Test your new tool**
114
+
Access to your new control panel in your Plone site, add your API key and test your tool.
0 commit comments