[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On Wed, Dec 12, 2012 at 05:01:14AM +0200, Zeeshan Ali (Khattak) wrote:
> On Tue, Dec 11, 2012 at 10:17 PM, Christophe Fergeau
> <cfergeau 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.

Hmm, I was initially thinking of having type='list' in the future to
associate a list of languages to the media, but it seems that having
multiple <l10n-language> tags in this case fits better with OsinfoEntity
rather than having a single tag containing a list. It probably makes sense
to change the 'type' tag indeed, I'll change it.

Christophe

Attachment: pgp6xfdoe7PIH.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]