feat: updated readme

This commit is contained in:
Chris Milne 2026-04-29 14:07:08 +01:00
parent 92188b11f4
commit f764155b77

View file

@ -1,34 +1,40 @@
# ButterBox Website for 2026... and beyond! # ButterBox Website for 2026... and beyond!
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. 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.
## Localization ## Localization
All localizations (currently en, es, ru and zh-Hans) are under the www/i18n/ folder structure All localizations (currently en, es, ru and zh-Hans) are under the i18n/ folder structure
Key files for localization are: Key files for localization are:
- homepage and general strings: www/i18n/<locale>/code.json - English Markdown docs: docs/
- navbar: www/i18n/<locale>/docusaurus-theme-classic/navbar.json - homepage and general strings: i18n/<locale>/code.json
- footer: www/i18n/<locale>/docusaurus-theme-classic/footer.json - navbar: i18n/<locale>/docusaurus-theme-classic/navbar.json
- english markdown docs: www/docs/ - footer: i18n/<locale>/docusaurus-theme-classic/footer.json
- localization markdown docs: www/i18n/<locale>/docusaurus-plugin-content-docs/current/ - localization markdown docs: i18n/<locale>/docusaurus-plugin-content-docs/current/
### Locale commands ### Locale commands
To update translation key values: To update translation key values:
npm run write-translations -- --locale <locale> npm run write-translations -- --locale <locale>
To updated po4a consolidated .pot and .po files from English markdown files (with po4a tool installed):
po4a po4a.conf --no-translations
To update localization markdown files from po4a consolidated .po files (with po4a tool installed):
po4a po4a.conf --no-update
To run the site in a specific locale: To run the site in a specific locale:
npm run start -- --locale <locale> npm run start -- --locale <locale>
To build the static site for all locales: To build the static site for all locales:
npm run build npm run build
### Localization mapping ### Localization mapping
Below is a rough mapping from the old jekyll site i18n strings file fields into the new www/i18n/en/code.json file, for the main page. 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.
- home.subtitle2 = from the top-level title - home.subtitle2 = from the top-level title
- home.whatisbutterbox = butter_box.device_image_caption - home.whatisbutterbox = butter_box.device_image_caption