Source code for the Codeberg e.V. member registration web service.
https://join.codeberg.org
- Go 96.8%
- Makefile 2.1%
- Nix 1.1%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
How it works: 1) it generates a list of available locales at statup, scanning the embed fs. 2) when getting the locale from the accept header it also considers a cookie called "lang" 3) it constructs a language selector in header.tmpl by accesing the list of available languaes 4) changing the language selector triggers a submit via javascript, setting the langue in a /setlang endpoint handler What I found weird during implementation: 1) I could not access data I tried to pass in context for the template renderer, so I make a function accessible that returns the data 2) there seems to be no way of actually getting the chosen language when calling localeDomain.Locale(localesToTry...), thats why I track the to-be-chosen language myself and make it available to the template independently (to show the currently selected language) TODO: - [X] Make work without javascript - [ ] Bonus points: Don't display "de" "en" etc but "Deutsch" and "English" Reviewed-on: #164 Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org> Co-committed-by: Andreas Shimokawa <shimokawa@fsfe.org> |
||
|---|---|---|
| dataformat-workaround | ||
| docs | ||
| etc | ||
| locales | ||
| templates | ||
| testdata/keyring | ||
| .envrc | ||
| .gitignore | ||
| .woodpecker.yml | ||
| basic-swift-checks.go | ||
| end_to_end_test.go | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| LICENSE.md | ||
| main.go | ||
| main_test.go | ||
| Makefile | ||
| README.md | ||
| validator.go | ||
registration-server by Codeberg e.V. 
This is the registration server used for Codeberg e.V.'s online membership application form: join.codeberg.org
Documentation Index
License
This software (excluding bundled fonts) is licensed under the GNU Affero General Public License version 3 (GNU AGPLv3) (LICENSE or https://www.gnu.org/licenses/agpl-3.0.en.html).
The Codeberg logo is the work of @mray and licensed under CC0 1.0 Universal: https://codeberg.org/Codeberg/Design/src/branch/main/LICENSE or https://creativecommons.org/publicdomain/zero/1.0/
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.