{"id":22831517,"url":"https://github.com/phrase/react-intl-phraseapp","last_synced_at":"2025-04-23T19:42:59.273Z","repository":{"id":37444211,"uuid":"87319005","full_name":"phrase/react-intl-phraseapp","owner":"phrase","description":"Use react-intl with Phrase In-Context Editor","archived":false,"fork":false,"pushed_at":"2024-08-21T12:31:23.000Z","size":1794,"stargazers_count":20,"open_issues_count":2,"forks_count":15,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-30T02:51:08.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://phrase.com","language":"TypeScript","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/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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-05T14:27:23.000Z","updated_at":"2024-08-21T12:31:26.000Z","dependencies_parsed_at":"2024-12-12T20:33:52.808Z","dependency_job_id":"d39ec24f-e194-4b05-b4a9-fb39053753ae","html_url":"https://github.com/phrase/react-intl-phraseapp","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Freact-intl-phraseapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Freact-intl-phraseapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Freact-intl-phraseapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phrase%2Freact-intl-phraseapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phrase","download_url":"https://codeload.github.com/phrase/react-intl-phraseapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250501320,"owners_count":21440998,"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-12-12T20:26:23.321Z","updated_at":"2025-04-23T19:42:59.252Z","avatar_url":"https://github.com/phrase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-intl-phraseapp\n\n![Build status](https://github.com/phrase/react-intl-phraseapp/workflows/Test/badge.svg)\n\n**react-intl-phraseapp** is the official library for integrating [Phrase Strings In-Context Editor](https://support.phrase.com/hc/en-us/articles/5784095916188-In-Context-Editor-Strings) with [react-intl](https://github.com/yahoo/react-intl) in your React application.\n\n## :scroll: Documentation\n\n### Prerequisites\n\nTo use react-intl-phraseapp with your application you have to:\n\n* Sign up for a Phrase account: [https://app.phrase.com/signup](https://app.phrase.com/signup)\n* Use the excellent [react-intl](https://github.com/yahoo/react-intl) module by yahoo for localization in your react app\n\n### Demo\n\nYou can find a demo project in the `examples/demo` folder, just run `yarn \u0026\u0026 yarn start`\n\n### Installation\n\n#### via NPM\n\n```bash\nnpm install react-intl-phraseapp\n```\n\n#### via Yarn\n\n```bash\nyarn add react-intl-phraseapp\n```\n\n#### Build from source\n\nYou can also build it directly from source to get the latest and greatest:\n\n```bash\nyarn dist\n```\n\n### Development\n\n```bash\n# install deps\nyarn install\n```\n\n#### Configure\n\nAdd the following JavaScript snippet to your react app.\n\n```js\nimport {initializePhraseAppEditor} from 'react-intl-phraseapp'\n\nlet config = {\n  projectId: '\u003cYOUR_PROJECT_ID\u003e',\n  accountId: '\u003cYOUR_ACCOUNT_ID\u003e',\n  phraseEnabled: true,\n  prefix: \"[[__\",\n  suffix: \"__]]\",\n  fullReparse: true\n};\n\ninitializePhraseAppEditor(config);\n```\n\nYou can find the Project-ID in the Project overview in the PhraseApp Translation Center.\nYou can find the Account-ID in the Organization page in the PhraseApp Translation Center.\n\nIf this does not work for you, you can also integrate the [JavaScript snippet manually](https://help.phrase.com/help/integrate-in-context-editor-into-any-web-framework).\n\nTo use the old version of ICE, use option `useOldICE: true` in your PHRASEAPP_CONFIG or integration options\n```js\nlet config = {\n  projectId: '\u003cYOUR_PROJECT_ID\u003e',\n  phraseEnabled: true,\n  useOldICE: true,\n};\n\ninitializePhraseAppEditor(config);\n```\n\n#### Using the US Datacenter with ICE\n\nIn addition to the settings in your config, set the US datacenter to enable it working with the US endpoints.\n```js\n  datacenter: 'us',\n```\n\n#### Import from react-intl-phraseapp rather than from react-intl\n\nFind all available imports for `react-intl` by changing the source from `react-intl` to `react-intl-phraseapp`, such as `FormattedMessage`, `useIntl`, `WrappedComponentProps`, and `injectIntl`.\n\n\n`import { FormattedMessage } from 'react-intl-phraseapp'`\n`import { useIntl, WrappedComponentProps } from 'react-intl-phraseapp'`\n`import { injectIntl, WrappedComponentProps } from 'react-intl-phraseapp'`\n\n### Browser support\n\nThis library might not work out of the box for some older browser or IE11. We recommend to add [Babel](https://github.com/babel/babel) to the build pipeline if those browser need to be supported.\n\n### How does it work\n\nThe library inherits common components of the react-intl packages. In case you enabled Phrase by calling `initializePhraseAppEditor` the behaviour of the components will be changed.\n\n### Test\n\nRun unit tests using jest:\n\n```bash\nnpm test\n```\n\n## :white_check_mark: Commits \u0026 Pull Requests\n\nWe welcome anyone who wants to contribute to our codebase, so if you notice something, feel free to open a Pull Request! However, we ask that you please use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for your commit messages and titles when opening a Pull Request.\n\nExample: `chore: Update README`\n\n## :question: Issues, Questions, Support\n\nPlease use [GitHub issues](https://github.com/phrase/react-intl-phraseapp/issues) to share your problem, and we will do our best to answer any questions or to support you in finding a solution.\n\n## :memo: Changelog\n\nDetailed changes for each release are documented in the [changelog](https://github.com/phrase/react-intl-phraseapp/releases).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrase%2Freact-intl-phraseapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphrase%2Freact-intl-phraseapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphrase%2Freact-intl-phraseapp/lists"}