Available Forms:
- Community Reporting Form
- Medical Centers Form
- Passengers / Port-of-Entry Form
Community Form | Community i18n |
---|---|
Overview:
- Mobile first
- Internationalization Support
- Common Form Utilities
- Environment Configuration
# first time - install all dependencies
$ yarn install
# start the server
$ yarn local
Use storybook to develop components in isolation (see *.story.js
files under src/components
).
# start storybook
$ yarn storybook
- API calls live at the bottom of
src/api/index.js
- Clone API Gateway repo and follow directions to start the API locally.
- State is managed using mobx library (see
src/modules/resource/LanguageStore.js
). - See
src/controllers/Community.js
for usage.
- Represents a page in the application
- Mapped to a route - see
App.js
- Have access to
react-router-dom
propertiesmatch
,history
andlocation
- Create the form component under
src/components
(seesrc/components/CommunityForm.js
) - Create a page under
src/containers
(seesrc/containers/Community.js
) - Map your page to a route in
src/core/App.js
- Add a new language pack by duplicating
src/modules/lang/phrases_en.js
- Import and map new language in
src/modules/lang/lang-util.js
- To add a new language, copy the
src/config/lang-phrases/phrases_en.js
- Rename the copied file to
src/config/lang-phrases/phrases_xx.js
- Translate the phrases to the language of your choice (xx).
- Import the new file to
src/modules/lang/lang-util.js
.import xx from "../../config/lang-phrases/phrases_xx"
- Add the new lanauges to supportedLanguages list
src/modules/lang/lang-util.js
am: { pack: am, name: "amharic" }, xx : { pack: xx, name: "newLanguage" }
- Make sure
newLanguage
is in the list of phrases inlanguage
src/modules/lang/phrases_xx.js
- To add support for more languages for calendar, we use moment.js
- For languages
moment.js
does not support, one can add support usingmoment.defineLocale()
. See the example insrc/config/lang-phrases/moment-am.js
, where Amharic support was added.
- Change the values in
src/config/address_schema_locale.js
- Add the translation for the new labels in
src/config/lang-phrases/phrases_en.js
and any other language translation that you have
TODO
Thanks goes to these wonderful people (emoji key):
antxaddis 💻 |
Sole 💻 |
Beakal Teshome 💻 |
Ermias Bunaro 💻 |
menilik belay 💻 |
Eyosiyas Tadele 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!