Files
odoo_source/addons/web
Benoit Socias 4952ea3dcf [FIX] web,*: keep distinct cached translation bundles per front-end lang
*: website_sale_stock

When translations are loaded in a front-end page, the language is
initially deduced by the server. The `GET` that obtains them does not
have a language parameter set. Because of this, this initial result is
reused from the browser cache on subsequent page accesses.
This is a problem when the user toggles between languages because the
cached content is reused while it is related to a previously selected
language.

This commit avoids this problem by making the cache specific to the
current front-end language.

Steps to reproduce:
- Make sure "Disable cache" is not enabled in your browser.
- Install website_sale_stock.
- Add the French language and activate it on the first website.
- In the backend, go to a product (e.g. Office Lamp)'s Sales tab.
- Disable "Out-of-Stock: Continue selling".
- Enter an "Out-of-Stock Message" in both English and French.
- Open the product's website page in French.
- Copy the URL.
- Open a new browser private navigation window.
- Go to the copied URL.
- Switch to English.
- Switch to French.

=> The price is first displayed correctly in French with a "," decimal
separator then is replaced by using the English "." decimal separator
and the out-of-stock message is displayed in English.

opw-3293403
opw-3343614

closes odoo/odoo#124907

X-original-commit: a827de6fffedc9d952d0a4e888c7089896bdb44f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-14 10:54:10 +02:00
..
2023-06-12 22:39:26 +02:00
…
2023-06-09 17:00:47 +02:00
2023-06-09 13:50:08 +02:00