mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 09:58:50 -06:00
18 lines
700 B
Python
18 lines
700 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
|
|
|
from flectra import http
|
|
from flectra.http import request
|
|
from flectra.addons.web.controllers.main import WebClient, Home
|
|
|
|
|
|
class Routing(Home):
|
|
|
|
@http.route('/website/translations/<string:unique>', type='http', auth="public", website=True)
|
|
def get_website_translations(self, unique, lang, mods=None):
|
|
IrHttp = request.env['ir.http'].sudo()
|
|
modules = IrHttp.get_translation_frontend_modules()
|
|
if mods:
|
|
modules += mods.split(',') if isinstance(mods, str) else mods
|
|
return WebClient().translations(unique, mods=','.join(modules), lang=lang)
|