Units
Translation components API.
See the Weblate's Web API documentation for detailed description of the API.
GET /api/translations/documentation/booksarch-handbookkobj_index/zh_CN/units/?format=api
https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/units/?format=api&page=2", "previous": null, "results": [ { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Chapter 3. Kernel Objects" ], "previous_source": "", "target": [ "" ], "id_hash": -5072630519562594534, "content_hash": -5072630519562594534, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:1", "context": "", "note": "type: YAML Front Matter: title", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 2, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1065126/?format=api", "priority": 100, "id": 1065598, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=399a656b1caa971a", "url": "https://translate-dev.freebsd.org/api/units/1065598/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:38.981182Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Kernel Objects" ], "previous_source": "", "target": [ "内核对象" ], "id_hash": 2142017301276315406, "content_hash": 2142017301276315406, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:1, documentation/content/en/books/arch-handbook/kobj/_index.adoc:13", "context": "", "note": "type: Title =", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 1, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065128/?format=api", "priority": 100, "id": 1065599, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=9db9f962f950cf0e", "url": "https://translate-dev.freebsd.org/api/units/1065599/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:38.989704Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Kernel Objects, or _Kobj_ provides an object-oriented C programming system for the kernel. As such the data being operated on carries the description of how to operate on it. This allows operations to be added and removed from an interface at run time and without breaking binary compatibility." ], "previous_source": "", "target": [ "内核对象,也就是<firstterm>Kobj</firstterm>,为内核提供了一种面向对象的C语言编程方式。被操作的数据也承载操作它的方法。这使得在不破坏二进制兼容性的前提下,某一个接口能够增/减相应的操作。" ], "id_hash": 4212823472239535378, "content_hash": 4212823472239535378, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:53", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 3, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 48, "source_unit": "https://translate-dev.freebsd.org/api/units/1065130/?format=api", "priority": 100, "id": 1065600, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ba76f4a0a443e512", "url": "https://translate-dev.freebsd.org/api/units/1065600/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.079492Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Terminology" ], "previous_source": "", "target": [ "术语" ], "id_hash": -2265359017240566842, "content_hash": -2265359017240566842, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:55", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 4, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065132/?format=api", "priority": 100, "id": 1065601, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=608fd3f9e8a5e3c6", "url": "https://translate-dev.freebsd.org/api/units/1065601/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.085563Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Object" ], "previous_source": "", "target": [ "对象" ], "id_hash": -4121335585198452573, "content_hash": -4121335585198452573, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:57", "context": "", "note": "type: Labeled list", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 5, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065134/?format=api", "priority": 100, "id": 1065602, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=46ce131efc11d0a3", "url": "https://translate-dev.freebsd.org/api/units/1065602/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.091923Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "A set of data - data structure - data allocation." ], "previous_source": "", "target": [ "数据集合-数据结构-数据分配的集合。" ], "id_hash": -8705410258148419307, "content_hash": -8705410258148419307, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:59", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 6, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 10, "source_unit": "https://translate-dev.freebsd.org/api/units/1065136/?format=api", "priority": 100, "id": 1065603, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=07302b7e53059915", "url": "https://translate-dev.freebsd.org/api/units/1065603/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.098168Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Method" ], "previous_source": "", "target": [ "方法" ], "id_hash": -7177810348649804229, "content_hash": -7177810348649804229, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:60", "context": "", "note": "type: Labeled list", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 7, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065138/?format=api", "priority": 100, "id": 1065604, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=1c634b847f9b0e3b", "url": "https://translate-dev.freebsd.org/api/units/1065604/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.171964Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "An operation - function." ], "previous_source": "", "target": [ "某一种操作──函数。" ], "id_hash": -4742759947667013649, "content_hash": -4742759947667013649, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:62", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 8, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1065140/?format=api", "priority": 100, "id": 1065605, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=3e2e54f4b05b7fef", "url": "https://translate-dev.freebsd.org/api/units/1065605/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.178625Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Class" ], "previous_source": "", "target": [ "类" ], "id_hash": 3840883458895904946, "content_hash": 3840883458895904946, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:63", "context": "", "note": "type: Labeled list", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 9, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065142/?format=api", "priority": 100, "id": 1065606, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=b54d8f27ef2a00b2", "url": "https://translate-dev.freebsd.org/api/units/1065606/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.184670Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "One or more methods." ], "previous_source": "", "target": [ "一种或多种方法。" ], "id_hash": 5663658878951228916, "content_hash": 5663658878951228916, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:65", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 10, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1065144/?format=api", "priority": 100, "id": 1065607, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ce995bbe38e005f4", "url": "https://translate-dev.freebsd.org/api/units/1065607/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.190353Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Interface" ], "previous_source": "", "target": [ "接口" ], "id_hash": -3517470175911236304, "content_hash": -3517470175911236304, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:66", "context": "", "note": "type: Labeled list", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 11, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065146/?format=api", "priority": 100, "id": 1065608, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=4f2f6f82e8c7ad30", "url": "https://translate-dev.freebsd.org/api/units/1065608/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.196814Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "A standard set of one or more methods." ], "previous_source": "", "target": [ "一种或多种方法的一个标准集合。" ], "id_hash": -6416960129942924106, "content_hash": -6416960129942924106, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:68", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 12, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 8, "source_unit": "https://translate-dev.freebsd.org/api/units/1065148/?format=api", "priority": 100, "id": 1065609, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=26f260c2a4e854b6", "url": "https://translate-dev.freebsd.org/api/units/1065609/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.203327Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Kobj Operation" ], "previous_source": "", "target": [ "Kobj的工作流程" ], "id_hash": -1527885741034083436, "content_hash": -1527885741034083436, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:70", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 13, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065150/?format=api", "priority": 100, "id": 1065610, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=6acbdc037c476b94", "url": "https://translate-dev.freebsd.org/api/units/1065610/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.274271Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Kobj works by generating descriptions of methods. Each description holds a unique id as well as a default function. The description's address is used to uniquely identify the method within a class' method table." ], "previous_source": "", "target": [ "Kobj工作时,产生方法的描述。每个描述有一个唯一的标识和一个缺省函数。 某个描述的地址被用来在一个类的方法表里唯一的标识方法。" ], "id_hash": 3206762378210361264, "content_hash": 3206762378210361264, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:75", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 14, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 34, "source_unit": "https://translate-dev.freebsd.org/api/units/1065152/?format=api", "priority": 100, "id": 1065611, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ac80b5649050bfb0", "url": "https://translate-dev.freebsd.org/api/units/1065611/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.280431Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/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": -5296307729145317583, "content_hash": -5296307729145317583, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:84", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 15, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 156, "source_unit": "https://translate-dev.freebsd.org/api/units/1065154/?format=api", "priority": 100, "id": 1065612, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=367fbc2e6f233731", "url": "https://translate-dev.freebsd.org/api/units/1065612/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.287610Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "These indirections can be visualized as the following:" ], "previous_source": "", "target": [ "这些过程可被表示如下:" ], "id_hash": 8016806998185763785, "content_hash": 8016806998185763785, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:86", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 16, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 8, "source_unit": "https://translate-dev.freebsd.org/api/units/1065156/?format=api", "priority": 100, "id": 1065613, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ef416b7d6fba63c9", "url": "https://translate-dev.freebsd.org/api/units/1065613/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.294396Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "object->cache<->class\n" ], "previous_source": "", "target": [ "" ], "id_hash": 5229401094742486930, "content_hash": 5229401094742486930, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:90", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 17, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065158/?format=api", "priority": 100, "id": 1065614, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=c8929096d02a2f92", "url": "https://translate-dev.freebsd.org/api/units/1065614/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.300310Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Using Kobj" ], "previous_source": "", "target": [ "使用Kobj" ], "id_hash": -2552649822068836302, "content_hash": -2552649822068836302, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:93", "context": "", "note": "type: Title ==", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 18, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065160/?format=api", "priority": 100, "id": 1065615, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=5c932a82e79f7832", "url": "https://translate-dev.freebsd.org/api/units/1065615/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.376993Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Structures" ], "previous_source": "", "target": [ "结构" ], "id_hash": 3894402431469020987, "content_hash": 3894402431469020987, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:95", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 19, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065162/?format=api", "priority": 100, "id": 1065616, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=b60bb260c420e73b", "url": "https://translate-dev.freebsd.org/api/units/1065616/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.384063Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "struct kobj_method\n" ], "previous_source": "", "target": [ "struct kobj_method\n" ], "id_hash": -2711644346714433463, "content_hash": -2711644346714433463, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:100", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 20, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065164/?format=api", "priority": 100, "id": 1065617, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=5a5e4dd564e3d849", "url": "https://translate-dev.freebsd.org/api/units/1065617/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.390700Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Functions" ], "previous_source": "", "target": [ "结构" ], "id_hash": 3642383334814429404, "content_hash": 3642383334814429404, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:102", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 21, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065166/?format=api", "priority": 100, "id": 1065618, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=b28c5858476ab0dc", "url": "https://translate-dev.freebsd.org/api/units/1065618/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.477938Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "void kobj_class_compile(kobj_class_t cls);\nvoid kobj_class_compile_static(kobj_class_t cls, kobj_ops_t ops);\nvoid kobj_class_free(kobj_class_t cls);\nkobj_t kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags);\nvoid kobj_init(kobj_t obj, kobj_class_t cls);\nvoid kobj_delete(kobj_t obj, struct malloc_type *mtype);\n" ], "previous_source": "", "target": [ "void kobj_class_compile(kobj_class_t cls);\nvoid kobj_class_compile_static(kobj_class_t cls, kobj_ops_t ops);\nvoid kobj_class_free(kobj_class_t cls);\nkobj_t kobj_create(kobj_class_t cls, struct malloc_type *mtype, int mflags);\nvoid kobj_init(kobj_t obj, kobj_class_t cls);\nvoid kobj_delete(kobj_t obj, struct malloc_type *mtype);\n" ], "id_hash": 7862126614426854931, "content_hash": 7862126614426854931, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:112", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 22, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 30, "source_unit": "https://translate-dev.freebsd.org/api/units/1065168/?format=api", "priority": 100, "id": 1065619, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ed1be280200ea613", "url": "https://translate-dev.freebsd.org/api/units/1065619/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.485028Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Macros" ], "previous_source": "", "target": [ "宏" ], "id_hash": 4242434847767527707, "content_hash": 4242434847767527707, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:114", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 23, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065170/?format=api", "priority": 100, "id": 1065620, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=bae0280443ec011b", "url": "https://translate-dev.freebsd.org/api/units/1065620/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.492091Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "KOBJ_CLASS_FIELDS\nKOBJ_FIELDS\nDEFINE_CLASS(name, methods, size)\nKOBJMETHOD(NAME, FUNC)\n" ], "previous_source": "", "target": [ "KOBJ_CLASS_FIELDS\nKOBJ_FIELDS\nDEFINE_CLASS(name, methods, size)\nKOBJMETHOD(NAME, FUNC)\n" ], "id_hash": 8308893867500307912, "content_hash": 8308893867500307912, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:122", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 24, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 7, "source_unit": "https://translate-dev.freebsd.org/api/units/1065172/?format=api", "priority": 100, "id": 1065621, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=f34f1ef338c705c8", "url": "https://translate-dev.freebsd.org/api/units/1065621/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.499147Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Headers" ], "previous_source": "", "target": [ "头文件" ], "id_hash": 1850317099559884940, "content_hash": 1850317099559884940, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:124", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 25, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 1, "source_unit": "https://translate-dev.freebsd.org/api/units/1065174/?format=api", "priority": 100, "id": 1065622, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=99ada5994119188c", "url": "https://translate-dev.freebsd.org/api/units/1065622/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.570645Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "<sys/param.h>\n<sys/kobj.h>\n" ], "previous_source": "", "target": [ "" ], "id_hash": 3341868903880953592, "content_hash": 3341868903880953592, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:130", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 26, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065176/?format=api", "priority": 100, "id": 1065623, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ae60b40fe5bf8ef8", "url": "https://translate-dev.freebsd.org/api/units/1065623/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.578105Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Creating an Interface Template" ], "previous_source": "", "target": [ "建立一个接口的模板" ], "id_hash": -1184892745757591965, "content_hash": -1184892745757591965, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:132", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 27, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1065178/?format=api", "priority": 100, "id": 1065624, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=6f8e6a53582e7663", "url": "https://translate-dev.freebsd.org/api/units/1065624/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.585653Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The first step in using Kobj is to create an Interface. Creating the interface involves creating a template that the script [.filename]#src/sys/kern/makeobjops.pl# can use to generate the header and code for the method declarations and method lookup functions." ], "previous_source": "", "target": [ "使用Kobj的第一步是建立一个接口。建立接口包括建立模板的工作。建立模板可用脚本<filename>src/sys/kern/makeobjops.pl</filename>完成,它会产生申明方法的头文件和代码,脚本还会生成方法查找函数。" ], "id_hash": 9186764191999803578, "content_hash": 9186764191999803578, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:136", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 28, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 38, "source_unit": "https://translate-dev.freebsd.org/api/units/1065180/?format=api", "priority": 100, "id": 1065625, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ff7df15beb6d40ba", "url": "https://translate-dev.freebsd.org/api/units/1065625/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.592324Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The `#include` statement and what follows it is copied verbatim to the head of the generated code file." ], "previous_source": "", "target": [ "" ], "id_hash": -5514464080478431862, "content_hash": -5514464080478431862, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:140", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 30, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/1065184/?format=api", "priority": 100, "id": 1065627, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=3378b022bc6e958a", "url": "https://translate-dev.freebsd.org/api/units/1065627/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.681138Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "For example:" ], "previous_source": "", "target": [ "例如:" ], "id_hash": -3643751247835186919, "content_hash": -3643751247835186919, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:142, documentation/content/en/books/arch-handbook/kobj/_index.adoc:153, documentation/content/en/books/arch-handbook/kobj/_index.adoc:163, documentation/content/en/books/arch-handbook/kobj/_index.adoc:178, documentation/content/en/books/arch-handbook/kobj/_index.adoc:191, documentation/content/en/books/arch-handbook/kobj/_index.adoc:206, documentation/content/en/books/arch-handbook/kobj/_index.adoc:240", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 31, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065186/?format=api", "priority": 100, "id": 1065628, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=4d6ecb8ba6e5b919", "url": "https://translate-dev.freebsd.org/api/units/1065628/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.688234Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "#include <sys/foo.h>\n" ], "previous_source": "", "target": [ "" ], "id_hash": -4982796760927921397, "content_hash": -4982796760927921397, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:146", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 32, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065188/?format=api", "priority": 100, "id": 1065629, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=3ad98cbef4ec9b0b", "url": "https://translate-dev.freebsd.org/api/units/1065629/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.695854Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The `INTERFACE` keyword is used to define the interface name. This name is concatenated with each method name as [interface name]_[method name]. Its syntax is INTERFACE [interface name];." ], "previous_source": "", "target": [ "" ], "id_hash": 6787292693968173343, "content_hash": 6787292693968173343, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:151", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 33, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 28, "source_unit": "https://translate-dev.freebsd.org/api/units/1065190/?format=api", "priority": 100, "id": 1065630, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=de314ebe9a93b91f", "url": "https://translate-dev.freebsd.org/api/units/1065630/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.705006Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "INTERFACE foo;\n" ], "previous_source": "", "target": [ "INTERFACE foo;\n" ], "id_hash": -6726847942004127475, "content_hash": -6726847942004127475, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:157", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 34, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065192/?format=api", "priority": 100, "id": 1065631, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=22a56f6fe6c6c90d", "url": "https://translate-dev.freebsd.org/api/units/1065631/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.776935Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The `CODE` keyword copies its arguments verbatim into the code file. Its syntax is `CODE { [whatever] };`" ], "previous_source": "", "target": [ "" ], "id_hash": 6120071557811902005, "content_hash": 6120071557811902005, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:161", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 35, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 18, "source_unit": "https://translate-dev.freebsd.org/api/units/1065194/?format=api", "priority": 100, "id": 1065632, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=d4eedca803599635", "url": "https://translate-dev.freebsd.org/api/units/1065632/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.786630Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The `METHOD` keyword describes a method. Its syntax is `METHOD [return type] [method name] { [object [, arguments]] };`" ], "previous_source": "", "target": [ "" ], "id_hash": 2980371606613866348, "content_hash": 2980371606613866348, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:189", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 39, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 19, "source_unit": "https://translate-dev.freebsd.org/api/units/1065198/?format=api", "priority": 100, "id": 1065634, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=a95c682f7ee1376c", "url": "https://translate-dev.freebsd.org/api/units/1065634/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.871415Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "METHOD int bar {\n\tstruct object *;\n\tstruct foo *;\n\tstruct bar;\n};\n" ], "previous_source": "", "target": [ "METHOD int bar {\n\tstruct object *;\n\tstruct foo *;\n\tstruct bar;\n};\n" ], "id_hash": 6039927348842132122, "content_hash": 6039927348842132122, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:199", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 40, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 13, "source_unit": "https://translate-dev.freebsd.org/api/units/1065200/?format=api", "priority": 100, "id": 1065635, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=d3d221ec40e6f29a", "url": "https://translate-dev.freebsd.org/api/units/1065635/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.882476Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The `DEFAULT` keyword may follow the `METHOD` keyword. It extends the `METHOD` key word to include the default function for method. The extended syntax is `METHOD [return type] [method name] { [object; [other arguments]] }DEFAULT [default function];`" ], "previous_source": "", "target": [ "" ], "id_hash": -8422277466677725422, "content_hash": -8422277466677725422, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:204", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 41, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 37, "source_unit": "https://translate-dev.freebsd.org/api/units/1065202/?format=api", "priority": 100, "id": 1065636, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=0b1e0f4466e5b712", "url": "https://translate-dev.freebsd.org/api/units/1065636/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.891820Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "METHOD int bar {\n\tstruct object *;\n\tstruct foo *;\n\tint bar;\n} DEFAULT foo_hack;\n" ], "previous_source": "", "target": [ "METHOD int bar {\n\tstruct object *;\n\tstruct foo *;\n\tint bar;\n} DEFAULT foo_hack;\n" ], "id_hash": 7805893827183263811, "content_hash": 7805893827183263811, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:214", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 42, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 15, "source_unit": "https://translate-dev.freebsd.org/api/units/1065204/?format=api", "priority": 100, "id": 1065637, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ec541b1413ac4043", "url": "https://translate-dev.freebsd.org/api/units/1065637/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.903629Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The `STATICMETHOD` keyword is used like the `METHOD` keyword except the kobj data is not at the head of the object structure so casting to kobj_t would be incorrect. Instead `STATICMETHOD` relies on the Kobj data being referenced as 'ops'. This is also useful for calling methods directly out of a class's method table." ], "previous_source": "", "target": [ "关键词<literal>STATICMETHOD</literal>类似关键词<literal>METHOD</literal>。对于每个Kobj对象,一般其头部都有一些Kobj专有的数据。<literal>METHOD</literal>定义的方法就假设这些专有数据位于对象头部;假如对象头部没有这些专有数据,这些方法对这个对象的访问就可能出错。而<literal>STATICMETHOD</literal>定义的对象可以不受这个限制:这样描述出的方法,其操作的数据不由这个类的某个对象实例给出,而是全都由调用这个方法时的操作数(译者注:即参数)给出。这也对于在某个类的方法表之外调用这个方法有用。" ], "id_hash": -654482491791125323, "content_hash": -654482491791125323, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:219", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 43, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 54, "source_unit": "https://translate-dev.freebsd.org/api/units/1065206/?format=api", "priority": 100, "id": 1065638, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=76eacfa42d13d4b5", "url": "https://translate-dev.freebsd.org/api/units/1065638/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.912029Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Other complete examples:" ], "previous_source": "", "target": [ "其它完整的例子:" ], "id_hash": -6622678238524672837, "content_hash": -6622678238524672837, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:224", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 45, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1065208/?format=api", "priority": 100, "id": 1065639, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=2417853b0306f4bb", "url": "https://translate-dev.freebsd.org/api/units/1065639/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.918465Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "src/sys/kern/bus_if.m\nsrc/sys/kern/device_if.m\n" ], "previous_source": "", "target": [ "src/sys/kern/bus_if.m\nsrc/sys/kern/device_if.m\n" ], "id_hash": 6496380357697134957, "content_hash": 6496380357697134957, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:229", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 46, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065210/?format=api", "priority": 100, "id": 1065640, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=da27c7841a5ce16d", "url": "https://translate-dev.freebsd.org/api/units/1065640/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.971433Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Creating a Class" ], "previous_source": "", "target": [ "创建类" ], "id_hash": -5455273803332987329, "content_hash": -5455273803332987329, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:231", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 47, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1065212/?format=api", "priority": 100, "id": 1065641, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=344af9610fd7d63f", "url": "https://translate-dev.freebsd.org/api/units/1065641/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.978828Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The second step in using Kobj is to create a class. A class consists of a name, a table of methods, and the size of objects if Kobj's object handling facilities are used. To create the class use the macro `DEFINE_CLASS()`. To create the method table create an array of kobj_method_t terminated by a NULL entry. Each non-NULL entry may be created using the macro `KOBJMETHOD()`." ], "previous_source": "", "target": [ "使用Kobj的第二步是建立一个类。一个类的组有名字、方法表;假如使用了Kobj的“对象管理工具”(Object Handling Facilities),类中还包含对象的大小。建立类时使用宏<function>DEFINE_CLASS()</function>。建立方法表时,须建立一个 kobj_method_t 数组,用NULL项结尾。每个非 NULL 项可用宏<function>KOBJMETHOD()</function>建立。" ], "id_hash": -6519692949789134979, "content_hash": -6519692949789134979, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:238", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 48, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 66, "source_unit": "https://translate-dev.freebsd.org/api/units/1065214/?format=api", "priority": 100, "id": 1065642, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=258565ce13332f7d", "url": "https://translate-dev.freebsd.org/api/units/1065642/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.985122Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "DEFINE_CLASS(fooclass, foomethods, sizeof(struct foodata));\n" ], "previous_source": "", "target": [ "" ], "id_hash": 5652458561932128597, "content_hash": 5652458561932128597, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:244", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 49, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 4, "source_unit": "https://translate-dev.freebsd.org/api/units/1065216/?format=api", "priority": 100, "id": 1065643, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=ce71911d33947155", "url": "https://translate-dev.freebsd.org/api/units/1065643/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.991847Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "kobj_method_t foomethods[] = {\n\tKOBJMETHOD(bar_doo, foo_doo),\n\tKOBJMETHOD(bar_foo, foo_foo),\n\t{ NULL, NULL}\n};\n" ], "previous_source": "", "target": [ "" ], "id_hash": -6838311498862653983, "content_hash": -6838311498862653983, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:250", "context": "", "note": "type: delimited block . 4", "flags": "no-wrap", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 50, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1065218/?format=api", "priority": 100, "id": 1065644, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=21196fec36d28de1", "url": "https://translate-dev.freebsd.org/api/units/1065644/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:39.998776Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The class must be \"compiled\". Depending on the state of the system at the time that the class is to be initialized a statically allocated cache, \"ops table\" have to be used. This can be accomplished by declaring a `struct kobj_ops` and using `kobj_class_compile_static();` otherwise, `kobj_class_compile()` should be used." ], "previous_source": "", "target": [ "" ], "id_hash": -6378599553917108744, "content_hash": -6378599553917108744, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:255", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 0, "fuzzy": false, "translated": false, "approved": false, "position": 51, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 49, "source_unit": "https://translate-dev.freebsd.org/api/units/1065220/?format=api", "priority": 100, "id": 1065645, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=277aa980404e3df8", "url": "https://translate-dev.freebsd.org/api/units/1065645/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:40.005046Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "Creating an Object" ], "previous_source": "", "target": [ "建立一个对象" ], "id_hash": -4717214818264919336, "content_hash": -4717214818264919336, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:256", "context": "", "note": "type: Title ===", "flags": "no-wrap", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 52, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 3, "source_unit": "https://translate-dev.freebsd.org/api/units/1065222/?format=api", "priority": 100, "id": 1065646, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=3e89161d9c1c52d8", "url": "https://translate-dev.freebsd.org/api/units/1065646/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:40.010572Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "The third step in using Kobj involves how to define the object. Kobj object creation routines assume that Kobj data is at the head of an object. If this in not appropriate you will have to allocate the object yourself and then use `kobj_init()` on the Kobj portion of it; otherwise, you may use `kobj_create()` to allocate and initialize the Kobj portion of the object automatically. `kobj_init()` may also be used to change the class that an object uses." ], "previous_source": "", "target": [ "使用Kobj的第三步是定义对象。Kobj对象建立程序假定Kobj专有数据在一个对象的头部。如果不是如此,应当先自行分配对象,再使用<function>kobj_init()</function>初始化对象中的Kobj专有数据;其实可以使用<function>kobj_create()</function>分配对象,并自动初始化对象中的Kobj专有内容。<function>kobj_init()</function>也可以用来改变一个对象所使用的类。" ], "id_hash": 4835228233548177945, "content_hash": 4835228233548177945, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:262", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 10, "fuzzy": true, "translated": false, "approved": false, "position": 53, "has_suggestion": false, "has_comment": false, "has_failing_check": true, "num_words": 79, "source_unit": "https://translate-dev.freebsd.org/api/units/1065224/?format=api", "priority": 100, "id": 1065647, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=c31a2e75d4942219", "url": "https://translate-dev.freebsd.org/api/units/1065647/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:40.016544Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "To integrate Kobj into the object you should use the macro KOBJ_FIELDS." ], "previous_source": "", "target": [ "将Kobj的数据集成到对象中要使用宏KOBJ_FIELDS。" ], "id_hash": 7402991996235972289, "content_hash": 7402991996235972289, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:264", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 54, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 12, "source_unit": "https://translate-dev.freebsd.org/api/units/1065226/?format=api", "priority": 100, "id": 1065648, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=e6bcb5ff72b47ec1", "url": "https://translate-dev.freebsd.org/api/units/1065648/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:40.022160Z" }, { "translation": "https://translate-dev.freebsd.org/api/translations/documentation/booksarch-handbookkobj_index/zh_CN/?format=api", "source": [ "For example" ], "previous_source": "", "target": [ "例如" ], "id_hash": 1643455197748221666, "content_hash": 1643455197748221666, "location": "documentation/content/en/books/arch-handbook/kobj/_index.adoc:266", "context": "", "note": "type: Plain text", "flags": "", "labels": [], "state": 20, "fuzzy": false, "translated": true, "approved": false, "position": 55, "has_suggestion": false, "has_comment": false, "has_failing_check": false, "num_words": 2, "source_unit": "https://translate-dev.freebsd.org/api/units/1065228/?format=api", "priority": 100, "id": 1065649, "web_url": "https://translate-dev.freebsd.org/translate/documentation/booksarch-handbookkobj_index/zh_CN/?checksum=96ceb9cb820d56e2", "url": "https://translate-dev.freebsd.org/api/units/1065649/?format=api", "explanation": "", "extra_flags": "", "pending": false, "timestamp": "2021-05-23T12:47:40.027420Z" } ] }{ "count": 62, "next": "