Skip to content

Commit 3bcc2cc

Browse files
Merge pull request #769 from ossf/french_lab
Create lab fr_hello.html (French translation)
2 parents 0f507b2 + b7386bf commit 3bcc2cc

File tree

4 files changed

+114
-4
lines changed

4 files changed

+114
-4
lines changed

docs/labs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ how to do that and the labs we'd like created.
1515

1616
Here are some of the labs available, which you can use as examples:
1717

18-
* [hello](hello.html) - simple "Hello, world!" demo. [ja_hello](ja_hello.html)
18+
* [hello](hello.html) - simple "Hello, world!" demo. ([ja_hello](ja_hello.html), [fr_hello](fr_hello.html))
1919
* [input1](input1.html) - input validation (simple types)
2020
* [regex0](regex0.html) - regular expressions (regexes) - introduction
2121
* [regex1](regex1.html) - regular expressions (regexes)

docs/labs/checker.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const resources = {
4040
reset_title: 'Reset initial state (throwing away current attempt).',
4141
to_be_completed: 'to be completed',
4242
try_harder: "Try harder! Don't give up so soon. Current time spent (in seconds): {0}",
43-
}
43+
},
4444
},
4545
ja: {
4646
translation: {
@@ -57,9 +57,26 @@ const resources = {
5757
reset_title: '初期状態をリセットします (現在の試行を破棄します)。',
5858
to_be_completed: '完成する',
5959
try_harder: '「もっと頑張ってください! すぐに諦めないでください。現在の所要時間 (秒): {0}」',
60-
}
60+
},
6161
},
62-
}
62+
fr: {
63+
translation: {
64+
already_correct: 'La réponse est déjà correcte !',
65+
complete: 'COMPLET !',
66+
completed: 'Terminé',
67+
congrats: 'Félicitations ! Votre réponse est correcte !',
68+
congrats_all: 'Excellent travail ! Toutes vos réponses sont correctes !',
69+
expecting: "Nous attendions une réponse comme celle-ci :\n{0}",
70+
give_up_title: 'Abandonnez et montrez une réponse.',
71+
hint_title: 'Fournir un indice compte tenu de la tentative en cours.',
72+
no_hints: "Désolé, il n'y a aucun indice pour cet atelier.",
73+
no_matching_hint: "Désolé, je ne trouve pas d'indice correspondant à votre tentative.",
74+
reset_title: "Réinitialiser l'état initial (abandonner la tentative actuelle).",
75+
to_be_completed: 'à compléter',
76+
try_harder: "Essayez plus fort ! N'abandonnez pas si tôt. Temps actuel passé (en secondes) : {0}",
77+
},
78+
},
79+
};
6380

6481
// Create a "format" method to simplify internationalization.
6582
// Use as: "Demo {0} result"".format(name);

docs/labs/fr_hello.html

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<!DOCTYPE html>
2+
<html lang="fr">
3+
<head>
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<link rel="stylesheet" href="https://best.openssf.org/assets/css/style.css">
7+
<link rel="stylesheet" href="checker.css">
8+
<script src="checker.js"></script>
9+
<script src="hello.js"></script>
10+
<link rel="license" href="https://creativecommons.org/licenses/by/4.0/">
11+
12+
<!-- See create_labs.md for how to create your own lab! -->
13+
</head>
14+
<body>
15+
<!-- For GitHub Pages formatting: -->
16+
<div class="container-lg px-3 my-5 markdown-body">
17+
<h1>Exercice de laboratoire Hello</h1>
18+
19+
Il s'agit d'un exercice de laboratoire sur le développement de logiciels sécurisés.
20+
Pour plus d'informations, consultez l'<a href="introduction.html" target="_blank">introduction à les laboratoires</a>.
21+
22+
<p>
23+
<h2>But</h2>
24+
<p>
25+
<b>Apprenez à utiliser nos laboratoires en écrivant un message « Hello, world ! » programme.</b>
26+
27+
<p>
28+
<h2>Arrière-plan</h2>
29+
<p>
30+
<a href="https://en.wikipedia.org/wiki/%22Hello,_World!%22_program"
31+
> "Hello, World! " programme</a>
32+
est souvent le premier programme écrit en
33+
un nouveau langage ou système de programmation.
34+
Nous en rédigerons un afin de voir comment fonctionnent ces laboratoires.
35+
36+
<p>
37+
<h2>Informations sur la tâche</h2>
38+
<p>
39+
40+
<p>
41+
Votre tâche est de modifier le programme ci-dessous
42+
pour imprimer "Hello, world!" pour savoir comment fonctionnent nos laboratoires.
43+
Veuillez expérimenter avec les boutons ci-dessous intitulés
44+
<i>Indice</i>, <i>Réinitialiser</i> et <i>Abandonner</i>.
45+
46+
<p>
47+
Lorsque vous obtenez une réponse correcte, vous verrez une notification contextuelle, le
48+
la couleur d'arrière-plan de la zone de saisie changera et le
49+
Le titre « Laboratoire interactif » changera pour indiquer <i>Terminé !</i>.
50+
51+
<p>
52+
<h2>Laboratoire interactif (<span id="grade"></span>)</h2>
53+
<p>
54+
<b>Veuillez modifier le code ci-dessous pour imprimer "Hello, world!"
55+
(sans compter les citations)
56+
pour JavaScript sur Node.js, tout en apprenant comment fonctionnent nos ateliers.</b>
57+
<p>
58+
<!--
59+
You can use this an example for new labs.
60+
For multi-line inputs, instead of <input id="attempt0" type="text" ...>, use
61+
<textarea id="attempt" rows="2" cols="65">...</textarea>
62+
-->
63+
<form id="lab">
64+
<pre><code
65+
><input id="attempt0" type="text" size="60" spellcheck="false"
66+
value='console.log("Goodbye.");'>
67+
</code></pre>
68+
<button type="button" class="hintButton">Indice</button>
69+
<button type="button" class="resetButton">Réinitialiser</button>
70+
<button type="button" class="giveUpButton">Abandonner</button>
71+
<br><br>
72+
<p>
73+
<i>Ce laboratoire a été développé par David A. Wheeler à
74+
<a href="https://www.linuxfoundation.org/">La Fondation Linux</a>.</i>
75+
<br><br>
76+
<p id="correctStamp" class="small">
77+
<textarea id="debugData" class="displayNone" rows="20" cols="65" readonly>
78+
</textarea>
79+
</form>
80+
81+
</div><!-- End GitHub pages formatting -->
82+
</body>
83+
</html>

docs/labs/hello.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,63 +5,73 @@ info =
55
absent: String.raw`^ console \. log \(`,
66
text: "Please use the form console.log(...);",
77
text_ja: "console.log(...); の形式を使用してください。",
8+
text_fr: "Veuillez utiliser le formulaire console.log(...);",
89
examples: [ [ "" ], [ "foo" ]
910
],
1011
},
1112
{
1213
present: "Goodbye",
1314
text: "You need to change the text Goodbye to something else.",
1415
text_ja: "「Goodbye」というテキストを別の文字に変更する必要があります.",
16+
text_fr: "Vous devez remplacer le texte Goodbye par autre chose.",
1517
examples: [ [ "console.log(\"Goodbye.\");" ] ]
1618
},
1719
{
1820
present: "hello",
1921
text: "Please capitalize Hello.",
2022
text_ja: "Hello は大文字で入力してください。.",
23+
text_fr: "Veuillez mettre une majuscule Hello.",
2124
examples: [ [ "console.log(\"hello.\");" ] ]
2225
},
2326
{
2427
present: "World",
2528
text: "Please lowercase world.",
2629
text_ja: "world という単語を小文字にしてください。",
30+
text_fr: "Veuillez mettre world en minuscule.",
2731
examples: [ [ "console.log(\"Hello, World!\");" ] ]
2832
},
2933
{
3034
present: "Hello[^,]",
3135
text: "Put a comma immediately after Hello.",
3236
text_ja: "Hello の直後にカンマを入れます",
37+
text_fr: "Mettez une virgule immédiatement après Hello.",
3338
examples: [ [ "console.log(\"Hello world.\");" ] ]
3439
},
3540
{
3641
present: "Hello",
3742
absent: "[Ww]orld",
3843
text: "There's a Hello, but you need to also mention the world.",
3944
text_ja: "「Hello」がありますが、「world」という単語にも言及する必要があります。",
45+
text_fr: "Il y a un Hello, mais il faut aussi mentionner le world.",
4046
examples: [ [ "console.log(\"Hello, \");" ] ]
4147
},
4248
{
4349
present: String.raw`world[^\!]`,
4450
text: "Put an exclamation point immediately after world.",
4551
text_ja: "world の直後に感嘆符を置きます。",
52+
text_fr: "Mettez un point d'exclamation immédiatement après world.",
4653
examples: [ [ "console.log(\"Hello, world.\");" ] ]
4754
},
4855
{
4956
present: String.raw`Hello,\s*world!`,
5057
absent: String.raw`Hello,\x20world!`,
5158
text: "You need exactly one space between 'Hello,' and 'world!'",
5259
text_ja: "「Hello」と「world!」の間にはスペースが 1 つだけ必要です。",
60+
text_fr: "Vous avez besoin d'exactement un espace entre « Hello, » et « world! »",
5361
examples: [ [ "console.log(\"Hello, world!\");" ] ]
5462
},
5563
{
5664
present: String.raw`^ console \. log \( Hello`,
5765
text: "You must quote constant strings using \", ', or `",
5866
text_ja: "定数文字列は \"、'、または ` を使用して引用符で囲む必要があります。",
67+
text_fr: "Vous devez citer les chaînes constantes en utilisant \", ' ou `",
5968
examples: [ [ "console.log(Hello, world" ], [ "console.log( Hello, world" ] ]
6069
},
6170
{
6271
absent: String.raw` ; $`,
6372
text: "Please end this statement with a semicolon. JavaScript does not require a semicolon in this case, but usually when modifying source code you should follow the style of the current code.",
6473
text_ja: "このステートメントはセミコロンで終了してください。この場合、JavaScript ではセミコロンは必要ありませんが、通常、ソース コードを変更する場合は、現在のコードのスタイルに従う必要があります。",
74+
text_fr: "Veuillez terminer cette déclaration par un point-virgule. JavaScript ne nécessite pas de point-virgule dans ce cas, mais généralement lors de la modification du code source, vous devez suivre le style du code actuel",
6575
examples: [ [ " console.log(\"Hello, world!\") " ] ]
6676
},
6777
],

0 commit comments

Comments
 (0)