likebutter.app/README.md

52 lines
2 KiB
Markdown
Raw Normal View History

2026-04-21 19:03:37 -04:00
# ButterBox Website for 2026... and beyond!
2026-04-29 14:07:08 +01:00
Welcome to our new site, built on Docusaurus. This integrates our previous simple Jekyll site and our documentation work from Gitbook into a single site. It also provides a blog capability, and built-in capability for localization.
2026-04-21 19:03:37 -04:00
2026-04-24 10:06:17 -04:00
## Localization
2026-04-29 14:07:08 +01:00
All localizations (currently en, es, ru and zh-Hans) are under the i18n/ folder structure
2026-04-24 10:06:17 -04:00
Key files for localization are:
2026-04-29 14:07:08 +01:00
- English Markdown docs: docs/
- homepage and general strings: i18n/<locale>/code.json
- navbar: i18n/<locale>/docusaurus-theme-classic/navbar.json
- footer: i18n/<locale>/docusaurus-theme-classic/footer.json
- localization markdown docs: i18n/<locale>/docusaurus-plugin-content-docs/current/
2026-04-24 10:06:17 -04:00
### Locale commands
To update translation key values:
npm run write-translations -- --locale <locale>
2026-04-29 14:07:08 +01:00
To updated po4a consolidated .pot and .po files from English markdown files (with po4a tool installed):
po4a po4a.conf --no-translations
2026-04-29 14:07:08 +01:00
To update localization markdown files from po4a consolidated .po files (with po4a tool installed):
po4a po4a.conf --no-update
2026-04-24 10:06:17 -04:00
To run the site in a specific locale:
npm run start -- --locale <locale>
2026-04-24 10:06:17 -04:00
To build the static site for all locales:
npm run build
2026-04-24 10:06:17 -04:00
### Localization mapping
2026-04-29 14:07:08 +01:00
Below is a rough mapping from the old Jekyll site i18n strings file fields into the new i18n/en/code.json file, for the main page.
2026-04-22 08:44:46 -04:00
- home.subtitle2 = from the top-level title
- home.whatisbutterbox = butter_box.device_image_caption
- home.section1.title = butter_box.explanation_header
- home.section1.description = butter_box.explanation
- home.learnmore = butter_box.learn_more
- home.getbutter.title = butter_box.get_your_own_header
- home.getbutter.description = butter_box.get_your_own
- home.getintouch = butter_box.contact_cta
- home.makebutter.title = butter_box.make_your_own_header
- home.makebutter.description = butter_box.make_your_own
- home.getcode.title = butter_box.make_your_own_from_scratch
- home.getsource.button = butter_box.repo_cta
2026-04-21 19:03:37 -04:00