If you're interested in contributing ideas or code to Juicebox, you're in the right place!
Check out the README for instructions on running the app in development.
Start with issues labelled
good first issue
.
Create a pull request (PR) that targets the main
branch. A live Fleek preview
will be automatically deployed for each PR.
When your PR has met the #approval guidelines and is
ready for review, @mention
a codeowner and ask for a
review.
We opt for a rebase policy where the repository history is kept flat and clean. When a feature branch's development is complete, rebase/squash all the work down to the minimum number of meaningful commits.
While the work is still in progress and a feature branch needs to be brought up to date with the upstream target branch, use rebase – as opposed to pull or merge – to avoid polluting the commit history with spurious merges. Learn more about the differences between merge and rebase Git workflows.
You can rebase your feature branch with the following procedure, where
feature-branch
is the name of your branch. Further explanation of rebase and
its options can be found
here.
git checkout feature-branch
git fetch origin main
git rebase origin/main
git push --force-with-lease
Before your PR is merged, it must meet the following criteria:
- The PR follows the Git workflow and contains no merge commits.
- All CI checks pass.
- The PR is approved by at least one codeowner.
- Significant UI/UX changes are discussed by other design/dev contributors.
All changes to the main
branch will be automatically deployed via
Fleek.
Juicebox supports the following web browsers:
- Google Chrome
- Mozilla Firefox
- Chromium-based browsers (e.g. Brave Browser)
Juicebox uses Crowdin for managing translations. A GitHub workflow uploads new strings for translation to the Crowdin project whenever code using the lingui translation macros is merged into main.
Every day, translations are synced back down from Crowdin to a pull request to
main
. We then merge these PR's into main
manually.
Any strings that are added or modified in the source code should be marked for
translation. Use the t
macro or the Trans
component from the @lingui/macro
library. Learn more.
const myString = t`Example text`
<Trans>Example text</Trans>
You must extract strings in PRs. If your PR adds or modifies translated
strings, run the following command to generate new .po
files:
yarn i18n:extract
For details of how to contribute as a translator, see our How to become a Juicebox translator Notion page.
-
Add the locale code, english name, and short and long alias's to
constants/languages/language-options.ts
.export const Languages: Language = { en: { code: 'en', name: 'english', short: 'EN', long: 'English' }, zh: { code: 'zh', name: 'chinese', short: '中文', long: '中文' }, ru: { code: 'ru', name: 'russian', short: 'RU', long: 'Pусский' }, + es: { code: 'es', name: 'spanish', short: 'ES', long: 'Español' }, }
-
Add the locale code to
./linguirc.json
.- "locales": ["en", "zh"] + "locales": ["en", "zh", "af"]
-
Add the locale code to
SUPPORTED_LOCALES
in./src/constants/locale.ts
- export const SUPPORTED_LOCALES = ['en', 'zh'] + export const SUPPORTED_LOCALES = ['en', 'zh', 'af']
-
Import the locale plurals in
./src/providers/LanguageProvider.tsx
.- import { en, zh } from 'make-plural/plurals' + import { en, zh, af } from 'make-plural/plurals'
-
Load the locale plurals in
./src/providers/LanguageProvider.tsx
i18n.loadLocaleData({ en: { plurals: en }, zh: { plurals: zh }, + af: { plurals: af }, })
-
Extract and compile the strings marked for translation. This creates a directory for the locale within the
./locale/
directory:yarn i18n:extract && yarn i18n:compile