256
256
with open(dest_filename, "wb") as f:
257
257
tree.write(f, encoding="utf-8")
260
260
def add_missing_grd_files_and_export_xtb(source_txln_info, root, source_grd_filename, dest_grd_filename, destination_container):
261
261
grdsid_list_to_insert = get_grdsids(root, source_grd_filename)
263
263
translations_tags = root.findall("translations")
264
264
if len(translations_tags) == 0:
265
logging.info("No translations tag in %r, so not exporting. Skipping it.", source_grd_filename,)
267
267
elif len(translations_tags) > 1:
268
logging.error("%s translations tag to update in %r. I don't know what to do with these.", len(translations_tags), source_grd_filename)
270
270
translations_tag = translations_tags[0]