Skip to content
Snippets Groups Projects
Commit 441c9427 authored by Mahdi Cheikh Rouhou (macr)'s avatar Mahdi Cheikh Rouhou (macr)
Browse files

[FIX] web : translate all content in customer preview

When we go into customer preview of a quotation for example and change the language different than English (to fr_BE for example)
we see that some of the content isn't translated  and still displaying in english.

Steps to reproduce the error :
1-Install sales and website app
2-Create a quotation for a customer and just save it don't confirm it.
3-Go to customer preview
4-Change the language to fr_BE
5-Click on "signer & payer"
6-You can see that it still display 'Full Name' in english and also some other terms

The origin of the problem is that all the parts that were rendered via a t-call gets rendered in english.
I investigated the problem and it turns out that the language code for the _t is alwyas english(https://github.com/odoo/odoo/blob/06719a84c52c7a97487b7ee0bef3bbe166d5b502/addons/portal/static/src/js/portal_signature.js#L45)
The problem is that the user_context.lang is always undefined here (https://github.com/odoo/odoo/blob/06719a84c52c7a97487b7ee0bef3bbe166d5b502/addons/web/static/src/legacy/js/core/session.js#L201)
As a solution I copied the code from 15.0 which was working fine (https://github.com/odoo/odoo/blob/4fa2dbcaf777c23758519ab0feb9707a7592cd6b/addons/web/static/src/legacy/js/core/session.js#L199-L209

).

opw-3192666
.

closes odoo/odoo#122447

Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
parent 2ac47464
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment