Files
owl/tests/compiler/__snapshots__/translation.test.ts.snap
T

72 lines
2.7 KiB
Plaintext
Raw Normal View History

2021-10-13 16:49:34 +02:00
// Jest Snapshot v1, https://goo.gl/fbAQLP
2021-10-19 11:00:26 +02:00
exports[`translation support can set translatable attributes 1`] = `
2021-10-13 16:49:34 +02:00
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
2021-11-15 15:01:56 +01:00
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
2021-10-13 16:49:34 +02:00
2021-10-19 11:00:26 +02:00
let block1 = createBlock(\`<div tomato=\\"word\\" potato=\\"mot\\" title=\\"word\\">text</div>\`);
2021-10-13 16:49:34 +02:00
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
2021-10-19 11:00:26 +02:00
exports[`translation support can translate node content 1`] = `
2021-10-13 16:49:34 +02:00
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
2021-11-15 15:01:56 +01:00
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
2021-10-13 16:49:34 +02:00
2021-10-19 11:00:26 +02:00
let block1 = createBlock(\`<div>mot</div>\`);
2021-10-13 16:49:34 +02:00
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
2021-10-19 11:00:26 +02:00
exports[`translation support does not translate node content if disabled 1`] = `
2021-10-13 16:49:34 +02:00
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
2021-11-15 15:01:56 +01:00
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
2021-10-13 16:49:34 +02:00
2021-10-19 11:00:26 +02:00
let block1 = createBlock(\`<div><span>mot</span><span>word</span></div>\`);
2021-10-13 16:49:34 +02:00
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
2021-10-19 11:00:26 +02:00
exports[`translation support some attributes are translated 1`] = `
2021-10-13 16:49:34 +02:00
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
2021-11-15 15:01:56 +01:00
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
2021-10-13 16:49:34 +02:00
2021-10-19 11:00:26 +02:00
let block1 = createBlock(\`<div><p label=\\"mot\\">mot</p><p title=\\"mot\\">mot</p><p placeholder=\\"mot\\">mot</p><p alt=\\"mot\\">mot</p><p something=\\"word\\">mot</p></div>\`);
2021-10-13 16:49:34 +02:00
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
2021-10-19 11:00:26 +02:00
exports[`translation support translation is done on the trimmed text, with extra spaces readded after 1`] = `
2021-10-13 16:49:34 +02:00
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
2021-11-15 15:01:56 +01:00
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
2021-10-13 16:49:34 +02:00
2021-10-19 11:00:26 +02:00
let block1 = createBlock(\`<div> mot </div>\`);
2021-10-13 16:49:34 +02:00
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;