aboutsummaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorenen92 <92enen@gmail.com>2018-08-03 19:24:23 +0100
committerenen92 <92enen@gmail.com>2018-08-08 15:44:11 +0100
commit53e6ceab80d7d4420d79806894c7df6b3802d4e9 (patch)
tree0cccad27003de2041e38448b605ccdd93cb82795 /addons
parenta5d62706def105e242600b9b988db2b6331b12b6 (diff)
[schemas] Restrict language addons locale attribute through regex
Diffstat (limited to 'addons')
-rw-r--r--addons/kodi.resource/language.xsd7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/kodi.resource/language.xsd b/addons/kodi.resource/language.xsd
index 6178fe2ad9..d073196a10 100644
--- a/addons/kodi.resource/language.xsd
+++ b/addons/kodi.resource/language.xsd
@@ -48,7 +48,7 @@
<xs:attribute name="point" type="xs:string" use="required"/>
<xs:attribute name="id" type="simpleIdentifier"/>
<xs:attribute name="name" type="xs:string"/>
- <xs:attribute name="locale" type="xs:string"/>
+ <xs:attribute name="locale" type="langIdentifier"/>
<xs:attribute name="language" type="xs:string"/>
<xs:attribute name="region" type="xs:string"/>
</xs:complexType>
@@ -58,4 +58,9 @@
<xs:pattern value="kodi\.resource\.language"/>
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="langIdentifier">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[a-z]{2,3}(_[A-Z]{2}(@\S+)?)?"/>
+ </xs:restriction>
+ </xs:simpleType>
</xs:schema>