diff --git a/webnotes/build.py b/webnotes/build.py index 72837522d1..d83328a948 100644 --- a/webnotes/build.py +++ b/webnotes/build.py @@ -55,6 +55,9 @@ def clear_pyc_files(): from webnotes.utils import get_base_path for path, folders, files in os.walk(get_base_path()): if 'locale' in folders: folders.remove('locale') + if 'files' in folders: folders.remove('files') + if 'backups' in folders: folders.remove('backups') + for f in files: if f.decode("utf-8").endswith(".pyc"): os.remove(os.path.join(path, f)) diff --git a/webnotes/translate.py b/webnotes/translate.py index 41f6bd3c20..3a2dacea43 100644 --- a/webnotes/translate.py +++ b/webnotes/translate.py @@ -309,6 +309,9 @@ def import_messages(lang, infile): data = dict(get_all_messages_from_file(infile)) for (basepath, folders, files) in os.walk('.'): + if 'files' in folders: folders.remove('files') + if 'backups' in folders: folders.remove('backups') + def _update_lang_file(mtype): """create a langauge file for the given message type""" messages = get_messages(basepath, mtype)