--- import { useT } from '../../i18n/translations'; const isRu = Astro.url.pathname.startsWith('/ru'); const T = useT(isRu ? 'ru' : 'en'); const notationLabel = isRu ? 'Нотация' : 'Notation'; const notationPlaceholder = isRu ? 'напр. 2d6+3, 1d20, 4d4-1' : 'e.g. 2d6+3, 1d20, 4d4-1'; const modeLabel = isRu ? 'Режим' : 'Mode'; const modeNormal = isRu ? 'Обычный' : 'Normal'; const modeAdvantage = isRu ? 'Преимущество' : 'Advantage'; const modeDisadvantage = isRu ? 'Помеха' : 'Disadvantage'; const advOnly = isRu ? 'Преимущество работает только с одним кубиком' : 'Advantage only works with a single die'; const historyTitle = isRu ? 'История бросков' : 'Roll history'; const clearHistory = isRu ? 'Очистить историю' : 'Clear history'; const presets = [ { label: isRu ? 'Атака' : 'Attack', notation: '1d20', stat: false }, { label: isRu ? 'Урон (1d8)' : 'Damage (1d8)', notation: '1d8+3', stat: false }, { label: isRu ? 'Огненный шар' : 'Fireball', notation: '8d6', stat: false }, { label: isRu ? 'Скрытая атака' : 'Sneak Attack', notation: '3d6', stat: false }, { label: isRu ? 'Характеристика' : 'Stat Roll', notation: '4d6', stat: true }, ]; ---
{presets.map((p) => ( ))}
{['4','6','8','10','12','20','100'].map((s) => ( ))}
{[ { value: 'normal', label: modeNormal }, { value: 'advantage', label: modeAdvantage }, { value: 'disadvantage',label: modeDisadvantage }, ].map(({ value, label }, i) => ( ))}