You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing/detailed_contributing_guide.md
+8-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,14 @@ This is an essential step of contributing to the WCA website, as you'll want to
27
27
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
28
28
29
29
### 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`.
Copy file name to clipboardExpand all lines: contributing/quickstart.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,8 @@ Now the website will run locally. You have some options on how to set up the dat
18
18
19
19
## (2) DATABASE SETUP
20
20
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"`
23
23
24
24
## (3) RUNNING TESTS
25
25
Two options - running while your docker server is running, or running tests independently.
Copy file name to clipboardExpand all lines: guides/translating_the_website.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ Here are the descriptions of the field:
174
174
1. The name of your translation, anything really
175
175
2. The base locale code, in our case it will always be "en".
176
176
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.
178
178
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).
179
179
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 :)
180
180
@@ -256,7 +256,7 @@ Some of the content is provided by external modules (such as some error messages
256
256
If you don't plan on opening a PR, please skip the next information and we'll be happy to do this for you!
257
257
258
258
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.
260
260
- `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.
261
261
- `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).
0 commit comments