Giter Club home page Giter Club logo

fbt's Introduction

Travis CI Twitter Follow Discord Chat Facebook Group

FBT

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 See our React Native demo here

Requirements

Building the fbt library

git clone [email protected]:facebook/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://facebook.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.

fbt's People

Contributors

aaronabramov avatar aclave1 avatar adamjernst avatar adamramberg avatar alp avatar analisanazari avatar aralroca avatar david-cho-lerat-hl2 avatar davidsnider avatar dependabot[bot] avatar dsainati1 avatar fantazic76 avatar gkz avatar jamestran avatar jbrown215 avatar jrwats avatar kayhadrin avatar kazuya93 avatar logandaniels avatar miorel avatar mitoyarzun avatar pakoito avatar retyui avatar rubennorte avatar samwgoldman avatar sibelius avatar singhalavi avatar toolness avatar tychota avatar yangshun avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.