From: <svn...@pl...> - 2004-07-02 08:17:55
|
Author: tesdal Date: Fri Jul 2 03:28:44 2004 New Revision: 5407 Modified: CMFPlone/branches/plip41-itranslatable-branch/interfaces/Translatable.py (contents, props changed) CMFPlone/branches/plip41-itranslatable-branch/skins/plone_scripts/isTranslatable.py (contents, props changed) Log: Set svn:eol-style Modified: CMFPlone/branches/plip41-itranslatable-branch/interfaces/Translatable.py ============================================================================== --- CMFPlone/branches/plip41-itranslatable-branch/interfaces/Translatable.py (original) +++ CMFPlone/branches/plip41-itranslatable-branch/interfaces/Translatable.py Fri Jul 2 03:28:44 2004 @@ -1,73 +1,73 @@ -try: - from Interface import Interface -except ImportError: - # for Zope versions before 2.6.0 - from Interface import Base as Interface - -class ITranslatable(Interface): - """ - Interface for translatable content. - """ - - def isTranslation(): - """ - return language if this object is used as multilingual content, 0 otherwise - """ - - def addTranslation(language, **kwargs): - """ - Add a new language translation of this content. - """ - - def removeTranslation(language): - """ - Removes a translation - """ - - def getTranslation(language='language'): - """ - Return the object corresponding to a translated version or None. - If called without arguments it returns the translation in the currently - selected language, or self. - """ - - def getTranslationLanguages(): - """ - Return a list of language codes - """ - - def getTranslations(): - """ - Return a dict of {lang : [object, wf_state]} - """ - - def isCanonical(): - """ - boolean, is this the original, canonical translation of the content. - """ - - def getCanonicalLanguage(): - """ - Return the language code for the canonical translation of this content. - """ - - def getCanonical(): - """ - Return the original, canonical translation of this content. - """ - - def setTranslationLanguage(language): - """ - Sets the language for the current translation - """ - - def getTranslationLanguage(): - """ - Returns the language of this translation - """ - - def initializeTranslation(): - """ - Initializes the object as a translation, would typically be called by - addTranslation. +try: + from Interface import Interface +except ImportError: + # for Zope versions before 2.6.0 + from Interface import Base as Interface + +class ITranslatable(Interface): + """ + Interface for translatable content. + """ + + def isTranslation(): + """ + return language if this object is used as multilingual content, 0 otherwise + """ + + def addTranslation(language, **kwargs): + """ + Add a new language translation of this content. + """ + + def removeTranslation(language): + """ + Removes a translation + """ + + def getTranslation(language='language'): + """ + Return the object corresponding to a translated version or None. + If called without arguments it returns the translation in the currently + selected language, or self. + """ + + def getTranslationLanguages(): + """ + Return a list of language codes + """ + + def getTranslations(): + """ + Return a dict of {lang : [object, wf_state]} + """ + + def isCanonical(): + """ + boolean, is this the original, canonical translation of the content. + """ + + def getCanonicalLanguage(): + """ + Return the language code for the canonical translation of this content. + """ + + def getCanonical(): + """ + Return the original, canonical translation of this content. + """ + + def setTranslationLanguage(language): + """ + Sets the language for the current translation + """ + + def getTranslationLanguage(): + """ + Returns the language of this translation + """ + + def initializeTranslation(): + """ + Initializes the object as a translation, would typically be called by + addTranslation. """ \ No newline at end of file Modified: CMFPlone/branches/plip41-itranslatable-branch/skins/plone_scripts/isTranslatable.py ============================================================================== --- CMFPlone/branches/plip41-itranslatable-branch/skins/plone_scripts/isTranslatable.py (original) +++ CMFPlone/branches/plip41-itranslatable-branch/skins/plone_scripts/isTranslatable.py Fri Jul 2 03:28:44 2004 @@ -1,14 +1,14 @@ -## Script (Python) "isTranslatable" -##bind container=container -##bind context=context -##bind namespace= -##bind script=script -##bind subpath=traverse_subpath -##parameters= -##title= -## - -try : - return context.portal_url.getPortalObject().plone_utils.isTranslatable(context) -except: +## Script (Python) "isTranslatable" +##bind container=container +##bind context=context +##bind namespace= +##bind script=script +##bind subpath=traverse_subpath +##parameters= +##title= +## + +try : + return context.portal_url.getPortalObject().plone_utils.isTranslatable(context) +except: return 0 \ No newline at end of file |