Пример #1
0
def update_translations(lang, untranslated_file, translated_file):
	clear_cache()
	full_dict = get_full_dict(lang)
	
	full_dict.update(dict(zip(webnotes.get_file_items(untranslated_file), 
		webnotes.get_file_items(translated_file))))

	for app in webnotes.get_all_apps(True):
		write_translations_file(app, lang, full_dict)
Пример #2
0
def get_all_patches():
    patches = []
    for app in webnotes.get_installed_apps():
        patches.extend(webnotes.get_file_items(webnotes.get_pymodule_path(app, "patches.txt")))

    return patches
Пример #3
0
def get_lang_info():
	return webnotes.cache().get_value("langinfo", 
		lambda:webnotes.get_file_items(os.path.join(webnotes.local.sites_path, "languages.txt")))