• Sven Franck's avatar
    erp5_web_renderjs_ui: make translation gadget generic · ac93b0ce
    Sven Franck authored
    - add uritemplate
    - add getTranslationDict method to retrieve a language dictionary from ERP5
    - add fetchLanguage to handle browser working with "en-EN" vs gadget/ERP5 only using "en"
    - add ready handler to retrieve languages from web_site_module and translation method from custom
    initialization gadget (temp fix) to remove hardcoded configuration parameters
    - add error handler to catch missing translation method and not translate/expose language options to
    ensure compat with existing rJS web sites
    - add ready handler to initialize plugin and re-render header once translations are available
    - add method to expose available languages, so they can be fetched from the panel gadget
    - fix translation methods to only work with strings being passed in and out
    ac93b0ce
rjs_gadget_translate_html.xml 10.8 KB