Ejemplo n.º 1
0
 def handle_noargs(self, **options):
     logging.info("Creating a debugging language pack, with %s language code." % TARGET_LANGUAGE_PACK)
     langpack_zip = download_language_pack(BASE_LANGUAGE_PACK)
     django_mo_contents, djangojs_mo_contents = retrieve_mo_files(langpack_zip)
     dummy_django_mo, dummy_djangojs_mo = (create_mofile_with_dummy_strings(django_mo_contents, filename="django.mo"),
                                           create_mofile_with_dummy_strings(djangojs_mo_contents, filename="djangojs.mo"))
     logging.debug("Creating i18n JS file for %s" % TARGET_LANGUAGE_PACK)
     update_jsi18n_file(code=TARGET_LANGUAGE_PACK)
     logging.info("Finished creating debugging language pack %s." % TARGET_LANGUAGE_PACK)
    def process_content_pack(self, zf, lang):

        self.next_stage(_("Moving content files to the right place."))
        extract_catalog_files(zf, lang)
        update_jsi18n_file(lang)
        extract_content_db(zf, lang, is_template=self.is_template)
        extract_subtitles(zf, lang)
        extract_content_pack_metadata(zf, lang)  # always extract to the en lang
        extract_assessment_items(zf, "en")

        if not self.is_template:
            self.next_stage(_("Looking for available content items."))
            call_command("annotate_content_items", language=lang)

        self.complete(_("Finished processing content pack."))
Ejemplo n.º 3
0
    def process_content_pack(self, zf, lang):

        self.next_stage(_("Moving content files to the right place."))
        extract_catalog_files(zf, lang)
        update_jsi18n_file(lang)
        extract_content_db(zf, lang, is_template=self.is_template)
        extract_subtitles(zf, lang)
        extract_content_pack_metadata(zf, lang)  # always extract to the en lang
        extract_assessment_items(zf, "en")

        if not self.is_template:
            self.next_stage(_("Looking for available content items."))
            call_command("annotate_content_items", language=lang)

        self.complete(_("Finished processing content pack."))
Ejemplo n.º 4
0
 def handle_noargs(self, **options):
     logging.info(
         "Creating a debugging language pack, with %s language code." %
         TARGET_LANGUAGE_PACK)
     langpack_zip = download_language_pack(BASE_LANGUAGE_PACK)
     django_mo_contents, djangojs_mo_contents = retrieve_mo_files(
         langpack_zip)
     dummy_django_mo, dummy_djangojs_mo = (create_mofile_with_dummy_strings(
         django_mo_contents, filename="django.mo"),
                                           create_mofile_with_dummy_strings(
                                               djangojs_mo_contents,
                                               filename="djangojs.mo"))
     logging.debug("Creating i18n JS file for %s" % TARGET_LANGUAGE_PACK)
     update_jsi18n_file(code=TARGET_LANGUAGE_PACK)
     logging.info("Finished creating debugging language pack %s." %
                  TARGET_LANGUAGE_PACK)