[virt-tools-list] [libosinfo PATCHv2 6/9] loader: Read media language information

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Dec 12 03:01:14 UTC 2012


On Tue, Dec 11, 2012 at 10:17 PM, Christophe Fergeau
<cfergeau at redhat.com> wrote:
> Getting language information can either be supplied through a
> series of <l10n-language> tag set on the <media> element or through
> a regex that will be applied on the media volume ID.
> The former should be all that is needed for most Linux distros while
> the latter will be useful to get the language of Windows images.
> ---
>  data/schemas/libosinfo.rng | 21 +++++++++++++++++++++
>  osinfo/libosinfo.syms      |  2 ++
>  osinfo/osinfo_loader.c     | 33 +++++++++++++++++++++++++++++----
>  osinfo/osinfo_media.h      |  3 +++
>  4 files changed, 55 insertions(+), 4 deletions(-)
>
> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> index 4094710..796d5f2 100644
> --- a/data/schemas/libosinfo.rng
> +++ b/data/schemas/libosinfo.rng
> @@ -281,6 +281,9 @@
>              <text/>
>            </element>
>          </optional>
> +        <zeroOrMore>
> +          <ref name='media-lang'/>
> +        </zeroOrMore>
>        </interleave>
>      </element>
>    </define>
> @@ -328,6 +331,24 @@
>      </element>
>    </define>
>
> +  <define name='media-lang'>
> +    <element name='l10n-language'>
> +      <optional>
> +        <attribute name="type">
> +          <choice>
> +            <value>regex</value>
> +          </choice>

Only one choice? :) I think a boolean "is-regex" or just "regex" would
be more appropriate here.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124




More information about the virt-tools-list mailing list