Skip to content

Instantly share code, notes, and snippets.

View mathjazz's full-sized avatar

Matjaž Horvat mathjazz

View GitHub Profile
@mathjazz
mathjazz / tm.py
Last active March 12, 2021 14:00
tm.py
import time
from pontoon.base.models import TranslationMemoryEntry, Translation
from bulk_update.helper import bulk_update
tm_entries_to_update = []
"""
Generate a dict of TM entries for which translation ForeignKey is null
- key: serialized TM entry data
- value: reference to a TM entry