This repository has been archived by the owner on May 25, 2021. It is now read-only.
forked from facebook/fbt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Give OSS a script to generate enum and src manifests for `JSFbtTableBuilder` Differential Revision: D13538875 fbshipit-source-id: a514acaf0e80bacbfba08265e8c3a622574fe9d6
- Loading branch information
1 parent
d8813e1
commit 958d62e
Showing
13 changed files
with
8,335 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
node_modules/* | ||
yarn.lock | ||
yarn-error.log | ||
|
||
demo-app/yarn-error.log | ||
demo-app/yarn.lock | ||
demo-app/.enum_manifest.json | ||
demo-app/.src_manifest.json | ||
demo-app/node_modules/* | ||
demo-app/output | ||
demo-app/source_strings.json | ||
demo-app/src/translatedFbts.json | ||
demo-app/node_modules/* | ||
demo-app/yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,39 +9,45 @@ FBT is an internationalization framework designed to be both intuitive and power | |
[See here](https://github.com/facebook/fbt) | ||
|
||
## Requirements | ||
* [node]() | ||
* yarn | ||
* babel | ||
* [node](https://nodejs.org/) | ||
* [yarn](https://yarnpkg.com/) | ||
* [babel](https://babeljs.io/) | ||
|
||
## Building fbt | ||
... | ||
``` | ||
git clone [email protected]:facebook/fbt.git; | ||
cd fbt; | ||
yarn install; | ||
``` | ||
|
||
## Installing fbt | ||
We have plans to make the transform and runtime installable as an npm package. Until then, | ||
See how to use the source directly with Babel and Webpack in our demo-app: | ||
|
||
## Installing __________ | ||
``` | ||
git clone [email protected]:facebook/fbt.git; | ||
cd fbt/demo-app; | ||
cd demo-app; # from fbt repo | ||
yarn install; | ||
yarn manifest; | ||
yarn collect-fbts; | ||
yarn translate-fbts; | ||
yarn start; | ||
``` | ||
|
||
|
||
## How fbt works | ||
## How FBT works | ||
FBT works by transforming your `<fbt>` and `fbt(...)` constructs in | ||
Babel plugins. These plugins serve to extact strings from source and | ||
lookup translate payloads generated at build-time. | ||
Babel plugins. These plugins serve to extract strings from source and | ||
lookup translate 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 __________ community | ||
## Join the fbt community | ||
* Website: https://facebook.github.io/fbt | ||
* Facebook page: m.me/sjtbf | ||
* Slack: https://fbtjs.slack.com | ||
See the CONTRIBUTING file for how to help out. | ||
|
||
## License | ||
fbt is MIT licensed, as found in the LICENSE file. | ||
FBT is MIT licensed, as found in the LICENSE file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# Babel/Webpack/React OSS FBT Demo | ||
|
||
* `yarn install` to pull in dependencies down | ||
* `yarn build` to generate static files in `./output/`. | ||
* `yarn start` to run a local server with hot reloading. | ||
* `yarn manifest` to generate enum and source manifests | ||
* `yarn collect-fbts` to collect FBT translatable texts | ||
* `yarn translate-fbts` to generate translatedFbts.js from translation_input.json | ||
* `yarn build` to generate static files in `./output/`. | ||
* The commands above are required to run this step | ||
* `yarn start` to run a local server with hot reloading. | ||
* `yarn test ./src` to run unit tests. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.