Categorygithub.com/louisbranch/edulab
modulepackage
0.0.0-20241127180833-775080a82b6c
Repository: https://github.com/louisbranch/edulab.git
Documentation: pkg.go.dev

# README

EduLab

Coverage

Running locally

By default, the project runs on port 8080: http://localhost:8080.

With Docker Compose

docker compose -f server-compose.yaml up -d --build server

With Go

go mod tidy
go run cmd/server/main.go

Two databases are supported SQLite (default) and PostgreSQL. For PostgreSQL, you have to set the following environmental variables:

POSTGRES_USER=%your db user%
POSTGRES_PASSWORD=%your db password%
POSTGRES_HOSTNAME=%your db hostname%
POSTGRES_DB=%your db name%

Adding a new language

Add the language go to translations.go

For Spanish, for example:

//go:generate gotext -srclang=en update -out=catalog.go -lang=en,pt-BR,es github.com/louisbranch/edulab/cmd/server

Then run:

go generate translations/translations.go

A new file for the language will be created at translations/locales.

Copy the source file for the one containing the translated messages:

cp translations/locales/es/out.gotext.json translations/locales/es/messages.gotext.json

After translating the messages in messages.gotext.json, run the generator again to update the language catalog:

go generate translations/translations.go

Finally, for the language to appear on the website, add the new language to the server.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author