Пример #1
0
def make_langpack(version):
    versions = (version, '%s.*' % version)

    for version in versions:
        AppVersion.objects.get_or_create(application=amo.FIREFOX.id,
                                         version=version,
                                         version_int=version_int(version))

    return make_xpi({
        'install.rdf':
        """<?xml version="1.0"?>

            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
              <Description about="urn:mozilla:install-manifest"
                           em:id="*****@*****.**"
                           em:name="Foo Language Pack"
                           em:version="{0}"
                           em:type="8"
                           em:creator="mozilla.org">

                <em:targetApplication>
                  <Description>
                    <em:id>{{ec8030f7-c20a-464f-9b0e-13a3a9e97384}}</em:id>
                    <em:minVersion>{0}</em:minVersion>
                    <em:maxVersion>{1}</em:maxVersion>
                  </Description>
                </em:targetApplication>
              </Description>
            </RDF>
        """.format(*versions)
    }).read()
Пример #2
0
def make_langpack(version):
    return make_xpi({
        'install.rdf': """<?xml version="1.0"?>

            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
              <Description about="urn:mozilla:install-manifest"
                           em:id="*****@*****.**"
                           em:name="Foo Language Pack"
                           em:version="%(version)s"
                           em:type="8"
                           em:creator="mozilla.org">

                <em:targetApplication>
                  <Description>
                    <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
                    <em:minVersion>%(version)s</em:minVersion>
                    <em:maxVersion>%(version)s.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
              </Description>
            </RDF>
        """ % {
            'version': version
        }
    }).read()
Пример #3
0
def make_langpack(version):
    versions = (version, '%s.*' % version)

    for version in versions:
        AppVersion.objects.get_or_create(application=amo.FIREFOX.id,
                                         version=version,
                                         version_int=version_int(version))

    return make_xpi({
        'install.rdf': """<?xml version="1.0"?>

            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
              <Description about="urn:mozilla:install-manifest"
                           em:id="*****@*****.**"
                           em:name="Foo Language Pack"
                           em:version="{0}"
                           em:type="8"
                           em:creator="mozilla.org">

                <em:targetApplication>
                  <Description>
                    <em:id>{{ec8030f7-c20a-464f-9b0e-13a3a9e97384}}</em:id>
                    <em:minVersion>{0}</em:minVersion>
                    <em:maxVersion>{1}</em:maxVersion>
                  </Description>
                </em:targetApplication>
              </Description>
            </RDF>
        """.format(*versions)
    }).read()
Пример #4
0
def make_langpack(version):
    return make_xpi({
        'install.rdf': """<?xml version="1.0"?>

            <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                 xmlns:em="http://www.mozilla.org/2004/em-rdf#">
              <Description about="urn:mozilla:install-manifest"
                           em:id="*****@*****.**"
                           em:name="Foo Language Pack"
                           em:version="%(version)s"
                           em:type="8"
                           em:creator="mozilla.org">

                <em:targetApplication>
                  <Description>
                    <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
                    <em:minVersion>%(version)s</em:minVersion>
                    <em:maxVersion>%(version)s.*</em:maxVersion>
                  </Description>
                </em:targetApplication>
              </Description>
            </RDF>
        """ % {'version': version}
    }).read()