All Projects → akameco → extract-react-intl

akameco / extract-react-intl

Licence: MIT license
Extract react-intl messages

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to extract-react-intl

Extract React Intl Messages
extract react intl messages
Stars: ✭ 174 (+866.67%)
Mutual labels:  i18n, extract, messages
i18n
Minimalist gettext style i18n for JavaScript
Stars: ✭ 14 (-22.22%)
Mutual labels:  i18n, react-intl
storybook-addon-intl
Addon to provide a locale switcher and react-intl for storybook
Stars: ✭ 84 (+366.67%)
Mutual labels:  i18n, react-intl
mobx-react-intl
A connector between mobx-react and react-intl
Stars: ✭ 32 (+77.78%)
Mutual labels:  i18n, react-intl
inlang
Open Source Localization Solution for Software.
Stars: ✭ 160 (+788.89%)
Mutual labels:  i18n
Movie-Paradise
A responsive movie preview web app
Stars: ✭ 19 (+5.56%)
Mutual labels:  i18n
oojs-ui
OOUI is a modern JavaScript UI library with strong cross-browser support. It is the standard library for MediaWiki and Wikipedia. This is a mirror from https://gerrit.wikimedia.org. Main website:
Stars: ✭ 45 (+150%)
Mutual labels:  i18n
nuxt-i18n-routing
Localized routing with Nuxt.js
Stars: ✭ 32 (+77.78%)
Mutual labels:  i18n
SimpleOfficeReader
A simple office file reader can extract content and summary information from .doc,.docx,.ppt,.pptx files without Microsoft Office or interop.
Stars: ✭ 54 (+200%)
Mutual labels:  extract
fbvideos
🔗 Easily extract downloadable link of publicly available videos on facebook.
Stars: ✭ 28 (+55.56%)
Mutual labels:  extract
pydantic-i18n
pydantic-i18n is an extension to support an i18n for the pydantic error messages.
Stars: ✭ 32 (+77.78%)
Mutual labels:  i18n
public
util toolkit for go.golang 通用函数包
Stars: ✭ 135 (+650%)
Mutual labels:  i18n
Angular-Gulp-Boilerplate
Clean but full-featured AngularJS boilerplate using Gulp workflow and best practices
Stars: ✭ 30 (+66.67%)
Mutual labels:  i18n
vite-vue-admin
🎉🎉使用Vite + Vue3 + TypeScript + Element-plus + Mock开发的后台管理系统🎉🎉
Stars: ✭ 97 (+438.89%)
Mutual labels:  i18n
wlc
Weblate command line client
Stars: ✭ 22 (+22.22%)
Mutual labels:  i18n
gatsby-i18n
Gatsby plugin that provides i18n support
Stars: ✭ 25 (+38.89%)
Mutual labels:  i18n
vue-element-admin-ts
vue-element-admin 的 typescript 版本
Stars: ✭ 101 (+461.11%)
Mutual labels:  i18n
tr4n5l4te
Use Google Translate without an API key.
Stars: ✭ 32 (+77.78%)
Mutual labels:  i18n
i18n
internationalize projects to Arabic
Stars: ✭ 67 (+272.22%)
Mutual labels:  i18n
grunt-assemble-i18n
Assemble middleware for adding i18n support to projects.
Stars: ✭ 25 (+38.89%)
Mutual labels:  i18n

This repo was migrated to the extract-react-intl-messages

extract-react-intl

Build Status tested with jest styled with prettier All Contributors

This package allows you to extract all messages from a glob. It will return an object with a key for each locale you pass, which in turn contains an object with the ids of each message defined by the defineMessages function of react-intl. The value of each of these keys will be an empty string, except for your defaultLocale which will be populated with the defaultMessage.

Install

$ yarn add --dev extract-react-intl

Usage

const extractReactIntl = require('extract-react-intl')

const pattern = 'app/**/*.js'
const locales = ['en', 'ja']

extractReactIntl(locales, pattern).then(result => {
  console.log(result)
  /*
{
  en:
   { 'components/App/hello': 'hello',
     'components/App/welcome': 'welcome to extract-react-intl' }
  ja:
   { 'components/App/hello': '',
     'components/App/world': '' }
}
  */
})

API

extractReactIntl(locales, pattern, [options])

Return a Promise wrapped extracted messages.

locales

Type: Array<string>

Example: ['en', 'ja']

pattern

Type: string

File path with glob.

options

Additional options.

defaultLocale

Type: string
Default: en

Set default locale for your app.

moduleSourceName

Type: string
Example: ./path/to/module
Default: react-intl

The ES6 module source name of the React Intl package. Defines from where defineMessages, <FormattedMessage /> and <FormattedHTMLMessage /> are imported.

cwd

Type: string
Default: .

You most likely don't need this.

Change run path.

Contributors

Thanks goes to these wonderful people (emoji key):

akameco
akameco

💻 📖 ⚠️ 🚇
nodaguti
nodaguti

💻 ⚠️
fix-fix
fix-fix

💻
enrique-ramirez
enrique-ramirez

📖
bradbarrow
bradbarrow

🐛 💻 ⚠️
Filip Filson Pasternak
Filip "Filson" Pasternak

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].