--- import { useT } from "../../i18n/translations"; const isRu = Astro.url.pathname.startsWith("/ru"); const T = useT(isRu ? "ru" : "en"); const notationPlaceholder = isRu ? "напр. 2d6+3, 1d20, 4d6dl1" : "e.g. 2d6+3, 1d20, 4d6dl1"; 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 presetsLabel = isRu ? "Пресеты" : "Presets"; const presets = [ { label: isRu ? "Атака" : "Attack", notation: "1d20" }, { label: isRu ? "Урон" : "Damage", notation: "1d8+3" }, { label: isRu ? "Огненный шар" : "Fireball", notation: "8d6" }, { label: isRu ? "Скрытая атака" : "Sneak Attack", notation: "3d6" }, { label: isRu ? "Характеристика" : "Stat Roll", notation: "4d6dl1" }, { label: isRu ? "Яростный удар" : "Savage Strike", notation: "2d6!" }, ]; ---