fbt

A JavaScript Internationalization Framework

Github星跟踪图

FBT is an internationalization framework for JavaScript designed to be not just powerful and flexible, but also simple and intuitive. It helps with the following:

  • Organizing your source text for translation
  • Composing grammatically correct translatable UI
  • Eliminating verbose boilerplate for generating UI

Examples

See our demo here

Requirements

Building the fbt library

git clone git@github.com:facebookincubator/fbt.git
cd fbt
yarn install

NOTE: if you make changes to the fbt runtime that you'd like to
test in the demo-app, be sure to run this command to rebuild the JS code:

yarn build-runtime

Using fbt

See how to use the source directly with Babel and Webpack in our demo-app.

How FBT works

FBT works by transforming your <fbt> and fbt(...) constructs via
Babel plugins. These plugins serve to extract strings from source and
lookup translated payloads generated at build-time. FBT creates tables
of all possible variations for the given fbt phrase and accesses this
at runtime.

Full documentation

https://facebookincubator.github.io/fbt

Join the fbt community

See the CONTRIBUTING file for how to help out.

Change log

See CHANGELOG.

List of npm modules published from this repo:

How to release a new npm version

# Go to the module's folder (where package.json is located)
cd fbt-runtime/
# or
# cd packages/babel-plugin-fbt/
# cd packages/babel-plugin-runtime/

# publishes to npm and push new git tag to Github
yarn publish_to_npm_latest

License

FBT is MIT licensed, as found in the LICENSE file.

主要指标

概览
名称与所有者facebook/fbt
主编程语言JavaScript
编程语言JavaScript (语言数: 9)
平台
许可证MIT License
所有者活动
创建于2018-08-01 17:39:49
推送于2024-11-14 00:04:17
最后一次提交
发布数101
最新版本名称fbt-v1.0.2 (发布于 )
第一版名称fbt-v0.10.0 (发布于 2019-09-03 18:26:40)
用户参与
星数3.9k
关注者数45
派生数179
提交数1.3k
已启用问题?
问题数103
打开的问题数33
拉请求数17
打开的拉请求数24
关闭的拉请求数223
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?