Translate the menu
The whole of track six against the clock: the Spanish menu in JSON, HTML and Markdown, with every object from ciw to dap and the stamp on top.
Thursday, 1:00 p.m. The Little Havana kitchen opens tomorrow, and its menu goes out in Spanish: es/menu.json and its page code for the app, es/menu.html for the website, es/menu.md for the write-ups. The translations are in a chat message; putting them in is your job.
Three stops and two hours. Every value you need is wrapped in something, and you know all the wrappings now.
Warm-up from earlier chapters
Two from earlier chapters, from memory, before the new idea. Two wrong tries show the answer.
Every wrapping, on one card
Words and WORDs (iw iW), strings (i" a"), brackets and their layers (i( 2i(), tags (it at), sentences and paragraphs (is ap), and the stamp on top (.). Inside for the filling, around for the whole burrito.
log(menu.name, find(tags, "hot"));log(menu.name, find(tags, "hot"));log(menu.name, find(tags, "hot"));log(menu.name, find(tags, "hot"));log(menu.name, find(tags, "hot"));log(menu.name, find(tags, "hot"));Stage 1 · The app
1:05. es/menu.json, four words to translate, one at a time: "pork" becomes "cerdo", Garden Veggie becomes "Vegetariano", "vegan" becomes "vegano", and "hot" becomes "picante". Then es/menu-page.ts opens: data.en.menu is just data.menu in this file, and whatever heading gets becomes the fixed text "La carta".
Stuck? Show a hint
ci"cerdo<Esc> then . on the other pork tags · ci"… for each word · ciWdata.menu<Esc> · from "menu": c2i("La carta"<Esc>This exercise needs a keyboard. Read on, and play it at your computer.
Stage 2 · The website
1:40. es/menu.html: the heading becomes La carta, Garden Veggie becomes Vegetariano, and the note becomes Lo picante va en rojo.
Stuck? Show a hint
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.
Stage 3 · The write-ups
2:20. es/menu.md is half done: an English sentence left over at the end of the Al Pastor line, a TODO paragraph that someone else is translating (it goes, blank line and all), and a doubled cocinado.
Stuck? Show a hint
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.
The whole track, from memory
Seven situations from this week. The cursor is somewhere inside each thing.
Extra practice optional
The chapter is done. These rounds keep going as long as you like: stop whenever it stops being useful.
Every wrapping
Endless strings, arguments, words, dotted names, tags and paragraphs, a few of each in turn.
The first exercise of every lesson is free. Pro unlocks the rest, every track, for good.
See ProThis exercise needs a keyboard. Read on, and play it at your computer.