Skip to content

Commit b02d0c8

Browse files
committed
Merge branch 'main' of github.com:thewca/web-dev-docs
2 parents f894e7f + 5d26a9d commit b02d0c8

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

contributing/detailed_contributing_guide.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ This is an essential step of contributing to the WCA website, as you'll want to
2727
6. If you're using Visual Studio Code to develop, you can [attach it to the Docker container](https://code.visualstudio.com/docs/remote/containers) so that your extensions can take advantage of the Ruby environment and so the terminal runs from inside the container
2828

2929
### 3. Set up the database
30-
TODO
30+
31+
#### Import the developer database
32+
1. Make sure that you have allocated at least 4GB RAM to your Docker containers under the Resources menu.
33+
2. In a bin/rails console prompt, run `bin/rake db:load:development`
34+
3. This job will take 10-200 minutes - yes, more than two hours in bad cases! This will load the latest database export onto your local machine.
35+
36+
#### Run CAD
37+
In a bin/rails console prompt, run `ComputeAuxiliaryData.perform_now`.
3138

3239
### 4. Run migrations (if necesary)
3340

contributing/quickstart.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Now the website will run locally. You have some options on how to set up the dat
1818

1919
## (2) DATABASE SETUP
2020
There are two options here - a "test" database with generated data, or the production database (with sensitive information removed).
21-
1. **Test database**: Quick to set up, but may not mirror real-world data well. `bin/rake db:reset`
22-
2. **Exported database**: Takes 60-90 minutes to set up, but uses actual data from the live website. `bin/rake db:load:development`
21+
1. **Test database**: Quick to set up, but may not mirror real-world data well. `docker exec -it rails bash -c "bin/rake db:reset"`
22+
2. **Exported database**: Takes 60-90 minutes to set up, but uses actual data from the live website. `docker exec -it rails bash -c "bin/rake db:load:development"`
2323

2424
## (3) RUNNING TESTS
2525
Two options - running while your docker server is running, or running tests independently.

guides/translating_the_website.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Here are the descriptions of the field:
174174
1. The name of your translation, anything really
175175
2. The base locale code, in our case it will always be "en".
176176
3. The locale code for the language you're translating (see [here](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), the "639-1" column). It may be completed if your language is based on another one (eg: "pt" is used for Portuguese, "pt-BR" is used for Brazilian Portuguese).
177-
4. The url of the file you're translating, in our case we use "https://raw.githubusercontent.com/thewca/worldcubeassociation.org/master/WcaOnRails/config/locales/en.yml" as it will always point to the most up-to-date version of the English locale.
177+
4. The url of the file you're translating, in our case we use "https://raw.githubusercontent.com/thewca/worldcubeassociation.org/main/config/locales/en.yml" as it will always point to the most up-to-date version of the English locale.
178178
5. The url of the locale file in the target language. If your language doesn't exist yet on the website **leave it empty**! If you're updating an existing translation, you can import the work done until now by specifying the locale url (change "en" by your locale code in the link used for 4).
179179
6. If the generated file should contain include hashes of the original keys. **Keep it checked!** It will enable the website to display accurate information about the translation status in the [translations status](https://www.worldcubeassociation.org/translations/status) page :)
180180

@@ -256,7 +256,7 @@ Some of the content is provided by external modules (such as some error messages
256256
If you don't plan on opening a PR, please skip the next information and we'll be happy to do this for you!
257257

258258
Here is where you can get the additional modules' translation:
259-
- `time_will_tell`: it's the component used to display date ranges, such as on the competitions index page. There is no locale available, so if you want to translate these too, you need to take [this](https://github.com/thewca/worldcubeassociation.org/blob/master/WcaOnRails/config/locales/time_will_tell.en.yml) file, translate it, and include the translation in your PR.
259+
- `time_will_tell`: it's the component used to display date ranges, such as on the competitions index page. There is no locale available, so if you want to translate these too, you need to take [this](https://github.com/thewca/worldcubeassociation.org/blob/main/config/locales/time_will_tell.en.yml) file, translate it, and include the translation in your PR.
260260
- `carrierwave`: it's the tool used to update profile pictures. There are plenty of locales already available [here](https://github.com/carrierwaveuploader/carrierwave-i18n/blob/3046d86ef580d449ea6ad70aab05db22276da01c/rails/locales). Pick the one for your language, edit the key names containing "whitelist" or "blacklist" to "white_list" or "black_list" (respectively), and include it in your PR.
261261
- `momentjs`: it's the component used to display a calendar when one has to fill in a date. Here again plenty of locales are available, so you just need to activate your language in [this](https://github.com/thewca/worldcubeassociation.org/blob/34d46d3f0ed022ec20a84d6d6241853f05495b71/WcaOnRails/app/assets/javascripts/application.js#L27-L28) file (just as I did with the French one).
262262

0 commit comments

Comments
 (0)