Skip to content

Commit b82c839

Browse files
committed
[REL] v2.3.0
- [IMP] compiler: add support for the .translate suffix
1 parent 0cde4b8 commit b82c839

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

docs/owl.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4594,7 +4594,12 @@ class CodeGenerator {
45944594
* "onClick.bind" "onClick" "onClick: bind(ctx, ctx['onClick'])"
45954595
*/
45964596
formatProp(name, value) {
4597-
value = this.captureExpression(value);
4597+
if (name.endsWith(".translate")) {
4598+
value = toStringExpression(this.translateFn(value));
4599+
}
4600+
else {
4601+
value = this.captureExpression(value);
4602+
}
45984603
if (name.includes(".")) {
45994604
let [_name, suffix] = name.split(".");
46004605
name = _name;
@@ -4603,6 +4608,7 @@ class CodeGenerator {
46034608
value = `(${value}).bind(this)`;
46044609
break;
46054610
case "alike":
4611+
case "translate":
46064612
break;
46074613
default:
46084614
throw new OwlError("Invalid prop suffix");
@@ -5546,7 +5552,7 @@ function compile(template, options = {}) {
55465552
}
55475553

55485554
// do not modify manually. This file is generated by the release script.
5549-
const version = "2.2.11";
5555+
const version = "2.3.0";
55505556

55515557
// -----------------------------------------------------------------------------
55525558
// Scheduler
@@ -5975,6 +5981,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
59755981
export { App, Component, EventBus, OwlError, __info__, batched, blockDom, loadFile, markRaw, markup, mount, onError, onMounted, onPatched, onRendered, onWillDestroy, onWillPatch, onWillRender, onWillStart, onWillUnmount, onWillUpdateProps, reactive, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, validate, validateType, whenReady, xml };
59765982

59775983

5978-
__info__.date = '2024-06-17T13:31:12.099Z';
5979-
__info__.hash = 'e7f405c';
5984+
__info__.date = '2024-07-25T13:13:44.371Z';
5985+
__info__.hash = '0cde4b8';
59805986
__info__.url = 'https://github.com/odoo/owl';

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@odoo/owl",
3-
"version": "2.2.11",
3+
"version": "2.3.0",
44
"description": "Odoo Web Library (OWL)",
55
"main": "dist/owl.cjs.js",
66
"module": "dist/owl.es.js",

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// do not modify manually. This file is generated by the release script.
2-
export const version = "2.2.11";
2+
export const version = "2.3.0";

0 commit comments

Comments
 (0)