{"id":38603952,"url":"https://github.com/sauntor/stranslator","last_synced_at":"2026-01-17T08:36:14.382Z","repository":{"id":57726207,"uuid":"87830500","full_name":"sauntor/stranslator","owner":"sauntor","description":"A most lightweight library for translating you application to the local languages.","archived":false,"fork":false,"pushed_at":"2017-04-12T13:32:14.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-15T05:36:00.607Z","etag":null,"topics":["internalization","localization","scala-i18n","scala-l10n"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sauntor.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-04-10T16:00:31.000Z","updated_at":"2017-04-11T15:14:59.000Z","dependencies_parsed_at":"2022-09-17T14:31:33.147Z","dependency_job_id":null,"html_url":"https://github.com/sauntor/stranslator","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/sauntor/stranslator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauntor%2Fstranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauntor%2Fstranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauntor%2Fstranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauntor%2Fstranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sauntor","download_url":"https://codeload.github.com/sauntor/stranslator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sauntor%2Fstranslator/sbom","scorecard":{"id":801821,"data":{"date":"2025-08-11","repo":{"name":"github.com/sauntor/stranslator","commit":"457137bf225f553c7b71802828618fd2be3585bb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T10:42:36.082Z","repository_id":57726207,"created_at":"2025-08-23T10:42:36.082Z","updated_at":"2025-08-23T10:42:36.082Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28504368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["internalization","localization","scala-i18n","scala-l10n"],"created_at":"2026-01-17T08:36:13.867Z","updated_at":"2026-01-17T08:36:14.368Z","avatar_url":"https://github.com/sauntor.png","language":"Scala","readme":"# Stranslator\nA most lightweight library for translating you application to the local languages.\n\n### The XML format for translation file\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003ctranslator\u003e\n    \u003cmessage\u003e\n        \u003cfrom\u003eThis is the original message!\u003c/from\u003e\n        \u003cto\u003e\n            \u003c!-- the translation for chinese --\u003e\n            \u003czh\u003e这是原始文本！\u003c/zh\u003e\n            \u003c!-- the translation for traditional chinese(Hong Kong) --\u003e\n            \u003czh_HK\u003e這是原始文本！\u003c/zh_HK\u003e\n        \u003c/to\u003e\n    \u003c/message\u003e\n\u003c/translator\u003e\n```\n### Usage\n1. Add `Stranslator` to your project\n```sbtshell\nlibraryDependencies += \"com.lingcreative\" %% \"stranslator\" % \"1.1.0\"\n```\n\n2. Code sample\n```scala\nimport translator._\n\nval translator = Translator()\nval locale = new Locale(\"zh\", \"CN\")\nimplicit val context = SimpleTranslatorContext(translator, Seq(locale))\n\nval welcome = ${\"Hello, Sauntor! Welcome to China!\"}\n```\nIf you create a translation file which is located in `l10n/translator.xml`(within the class path) with the flowing content:\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003ctranslator\u003e\n    \u003cmessage\u003e\n        \u003cfrom\u003eHello, Sauntor! Welcome to China!\u003c/from\u003e\n        \u003cto\u003e\n            \u003czh_CN\u003e适然，你好！欢迎来到中国！\u003c/zh_CN\u003e\n        \u003c/to\u003e\n    \u003c/message\u003e\n\u003c/translator\u003e\n```\nThe `welcome` would be:\n`适然，你好！欢迎来到中国！`\n###### Notice\n1. the line feed(`\\n`) after the beginning and before the ending tag of `from`, `locale`s  (in `to` tag, i.e. `locale` stands for `\u003czh_CN\u003e` and `\u003c/zh_CN\u003e`), will be ignored.\n2. you can break one line into multiple lines by putting an `\\ ` to the end of the line(and the leading space is ignored and the space after `\\ ` will be preserved).\nFor example:\n```xml\n\u003ctranslator\u003e\n    \u003cmessage\u003e\n        \u003cfrom\u003e\n            Hello, \\\n            Jack! I'm waiting \\\n            for you!\n        \u003c/from\u003e\n        \u003cto\u003e\n            \u003czh\u003e捷克，你来了。\\\n            我已经等你好久了！\n            \u003c/zh\u003e\n        \u003c/to\u003e\n    \u003c/message\u003e\n\u003c/translator\u003e\n```\nThe code above is equal to:\n```xml\n\u003ctranslator\u003e\n    \u003cmessage\u003e\n        \u003cfrom\u003eHello, Jack! I'm waiting for you!\u003c/from\u003e\n        \u003cto\u003e\u003czh\u003e捷克，你来了。我已经等你好久了！\u003c/zh\u003e\u003c/to\u003e\n    \u003c/message\u003e\n\u003c/translator\u003e\n```\n3. The default location to load translations from is `l10n/translator.xml`, i.e.\n```scala\nval translator = Translator()\n```\nIs equal to:\n```scala\nval translator = Translator(\"cp://l10n/translator.xml\")\n// Or to this:\n//val translator = Translator(\"l10n/translator.xml\")\n```\n4. You can `include` another xml for translations by `\u003cinclude\u003e`tag :\n```xml\n\u003ctranslator\u003e\n    \u003cinclude\u003ehttp://example.com:9000/some/app/l10n/translations.xml\u003c/include\u003e\n\u003c/translator\u003e\n```\n\u003e The `\u003cinclude\u003e` tag **does not** support **relative path**, i.e. you can't include a resource like `../some/other/module.xml`.\n\n### About the `stranslator.Translator`\nIt's the core API for translating. You can initialize it with an URL. An class path resource will start with \"cp://\" (no prefix is identical to it too),\nor an external resource on a **Web Server** with the corresponding uri pattern(i.e. http://example.com/l10n/demo-app.xml).\n\n### Enjoy it! :tea:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauntor%2Fstranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsauntor%2Fstranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsauntor%2Fstranslator/lists"}