From 15c9c8527a8525ae2410323b2ecab7de3a317046 Mon Sep 17 00:00:00 2001 From: Schalk Neethling Date: Wed, 14 Feb 2018 18:24:21 +0200 Subject: [PATCH] fix: language update suggestions for basic-css and basic-html (#16713) --- .../01-responsive-web-design/basic-css.json | 147 +++++++++--------- .../basic-html-and-html5.json | 7 +- 2 files changed, 78 insertions(+), 76 deletions(-) diff --git a/challenges/01-responsive-web-design/basic-css.json b/challenges/01-responsive-web-design/basic-css.json index e64e77d35d..d293bdab25 100644 --- a/challenges/01-responsive-web-design/basic-css.json +++ b/challenges/01-responsive-web-design/basic-css.json @@ -594,11 +594,11 @@ "id": "bad87fee1348bd9aede08807", "title": "Set the Font Family of an Element", "description": [ - "You can set an element's font by using the font-family property.", - "For example, if you wanted to set your h2 element's font to Sans-Serif, you would use the following CSS:", - "
h2 {
  font-family: Sans-Serif;
}
", + "You can set which font an element should use, by using the font-family property.", + "For example, if you wanted to set your h2 element's font to sans-serif, you would use the following CSS:", + "
h2 {
  font-family: sans-serif;
}
", "
", - "Make all of your p elements use the Monospace font." + "Make all of your p elements use the monospace font." ], "challengeSeed": [ "", "", @@ -754,7 +755,7 @@ "assert(new RegExp(\"googleapis\", \"gi\").test(code), 'message: Import the Lobster font.');", "assert($(\"h2\").css(\"font-family\").match(/lobster/i), 'message: Your h2 element should use the font Lobster.');", "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?\\s*;\\s*\\}/gi.test(code), 'message: Use an h2 CSS selector to change the font.');", - "assert($(\"p\").css(\"font-family\").match(/monospace/i), 'message: Your p element should still use the font Monospace.');" + "assert($(\"p\").css(\"font-family\").match(/monospace/i), 'message: Your p element should still use the font monospace.');" ], "type": "waypoint", "challengeType": 0, @@ -810,14 +811,14 @@ "id": "bad87fee1348bd9aedf08808", "title": "Specify How Fonts Should Degrade", "description": [ - "There are several default fonts that are available in all browsers. These generic font families include Monospace, Serif and Sans-Serif", + "There are several default fonts that are available in all browsers. These generic font families include monospace, serif and sans-serif", "When one font isn't available, you can tell the browser to \"degrade\" to another font.", - "For example, if you wanted an element to use the Helvetica font, but also degrade to the Sans-Serif font when Helvetica wasn't available, you could use this CSS style:", - "
p {
  font-family: Helvetica, Sans-Serif;
}
", + "For example, if you wanted an element to use the Helvetica font, but degrade to the sans-serif font when Helvetica wasn't available, you will specify it as follows:", + "
p {
  font-family: Helvetica, sans-serif;
}
", "Generic font family names are not case-sensitive. Also, they do not need quotes because they are CSS keywords.", "
", - "To begin with, apply the Monospace font to the h2 element, so that it now has two fonts - Lobster and Monospace.", - "In the last challenge, you imported the Lobster font using the link tag. Now comment out that import of the Lobster font from Google Fonts so that it isn't available anymore. Notice how your h2 element degrades to the Monospace font.", + "To begin with, apply the monospace font to the h2 element, so that it now has two fonts - Lobster and monospace.", + "In the last challenge, you imported the Lobster font using the link tag. Now comment out that import of the Lobster font(using the HTML comments you learned before) from Google Fonts so that it isn't available anymore. Notice how your h2 element degrades to the monospace font.", "Note
If you have the Lobster font installed on your computer, you won't see the degradation because your browser is able to find the font." ], "challengeSeed": [ @@ -833,7 +834,7 @@ "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", "", @@ -871,7 +872,7 @@ ], "tests": [ "assert($(\"h2\").css(\"font-family\").match(/^\"?lobster/i), 'message: Your h2 element should use the font Lobster.');", - "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?,\\s*Monospace\\s*;\\s*\\}/gi.test(code), 'message: Your h2 element should degrade to the font Monospace when Lobster is not available.');", + "assert(/\\s*h2\\s*\\{\\s*font-family\\:\\s*(\\'|\")?Lobster(\\'|\")?,\\s*monospace\\s*;\\s*\\}/gi.test(code), 'message: Your h2 element should degrade to the font monospace when Lobster is not available.');", "assert(new RegExp(\"\", \"gi\").test(code), 'message: Be sure to close your comment by adding -->.');" ], @@ -880,47 +881,47 @@ "translations": { "de": { "description": [ - "Es gibt verschiedene Schriftarten, die jedem Browser standardmäßig zur Verfügung stehen. Das sind unter anderem Monospace, Serif und Sans-Serif.", + "Es gibt verschiedene Schriftarten, die jedem Browser standardmäßig zur Verfügung stehen. Das sind unter anderem monospace, serif und sans-serif.", "Falls eine Font nicht verfügbar ist kannst du dem Browser sagen was er stattdessen verwenden soll.", - "Wenn du zum Beispiel einem Element die Schriftart Helvetica geben möchtest, aber gleichzeitig als Alertnative die Schrift Sans-Serif laden willst, falls Helvetica nicht verfügbar ist, kannst du diesen CSS Style verwenden:", - "
p {
  font-family: Helvetica, Sans-Serif;
}
", + "Wenn du zum Beispiel einem Element die Schriftart Helvetica geben möchtest, aber gleichzeitig als Alertnative die Schrift sans-serif laden willst, falls Helvetica nicht verfügbar ist, kannst du diesen CSS Style verwenden:", + "
p {
  font-family: Helvetica, sans-serif;
}
", "
", - "Kommentiere jetzt den Aufruf an Google Fonts aus, sodass Lobster nicht zur Verfügung steht. Beachte, wie nun alternativ die Schriftart Monospace geladen wird." + "Kommentiere jetzt den Aufruf an Google Fonts aus, sodass Lobster nicht zur Verfügung steht. Beachte, wie nun alternativ die Schriftart monospace geladen wird." ] }, "fr": { "title": "Spécifier comment vos polices devraient dégrader", "description": [ - "Il y a plusieurs polices par défaut qui sont disponible dans tous les navigateurs Web. Ceci comprend Monospace, Serif et Sans-Serif.", + "Il y a plusieurs polices par défaut qui sont disponible dans tous les navigateurs Web. Ceci comprend monospace, serif et sans-serif.", "Quand une police n'est pas disponible, vous pouvez demander au navigateur de \"dégrader\" vers une autre police.", - "Par exemple, si vous voulez qu'un élément utilise la police Helvetica, mais également dégrader vers Sans-Serif lorsque la police Helvetica n'est pas disponible, vous pouvez utiliser le style CSS suivant :", - "
p {
  font-family: Helvetica, Sans-Serif;
}
", + "Par exemple, si vous voulez qu'un élément utilise la police Helvetica, mais également dégrader vers sans-serif lorsque la police Helvetica n'est pas disponible, vous pouvez utiliser le style CSS suivant :", + "
p {
  font-family: Helvetica, sans-serif;
}
", "
", - "Maintenant, commenter votre appel vers les polices de Google, pour que la police Lobster ne soit pas disponible. Regardez comment la police se dégrade vers Monospace." + "Maintenant, commenter votre appel vers les polices de Google, pour que la police Lobster ne soit pas disponible. Regardez comment la police se dégrade vers monospace." ] }, "pt-br": { "title": "Especifique como as Fontes Devem se Degradar", "description": [ - "Existem diversas fontes que estão disponíveis por padrão nos navegadores de internet, incluindo Monospace, Serif e Sans-Serif.", + "Existem diversas fontes que estão disponíveis por padrão nos navegadores de internet, incluindo monospace, serif e sans-serif.", "No entanto, quando uma fonte não está disponível, podemos dizer ao navegador que \"degrade\" a outro tipo de fonte.", - "Por exemplo, se você deseja que um elemento use a fonte Helvetica, e que degrade para a fonte Sans-Serif quando a Helvetica não estiver disponível, você pode utilizar o seguinte CSS:", + "Por exemplo, se você deseja que um elemento use a fonte Helvetica, e que degrade para a fonte sans-serif quando a Helvetica não estiver disponível, você pode utilizar o seguinte CSS:", "p {", - "  font-family: Helvetica, Sans-Serif;", + "  font-family: Helvetica, sans-serif;", "}", "
", - "Agora, comente o seu chamado para a fonte do Google, para que a fonte Lobster não esteja disponível. Note como a fonte degrada para Monospace." + "Agora, comente o seu chamado para a fonte do Google, para que a fonte Lobster não esteja disponível. Note como a fonte degrada para monospace." ] }, "ru": { "title": "Укажите порядок деградации шрифтов", "description": [ - "Существует несколько стандартных шрифтов, которые доступны во всех браузерах. Среди них Monospace, Serif и Sans-Serif", + "Существует несколько стандартных шрифтов, которые доступны во всех браузерах. Среди них monospace, serif и sans-serif", "Когда один шрифт недоступен, вы можете сообщить браузеру \"деградировать\" до другого шрифта.", - "Например, если бы вы хотели, чтобы элемент использовал шрифт Helvetica, но также деградировал до шрифта Sans-Serif, когда Helvetica недоступен, вы могли бы использовать этот CSS-стиль:", - "
p {
  font-family: Helvetica, Sans-Serif;
}
", + "Например, если бы вы хотели, чтобы элемент использовал шрифт Helvetica, но также деградировал до шрифта sans-serif, когда Helvetica недоступен, вы могли бы использовать этот CSS-стиль:", + "
p {
  font-family: Helvetica, sans-serif;
}
", "
", - "Теперь закомментируйте ваш запрос к Google Fonts, таким образом шрифт Lobster становится недоступен. Обратите внимание как происходит деградация до шрифта Monospace." + "Теперь закомментируйте ваш запрос к Google Fonts, таким образом шрифт Lobster становится недоступен. Обратите внимание как происходит деградация до шрифта monospace." ] } } @@ -944,12 +945,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", "", @@ -1060,12 +1061,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .smaller-image {", @@ -1188,12 +1189,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .thick-green-border {", @@ -1301,12 +1302,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .thick-green-border {", @@ -1412,12 +1413,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .thick-green-border {", @@ -1535,12 +1536,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .thick-green-border {", @@ -1667,12 +1668,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .thick-green-border {", @@ -2488,12 +2489,12 @@ " }", "", " h2 {", - " font-family: Lobster, Monospace;", + " font-family: Lobster, monospace;", " }", "", " p {", " font-size: 16px;", - " font-family: Monospace;", + " font-family: monospace;", " }", "", " .thick-green-border {", @@ -2693,7 +2694,7 @@ "
", "First, create a h1 element with the text Hello World", "Then, let's give all elements on your page the color of green by adding color: green; to your body element's style declaration.", - "Finally, give your body element the font-family of Monospace by adding font-family: Monospace; to your body element's style declaration." + "Finally, give your body element the font-family of monospace by adding font-family: monospace; to your body element's style declaration." ], "challengeSeed": [ "", @@ -2852,7 +2853,7 @@ "