fix(editor): plurals, trimmed names, default tab, parent drawing confirmation
This commit is contained in:
1 parent
b42c6ae844
commit
be4f468790
35 files changed
+385
-63
No files matched your search
@@ -12,6 +12,7 @@ import {
|
||||
type EditableGeometry,
|
||||
type GroupFields,
|
||||
} from '@/editor/annotations/geometryEdit'
|
||||
import { usePlural } from '@/editor/plural'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
/** What applying the group answers: kept, or the words that say why not. */
|
||||
@@ -208,7 +209,6 @@ function CircleRows(props: RowsProps<Extract<Fields, { type: 'circle' }>>) {
|
||||
}
|
||||
|
||||
function PolygonRows(props: RowsProps<PolygonFields>) {
|
||||
const t = useT()
|
||||
const [selected, setSelected] = useState(0)
|
||||
const { fields } = props
|
||||
const change = (index: number, axis: 'x' | 'y', value: string) =>
|
||||
@@ -218,11 +218,11 @@ function PolygonRows(props: RowsProps<PolygonFields>) {
|
||||
i === index ? { ...row, [axis]: value } : row,
|
||||
),
|
||||
})
|
||||
const count = String(fields.rows.length)
|
||||
const plural = usePlural()
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<p className="text-sm text-[var(--color-ink-muted)]">
|
||||
{t('editor.annotations.geometry.vertices').replace('{count}', count)}
|
||||
{plural('editor.annotations.geometry.vertices', fields.rows.length)}
|
||||
</p>
|
||||
{fields.rows.map((row, index) => (
|
||||
<VertexRow
|
||||
|
||||
Reference in new issue
Block a user