mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] compiler: make human-readable ARIA attributes translatable
ARIA attributes containing human-readable text should be translated. This commit adds human-readable ARIA attributes to the list of the attributes translated by OWL.
This commit is contained in:
committed by
Géry Debongnie
parent
56041bc133
commit
89cb00cc83
@@ -254,7 +254,16 @@ class CodeTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const TRANSLATABLE_ATTRS = ["label", "title", "placeholder", "alt"];
|
const TRANSLATABLE_ATTRS = [
|
||||||
|
"alt",
|
||||||
|
"aria-label",
|
||||||
|
"aria-placeholder",
|
||||||
|
"aria-roledescription",
|
||||||
|
"aria-valuetext",
|
||||||
|
"label",
|
||||||
|
"placeholder",
|
||||||
|
"title",
|
||||||
|
];
|
||||||
const translationRE = /^(\s*)([\s\S]+?)(\s*)$/;
|
const translationRE = /^(\s*)([\s\S]+?)(\s*)$/;
|
||||||
|
|
||||||
export class CodeGenerator {
|
export class CodeGenerator {
|
||||||
|
|||||||
Reference in New Issue
Block a user