{"id":20757403,"url":"https://github.com/hetznercloud/ngx-translate-mock","last_synced_at":"2025-04-29T23:29:41.093Z","repository":{"id":34448482,"uuid":"178011596","full_name":"hetznercloud/ngx-translate-mock","owner":"hetznercloud","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-15T02:48:26.000Z","size":1004,"stargazers_count":9,"open_issues_count":8,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-26T02:52:07.224Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hetznercloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-03-27T14:29:58.000Z","updated_at":"2025-01-14T10:51:50.000Z","dependencies_parsed_at":"2023-12-15T03:41:36.082Z","dependency_job_id":"7a55676b-4f47-4f74-9442-2dee1048f93a","html_url":"https://github.com/hetznercloud/ngx-translate-mock","commit_stats":{"total_commits":25,"total_committers":7,"mean_commits":"3.5714285714285716","dds":0.6799999999999999,"last_synced_commit":"3041ee10894dfb4b391ffcd9aa4cbefa457b2781"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fngx-translate-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fngx-translate-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fngx-translate-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fngx-translate-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hetznercloud","download_url":"https://codeload.github.com/hetznercloud/ngx-translate-mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599329,"owners_count":21615507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-17T09:42:04.083Z","updated_at":"2025-04-29T23:29:41.064Z","avatar_url":"https://github.com/hetznercloud.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NgxTranslateMock\n\n[![npm version](https://badge.fury.io/js/@hetznercloud%2Fngx-translate-mock.svg)](https://badge.fury.io/js/@hetznercloud%2Fngx-translate-mock)\n\nThis packages provides a mock module for [ngx-translate](https://github.com/ngx-translate/core).\nIt includes mocks for the `TranslateService`, the `TranslateDirective` and the `TranslatePipe`.\nNot all methods of the service have been mocked yet, feel free to open a pull-request.\n\n## How to use\n\nImport the module in your `TestBed` testing module.\n\n```ts\nimport { TestBed } from '@angular/core/testing';\nimport { TranslateMockModule } from '@hetznercloud/ngx-translate-mock';\n\nTestBed.configureTestingModule({\n  imports: [TranslateMockModule],\n});\n```\n\n### TranslateMockDirective, TranslateMockPipe\n\nWith this module you can also get reliable (snapshot) test results and check whether the translation string was correct or not.\nTo do this the directive and pipe append `-i18n` to the translation string:\n\n```html\n\u003cp\u003eMY.TRANSLATION.STRING-i18n\u003c/p\u003e\n```\n\n### TranslateServiceMock\n\nThe `TranslateServiceMock` acts similar to the real service. For example,\n`use()` emits `onLangChange`, or `get` returns the passed in translation string with `-i18n` appended.\n\n## License\n\nMIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhetznercloud%2Fngx-translate-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhetznercloud%2Fngx-translate-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhetznercloud%2Fngx-translate-mock/lists"}