Skip to content

Commit 84d3576

Browse files
authored
Merge pull request #1012 from sammajayi/feat/voting-deadline-reminders
feat: notify token holders before governance voting deadline closes
2 parents 9c365a1 + d1b227e commit 84d3576

49 files changed

Lines changed: 1758 additions & 625 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/contracts.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
- name: Setup stable Rust toolchain
1717
uses: dtolnay/rust-toolchain@stable
1818

19+
- name: Add WASM target
20+
run: rustup target add wasm32v1-none
21+
1922
- name: Run contract tests
2023
run: |
2124
set -euo pipefail

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: 20
18+
node-version: 22
1919
cache: npm
2020

2121
- name: Install dependencies

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup Node.js
1515
uses: actions/setup-node@v4
1616
with:
17-
node-version: '20'
17+
node-version: '22'
1818
cache: 'npm'
1919
- name: Install dependencies
2020
run: npm ci --legacy-peer-deps --force

.size-limit.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[
22
{
3-
"name": "Main Next.js Chunk",
4-
"path": ".next/static/chunks/main-*.js",
5-
"limit": "150 kB"
3+
"name": "Main Bundle",
4+
"path": "dist/assets/*.js",
5+
"limit": "250 kB"
66
},
77
{
88
"name": "Framework/Vendor Chunks",
9-
"path": ".next/static/chunks/framework-*.js",
10-
"limit": "100 kB"
9+
"path": "dist/assets/framework-*.js",
10+
"limit": "150 kB"
1111
},
1212
{
1313
"name": "CSS Assets",
14-
"path": ".next/static/css/**/*.css",
14+
"path": "dist/assets/*.css",
1515
"limit": "50 kB"
1616
}
17-
]
17+
]

I18N_COMPLETION.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
# i18n Internationalization Completion Summary
22

33
## Problem Solved
4-
The LearnVault application had full i18next configuration but extremely poor translation coverage:
4+
5+
The LearnVault application had full i18next configuration but extremely poor
6+
translation coverage:
7+
58
- **English (en.json)**: 103 keys ✅ Complete
69
- **Spanish (es.json)**: 103 keys → **was partial, now complete**
710
- **French (fr.json)**: 3 keys → **was 3%, now 100%**
811
- **Swahili (sw.json)**: 4 keys → **was 4%, now 100%**
9-
- **Pashto (ps.json)**: Empty pseudo-locale (confusing, now removed from imports)
12+
- **Pashto (ps.json)**: Empty pseudo-locale (confusing, now removed from
13+
imports)
1014

11-
Users selecting these languages would see broken UI (untranslated keys) instead of a functional app.
15+
Users selecting these languages would see broken UI (untranslated keys) instead
16+
of a functional app.
1217

1318
## Changes Made
1419

1520
### 1. Configuration Updates
21+
1622
**File**: `src/i18n.ts`
23+
1724
- ✅ Added `es` (Spanish) to `supportedLngs` array
1825
- ✅ Removed unused `ps` (Pashto pseudo-locale) from imports and resources
1926
- **Before**: `supportedLngs: ["en", "fr", "sw"]`
@@ -22,11 +29,13 @@ Users selecting these languages would see broken UI (untranslated keys) instead
2229
### 2. Translation Files
2330

2431
#### Spanish (es.json) - 103 keys
32+
2533
- **Status**: Already had 103 keys (complete!) but wasn't marked as supported
2634
- **Action**: Now officially supported
2735
- **Coverage**: 100% parity with en.json
2836

2937
#### French (fr.json) - 3 → 103 keys
38+
3039
- **Before**: Only had 3 nav keys (contractExplorer, dashboard, courses)
3140
- **After**: Complete professional French translations covering:
3241
- Navigation (16 keys)
@@ -38,37 +47,49 @@ Users selecting these languages would see broken UI (untranslated keys) instead
3847
- **Coverage**: 100% parity with en.json
3948

4049
#### Swahili (sw.json) - 4 → 103 keys
41-
- **Before**: Only scattered keys (home.heroTitle, nav.{contractExplorer,dashboard,courses}, usdc.{getTestUSDC,minting,mintSuccess,mintError,tooltip})
50+
51+
- **Before**: Only scattered keys (home.heroTitle,
52+
nav.{contractExplorer,dashboard,courses},
53+
usdc.{getTestUSDC,minting,mintSuccess,mintError,tooltip})
4254
- **After**: Complete Swahili translations using proper East African terminology
4355
- **Coverage**: 100% parity with en.json
4456

4557
### 3. CI/CD Validation
4658

4759
#### New Script: `scripts/validate-i18n.mjs`
60+
4861
Automated validation that ensures:
62+
4963
- All supported locales (es, fr, sw) have complete key parity with en.json
5064
- No unexpected locale files are present
5165
- Fails the build if translations are incomplete
5266
- Warns about extra keys in locale files
5367

5468
#### Updated: `package.json`
69+
5570
Added new npm script:
71+
5672
```json
5773
"i18n-check": "node scripts/validate-i18n.mjs"
5874
```
5975

6076
#### Integration with CI
77+
6178
The `frontend-ci.yml` workflow already includes:
79+
6280
```yaml
6381
- name: i18n key parity check
6482
run: npm run i18n-check
6583
```
84+
6685
This will now properly validate all translations before PRs can be merged.
6786
6887
### 4. Documentation
6988
7089
#### New File: `docs/i18n-setup.md`
90+
7191
Comprehensive guide covering:
92+
7293
- Supported languages and status
7394
- Architecture and configuration
7495
- How to use translations in components
@@ -81,22 +102,30 @@ Comprehensive guide covering:
81102
## Impact
82103

83104
### For Users
105+
84106
- ✅ French speakers: Get a fully functional interface in their language
85107
- ✅ Swahili speakers: Get a fully functional interface in their language
86108
- ✅ Spanish speakers: Already had translations, now officially supported
87109
- ✅ All other languages: Fall back to English (as designed)
88110

89111
### For Developers
90-
- ✅ **Key parity enforcement**: CI will fail if new keys are added to en.json without updating all locales
112+
113+
- ✅ **Key parity enforcement**: CI will fail if new keys are added to en.json
114+
without updating all locales
91115
- ✅ **Clear process**: Documentation explains how to add/update translations
92116
- ✅ **Automated validation**: No need to manually check for missing keys
93-
- ✅ **Accessible codebase**: All 24 components using useTranslation now have proper translations
117+
- ✅ **Accessible codebase**: All 24 components using useTranslation now have
118+
proper translations
94119

95120
### For the Project
96-
- ✅ **Aligns with mission**: "Designed specifically with African learners in mind" - now with French & Swahili
121+
122+
- ✅ **Aligns with mission**: "Designed specifically with African learners in
123+
mind" - now with French & Swahili
97124
- ✅ **Trust**: No more language switcher that silently breaks the UI
98-
- ✅ **Maintainability**: Future contributors can't accidentally create translation gaps
99-
- ✅ **Quality**: Professional native-speaker translations (not machine-generated)
125+
- ✅ **Maintainability**: Future contributors can't accidentally create
126+
translation gaps
127+
- ✅ **Quality**: Professional native-speaker translations (not
128+
machine-generated)
100129

101130
## Testing
102131

@@ -115,25 +144,33 @@ npm run lint && npm run typecheck && npm run test:coverage
115144

116145
## Pashto (ps.json) Note
117146

118-
The original `ps.json` file was generated by `generate-pseudo-locale.mjs` for testing purposes (to identify missing translation keys by wrapping text in `[[...]]`). It was never actually used as a language:
147+
The original `ps.json` file was generated by `generate-pseudo-locale.mjs` for
148+
testing purposes (to identify missing translation keys by wrapping text in
149+
`[[...]]`). It was never actually used as a language:
150+
119151
- Never imported in `src/i18n.ts`
120152
- Never listed in `supportedLngs`
121153
- Not relevant to the project's African focus
122154

123-
The script still works fine - it just generates this file in the background. The important fix is removing ps from the i18n config so it can't be accidentally enabled.
155+
The script still works fine - it just generates this file in the background. The
156+
important fix is removing ps from the i18n config so it can't be accidentally
157+
enabled.
124158

125159
## Migration Checklist for Teams Using LearnVault
126160

127161
- [ ] Pull latest changes
128162
- [ ] Review new translations in `src/locales/{es,fr,sw}.json`
129163
- [ ] Test language switching in the UI (use LanguageSelector component)
130164
- [ ] Verify `npm run i18n-check` passes locally
131-
- [ ] Add translations for any new keys following the workflow in `docs/i18n-setup.md`
132-
- [ ] Update CI/CD pipeline if using a fork (frontend-ci.yml already has the check)
165+
- [ ] Add translations for any new keys following the workflow in
166+
`docs/i18n-setup.md`
167+
- [ ] Update CI/CD pipeline if using a fork (frontend-ci.yml already has the
168+
check)
133169

134170
## Future Improvements
135171

136172
Potential enhancements for consideration:
173+
137174
1. Add translator credits/attribution for es, fr, sw translations
138175
2. Set up crowdsourced translation management (e.g., Crowdin, Weblate)
139176
3. Add RTL language support (e.g., Arabic for North Africa)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ expect all participants to uphold these standards.
572572

573573
- [Glossary](docs/glossary.md) — Key terms, tokens, and contracts explained in
574574
plain English
575-
- [Contract events](docs/contract-events.md) — Documented on-chain event names, payloads, and example payloads for the indexer
575+
- [Contract events](docs/contract-events.md) — Documented on-chain event names,
576+
payloads, and example payloads for the indexer
576577

577578
---
578579

0 commit comments

Comments
 (0)