Skip to content

Commit

Permalink
[schemas] Restrict language addons locale attribute through regex
Browse files Browse the repository at this point in the history
  • Loading branch information
enen92 committed Aug 8, 2018
1 parent a5d6270 commit 53e6cea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion addons/kodi.resource/language.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>

0 comments on commit 53e6cea

Please sign in to comment.