Skip to content

Commit 2d9c999

Browse files
committed
2 parents 76c960f + cd58f16 commit 2d9c999

File tree

174 files changed

+21953
-33229
lines changed

Some content is hidden

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

174 files changed

+21953
-33229
lines changed

.github/workflows/node.js.yml

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

1616
strategy:
1717
matrix:
18-
node-version: [18.x, 20.x]
18+
node-version: [20.x, 22.x]
1919

2020
steps:
2121
- name: Checkout code

.github/workflows/po-to-json-autocommit.yml renamed to .github/workflows/po-to-json-validation.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Auto-convert PO to JSON and commit
1+
name: Convert PO to JSON and verify changes
22

33
on:
44
push:
55
paths:
66
- 'po/**/*.po'
77

88
jobs:
9-
convert-and-commit:
9+
convert-and-verify:
1010
runs-on: ubuntu-latest
1111

1212
steps:
@@ -30,7 +30,7 @@ jobs:
3030
echo "$(cat changed_po_files.txt)" >> $GITHUB_OUTPUT
3131
echo "EOF" >> $GITHUB_OUTPUT
3232
33-
- name: Run conversion script
33+
- name: Convert PO files to JSON
3434
if: steps.find_po.outputs.po_files != ''
3535
run: |
3636
mkdir -p locales
@@ -39,18 +39,13 @@ jobs:
3939
python3 convert_po_to_json.py "$po_file" "locales"
4040
done < changed_po_files.txt
4141
42-
- name: Commit and push updated JSON
42+
- name: Verify JSON conversion changes
4343
if: steps.find_po.outputs.po_files != ''
4444
run: |
45-
git config --global user.name "github-actions[bot]"
46-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
47-
48-
git add locales/*.json
49-
50-
if git diff --cached --quiet; then
51-
echo "✅ No JSON changes to commit."
45+
if ! git diff --quiet locales/; then
46+
echo "❌ Generated translation JSON files have changes that need to be committed."
47+
echo "Please run the PO-to-JSON conversion locally and commit the generated files in locales/."
48+
exit 1
5249
else
53-
git commit -m "chore(i18n): auto-update JSON files from updated PO files"
54-
git push origin ${{ github.ref }}
55-
echo "🚀 Pushed updated JSON files."
50+
echo "✅ Translation JSON files are verified and up to date."
5651
fi
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: E2E Test
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
e2e:
14+
name: Run Cypress E2E Tests
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout Repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
cache: 'npm'
26+
27+
- name: Run Cypress E2E Tests
28+
uses: cypress-io/github-action@v6
29+
with:
30+
install-command: npm ci
31+
start: npm start
32+
wait-on: 'http://127.0.0.1:3000'
33+
wait-on-timeout: 120
34+
browser: chrome
35+
config: video=false
36+
37+
- name: Upload Cypress Screenshots on Failure
38+
if: failure()
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: cypress-screenshots
42+
path: cypress/screenshots
43+
if-no-files-found: ignore

.github/workflows/security_scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Node.js
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: '18'
21+
node-version: '20'
2222

2323
- name: Install Dependencies
2424
run: npm install

CONTRIBUTING.md

Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
## <a name="CONTRIBUTING"></a>Contributing
22

33
We welcome contributions of all kinds — whether it’s code,
4-
documentation, music, lesson plans, artwork, or ideas. Music Blocks
4+
documentation, music, lesson plans, artwork, or ideas. Music Blocks
55
is a community-driven project, and every meaningful contribution helps
66
improve the platform for learners and educators around the world.
77

88
If you’re new to the project, start by setting up the local
9-
development environment using the guide linked above, then explore
9+
development environment using the guide linked below, then explore
1010
open issues or discussions to find a place to contribute.
1111

1212
- [How to set up a local server](README.md#how-to-set-up-a-local-server)
1313

14-
1514
### Special Notes
1615

1716
Music Blocks is being built from the ground-up, to address several
@@ -50,9 +49,12 @@ following resources:
5049
- [JavaScript tutorial - w3schools.com](https://www.w3schools.com/js/default.asp)
5150
- [JavaScript reference - MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
5251

53-
Programmers, please follow these general [guidelines for
52+
For code contributions, please follow these general [guidelines for
5453
contributions](https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md).
5554

55+
### AI guidelines
56+
57+
Follow [AI guidelines for Sugar Labs](https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md#ai-guidelines-for-sugar-labs)
5658

5759
### Before You Push
5860

@@ -64,8 +66,20 @@ npx prettier --check . # Formatting
6466
npm test # Jest
6567
```
6668

69+
NOTE: Only run ```prettier``` on the files you have modified.
70+
6771
If formatting fails, run `npx prettier --write .` to fix it.
6872

73+
### After your PR is merged
74+
75+
Please note that production deployments of Music Blocks are **manual**.
76+
77+
This means that even after your pull request is merged, your changes may not immediately appear. Your update will become visible after the next official release is deployed.
78+
79+
If your changes are not visible right away, it does **not** indicate a problem with your PR or implementation.
80+
81+
This note is included to prevent contributors from spending time debugging caching or deployment issues unnecessarily.
82+
6983
### License Header
7084

7185
Music Blocks is licensed under the [AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html).
@@ -129,60 +143,60 @@ Feel free. But, please don't spam :p.
129143
### Keep in Mind
130144

131145
1. Your contributions need not necessarily have to address any
132-
discovered issue. If you encounter any, feel free to add a fix through
133-
a PR, or create a new issue ticket.
146+
discovered issue. If you encounter any, feel free to add a fix through
147+
a PR, or create a new issue ticket.
134148

135149
2. Use [labels](https://github.com/sugarlabs/musicblocks/labels) on
136-
your issues and PRs.
150+
your issues and PRs.
137151

138152
3. Please do not spam with many PRs consisting of little changes.
139153

140154
4. If you are addressing a bulk change, divide your commits across
141-
multiple PRs, and send them one at a time. The fewer the number of
142-
files addressed per PR, the better.
155+
multiple PRs, and send them one at a time. The fewer the number of
156+
files addressed per PR, the better.
143157

144158
5. Communicate effectively. Go straight to the point. You don't need
145-
to address anyone using '_sir_'. Don't write unnecessary comments;
146-
don't be over-apologetic. There is no superiority hierarchy. Every
147-
single contribution is welcome, as long as it doesn't spam or distract
148-
the flow.
159+
to address anyone using '_sir_'. Don't write unnecessary comments;
160+
don't be over-apologetic. There is no superiority hierarchy. Every
161+
single contribution is welcome, as long as it doesn't spam or distract
162+
the flow.
149163

150164
6. Write useful, brief commit messages. Add commit descriptions if
151-
necessary. PR name should speak about what it is addressing and not
152-
the issue. In case a PR fixes an issue, use `fixes #ticketno` or
153-
`closes #ticketno` in the PR's comment. Briefly explain what your PR
154-
is doing.
165+
necessary. PR name should speak about what it is addressing and not
166+
the issue. In case a PR fixes an issue, use `fixes #ticketno` or
167+
`closes #ticketno` in the PR's comment. Briefly explain what your PR
168+
is doing.
155169

156170
7. Always test your changes extensively before creating a PR. There's
157-
no sense in merging broken code. If a PR is a _work in progress
158-
(WIP)_, convert it to draft. It'll let the maintainers know it isn't
159-
ready for merging.
171+
no sense in merging broken code. If a PR is a _work in progress
172+
(WIP)_, convert it to draft. It'll let the maintainers know it isn't
173+
ready for merging.
160174

161175
8. Read and revise the concepts about programming constructs you're
162-
dealing with. You must be clear about the behavior of the language or
163-
compiler/transpiler. See [JavaScript
164-
docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript).
176+
dealing with. You must be clear about the behavior of the language or
177+
compiler/transpiler. See [JavaScript
178+
docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript).
165179

166180
9. If you have a question, do a _web search_ first. If you don't find
167-
any satisfactory answer, then ask it in a comment. If it is a general
168-
question about Music Blocks, please use the new
169-
[discussions](https://github.com/sugarlabs/musicblocks/discussions)
170-
tab on top the the repository, or the _Sugar-dev Devel
171-
<[sugar-devel@lists.sugarlabs.org](mailto:sugar-devel@lists.sugarlabs.org)>_
172-
mailing list. Don't ask silly questions (unless you don't know it is
173-
silly ;p) before searching it on the web.
181+
any satisfactory answer, then ask it in a comment. If it is a general
182+
question about Music Blocks, please use the new
183+
[discussions](https://github.com/sugarlabs/musicblocks/discussions)
184+
tab on top the the repository, or the _Sugar-dev Devel
185+
<[sugar-devel@lists.sugarlabs.org](mailto:sugar-devel@lists.sugarlabs.org)>_
186+
mailing list. Don't ask silly questions (unless you don't know it is
187+
silly ;p) before searching it on the web.
174188

175189
10. Work on things that matter. Follow three milestones: `Port Ready`,
176-
`Migration`, and `Future`. Those tagged `Port Ready` are
177-
priority. Those tagged with `Migration` will be taken care of during
178-
or after the foundation rebuild. Feel free to participate in the
179-
conversation, adding valuable comments. Those tagged with `Future`
180-
need not be addressed presently.
190+
`Migration`, and `Future`. Those tagged `Port Ready` are
191+
priority. Those tagged with `Migration` will be taken care of during
192+
or after the foundation rebuild. Feel free to participate in the
193+
conversation, adding valuable comments. Those tagged with `Future`
194+
need not be addressed presently.
181195

182196
_Please note there is no need to ask permission to work on an
183197
issue. You should check for pull requests linked to an issue you are
184198
addressing; if there are none, then assume nobody has done
185199
anything. Begin to fix the problem, test, make your commits, push your
186200
commits, then make a pull request. Mention an issue number in the pull
187201
request, but not the commit message. These practices allow the
188-
competition of ideas (Sugar Labs is a meritocracy)._
202+
competition of ideas (Sugar Labs is a meritocracy)._

0 commit comments

Comments
 (0)