Contributing to this project
This repository has interaction limits enabled. Issues and pull requests are restricted to repository collaborators. This is in response to a high volume of unsolicited, AI-generated contributions that were consuming maintainer time without adding value.
If you are interested in contributing — including for Google Summer of Code — please:
- Read our contribution requirements
- Join our gsoc-contributors mailing list and introduce yourself
- Coordinate with a maintainer on what you'd like to work on
- Once vetted, you will be added as a collaborator and can open issues and PRs
We expect all contributions to reflect a genuine understanding of the code being changed. PRs that appear to be generated by AI tools without meaningful human review will be closed.
The mlab-speedtest repository implements the https://speed.measurementlab.net/ website.
- Install website build dependencies for your operating system and environment
- Node >= v20.0 - Using NVM:
nvm install v20.0 - Install libraries -
npm install - Build dist -
npm run build - Serving locally -
python3 -m http.server -d dist - Firebase tools -
npm install -g firebase-tools
- Node >= v20.0 - Using NVM:
Translations for this site are managed in the Open Technology Fund's Localization Lab Transifex site. Contributing translators may choose to translate and/or review translations there. Completed translations are then imported for use within this application and published by M-Lab staff.
- Download the completed
.pofile from Transifex and save it intranslations/languages/- Use the existing naming convention (e.g.,
es.po,de_DE.po)
- Use the existing naming convention (e.g.,
- If the filename uses a locale code (e.g.,
de_DE), add a mapping inscripts/po-to-json.jsso it maps to the short code (e.g.,de_DE->de) - Add the short language code to the
supportedarray insrc/js/i18n.js- If the language is RTL, also add it to the
rtlLanguagesarray
- If the language is RTL, also add it to the
- Rebuild:
npm run build
The build converts .po files to JSON in dist/translations/. At runtime, i18n.js selects the language automatically via the ?lang= query parameter, localStorage, or browser preference.
To preview the site locally, we recommend using Python:
npm install
npm run build
python3 -m http.server -d dist
If you are a user on the M-Lab Firebase project, you can also preview the site locally using the firebase-cli: firebase serve --only hosting:mlab-speedtest
The site is deployed via GitHub Actions to Firebase Hosting:
| Environment | Trigger | URL |
|---|---|---|
| Sandbox | Pull request (from same repo) | https://mlab-sandbox.web.app |
| Production | Merge to main |
https://speed.measurementlab.net |
Note: PR deployments only work for branches pushed directly to m-lab/mlab-speedtest, not from forks (due to Firebase secrets not being available to fork PRs).