{"id":43687826,"url":"https://github.com/NathanWalker/nativescript-ng2-translate","last_synced_at":"2026-02-16T13:01:55.820Z","repository":{"id":142263000,"uuid":"53520573","full_name":"NathanWalker/nativescript-ng2-translate","owner":"NathanWalker","description":"Use ng2-translate with NativeScript + Angular2.","archived":false,"fork":false,"pushed_at":"2017-01-07T04:31:18.000Z","size":1754,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-01T09:56:22.140Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/NathanWalker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-09T18:18:34.000Z","updated_at":"2019-09-30T09:32:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9a59741-c0d3-4d79-8b27-6a828125cf23","html_url":"https://github.com/NathanWalker/nativescript-ng2-translate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NathanWalker/nativescript-ng2-translate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ng2-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ng2-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ng2-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ng2-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NathanWalker","download_url":"https://codeload.github.com/NathanWalker/nativescript-ng2-translate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanWalker%2Fnativescript-ng2-translate/sbom","scorecard":{"id":99172,"data":{"date":"2025-08-11","repo":{"name":"github.com/NathanWalker/nativescript-ng2-translate","commit":"c79001e78617c4f44f9e93ab5ad2834f76c8f14b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"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":"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":"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":"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":1,"reason":"Found 1/8 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T09:46:37.848Z","repository_id":142263000,"created_at":"2025-08-15T09:46:37.848Z","updated_at":"2025-08-15T09:46:37.848Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29508735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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":[],"created_at":"2026-02-05T03:00:21.768Z","updated_at":"2026-02-16T13:01:55.815Z","avatar_url":"https://github.com/NathanWalker.png","language":"JavaScript","funding_links":[],"categories":["Awesome {N} [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Table of Contents"],"readme":"[![Angular 2 Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://github.com/mgechev/angular2-style-guide)\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![Dependency Status](https://david-dm.org/preboot/angular2-library-seed/status.svg)](https://david-dm.org/preboot/angular2-library-seed#info=dependencies) [![devDependency Status](https://david-dm.org/preboot/angular2-library-seed/dev-status.svg)](https://david-dm.org/preboot/angular2-webpack#info=devDependencies)\n\n## NOTE\n\nThis plugin is no longer needed to make [ng2-translate](https://github.com/ocombe/ng2-translate) work with NativeScript. Instead you can use it as normal following this as a guide to set it up:\n\nhttps://github.com/NathanWalker/nativescript-ng2-translate/issues/5#issuecomment-257606661\n\n\n* [Install](#install)\n* [Usage](#usage)\n* [Why the `TNS` prefixed name?](#why-the-tns-prefixed-name)\n* [Accolades](#accolades)\n\n## Install\n\n```\nnpm install nativescript-ng2-translate --save\n```\n\n## Usage\n\n#### 1. Add locale translation files\n\nYou can create these anywhere in your app but let's say you create an `assets` folder and in that an `i18n` folder so:\n\n* `app/assets/i18n` folder\n\nThen in there, create translation files, for example:\n\n* `en.json` (English):\n```\n{\n  \"HOME\": \"Home\"\n}\n```\n\n* `es.json` (Spanish):\n```\n{\n  \"HOME\": \"Casa\"\n}\n```\n\n#### 2. Setup NativeScript/Angular\n\n* `app.ts`:\n\n```\nimport {nativeScriptBootstrap} from 'nativescript-angular/application';\n\n// angular\nimport {Component, provide} from 'angular2/core';\nimport {HTTP_PROVIDERS} from 'angular2/http';\n\n// libs\nimport {TranslateLoader, TranslateService, TranslatePipe} from 'ng2-translate/ng2-translate';\nimport {TNSTranslateLoader} from 'nativescript-ng2-translate/nativescript-ng2-translate';\n\n@Component({\n  selector: 'app',\n  template: `\n  \u003cStackLayout\u003e\n    \u003cLabel [text]=\"'HOME' | translate\"\u003e\u003c/Label\u003e\n  \u003c/StackLayout\u003e\n  `,\n  pipes: [TranslatePipe]\n})\nclass TestComponent {}\n\nnativeScriptBootstrap(TestComponent, [\n  HTTP_PROVIDERS,\n  provide(TranslateLoader, {\n    useFactory: () =\u003e {\n      // pass in the path to your locale files\n      return new TNSTranslateLoader('assets/i18n');\n    }\n  }),\n  TranslateService\n]);\n```\n\n## Why the TNS prefixed name?\n\n`TNS` stands for **T**elerik **N**ative**S**cript\n\niOS uses classes prefixed with `NS` (stemming from the [NeXTSTEP](https://en.wikipedia.org/wiki/NeXTSTEP) days of old):\nhttps://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/\n\nTo avoid confusion with iOS native classes, `TNS` is used instead.\n\n## Accolades\n\n* Project using this library [angular2-seed-advanced](https://github.com/NathanWalker/angular2-seed-advanced)\n* [Olivier Combe's ng2-translate library](https://github.com/ocombe/ng2-translate)\n\n## Tutorials\n\nNeed more help getting started?  Check out these Angular Translate tutorials for NativeScript Android and iOS applications.\n\n* [Angular Translate in a NativeScript Angular Application](https://www.thepolyglotdeveloper.com/2017/01/internationalization-nativescript-mobile-app-angular/)\n\n# License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNathanWalker%2Fnativescript-ng2-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNathanWalker%2Fnativescript-ng2-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNathanWalker%2Fnativescript-ng2-translate/lists"}