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)
-
Add Glossary.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.post
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)
-
Clear TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.segments.clear
def concordance_search_in_tms(self, sourceLanguageId: str, targetLanguageId: str, autoSubstitution: bool, minRelevant: int, expressions: Iterable[str], projectId: Optional[int] = None)
-
Concordance search in TMs
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.projects.tms.concordance.post
def create_tm_segment(self, tmId: int, records: Iterable[TranslationMemorySegmentRecord])
-
Create TM Segment.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.segments.post
def delete_tm(self, tmId: int)
-
Delete TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.delete
def delete_tm_segment(self, tmId: int, segmentId: int)
-
Delete TM Segment.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.segments.delete
def download_tm(self, tmId: int, exportId: str)
-
Download TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.exports.download.download
def edit_tm(self, tmId: int, data: Iterable[TranslationMemoryPatchRequest])
-
Edit TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.patch
def edit_tm_segment(self, tmId: int, segmentId: int, data: Iterable[Union[TranslationMemorySegmentRecordOperationAdd, TranslationMemorySegmentRecordOperationReplace, TranslationMemorySegmentRecordOperationRemove]])
-
Edit TM Segment.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.segments.patch
def export_tm(self, tmId: int, sourceLanguageId: Optional[str] = None, targetLanguageId: Optional[str] = None, format: Optional[ExportFormat] = None)
-
Export TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.exports.post
def get_tm(self, tmId: int)
-
Get TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.get
def get_tm_export_path(self, tmId: int, exportId: Optional[str] = None)
def get_tm_segment(self, tmId: int, segmentId: int)
-
Get TM Segment.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.segments.get
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)
-
Import TM.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.imports.post
def list_tm_segments(self, tmId: int, orderBy: Optional[Sorting] = None, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None)
-
List TM Segments.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.segments.getMany
def list_tms(self, orderBy: Optional[Sorting] = None, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None)
-
List TMs.
Link to documentation: https://developer.crowdin.com/api/v2/#operation/api.tms.getMany