Split languages codes by a hyphen (-) instead of an underscore (_)
commit301172f850ef1039089a5538c6fc327c30dfb92a
authorBastian Eicher <bastian@eicher.net>
Tue, 2 Nov 2010 23:43:48 +0000 (3 00:43 +0100)
committerThomas Leonard <talex5@gmail.com>
Sun, 27 Feb 2011 19:29:39 +0000 (27 19:29 +0000)
tree6d56da3bb43428f25fd01e5621b314d3c362b34d
parent120415f840e6b05b93e2452d033510251d6bcf64
Split languages codes by a hyphen (-) instead of an underscore (_)

This fits W3C's definition of the "xml:lang" attribute:

http://www.w3.org/TR/REC-xml/#sec-lang-tag

Also, the selection logic has changed:

- If the user didn't set a preferred language, assume they want "en_US"
- If a <summary> doesn't specify a language, assume it's "en"
- If there's no exact match, and no language match, default to the "en" entry
tests/Local.xml
tests/testmodel.py
zeroinstall/injector/model.py