|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.control.DefaultController
org.olat.core.gui.control.controller.BasicController
org.olat.core.util.i18n.ui.InlineTranslationInterceptHandlerController
public class InlineTranslationInterceptHandlerController
Description:
This class acts both as the render intercepter and as the inline translation
tool dispatcher. For each detected translated GUI element it will add a hover
event which triggers an edit link.
When the server is configured as translation server, the inline translation tool will start in language translation mode. Otherwhise it will start in language customizing mode (overlay edit)
Initial Date: 16.09.2008
| Method Summary | |
|---|---|
static void |
buildInlineTranslationLink(java.lang.String combinedKeyWithID,
StringOutput link,
Translator inlineTrans,
URLBuilder inlineTranslationURLBuilder)
Helper method to build the inline translation link. |
ComponentRenderer |
createInterceptComponentRenderer(ComponentRenderer originalRenderer)
|
InterceptHandlerInstance |
createInterceptHandlerInstance()
|
static java.lang.String |
replaceLocalizationMarkupWithHTML(java.lang.String stringWithMarkup,
URLBuilder inlineTranslationURLBuilder,
Translator inlineTrans)
Helper method to replace the translations that are wrapped with some identifyer markup by the translator with HTML markup to allow inline editing. |
| Methods inherited from class org.olat.core.gui.control.DefaultController |
|---|
addControllerListener, addLoggingResourceable, dispatchEvent, dispatchEvent, dispose, getControllerCount, getInitialComponent, getUserActivityLogger, getWindowControlForDebug, isDisposed, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public InterceptHandlerInstance createInterceptHandlerInstance()
createInterceptHandlerInstance in interface InterceptHandlerInterceptHandler.createInterceptHandlerInstance()public ComponentRenderer createInterceptComponentRenderer(ComponentRenderer originalRenderer)
createInterceptComponentRenderer in interface InterceptHandlerInstance
public static java.lang.String replaceLocalizationMarkupWithHTML(java.lang.String stringWithMarkup,
URLBuilder inlineTranslationURLBuilder,
Translator inlineTrans)
This method is public and static to be testable with jUnit.
stringWithMarkup - The text that contains translated elements that are
wrapped with some identifyersinlineTranslationURLBuilder - URI builder used to create the inline
translation linksinlineTrans -
public static void buildInlineTranslationLink(java.lang.String combinedKeyWithID,
StringOutput link,
Translator inlineTrans,
URLBuilder inlineTranslationURLBuilder)
Public and static so that it can be used by the jUnit testcase
combinedKeyWithID - e.g. bundle.name:key.name:ramuniqueidlink - inlineTrans - inlineTranslationURLBuilder -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||