Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-intl-phraseapp

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intl-phraseapp

The In-Context-Editor for react using react-intl

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-52.46%
Maintainers
1
Weekly downloads
 
Created
Source

react-intl-phraseapp

Build Status

react-intl-phraseapp is an addon for react-intl that lets you connect localized react applications to the PhraseApp In-Context Editor.

Prerequisites

To use react-intl-phraseapp with your application you have to:

Demo

You can find a demo project on GitHub.

Installation

via NPM:

npm install react-intl-phraseapp

Build from source

You can also build it directly from source to get the latest and greatest:

npm run dist

Development

npm install

Configure

let config = {
  projectId: '<YOUR_PROJECT_ID>',
  phraseEnabled: true,
  prefix: "[[__",
  suffix: "__]]",
  fullReparse: true
};

You can find the Project-ID in the Project overview in the PhraseApp Translation Center

JavaScript snippet

Add the following snippet to your react app.

import {initializePhraseAppEditor} from 'react-intl-phraseapp'

let config = {
  projectId: '<YOUR_PROJECT_ID>',
  phraseEnabled: true,
  prefix: "[[__",
  suffix: "__]]",
  fullReparse: true
};

initializePhraseAppEditor(config);

If this does not work for you, you can also integrate the JavaScript snippet manually.

Import from react-intl-phrasapp rather than from react-intl

Find all imports of FormattedMessage, FormattedHTMLMessage and change the source from react-intl to react-intl-phrasapp.

import {FormattedMessage} from 'react-intl-phraseapp'

Browser support

This library might not work out of the box for some older browser or IE11. We recommend to add Babel to the build pipeline if those browser need to be supported.

How does it work?

The library inherits common components of the react-intl packages. In case you enabled PhraseApp by calling initializePhraseAppEditor the behaviour of the components will be changed.

Support

Question? Contact us at: phraseapp.com/contact

Issue? use GitHub issues and share the problem

Test

Run unit tests using jest:

npm test

Keywords

FAQs

Package last updated on 09 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc