Module crowdin_api.api_resources.translation_memory.resource

Classes

class TranslationMemoryResource (requester: APIRequester, project_id: Optional[int] = None, page_size=25)

Resource for Translation Memory.

Translation Memory (TM) is a vault of translations that were previously made in other projects. Those translations can be reused to speed up the translation process. Every translation made in the project is automatically added to the project Translation Memory.

Use API to create, upload, download, or remove specific TM. Translation Memory export and import are asynchronous operations and shall be completed with sequence of API methods.

Link to documentation: https://developer.crowdin.com/api/v2/#tag/Translation-Memory

Ancestors

Methods

def add_tm(self, name: str, languageId: str)
def check_tm_export_status(self, tmId: int, exportId: str)

Check TM Export Status.

Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.exports.get

def check_tm_import_status(self, tmId: int, importId: str)

Check TM Import Status.

Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.imports.get

def clear_tm(self, tmId: int)
def concordance_search_in_tms(self, sourceLanguageId: str, targetLanguageId: str, autoSubstitution: bool, minRelevant: int, expressions: Iterable[str], projectId: Optional[int] = None)
def create_tm_segment(self, tmId: int, records: Iterable[TranslationMemorySegmentRecord])
def delete_tm(self, tmId: int)
def delete_tm_segment(self, tmId: int, segmentId: int)
def download_tm(self, tmId: int, exportId: str)
def edit_tm(self, tmId: int, data: Iterable[TranslationMemoryPatchRequest])
def edit_tm_segment(self, tmId: int, segmentId: int, data: Iterable[Union[TranslationMemorySegmentRecordOperationAddTranslationMemorySegmentRecordOperationReplaceTranslationMemorySegmentRecordOperationRemove]])
def export_tm(self, tmId: int, sourceLanguageId: Optional[str] = None, targetLanguageId: Optional[str] = None, format: Optional[ExportFormat] = None)
def get_tm(self, tmId: int)
def get_tm_export_path(self, tmId: int, exportId: Optional[str] = None)
def get_tm_segment(self, tmId: int, segmentId: int)
def get_tm_segments_path(self, tmId: int, segmentId: Optional[int] = None)
def get_tms_path(self, tmId: Optional[int] = None)
def import_tm(self, tmId: int, storageId: int, scheme: Optional[Dict[~KT, ~VT]] = None, firstLineContainsHeader: Optional[bool] = None)
def list_tm_segments(self, tmId: int, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None)
def list_tms(self, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None)