An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
fix(skill): scripts that keep what they had when something fails
yzr01ee7cf67f11
diff --git a/.claude/skills/papermorph/scripts/bake_puppets.py b/.claude/skills/papermorph/scripts/bake_puppets.pyindex 85e7f04..f96d670 100644--- a/.claude/skills/papermorph/scripts/bake_puppets.py+++ b/.claude/skills/papermorph/scripts/bake_puppets.py@@ -32,14 +32,16 @@ def main():a = ap.parse_args()site = pathlib.Path(a.site); out = site / 'img/puppets'url = (a.url or f'http://localhost:8765/{site.resolve().name}/').rstrip('/') + '/'- got = {}+ got, clean = {}, a.cleanwith sync_playwright() as p:for kind in (p.chromium, p.firefox):try:b = kind.launch(**exe()) if kind is p.chromium else kind.launch()except Exception as e: # Playwright's Firefox may not run on this system: the Chromium pieces still standif kind is p.chromium: raise- print(f'{kind.name} did not start, so Firefox bakes its own few pieces in the page:', str(e).splitlines()[0]); continue+ print(f'{kind.name} did not start, so Firefox bakes its own few pieces in the page:', str(e).splitlines()[0])+ if clean: print('--clean is off: the Firefox pieces baked before stay'); clean = False+ continuepg = b.new_page(viewport={'width': 1600, 'height': 900})for ch in sorted(d.name for d in site.glob('ch[0-9][0-9]')):pg.goto(f'{url}{ch}/?bake', timeout=600000)@@ -51,16 +53,16 @@ def main():out.mkdir(parents=True, exist_ok=True)man_path = out / 'baked.js'man = {}- if man_path.exists() and not a.clean:+ if man_path.exists() and not clean:man = {h: f for h, f in json.loads(man_path.read_text().split('=', 1)[1].rstrip().rstrip(';')).items() if (out / f).exists()}new = 0for h, data in got.items():f = out / f'{h}.webp'- if h in man and not a.clean: continue # the same key is the same drawing: re-encoding only adds noise+ if h in man and not clean: continue # the same key is the same drawing: re-encoding only adds noiseImage.open(io.BytesIO(base64.b64decode(data.split(',')[1]))).save(f, quality=88, method=6)man[h] = f.name; new += 1man_path.write_text('window.BAKED = ' + json.dumps(man) + ';\n')- if a.clean: # only now, so the site never lists a file that is gone+ if clean: # only now, so the site never lists a file that is gonefor f in out.glob('*.webp'):if f.name not in man.values(): f.unlink()print(len(got), 'pieces asked for,', new, 'encoded,', len(man), 'listed,', sum((out / f).stat().st_size for f in man.values()) // 1024, 'KB')diff --git a/.claude/skills/papermorph/scripts/export.py b/.claude/skills/papermorph/scripts/export.pyindex b4fb88b..30ac158 100644--- a/.claude/skills/papermorph/scripts/export.py+++ b/.claude/skills/papermorph/scripts/export.py@@ -12,7 +12,7 @@ checks and practice) are left out, and then the video ends on a card saying they(--link adds its address). Captions are not burned in: upload OUT/chNN.srt with the video. Needs ffmpeg; serve thesite over HTTP first."""-import argparse, asyncio, functools, json, subprocess, sys, tempfile, wave+import argparse, asyncio, functools, json, shutil, subprocess, sys, tempfile, waveimport numpy as npfrom pathlib import Pathfrom playwright.async_api import async_playwright@@ -27,9 +27,9 @@ END_CARD = """(link) => {d.style.cssText = 'position:absolute;left:0;top:0;width:1600px;height:900px;display:flex;flex-direction:column;' +'align-items:center;justify-content:center;gap:26px;background:var(--board,#1d2b27);color:var(--chalk,#ece8dc);' +'font-family:inherit;text-align:center;z-index:50';- d.innerHTML = `<div style="font-size:30px;opacity:.65;letter-spacing:.08em;text-transform:uppercase">Chapter ${CHAPTER.number}</div>+ d.innerHTML = `<div style="font-size:30px;opacity:.65;letter-spacing:.08em;text-transform:uppercase">${translate('chapterNumber', { n: CHAPTER.label ?? CHAPTER.number })}</div><div style="font-size:64px;font-weight:600;max-width:1300px">${CHAPTER.title}</div>- <div style="font-size:34px;opacity:.85;margin-top:30px">Quick checks and practice are in the interactive lesson.</div>+ <div style="font-size:34px;opacity:.85;margin-top:30px">${translate('checksInLesson')}</div>${link ? `<div style="font-size:30px;opacity:.65">${link}</div>` : ''}`;document.getElementById('frame').append(d);}"""@@ -87,14 +87,16 @@ async def main(a):video = out / f'{a.chapter}.mp4'# Pass 1: the sound track and the captions, beat by beat at the beat's length on screen.end_s = END_SECONDS if asks or a.link else 0 # a picture book ends on its own last scene- lengths, starts, music_off, cues, offset = [], [], [], [], 0.0+ lengths, starts, counts, music_off, cues, offset = [], [], [], [], [], 0.0for i, bid in beats:await open_beat(pg, base, i)end, T = await pg.evaluate('[P.end, TIMINGS[BEATS[P.i].id]]')pre = info['beats'][i]['pre']- lengths.append(end); starts.append(offset)+ # frames counted on the running clock, so rounding never drifts the picture away from the sound+ count = round((offset + end) * a.fps) - round(offset * a.fps)+ lengths.append(end); starts.append(offset); counts.append(count)music_off.append(await pg.evaluate('([id, n, fps]) => Array.from({length: n}, (_, f) => !!window.MUSIC_OFF?.[id]?.(f / fps))',- [bid, round(end * a.fps), a.fps]))+ [bid, count, a.fps]))for k, c in enumerate(T['cues']): # [t, text, end?]: the page shows it at pre + tstop = c[2] if len(c) > 2 else T['cues'][k + 1][0] if k + 1 < len(T['cues']) else T['dur']cues.append((offset + pre + c[0], offset + pre + stop, c[1]))@@ -141,7 +143,7 @@ async def main(a):frames = 0for k, (i, bid) in enumerate(beats):await open_beat(pg, base, i)- n = round(lengths[k] * a.fps)+ n = counts[k]for f in range(n):await pg.evaluate('t => { P.t = t; evalTo(t); }', f / a.fps)enc.stdin.write(await pg.screenshot(clip=clip, type='jpeg', quality=92))@@ -153,6 +155,7 @@ async def main(a):for _ in range(end_s * a.fps):enc.stdin.write(end)enc.stdin.close(); enc.wait()+ shutil.rmtree(audio_dir, ignore_errors=True)await b.close()with open(out / f'{a.chapter}.srt', 'w', encoding='utf-8') as f:for k, (t0, t1, line) in enumerate(cues, 1):diff --git a/.claude/skills/papermorph/scripts/painted.py b/.claude/skills/papermorph/scripts/painted.pyindex 3e2a252..5855037 100644--- a/.claude/skills/papermorph/scripts/painted.py+++ b/.claude/skills/papermorph/scripts/painted.py@@ -92,9 +92,8 @@ def main(manifest, site):missing += [src for src in m.get('props', {}).values() if not (base / src).exists()]if missing: sys.exit(f'missing pictures (nothing changed): {missing}')for name, layers in m.get('sets', {}).items():- out = sets_js.parent / name; out.mkdir(parents=True, exist_ok=True)- for f in out.glob('*.webp'): f.unlink()- entry = []+ out = sets_js.parent / name+ entry, made = [], [] # every layer is made before the set's old files go, so a failure leaves the set wholefor L in layers:im = Image.open(base / L['file']).convert('RGBA')if 'cut' in L:@@ -105,10 +104,14 @@ def main(manifest, site):else:im = im.resize((W, H), Image.LANCZOS); words(im, L.get('words', []), 0, 0, fonts, base)im = padded(im, pad, L.get('edge', 'mirror')); b = [-pad[0], -pad[1], W + 2 * pad[0], H + 2 * pad[1]]- im.save(out / f"{L['name']}.webp", quality=88, method=6)- im.filter(ImageFilter.GaussianBlur(6)).save(out / f"{L['name']}-soft.webp", quality=80, method=6)+ made.append((L['name'], im))entry.append({'name': L['name'], 'k': L.get('k', 1), 'box': b, 'soft': True})print(name, L['name'], b)+ out.mkdir(parents=True, exist_ok=True)+ for f in out.glob('*.webp'): f.unlink()+ for n, im in made:+ im.save(out / f'{n}.webp', quality=88, method=6)+ im.filter(ImageFilter.GaussianBlur(6)).save(out / f'{n}-soft.webp', quality=80, method=6)sets[name] = entrysets_js.parent.mkdir(parents=True, exist_ok=True)sets_js.write_text('window.SETS = ' + json.dumps(sets) + ';\n')diff --git a/.claude/skills/papermorph/scripts/refs.py b/.claude/skills/papermorph/scripts/refs.pyindex faeff6f..2a80c0b 100644--- a/.claude/skills/papermorph/scripts/refs.py+++ b/.claude/skills/papermorph/scripts/refs.py@@ -65,6 +65,7 @@ def get(url, accept="application/json"):if attempt < 2:time.sleep(2)continue+ get.offline = Truereturn 0, url, str(e).encode()return 0, url, b""@@ -212,7 +213,7 @@ def lookup(entries, write):def verify(entries, write):bad, today = 0, datetime.date.today().isoformat()for e in entries:- problems, how = [], ""+ problems, how, get.offline = [], "", Falseif e.get("doi"):e["doi"] = re.sub(r"^(https?://(dx\.)?doi\.org/|doi:)", "", e["doi"].strip(), flags=re.I).lower()m = crossref_work(e["doi"])@@ -247,7 +248,10 @@ def verify(entries, write):how = "no link: " + e["nolink"] # searched; no reliable online record (thesis, magazine, talk)else:problems.append("no doi, isbn or url (run lookup), or set nolink to the reason none exists")- if problems:+ if get.offline: # no answer is not a wrong answer: keep the entry as it was+ bad += 1+ print(f"SKIP {e['key']}: network unreachable, nothing changed")+ elif problems:bad += 1e.pop("verified", None)print(f"FAIL {e['key']}: {'; '.join(problems)}")diff --git a/engine/engine.js b/engine/engine.jsindex 257515a..f24936a 100644--- a/engine/engine.js+++ b/engine/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/elementary-algebra/lib/engine.js b/site/elementary-algebra/lib/engine.jsindex 257515a..f24936a 100644--- a/site/elementary-algebra/lib/engine.js+++ b/site/elementary-algebra/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/joke-collection/lib/engine.js b/site/joke-collection/lib/engine.jsindex 257515a..f24936a 100644--- a/site/joke-collection/lib/engine.js+++ b/site/joke-collection/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/little-red-riding-hood/lib/engine.js b/site/little-red-riding-hood/lib/engine.jsindex 257515a..f24936a 100644--- a/site/little-red-riding-hood/lib/engine.js+++ b/site/little-red-riding-hood/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/math-notebook/lib/engine.js b/site/math-notebook/lib/engine.jsindex 257515a..f24936a 100644--- a/site/math-notebook/lib/engine.js+++ b/site/math-notebook/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/physics-notebook/lib/engine.js b/site/physics-notebook/lib/engine.jsindex 257515a..f24936a 100644--- a/site/physics-notebook/lib/engine.js+++ b/site/physics-notebook/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/science/lib/engine.js b/site/science/lib/engine.jsindex 257515a..f24936a 100644--- a/site/science/lib/engine.js+++ b/site/science/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',diff --git a/site/three-little-pigs/lib/engine.js b/site/three-little-pigs/lib/engine.jsindex 257515a..f24936a 100644--- a/site/three-little-pigs/lib/engine.js+++ b/site/three-little-pigs/lib/engine.js@@ -21,6 +21,7 @@ const TRANSLATIONS = {startLesson: 'Start lesson', startFilm: 'Play', aboutMinutesFilm: 'About {n} minutes, with sound.', coverKeys: 'Press {space} to start, {help} for shortcuts.', spaceKey: 'Space',chapterNumber: 'Chapter {n}', aboutMinutes: 'About {n} minutes, with sound and quick checks.',allChapters: 'All chapters', playLabel: 'Play or pause (space)', backLabel: 'Previous step (left arrow)', restartLabel: 'Restart lesson',+ checksInLesson: 'Quick checks and practice are in the interactive lesson.',volumeLabel: 'Adjust volume', volumeTitle: 'Volume (0 = muted)', volumeSlider: 'Volume',helpLabel: 'Keyboard shortcuts (?)', speedLabel: 'Playback speed (< and >)', captionsLabel: 'Captions (C)', fullScreenLabel: 'Full screen', goToStep: 'Go to step {n}: {title}',quickCheck: 'Quick check', countOf: '{k} of {n}', check: 'Check', showAnswer: 'Show answer', nextQuestion: 'Next question', continue: 'Continue',@@ -57,6 +58,7 @@ const TRANSLATIONS = {aboutMinutes: { one: 'Около {n} минуты, со звуком и проверками.', few: 'Около {n} минут, со звуком и проверками.',many: 'Около {n} минут, со звуком и проверками.', other: 'Около {n} минуты, со звуком и проверками.' },allChapters: 'Все главы', playLabel: 'Пуск или пауза (пробел)', backLabel: 'Предыдущий шаг (стрелка влево)', restartLabel: 'Начать урок заново',+ checksInLesson: 'Проверочные вопросы и практика — в интерактивном уроке.',volumeLabel: 'Настроить громкость', volumeTitle: 'Громкость (0 — без звука)', volumeSlider: 'Громкость',helpLabel: 'Горячие клавиши (?)', speedLabel: 'Скорость воспроизведения (< и >)', captionsLabel: 'Субтитры (C)', fullScreenLabel: 'Полный экран', goToStep: 'Перейти к шагу {n}: {title}',quickCheck: 'Проверь себя', countOf: '{k} из {n}', check: 'Проверить', showAnswer: 'Показать ответ', nextQuestion: 'Следующий вопрос', continue: 'Продолжить',@@ -91,6 +93,7 @@ const TRANSLATIONS = {startLesson: '开始上课', startFilm: '播放', aboutMinutesFilm: '约 {n} 分钟,有配音。', coverKeys: '按 {space} 开始,按 {help} 查看快捷键。', spaceKey: '空格',chapterNumber: '第 {n} 章', aboutMinutes: '约 {n} 分钟,含配音和随堂小测。',allChapters: '全部章节', playLabel: '播放或暂停(空格)', backLabel: '上一步(左方向键)', restartLabel: '重新开始本课',+ checksInLesson: '小测验和练习在互动课程里。',volumeLabel: '调节音量', volumeTitle: '音量(0 为静音)', volumeSlider: '音量',helpLabel: '键盘快捷键(?)', speedLabel: '播放速度(< 和 >)', captionsLabel: '字幕(C)', fullScreenLabel: '全屏', goToStep: '跳到第 {n} 步:{title}',quickCheck: '小测', countOf: '{k} / {n}', check: '检查', showAnswer: '显示答案', nextQuestion: '下一题', continue: '继续',@@ -125,6 +128,7 @@ const TRANSLATIONS = {startLesson: '授業を始める', startFilm: '再生', aboutMinutesFilm: '約{n}分、音声つき。', coverKeys: '{space} で開始、{help} でショートカット一覧。', spaceKey: 'スペース',chapterNumber: '第{n}章', aboutMinutes: '約{n}分、音声と確認問題つき。',allChapters: 'すべての章', playLabel: '再生/一時停止(スペース)', backLabel: '前のステップ(左矢印)', restartLabel: '授業を最初から',+ checksInLesson: '確認問題と練習はインタラクティブな授業の中にあります。',volumeLabel: '音量を調整', volumeTitle: '音量(0 でミュート)', volumeSlider: '音量',helpLabel: 'キーボードショートカット(?)', speedLabel: '再生速度(< と >)', captionsLabel: '字幕(C)', fullScreenLabel: '全画面', goToStep: 'ステップ {n}:{title} へ移動',quickCheck: '確認問題', countOf: '{k} / {n}', check: '答え合わせ', showAnswer: '答えを見る', nextQuestion: '次の問題', continue: '続ける',