{"id":17965037,"url":"https://github.com/tkyshm/goi18n-parser","last_synced_at":"2026-05-01T14:33:19.094Z","repository":{"id":57607221,"uuid":"82651444","full_name":"tkyshm/goi18n-parser","owner":"tkyshm","description":"Creating go-i18n JSON file by parsing your go source code","archived":false,"fork":false,"pushed_at":"2017-03-28T08:07:37.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T19:45:25.154Z","etag":null,"topics":["ast","go","golang","i18n","json"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkyshm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-21T07:47:15.000Z","updated_at":"2020-01-17T03:08:49.000Z","dependencies_parsed_at":"2022-08-30T08:51:46.756Z","dependency_job_id":null,"html_url":"https://github.com/tkyshm/goi18n-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tkyshm/goi18n-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fgoi18n-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fgoi18n-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fgoi18n-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fgoi18n-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkyshm","download_url":"https://codeload.github.com/tkyshm/goi18n-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkyshm%2Fgoi18n-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32501399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","go","golang","i18n","json"],"created_at":"2024-10-29T12:09:54.587Z","updated_at":"2026-05-01T14:33:19.074Z","avatar_url":"https://github.com/tkyshm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/tkyshm/goi18n-parser.svg?branch=master)](https://travis-ci.org/tkyshm/goi18n-parser)\n\n# goi18n-parser\n\nNote: Please check [go-i18n](https://github.com/nicksnyder/go-i18n) before to use this package.\n\n## Usage\n\nvery simple!\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"goi18np\"\n    \"encoding/json\"\n)\n\nfunc main() {\n    a := goi18np.Analyzer{\n        Debug: true,\n    }\n    result := a.AnalyzeFromFile(\"path/to/code.go\")\n\n    out, err := json.Marshal(result)\n    if err != nil {\n        panic(err)\n    }\n\n    fmt.Println(string(out))\n\n    a.SaveJSON(\"path/to/translate.json\")\n}\n\n```\n\n## Analyzer\n\nAnalyzer has fields:\n\nname     | type            | description\n-------- | --------------- | ----------------------------------------------\nFuncName | string          | Analyze target function name\nDebug    | bool            | If true, exec `ast.Print` for go source codes\nRecords  | []I18NRecord    | Analysis result with `FuncName`\n\nyou can analyze such as the following code:\n\n```go\nfmt.Println(T(\"message_uniq_key\"))\nfmt.Println(SomeStruct.T(\"message_uniq_key\"))\n```\n\nIf you want to parse other function names, please fill `FuncName`:\n\n```go\na := Analyzer{\n    FuncName: \"Translation\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkyshm%2Fgoi18n-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkyshm%2Fgoi18n-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkyshm%2Fgoi18n-parser/lists"}