|
63 | 63 | "en": "// Or better: Sort tasks by direction before batching.", |
64 | 64 | "zh-CN": "// 或者:在批量之前对任务进行排序。" |
65 | 65 | }, |
66 | | - "0464999d6422e031d4c754e98f0ed0238fa0a36f": { |
67 | | - "en": "// Returns a list of domain.Comment objects containing the comment text, location, and context symbols.", |
68 | | - "zh-CN": "// 返回包含注释文本、位置和上下文符号的 domain.Comment 列表" |
69 | | - }, |
70 | 66 | "046c00251ed8e0048dfc1298ec79500a6a403deb": { |
71 | 67 | "en": "//", |
72 | 68 | "zh-CN": "//\n```" |
73 | 69 | }, |
| 70 | + "049f10f32e71ac571ff1ca95afd0da90516b24da": { |
| 71 | + "en": "// Adapter implements the LanguageAdapter interface in Java.", |
| 72 | + "zh-CN": "// Adapter 实现 Java 语言的 LanguageAdapter 接口" |
| 73 | + }, |
74 | 74 | "04ab7b1f75eee005fe16d83c18d2cb94bac80bbc": { |
75 | 75 | "en": "// Save progress immediately", |
76 | 76 | "zh-CN": "// 立即保存进度" |
|
455 | 455 | "en": "// LanguageAdapter defines the interface for language-specific AST parsers", |
456 | 456 | "zh-CN": "// LanguageAdapter 定义了语言特定的 AST 解析器的接口" |
457 | 457 | }, |
458 | | - "1c6c3bd6bed40c55a529e8a5ea20e34223005494": { |
459 | | - "en": "// Language returns the language identifier (\"java\")", |
460 | | - "zh-CN": "// Language 返回语言标识符 (\"java\")" |
461 | | - }, |
462 | 458 | "1c9e9b6fbcf2a701fff0f9da334131d2937e4550": { |
463 | 459 | "en": "// For Java, the symbol path format is: package.ClassName#methodName or package.ClassName#fieldName", |
464 | 460 | "zh-CN": "// 对于 Java,符号路径格式为:package.ClassName#methodName 或 package.ClassName#fieldName" |
|
475 | 471 | "en": "// Parse", |
476 | 472 | "zh-CN": "// 解析" |
477 | 473 | }, |
| 474 | + "1d4024454f544bdf6d77ee20e21cde8db7735691": { |
| 475 | + "en": "// NewAdapter creates a new Java adapter instance", |
| 476 | + "zh-CN": "// NewAdapter 创建一个新的 Java 适配器实例" |
| 477 | + }, |
478 | 478 | "1d49c2b4a5ea4f7f1b8f494c4ed02a6892a0354d": { |
479 | 479 | "en": "// Skip .git, vendor, .codei18n", |
480 | 480 | "zh-CN": "// 跳过 .git, vendor, .codei18n" |
|
667 | 667 | "en": "// Search for matching Chinese text in the mapping", |
668 | 668 | "zh-CN": "// 在映射中查找匹配的中文文本" |
669 | 669 | }, |
670 | | - "2abebba44e8db929c05d11b8e4f554869b2fc0cb": { |
671 | | - "en": "// Adapter implements the LanguageAdapter interface in Java.", |
672 | | - "zh-CN": "// Adapter 实现 Java 语言的 LanguageAdapter 接口" |
673 | | - }, |
674 | 670 | "2ac6a603d607e405a251768b5d75c44ad95396f1": { |
675 | 671 | "en": "// If direction changes in batch, we can't batch efficiently.", |
676 | 672 | "zh-CN": "// 如果批量中方向发生变化,则无法高效地进行批处理。" |
|
755 | 751 | "en": "// 2. Generate IDs", |
756 | 752 | "zh-CN": "// 2. 生成 ID" |
757 | 753 | }, |
| 754 | + "301ab8d44d67c6b22ce7e7a244bb7ece47ff9561": { |
| 755 | + "en": "// Initialize the Tree-sitter parser and load the Java grammar", |
| 756 | + "zh-CN": "// 初始化 Tree-sitter 解析器并加载 Java 语法" |
| 757 | + }, |
758 | 758 | "302a4dc855ac27653854796f073aa82bf20e6c94": { |
759 | 759 | "en": "// Case 1: Comments inside string literals should NOT be extracted", |
760 | 760 | "zh-CN": "// 案例 1:字符串字面量内部的注释不应被提取" |
|
783 | 783 | "en": "// Now you can reverse lookup English text through Chinese text.", |
784 | 784 | "zh-CN": "// 现在验证可以通过中文文本反向查找英文" |
785 | 785 | }, |
786 | | - "31c6351c8c5b360cd63bc1e0e5797b6876051daa": { |
787 | | - "en": "// Normalize the text and identify comment types", |
788 | | - "zh-CN": "// 规范化文本并识别注释类型" |
789 | | - }, |
790 | 786 | "32034fa8ff84af1aacb96c29502abf938ee1ace4": { |
791 | 787 | "en": "// If a model is specified via the command line, it overrides the model in the configuration", |
792 | 788 | "zh-CN": "// 如果通过命令行指定了模型,则会覆盖配置中的模型" |
|
847 | 843 | "en": "// Rule: SHA1(file_path + language + parent_symbol + normalized_text)", |
848 | 844 | "zh-CN": "// 规则:SHA1(file_path + language + parent_symbol + normalized_text)" |
849 | 845 | }, |
| 846 | + "3563208344f880b815fca7d376ee1f23696d2020": { |
| 847 | + "en": "// Normalize the text and identify comment types", |
| 848 | + "zh-CN": "// 规范化文本并识别注释类型" |
| 849 | + }, |
850 | 850 | "356d6dbacbe459a332d51bd7b39a7bc646b74543": { |
851 | 851 | "en": "// 4. //! Module Doc -\u003e Owner is mod my_mod -\u003e Path \"my_mod\"", |
852 | 852 | "zh-CN": "// 4. //! 模块文档 -\u003e 拥有者为 mod my_mod -\u003e 路径 \"my_mod\"" |
|
943 | 943 | "en": "// Continue scanning other files", |
944 | 944 | "zh-CN": "// 继续扫描其他文件" |
945 | 945 | }, |
946 | | - "3b0922ac632530145f45465570706d3af713bfd2": { |
947 | | - "en": "// First, extract the package name", |
948 | | - "zh-CN": "// 首先提取包名" |
949 | | - }, |
950 | 946 | "3b0cc0654043ee485c8868a2263c7a532e982d30": { |
951 | 947 | "en": "// But let's check strict content if possible or just existence.", |
952 | 948 | "zh-CN": "// 但如果可能,请检查严格内容或仅检查存在性。" |
|
1111 | 1107 | "en": "// Rule: SHA1(file_path + language + symbol + normalized_text)", |
1112 | 1108 | "zh-CN": "// 规则:SHA1(file_path + language + symbol + normalized_text)" |
1113 | 1109 | }, |
| 1110 | + "44aa6f484383b4042a04c3f6d1de34e04a6bba5d": { |
| 1111 | + "en": "// Returns a list of domain.Comment objects containing the comment text, location, and context symbols.", |
| 1112 | + "zh-CN": "// 返回包含注释文本、位置和上下文符号的 domain.Comment 列表" |
| 1113 | + }, |
1114 | 1114 | "44bd8e1f66387ea67c11f7ff9950f9416504c65e": { |
1115 | 1115 | "en": "// \"// Create a decorator type to hide the original comment and display the translation in front of it\" should be on the second line", |
1116 | 1116 | "zh-CN": "// \"// 创建一个装饰类型,将原始注释隐藏并在前面显示翻译\" 应该在第 2 行" |
|
1255 | 1255 | "en": "// Or we can check if file mod time changed if the tool is smart,", |
1256 | 1256 | "zh-CN": "// 或者我们可以检查如果工具足够智能,文件修改时间是否发生了改变。" |
1257 | 1257 | }, |
1258 | | - "51fc1bff44817793e3b4ae76b54b3e069ecdcfc0": { |
1259 | | - "en": "// If src is nil, read the source code from the file path.", |
1260 | | - "zh-CN": "// 如果 src 为 nil,则从文件路径读取源代码" |
1261 | | - }, |
1262 | 1258 | "522c9f7d2175ea4967fb68cf29be69efcedbb1b6": { |
1263 | 1259 | "en": "// Expect additions", |
1264 | 1260 | "zh-CN": "// 预期有新增内容" |
|
1571 | 1567 | "en": "// Note: We want to capture comments. In tree-sitter, comments are often extra nodes ", |
1572 | 1568 | "zh-CN": "// 注意:我们想要捕获注释。在 tree-sitter 中,注释通常是额外的节点" |
1573 | 1569 | }, |
| 1570 | + "6d74752615a35527b4dbf52368e23fb4d08c72e9": { |
| 1571 | + "en": "// Language returns the language identifier (\"java\")", |
| 1572 | + "zh-CN": "// Language 返回语言标识符 (\"java\")" |
| 1573 | + }, |
1574 | 1574 | "6d88b3ae5272f5cd85e9f11c4ff8af4a758a2d04": { |
1575 | 1575 | "en": "// 2. Apply flags", |
1576 | 1576 | "zh-CN": "// 2. 应用标志" |
|
1947 | 1947 | "en": "// Should be strictly separated from preceding block comment", |
1948 | 1948 | "zh-CN": "// 应严格与前置代码块注释分开" |
1949 | 1949 | }, |
| 1950 | + "89b0fda5bd6bf5eed7d9c6d586a02276012f91a9": { |
| 1951 | + "en": "// Parse the symbol path", |
| 1952 | + "zh-CN": "// 解析符号路径" |
| 1953 | + }, |
1950 | 1954 | "8a8c9068221c799a3fef1291306c666b82b36fe4": { |
1951 | 1955 | "en": "// Already converted to Chinese content", |
1952 | 1956 | "zh-CN": "// 已经转换为中文的内容" |
|
2127 | 2131 | "en": "//", |
2128 | 2132 | "zh-CN": "//\n```\n//\n```" |
2129 | 2133 | }, |
| 2134 | + "9518a289a94d2d7336dee805fe938d97f5a1003f": { |
| 2135 | + "en": "// Create query", |
| 2136 | + "zh-CN": "// 创建查询" |
| 2137 | + }, |
2130 | 2138 | "955b1f2952d2aa3ef9dbf82e2c4449f20a73aa05": { |
2131 | 2139 | "en": "// 2. Verify Inline comment", |
2132 | 2140 | "zh-CN": "// 2. 验证内联注释" |
|
2215 | 2223 | "en": "// Default to package level", |
2216 | 2224 | "zh-CN": "// 默认为包级" |
2217 | 2225 | }, |
2218 | | - "9a1b2a617ee612f8c695c0b55af43a7dd3443667": { |
2219 | | - "en": "// Initialize the Tree-sitter parser and load the Java grammar", |
2220 | | - "zh-CN": "// 初始化 Tree-sitter 解析器并加载 Java 语法" |
2221 | | - }, |
2222 | 2226 | "9a477664ddd5e6c0764c480fb8a11f42d4e05bdb": { |
2223 | 2227 | "en": "// Validate comment type and tag", |
2224 | 2228 | "zh-CN": "// 验证注释类型和标记" |
|
2363 | 2367 | "en": "// 2. Run tests", |
2364 | 2368 | "zh-CN": "// 2. 运行测试" |
2365 | 2369 | }, |
| 2370 | + "a59655c6bff0a6f6329a735ef1d0e7bc07fa8eae": { |
| 2371 | + "en": "// Parse the provided Java source code and extract comments", |
| 2372 | + "zh-CN": "// Parse 解析提供的 Java 源代码并提取注释" |
| 2373 | + }, |
2366 | 2374 | "a59b196601d76c702962a523b610f1618371973f": { |
2367 | 2375 | "en": "// Calculate offsets", |
2368 | 2376 | "zh-CN": "// 计算偏移量" |
|
2471 | 2479 | "en": "// Since verbose is on (flag passed to binary? --verbose is global flag).", |
2472 | 2480 | "zh-CN": "// 由于 verbose 开启 (标志是否通过二进制传递? --verbose 是全局标志)。" |
2473 | 2481 | }, |
2474 | | - "b0a58f194c759355eac4ddf8fcdb9c1b05edb90d": { |
2475 | | - "en": "// Create query", |
2476 | | - "zh-CN": "// 创建查询" |
2477 | | - }, |
2478 | 2482 | "b0b280a5cca8bfb1357e1ba38e80c6872926c538": { |
2479 | 2483 | "en": "/**\n * A calculator class\n */", |
2480 | 2484 | "zh-CN": "/**\n * 一个计算器类\n */" |
|
2611 | 2615 | "en": "// Apply Mode (EN -\u003e ZH)", |
2612 | 2616 | "zh-CN": "// 应用模式 (EN -\u003e ZH)" |
2613 | 2617 | }, |
| 2618 | + "ba454cf85b190b52a07fa730b759907c0db41f98": { |
| 2619 | + "en": "// extractComments extracts comments from the parse tree", |
| 2620 | + "zh-CN": "// extractComments 从语法树中提取注释" |
| 2621 | + }, |
2614 | 2622 | "baac245448732d3431de11bfcbf5cefeae29cc51": { |
2615 | 2623 | "en": "// OR I update the test to generate IDs and put them in store.", |
2616 | 2624 | "zh-CN": "// 或者我更新测试以生成ID并将它们存储起来。" |
|
2935 | 2943 | "en": "// The smacker/go-tree-sitter javascript grammar usually handles JSX.", |
2936 | 2944 | "zh-CN": "// The smacker/go-tree-sitter javascript grammar usually handles JSX." |
2937 | 2945 | }, |
2938 | | - "cdbceab78c4d9094110be7dd1eb20c5de89dcb39": { |
2939 | | - "en": "// extractComments extracts comments from the parse tree", |
2940 | | - "zh-CN": "// extractComments 从语法树中提取注释" |
2941 | | - }, |
2942 | 2946 | "ce1eac4e2ce4747154ed445911623102b8260d44": { |
2943 | 2947 | "en": "// Override at build time via -ldflags \"-X main.version=\u003cversion\u003e\"", |
2944 | 2948 | "zh-CN": "// 通过 -ldflags 参数在构建时覆盖,例如:-X main.version=\u003c版本\u003e" |
|
3107 | 3111 | "en": "// c.SourceText is EN", |
3108 | 3112 | "zh-CN": "// c.SourceText 是 EN" |
3109 | 3113 | }, |
3110 | | - "da979dcb9aaf1d8c472ba49e26590c901eb5aa3c": { |
3111 | | - "en": "// Parse the symbol path", |
3112 | | - "zh-CN": "// 解析符号路径" |
3113 | | - }, |
3114 | 3114 | "daaafcd2f090cf4bf63fbf85cb2f16d690521885": { |
3115 | 3115 | "en": "// 3. Execute CLI: codei18n scan --file simple.go --format json", |
3116 | 3116 | "zh-CN": "// 3. 执行 CLI: codei18n scan --file simple.go --format json" |
|
3143 | 3143 | "en": "// 2. Install hook", |
3144 | 3144 | "zh-CN": "// 2. 安装钩子" |
3145 | 3145 | }, |
3146 | | - "dd43ecf8cf35aa31bb85b3818d494207c32c3923": { |
3147 | | - "en": "// Parse the provided Java source code and extract comments", |
3148 | | - "zh-CN": "// Parse 解析提供的 Java 源代码并提取注释" |
3149 | | - }, |
3150 | 3146 | "dd5e5dec26681ea7a848b8c70bb2f9f9ff63740e": { |
3151 | 3147 | "en": "// MappingStore defines the interface for managing mapping files", |
3152 | 3148 | "zh-CN": "// MappingStore 定义了管理映射文件的接口" |
|
3159 | 3155 | "en": "// GetBinaryPath returns the path to the pre-built binary", |
3160 | 3156 | "zh-CN": "// GetBinaryPath 返回预构建二进制文件的路径" |
3161 | 3157 | }, |
3162 | | - "de82f58f582b27517dd8dce56fc11c5d3a3ff2ac": { |
3163 | | - "en": "// Use Tree-sitter to parse Java source code and extract comments and their context", |
3164 | | - "zh-CN": "// 使用 Tree-sitter 解析 Java 源代码并提取注释及其上下文" |
3165 | | - }, |
3166 | 3158 | "debbc2c39bb4e12e07cc2f2a1f0e46bc4604cb04": { |
3167 | 3159 | "en": "// Simulate content converted to Chinese.", |
3168 | 3160 | "zh-CN": "// 模拟已转换为中文的内容" |
|
3203 | 3195 | "en": "// 6. Block comment (lines 9-10)", |
3204 | 3196 | "zh-CN": "// 6. 块注释 (第 9-10 行)" |
3205 | 3197 | }, |
| 3198 | + "e0f10e7d998a9fb9b1263ab4e95ae267bc84ee39": { |
| 3199 | + "en": "// If src is nil, read the source code from the file path.", |
| 3200 | + "zh-CN": "// 如果 src 为 nil,则从文件路径读取源代码" |
| 3201 | + }, |
3206 | 3202 | "e164f3d80351c71e1b31b93b14b1c1d0b3e7db61": { |
3207 | 3203 | "en": "// RustContent includes Rust-specific doc comments", |
3208 | 3204 | "zh-CN": "// RustContent 包括 Rust 特定的文档注释" |
|
3299 | 3295 | "en": "// We can try to unmarshal it", |
3300 | 3296 | "zh-CN": "// 我们可以尝试去解压它" |
3301 | 3297 | }, |
| 3298 | + "e6a63c8cf78cb605c9562dd172d349f180ab3ddc": { |
| 3299 | + "en": "// First, extract the package name", |
| 3300 | + "zh-CN": "// 首先提取包名" |
| 3301 | + }, |
3302 | 3302 | "e6c90d3b5fb921d594c253cf957f48bb8f14edbe": { |
3303 | 3303 | "en": "// Find comment, get translation, replace.", |
3304 | 3304 | "zh-CN": "// 查找注释,获取翻译,替换。" |
|
3483 | 3483 | "en": "// Fallback to parent if no sibling found (orphaned doc comment)", |
3484 | 3484 | "zh-CN": "// 如果未找到兄弟节点,则回退到父节点 (孤立文档注释)" |
3485 | 3485 | }, |
3486 | | - "f30b8a8353464e1f1e44ee40882c2466bb75e350": { |
3487 | | - "en": "// NewAdapter creates a new Java adapter instance", |
3488 | | - "zh-CN": "// NewAdapter 创建一个新的 Java 适配器实例" |
3489 | | - }, |
3490 | 3486 | "f33451ac345da8d60c1fcd06bc93aff01b04fdc3": { |
3491 | 3487 | "en": "// +1 for newline", |
3492 | 3488 | "zh-CN": "// +1 for newline" |
|
3591 | 3587 | "en": "// Common parser behavior: \"Line 1\" and \"Line 2\" are separate unless doc comment.", |
3592 | 3588 | "zh-CN": "// 常见解析器行为: \"Line 1\" 和 \"Line 2\" 在没有文档注释的情况下才被视为单独的行。" |
3593 | 3589 | }, |
| 3590 | + "fa608a87b5074f1740c59ab495c58a5824c2b474": { |
| 3591 | + "en": "// Use Tree-sitter to parse Java source code and extract comments and their context", |
| 3592 | + "zh-CN": "// 使用 Tree-sitter 解析 Java 源代码并提取注释及其上下文" |
| 3593 | + }, |
3594 | 3594 | "faff98fb150ad1d7d04ffd884e616aa21500a3b4": { |
3595 | 3595 | "en": "// queryTS is a tree-sitter query to find comments in TypeScript/JavaScript", |
3596 | 3596 | "zh-CN": "// queryTS 是一个 tree-sitter 查询,用于查找 TypeScript/JavaScript 中的注释" |
|
0 commit comments