def test_16_translipsum_generator_armenian(self): """ Testing the translipsum generator. Generating lorem ipsum paragraphs in Armenian. """ g_am = TranslipsumGenerator(language_code='hy') res = g_am.generate_paragraph() assert res return res
registry.register(ExampleLanguagePack) print '\nList of available (registered) languages after registering a new language pack \n---------------------------------------' print get_available_language_codes() print '\nTransliteration to Example\n---------------------------------------' print translit(text, 'example') print '\nTransliterated lorem ipsum generator \n---------------------------------------' from transliterate.contrib.apps.translipsum import TranslipsumGenerator g_am = TranslipsumGenerator(language_code='hy') print 'Generating paragraphs' print g_am.generate_paragraph() g_ru = TranslipsumGenerator(language_code='ru') print '\nGenerating sentenses' print g_ru.generate_sentence() print '\nLanguage detection\n---------------------------------------' from transliterate.utils import detect_language print detect_language(u'Լօրեմ իպսում դօլօր սիտ ամետ') print detect_language(u'Лорем ипсум долор сит амет') print '\nSlugify\n---------------------------------------' from transliterate.utils import slugify
lorem.generate_sentence()) browser.fill( 'titleInfo[subTitle]', str(time.strftime("%m/%d/%Y %H:%M:%S")) + ' ' + lorem.generate_sentence()) browser.fill('name[0][namePart]', random.choice(name_of_person)) browser.fill('name[0][role]', random.choice(person_role)) browser.find_option_by_text(random.choice(type_of_resource)).click() browser.fill('genre', random.choice(genre)) browser.fill('originInfo[dateIssued]', '2018') browser.fill('originInfo[publisher]', random.choice(publishers)) browser.fill('originInfo[country]', random.choice(countries)) browser.fill('originInfo[place]', random.choice(places)) browser.fill('language', random.choice(languages)) browser.fill('abstract', lorem.generate_paragraph()) browser.fill('identifier', str(time.strftime("%Y%m%d%H%M%S"))) browser.find_option_by_text( random.choice(physical_description)).click() browser.fill('physicalDescription[extent]', '1 online resource (78 pages)') browser.fill('note', lorem.generate_sentence()) browser.fill('subject[topic][0]', lorem.generate_sentence()) browser.fill('subject[geographic][0]', lorem.generate_sentence()) browser.fill('subject[temporal][0]', lorem.generate_sentence()) browser.find_option_by_text(random.choice(countries)).click()
) registry.register(ExampleLanguagePack) print '\nList of available (registered) languages after registering a new language pack \n---------------------------------------' print get_available_language_codes() print '\nTransliteration to Example\n---------------------------------------' print translit(text, 'example') print '\nTransliterated lorem ipsum generator \n---------------------------------------' from transliterate.contrib.apps.translipsum import TranslipsumGenerator g_am = TranslipsumGenerator(language_code='hy') print 'Generating paragraphs' print g_am.generate_paragraph() g_ru = TranslipsumGenerator(language_code='ru') print '\nGenerating sentenses' print g_ru.generate_sentence() print '\nLanguage detection\n---------------------------------------' from transliterate.utils import detect_language print detect_language(u'Լօրեմ իպսում դօլօր սիտ ամետ') print detect_language(u'Лорем ипсум долор сит амет') print '\nSlugify\n---------------------------------------' from transliterate.utils import slugify