feat: add Russian localization and independent STT languages
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"use client";
|
||||
import { useI18n } from "@/components/i18n";
|
||||
|
||||
|
||||
import { ArrowRightIcon, CornerDownLeftIcon, SquareIcon } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -75,6 +77,7 @@ export function Composer({
|
||||
* empty-Enter share it. */
|
||||
onNext?: () => void;
|
||||
}) {
|
||||
const { t } = useI18n();
|
||||
const act = () => {
|
||||
const action = enterAction({ busy, canSend, nextProblem });
|
||||
if (action === "stop") onStop();
|
||||
@@ -113,7 +116,7 @@ export function Composer({
|
||||
act();
|
||||
}
|
||||
}}
|
||||
placeholder={placeholder}
|
||||
placeholder={t(placeholder)}
|
||||
autoFocus={autoFocus}
|
||||
rows={1}
|
||||
className="field-sizing-content lh-input max-h-48 min-h-10 flex-1 resize-none bg-transparent px-2.5 py-2 outline-none placeholder:text-muted-foreground"
|
||||
@@ -136,16 +139,15 @@ export function Composer({
|
||||
<button
|
||||
type="submit"
|
||||
data-testid="next-problem-button"
|
||||
aria-label="Next problem"
|
||||
aria-label={t("Next problem")}
|
||||
className="flex h-10 shrink-0 items-center justify-center gap-1.5 rounded-[10px] bg-green-600 px-4 font-ui text-xs font-medium uppercase tracking-wide text-white transition-colors hover:bg-green-500"
|
||||
>
|
||||
Next problem
|
||||
<ArrowRightIcon className="size-4" />
|
||||
{t("Next problem")}<ArrowRightIcon className="size-4" />
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
type="submit"
|
||||
aria-label={busy && !canSend ? "Stop" : "Send"}
|
||||
aria-label={busy && !canSend ? t("Stop") : t("Send")}
|
||||
disabled={!busy && !canSend}
|
||||
className={cn(
|
||||
"flex size-10 shrink-0 items-center justify-center rounded-[10px] transition-colors",
|
||||
|
||||
Reference in New Issue
Block a user