Tags: youthlin/t
Tags
feat: xtemplate auto-detect template functions; DefaultPlural tolerat… …e empty msgIDPlural (#10) - xtemplate: scan all identifiers in template source and auto-register as noop functions, removing the need for mandatory -f flag - f/format.go: DefaultPlural returns msgID directly when msgIDPlural is empty, supporting source languages without plural distinction (e.g. Chinese) - translator/file.go: XN64 falls back to singular MsgStr when entry has no MsgID2 and no MsgStrN, avoiding unnecessary plural rule evaluation
feat: xtemplate auto-detect template functions; DefaultPlural tolerat… …e empty msgIDPlural (#10) - xtemplate: scan all identifiers in template source and auto-register as noop functions, removing the need for mandatory -f flag - f/format.go: DefaultPlural returns msgID directly when msgIDPlural is empty, supporting source languages without plural distinction (e.g. Chinese) - translator/file.go: XN64 falls back to singular MsgStr when entry has no MsgID2 and no MsgStrN, avoiding unnecessary plural rule evaluation
修复模板无法提取 if 内字符串问题 (#9) * fix: extract nested template translations correctly Walk control-structure nodes recursively so xtemplate can collect strings inside if/range/with branches without panicking on nil else lists, and use the local root module for reliable development testing. * refactor: polish xtemplate extraction flow Improve xtemplate's AST walking, CLI/runtime safeguards, and build ergonomics so nested template translations are extracted more reliably and the tool is easier to maintain. * 修复CI * fix(ci): align workflow Go toolchain with workspace Run coverage with the workspace Go version so GitHub Actions no longer triggers an automatic toolchain switch that can fail with missing covdata.
修复模板无法提取 if 内字符串问题 (#9) * fix: extract nested template translations correctly Walk control-structure nodes recursively so xtemplate can collect strings inside if/range/with branches without panicking on nil else lists, and use the local root module for reliable development testing. * refactor: polish xtemplate extraction flow Improve xtemplate's AST walking, CLI/runtime safeguards, and build ergonomics so nested template translations are extracted more reliably and the tool is easier to maintain. * 修复CI * fix(ci): align workflow Go toolchain with workspace Run coverage with the workspace Go version so GitHub Actions no longer triggers an automatic toolchain switch that can fail with missing covdata.
add support for template/if/range/with (#6) * add support for template/if/range/with * test * go mod
update to go1.20; pot read/sort (#4) * sort entry * update dep * pipe * go1.20 * gitee sync --------- Co-authored-by: youthlin <youthlinchen@outlook.com>
PreviousNext