Skip to content

Commit

Permalink
[REL] v2.3.0
Browse files Browse the repository at this point in the history
# v2.3.0

 - [IMP] compiler: add support for the .translate suffix
  • Loading branch information
rfr-odoo committed Jul 26, 2024
1 parent 0cde4b8 commit f8bb868
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions docs/owl.js
Original file line number Diff line number Diff line change
Expand Up @@ -4594,7 +4594,12 @@ class CodeGenerator {
* "onClick.bind" "onClick" "onClick: bind(ctx, ctx['onClick'])"
*/
formatProp(name, value) {
value = this.captureExpression(value);
if (name.endsWith(".translate")) {
value = toStringExpression(this.translateFn(value));
}
else {
value = this.captureExpression(value);
}
if (name.includes(".")) {
let [_name, suffix] = name.split(".");
name = _name;
Expand All @@ -4603,6 +4608,7 @@ class CodeGenerator {
value = `(${value}).bind(this)`;
break;
case "alike":
case "translate":
break;
default:
throw new OwlError("Invalid prop suffix");
Expand Down Expand Up @@ -5546,7 +5552,7 @@ function compile(template, options = {}) {
}

// do not modify manually. This file is generated by the release script.
const version = "2.2.11";
const version = "2.3.0";

// -----------------------------------------------------------------------------
// Scheduler
Expand Down Expand Up @@ -5975,6 +5981,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
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 };


__info__.date = '2024-06-17T13:31:12.099Z';
__info__.hash = 'e7f405c';
__info__.date = '2024-07-25T13:13:44.371Z';
__info__.hash = '0cde4b8';
__info__.url = 'https://github.com/odoo/owl';
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@odoo/owl",
"version": "2.2.11",
"version": "2.3.0",
"description": "Odoo Web Library (OWL)",
"main": "dist/owl.cjs.js",
"module": "dist/owl.es.js",
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// do not modify manually. This file is generated by the release script.
export const version = "2.2.11";
export const version = "2.3.0";

0 comments on commit f8bb868

Please sign in to comment.