Unit Instance
Units API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/units/34389/?format=api
https://translate-dev.freebsd.org/api/translations/freebsd-doc/boooks_arch-handbook/zh_CN/?format=api", "source": [ "A class is built by creating a method table associating one or more functions with method descriptions. Before use the class is compiled. The compilation allocates a cache and associates it with the class. A unique id is assigned to each method description within the method table of the class if not already done so by another referencing class compilation. For every method to be used a function is generated by script to qualify arguments and automatically reference the method description for a lookup. The generated function looks up the method by using the unique id associated with the method description as a hash into the cache associated with the object's class. If the method is not cached the generated function proceeds to use the class' table to find the method. If the method is found then the associated function within the class is used; otherwise, the default function associated with the method description is used." ], "previous_source": "", "target": [ "构建一个类,就是要建立一张方法表,并将这张表关联到一个或多个函数(方法); 这些函数(方法)都带有方法描述。使用前,类要被编译。编译时要为这个类分配一些缓存。 在方法表中的每个方法描述都会被指派一个唯一的标识, 除非已经被其它引用它的类在编译时指派了标识。对于每个将要被使用的方法, 都会由脚本生成一个函数(方法查找函数),以解析外来参数, 并在被查询时给出方法描述的地址。被生成的函数(方法查找函数) 凭着那个方法描述的唯一标识按Hash的方法查找对象的类的缓存。 如果这个方法不在缓存中,函数会查找使用类的方法表。如果这个方法被找到了, 类里的相关函数(也就是某个方法的实现代码)就会被使用。 否则,这个方法描述的缺省函数将被使用。" ], "id_hash": -3058613603925345496, "content_hash": -3058613603925345496, "location": "book.translate.xml:3051", "context": "", "note": "(itstool) path: sect1/para", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 384, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 156, "source_unit": "https://translate-dev.freebsd.org/api/units/102526/?format=api", "priority": 100, "id": 34389, "web_url": "https://translate-dev.freebsd.org/translate/freebsd-doc/boooks_arch-handbook/zh_CN/?checksum=558d9f21e8da3b28", "url": "https://translate-dev.freebsd.org/api/units/34389/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2019-10-20T12:21:46.344132Z" }{ "translation": "