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
@@ -6,11 +6,72 @@ These quizzes are the pre- and post-lecture quizzes for the data science curricu
6
6
7
7
Add a quiz translation by creating matching quiz structures in the `assets/translations` folders. The canonical quizzes are in `assets/translations/en`. The quizzes are broken into several groupings. Make sure to align the numbering with the proper quiz section. There are 40 quizzes total in this curriculum, with the count starting at 0.
8
8
9
+
10
+
<details>
11
+
<summary>Here's the shape of a translation file:</summary>
12
+
13
+
```
14
+
[
15
+
{
16
+
"title": "A title",
17
+
"complete": "A complete button title",
18
+
"error": "An error message upon selecting the wrong answer",
19
+
"quizzes": [
20
+
{
21
+
"id": 1,
22
+
"title": "Title",
23
+
"quiz": [
24
+
{
25
+
"questionText": "The question asked",
26
+
"answerOptions": [
27
+
{
28
+
"answerText": "Option 1 title",
29
+
"isCorrect": true
30
+
},
31
+
{
32
+
"answerText": "Option 2 title",
33
+
"isCorrect": false
34
+
}
35
+
]
36
+
}
37
+
]
38
+
}
39
+
]
40
+
}
41
+
]
42
+
```
43
+
</details>
44
+
9
45
After editing the translations, edit the index.js file in the translation folder to import all the files following the conventions in `en`.
10
46
11
-
Edit the `index.js` file in `assets/translations` to import the new translated files.
47
+
Edit the `index.js` file in `assets/translations` to import the new translated files.
48
+
49
+
For example, if your translation JSON is in `ex.json`, make 'ex' the localization key, then enter it as shown below to import it
50
+
51
+
<details>
52
+
<summary>index.js</summary>
53
+
54
+
```
55
+
import ex from "./ex.json";
56
+
57
+
// if 'ex' is localization key then enter it like so in `messages` to expose it
58
+
59
+
const messages = {
60
+
ex: ex[0],
61
+
};
62
+
63
+
export default messages;
64
+
```
65
+
66
+
</details>
12
67
13
-
Then, edit the dropdown in `App.vue` in this app to add your language. Match the localized abbreviation to the folder name for your language.
68
+
Then, edit the dropdown in `App.vue` in this app to add your language. Match the localized abbreviation to the folder name for your language. See example:
69
+
70
+
<details>
71
+
<summary>App.vue</summary>
72
+
TODO
73
+
74
+
</details>
14
75
15
76
Finally, edit all the quiz links in the translated lessons, if they exist, to include this localization as a query parameter: `?loc=fr` for example.
16
77
@@ -65,7 +126,9 @@ Finally, edit all the quiz links in the translated lessons, if they exist, to in
65
126
## Deploy the Quiz-app to Azure
66
127
67
128
### Prerequisites
68
-
- An Azure Subscription. _Cost Estimate: FREE_
129
+
- An Azure Subscription. Sign up for one for free [here](https://aka.ms/azure-free).
130
+
131
+
_Cost Estimate to deploy this quiz-app: FREE_
69
132
70
133
[](https://portal.azure.com/#create/Microsoft.StaticApp)
71
134
@@ -76,43 +139,49 @@ Once you are signed in on Azure through the link above, select a subscription an
76
139
- *Organization* – Choose your organization.
77
140
- *Repository* – Select the Web Dev for Beginners curriculum repository.
78
141
- *Branch* - Select a branch (main)
79
-
- Build Presets - Azure Static Web Apps uses a detection algorithm to detect the framework used in your application.
142
+
- Build Presets: Azure Static Web Apps uses a detection algorithm to detect the framework used in your application.
- Post-Deployment: After deployment is complete, click on 'Go to Deployment'then'View app in browser'.
85
147
86
-
### Example Workflow File
148
+
Once deployed, a workflow file will be created in the *.github* directory of your repo. This workflow file contains instructions of events that will trigger a re-deployment of the app to Azure, for example, _a **push** on branch **main**_ etc.
87
149
88
-
Here’s an example of what the GitHub Actions workflow file might look like:
0 commit comments