def synchronize(self):
gdocs_trans_csv = os.path.join(self.temp_path, GDOCS_TRANS_CSV)<EOL>gdocs_meta_csv = os.path.join(self.temp_path, GDOCS_META_CSV)<EOL>local_trans_csv = os.path.join(self.temp_path, LOCAL_TRANS_CSV)<EOL>local_meta_csv = os.path.join(self.temp_path, LOCAL_META_CSV)<EOL>try:<EOL><INDENT>entry = self._download_csv_from_gdocs(gdocs_trans_csv,<EOL>gdocs_meta_csv)<EOL><DEDENT>except PODocsError as e:<EOL><INDENT>if '<STR_LIT>' in str(e)or '<STR_LIT>' in str(e):<EOL><INDENT>self.upload()<EOL><DEDENT>else:<EOL><INDENT>raise PODocsError(e)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._merge_local_and_gdoc(entry, local_trans_csv, local_meta_csv,<EOL>gdocs_trans_csv, gdocs_meta_csv)<EOL>try:<EOL><INDENT>csv_to_po(local_trans_csv, local_meta_csv,<EOL>self.locale_root, self.po_files_path, self.header)<EOL><DEDENT>except IOError as e:<EOL><INDENT>raise PODocsError(e)<EOL><DEDENT><DEDENT>self._clear_temp()<EOL>
Synchronize local po files with translations on GDocs Spreadsheet.
Downloads two csv files, merges them and converts into po files
structure. If new msgids appeared in po files, this method creates
new ods with appended content and sends it to GDocs.