{"id":22831506,"url":"https://github.com/phrase/angular-phrase","last_synced_at":"2025-04-23T19:43:36.612Z","repository":{"id":14988614,"uuid":"17713854","full_name":"phrase/angular-phrase","owner":"phrase","description":"Angular JS adapter for Phrase","archived":false,"fork":false,"pushed_at":"2024-04-08T12:07:29.000Z","size":1436,"stargazers_count":17,"open_issues_count":7,"forks_count":4,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-13T08:18:26.758Z","etag":null,"topics":["angularjs","i18n","l10n","localization","phraseapp","translation"],"latest_commit_sha":null,"homepage":"https://phrase.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"saltstack-formulas/ntp-formula","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phrase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-03-13T14:58:50.000Z","updated_at":"2021-11-02T10:40:07.000Z","dependencies_parsed_at":"2023-12-05T17:44:39.347Z","dependency_job_id":null,"html_url":"https://github.com/phrase/angular-phrase","commit_stats":{"total_commits":77,"total_committers":15,"mean_commits":5.133333333333334,"dds":0.6233766233766234,"last_synced_commit":"be6f47a4f564b041ec53783c6616f554b13f6e1e"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fangular-phrase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fangular-phrase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fangular-phrase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Fangular-phrase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phrase","download_url":"https://codeload.github.com/phrase/angular-phrase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250501404,"owners_count":21441022,"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":["angularjs","i18n","l10n","localization","phraseapp","translation"],"created_at":"2024-12-12T20:26:16.569Z","updated_at":"2025-04-23T19:43:36.596Z","avatar_url":"https://github.com/phrase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-phrase\n\n![Build status](https://github.com/phrase/angular-phrase/workflows/Test/badge.svg)\n\nangular-phrase is an addon for [angular-translate](https://github.com/angular-translate/angular-translate) that lets you connect localized AngularJS applications to the Phrase In-Context Editor.\n\n## Prerequisites\n\nTo use angular-phrase with your application you have to:\n\n* Sign up for a Phrase account: [https://phrase.com/en/signup](https://phrase.com/en/signup)\n* Use the excellent [angular-translate](https://github.com/angular-translate/angular-translate) module by Pascal Precht for localization in your AngularJS app\n\n## Installation\n\n### via NPM:\n\n    npm install angular-phrase\n\n### via YARN:\n\n    yarn add angular-phrase\n\n(or download it manually from the `dist` folder)\n\n### Build form source\n\nYou can also build it directly from source to get the latest and greatest:\n\n    npm build\n\n### Add the module\n\nAdd angular-phrase module to your existing AngularJS application _after_ loading the `angular-translate` module:\n\n\tconst myApp = angular.module(\"myApp\", ['pascalprecht.translate', 'phrase'])\n\n### Configure\n\nConfigure the module:\n\n\tmyApp.value(\"phraseProjectId\", \"YOUR-PROJECT-ID\");\n\tmyApp.value(\"phraseEnabled\", true);\n\tmyApp.value(\"phraseDecoratorPrefix\", \"{{__\");\n\tmyApp.value(\"phraseDecoratorSuffix\", \"__}}\");\n\nYou can find the Project-ID in the Project overview in the Phrase Translation Center\n\n### JavaScript snippet\n\nAdd the `phrase-javascript` directive within your application, usually best within the `\u003chead\u003e`:\n\n    \u003cphrase-javascript\u003e\u003c/phrase-javascript\u003e\n\nIf this does not work for you, you can also integrate the [JavaScript snippet manually](https://help.phrase.com/en/articles/2183908-integrate-in-context-editor-into-any-web-framework/).\n\n## How does it work?\n\nOnce the module is enabled it will:\n\n* override the $translate service and provide placeholders that can be picked up by the Phrase [In-Context Editor](https://phrase.com/features)\n\n* fetch the JavaScript application used to render the In-Context Editor on top of your application\n\n## Using AngularJS with phraseapp-in-context-editor-ruby gem or any other server side technology\n\nIf you use the angular-phrase plugin in combination with the phraseapp-in-context-editor-ruby gem or another server side technology that enables the In-Context Editor, AngularJS might have problems if you use curly braces as the decorator suffix/prefix since AngularJS thinks that youre decoratated keys are AngularJS directives (which is not the case).\n\nYou can easily solve this issue by using a different decorator syntax for your setup:\n\n#### angular-phrase configuration\n\n    app.value(\"phraseDecoratorPrefix\", \"[[__\");\n    app.value(\"phraseDecoratorSuffix\", \"__]]\");\n\n#### phraseapp-in-context-editor-ruby gem configuration\n\n    PhraseApp::InContextEditor.prefix = \"[[__\"\n    PhraseApp::InContextEditor.suffix = \"__]]\"\n\n#### JavaScript configuration\n\n    window.PHRASEAPP_CONFIG = {\n      prefix: '[[__',\n      suffix: \"__]]\"\n    }\n\n*This is only necessary if you're not using the phraseJavascript` directive*\n\n## TODO\n\n* [x] Add support for `translate` filter\n* [x] Add support for `translate` directive\n* [ ] Add support for interpolation values\n\n\n## Test\n\nRun unit tests using Karma with webpack:\n\n    npm test\n\n## Get help / support\n\nPlease contact [support@phrase.com](mailto:support@phrase.com?subject=[GitHub]%20) and we can take more direct action toward finding a solution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrase%2Fangular-phrase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphrase%2Fangular-phrase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrase%2Fangular-phrase/lists"}