A set of tools that simplify handling multilingual content in Plone
Project description
Project Description
Code repository: https://svn.plone.org/svn/collective/slc.linguatools/
Questions and comments to info (at) syslab (dot) com
Report bugs at http://plone.org/products/slc.linguatools/issues
Plone 4 is supported starting with version 1.4.0 - Bugfix releases for Plone 3 will be continued in the 1.3.x series.
Overview
slc.linguatools offers a set of functions that are designed to make life easier when dealing with multilingual sites, especially those with several different languages.
Often you have the requirement that you want to do the same action for all translations of an object. In a site with ten, twenty or more languages, doing this manually is not an option any more.
Requirements and Installation
This package only works and makes sense if you have LinguaPlone installed.
Add “slc.linguatools” to the eggs and zcml sections of your buildout configuration. After running buildout and restarting your instance, go to the Site Setup -> Add-on Products, choose slc.linguatools and click “install”.
A tab named “Lingua Tools” will then appear on all translatable objects.
Functions
slc.linguatools offers assistance for the following use cases:
- Set title or description:
Set the title / description on all translations; either directly to the string you entered, or based on an i18n label and domain
- Rename an object
Rename all translations to the id (short name) you entered
- Set portlets
Propagate the portlet settings of the canonical object to all translations, either for all slots or the one you chose. Block / unblock portlet inheritance per slot.
- Workflow
Publish all translations
- Catalog reindex
Reindex all translations of an object
- Deleter
Delete all translations of an object
- Cut and paste
Cut all translations of an object and paste them to another folder
- Property handling
Set a property with id, type and value on all translations. Example: Set string property “layout” to “@@my-shiny-view”. Delete an existing property.
- Marker interfaces
Set or remove a marker interface on all translations of an object. The interfaces available for setting and removing are provided by a vocabulary and are the same as on the “Interfaces” tab in the ZMI.
- Subtyping (if p4a.subtyper is installed)
Set a subtype on all translations; remove a subtype
- Translate an object
Create a translation of the current object for all available languages. The AT attributes that should be copied over can be selected. If the object is a Collection, then all criteria are copied as well. This function can also be used to copy values of AT attributes and collection criteria to already existing translations.
Versions
The first version of this tool featured a manually written BrowserView. During the Plone-Conference 2009 sprint, a second version that uses z3c form was written. This is the version visible by default via the “Lingua Tools” tab. The original version is still accessible under @@linguatools-old.
Documentation
Please also see test/lttest.txt for a doctest that guides you through the basic functionalities.
Change history
slc.linguatools Changelog
1.4.0b1 (2011-04-08)
Updated the doctest setup to run in Plone4 [thomasw]
Added possibility to make displaying a form optional, e.g. only if a certain component is installed [thomasw]
1.3.6 (2010-07-18)
Bugfix in PropertyForm: encode unicode to utf-8, otherwise setting the property default_page breaks [thomasw]
allow module utils for import in python scripts [pilz]
1.3.5 (2010-03-31)
In plone.z3cform version 0.5.8 a major change was introduced that affects our product. By overwriting update() and contents() of FormWrapper, we enable support for versions >=0.5.8; with an ugly hack in contents(), we maintain support for versions <=0.5.7 [thomasw]
Fixed broken doctest for changing the workflow, introduced in 1.3.3 [thomasw]
The AvailableIdsVocabulary now only returns translatable items [thomasw]
New functionality: Add and remove marker interfaces [thomasw]
Don’t show the canonical lang in the vocabulary of avaiable langs [thomasw]
1.3.4 (2010-02-09)
In the AvailableWorkflowTransitions vocabulary, return all available transitions of a workflow, not just those available for the canonical’s state. The canonical might be published, while some translations are still private [thomasw]
1.3.3 (2010-01-27)
Reworked workflow handling. Instead of only “publish”, now all transactions available on the current object can be triggered [thomasw]
“Translate this” now has an additional language field, so that only a subset of the available languages may be chosen [thomasw]
Ran the pep8 script and fixed most issues [thomasw]
1.3.2 (2009-12-17)
Bugfix in linguatools.css: missing closing bracket. Thanks for the heads-up, do3cc! [thomasw]
1.3.1 (2009-12-11)
Be more relaxed with version pinning needed for plone.app.z3cform [thomasw]
1.3 (2009-11-29)
Major revamp at Plone Conference 2009 sprint: moved from static BrowserView to z3c form; brushed up test coverage; clearer interface; more user-friendly, less typing necessary; easier to plug in new functionality [cillian, jcbrand, pilz, thomasw, Andreas Schmid]
1.2.5 (unreleased)
make sure that lang is ascii when using it to create objectids. Otherwise we get an infinite recursion [pilz]
D’oh another bug in “block portlets”, this time in the status message [thomasw]
better status reporting for translateThis; collection criteria are now also copied when “translation exists” is ticked; more graceful handling for unknown fields [thomasw]
1.2.4 (2009-10-27)
Continuing my fix for ambiguous variable name [thomasw]
1.2.3 (2009-10-25)
2 bugs fixed for “block portlets”: ambiguous variable name, wrong button name [thomasw]
1.2.2 (2009-10-08)
2 bugfixes in cutAndPaste (don’t despair if object is not available) [thomasw]
Added a contenview tab for Lingua Tools on ITranslatable objects [jcbrand]
In lingatools.pt moved the legends into the fieldsets, added labels and reorganised a bit [jcbrand]
Added new option to remove subtypes [jcbrand]
Use the default plone status messages for messaging and added event.log logging [jcbrand]
slc.linguatools 1.2.1 (2009-08-13)
made compatible with current version of LinguaPlone [gerken/thomasw]
slc.linguatools 1.2 (2009-06-17)
built a proper framework for the already existing doctest linguatests.txt [thomasw]
slc.linguatools 1.1 (2009-05-12)
Packaged egg [pilz]
slc.linguatools 1.0 (2008-03-31)
Initial port
CREDITS
Contributors
Andreas Schmid (TIS Innovation Park): jquery toggle
TODO
Find and use an object-picker widget for “Cut & Paste” - having to type the destination path is ugly.
Distinguish between global functions (e.g. Set title) and those that only make sense on a folder (e.g. Delete).
Add a configuration page in the control panel so that the manager can select the available functions (e.g. exclude the Marker Interface function)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.