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
@@ -31,16 +31,17 @@ import {
|
||||
} from '@/editor/mode'
|
||||
import { leaveGuardArmed, useEditorStore } from '@/editor/state/editorStore'
|
||||
import { FocusConsumedContext, type FocusRequest } from '@/editor/focusRequest'
|
||||
import type { EditorTabId, EditorTabProps } from '@/editor/tabs'
|
||||
import {
|
||||
initialTab,
|
||||
type EditorTabId,
|
||||
type EditorTabProps,
|
||||
} from '@/editor/tabs'
|
||||
import { useUndoShortcuts } from '@/editor/useUndoShortcuts'
|
||||
import { useTabTier } from '@/editor/useViewport'
|
||||
import { useAuthStore } from '@/state/authStore'
|
||||
import { useT } from '@/i18n/useT'
|
||||
import { SheetNotFound } from './AdminSheetRoute'
|
||||
|
||||
/** The tab the boards open on (04 and 05 both show the annotations). */
|
||||
const FIRST_TAB: EditorTabId = 'annotations'
|
||||
|
||||
interface DraftEditorProps {
|
||||
sheet: OfficialSheetAdmin
|
||||
versionId: string
|
||||
@@ -78,7 +79,7 @@ function DraftEditor({
|
||||
}: DraftEditorProps) {
|
||||
const t = useT()
|
||||
const tier = useTabTier()
|
||||
const [tab, setTab] = useState<EditorTabId>(FIRST_TAB)
|
||||
const [chosen, setTab] = useState<EditorTabId | null>(null)
|
||||
const [focus, setFocus] = useState<FocusRequest | undefined>()
|
||||
const clearFocus = (serial: number) =>
|
||||
setFocus((prev) => (prev?.serial === serial ? undefined : prev))
|
||||
@@ -91,6 +92,13 @@ function DraftEditor({
|
||||
const sessionVersion = useEditorStore((s) => s.versionId)
|
||||
const failure = useEditorStore((s) => s.failure)
|
||||
const recovery = useEditorStore((s) => s.recovery)
|
||||
const previewState = useEditorStore((s) => s.previewState)
|
||||
const opened = status === 'ready' && sessionVersion === versionId
|
||||
// Chosen once per opened version: later edits never move the user off their tab.
|
||||
if (chosen === null && opened && previewState) {
|
||||
setTab(initialTab(previewState, tier))
|
||||
}
|
||||
const tab = chosen ?? 'annotations'
|
||||
const mode = modeAfterSave(
|
||||
editorMode({ hasRight, sheet, wide: tier === 'wide' }),
|
||||
saveFailure,
|
||||
|
||||
@@ -60,6 +60,7 @@ function NameFields(props: Props) {
|
||||
value={annotation.name?.[locale] ?? ''}
|
||||
onCommit={rename(locale)}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={edit.fieldError(locale)}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Button from '@/components/ui/Button'
|
||||
import { usePlural } from '@/editor/plural'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
/** While a zone or link is being traced: close (3 vertices at least) or drop it. */
|
||||
@@ -12,10 +13,11 @@ export default function TracingBar({
|
||||
onCancel: () => void
|
||||
}) {
|
||||
const t = useT()
|
||||
const plural = usePlural()
|
||||
return (
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
<p className="text-sm text-[var(--color-ink-muted)]">
|
||||
{t('editor.annotations.tracing').replace('{count}', String(count))}
|
||||
{plural('editor.annotations.tracing', count)}
|
||||
</p>
|
||||
<Button type="button" size="sm" disabled={count < 3} onClick={onClose}>
|
||||
{t('editor.annotations.trace_close')}
|
||||
|
||||
@@ -15,6 +15,8 @@ export interface TextFieldProps {
|
||||
readOnly?: boolean
|
||||
multiline?: boolean
|
||||
maxLength?: number
|
||||
/** Opt-in for names and simple labels: the committed value loses its edge spaces. */
|
||||
trim?: boolean
|
||||
hint?: string
|
||||
/** The refusal phrased by the caller, shown next to the control. */
|
||||
error?: string
|
||||
@@ -46,6 +48,7 @@ function EditableText({
|
||||
onCommit,
|
||||
multiline,
|
||||
maxLength,
|
||||
trim,
|
||||
hint,
|
||||
error,
|
||||
}: TextFieldProps) {
|
||||
@@ -56,20 +59,23 @@ function EditableText({
|
||||
setSeen(value)
|
||||
setDraft(value)
|
||||
}
|
||||
const latest = useRef({ draft, value, onCommit })
|
||||
const latest = useRef({ draft, value, onCommit, trim })
|
||||
useEffect(() => {
|
||||
latest.current = { draft, value, onCommit }
|
||||
latest.current = { draft, value, onCommit, trim }
|
||||
})
|
||||
useEffect(
|
||||
() => () => {
|
||||
const pending = latest.current
|
||||
if (pending.draft !== pending.value) pending.onCommit(pending.draft)
|
||||
const next = pending.trim ? pending.draft.trim() : pending.draft
|
||||
if (next !== pending.value) pending.onCommit(next)
|
||||
},
|
||||
[],
|
||||
)
|
||||
|
||||
const commit = () => {
|
||||
if (draft !== value) onCommit(draft)
|
||||
const next = trim ? draft.trim() : draft
|
||||
if (next !== draft) setDraft(next)
|
||||
if (next !== value) onCommit(next)
|
||||
}
|
||||
const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
|
||||
if (event.key === 'Enter' && !event.nativeEvent.isComposing) commit()
|
||||
|
||||
@@ -9,9 +9,10 @@ import DraftField from '@/components/editor/fields/DraftField'
|
||||
import SelectField from '@/components/editor/fields/SelectField'
|
||||
import type { FindingItem, FindingKind } from '@/editor/findings/tree'
|
||||
import type { IdPrefix } from '@/editor/ids'
|
||||
import { isBlank } from '@/editor/sheetDocument'
|
||||
import { elementLabel, isBlank, useSheetDocument } from '@/editor/sheetDocument'
|
||||
import { useEditCommand } from '@/editor/useEditCommand'
|
||||
import { useT } from '@/i18n/useT'
|
||||
import { useLocaleStore } from '@/state/localeStore'
|
||||
|
||||
export const CATEGORY_KINDS: readonly FindingCategoryKind[] = [
|
||||
'dysfunction',
|
||||
@@ -40,6 +41,7 @@ export default function FindingCreateForm({
|
||||
onCancel: () => void
|
||||
}) {
|
||||
const t = useT()
|
||||
const title = useFormTitle(pending)
|
||||
const edit = useEditCommand()
|
||||
const [fr, setFr] = useState('')
|
||||
const [en, setEn] = useState('')
|
||||
@@ -54,15 +56,13 @@ export default function FindingCreateForm({
|
||||
let createdId = ''
|
||||
const added = edit.runNew('form', PREFIX[pending.kind], (id) => {
|
||||
createdId = id
|
||||
return insertCommand(pending, id, { fr, en }, kind)
|
||||
return insertCommand(pending, id, { fr: fr.trim(), en: en.trim() }, kind)
|
||||
})
|
||||
if (added) onCreated(createdId)
|
||||
}
|
||||
return (
|
||||
<div className="space-y-2 rounded-lg border border-dashed border-[var(--color-border)] p-3">
|
||||
<p className="text-sm font-medium">
|
||||
{t(`editor.findings.new.${pending.kind}`)}
|
||||
</p>
|
||||
<p className="text-sm font-medium">{title}</p>
|
||||
<div className="grid gap-3 md:grid-cols-2">
|
||||
{pending.kind === 'category' && (
|
||||
<SelectField
|
||||
@@ -109,6 +109,22 @@ export default function FindingCreateForm({
|
||||
)
|
||||
}
|
||||
|
||||
/** A category lands at zone level, so its title names the zone, whatever is selected. */
|
||||
function useFormTitle(pending: PendingFinding): string {
|
||||
const t = useT()
|
||||
const doc = useSheetDocument()
|
||||
const locale = useLocaleStore((s) => s.locale)
|
||||
if (pending.kind !== 'category' || !doc || !pending.parent) {
|
||||
return t(`editor.findings.new.${pending.kind}`)
|
||||
}
|
||||
const zone = elementLabel(
|
||||
doc,
|
||||
{ kind: 'zone', id: pending.parent.zoneId },
|
||||
locale,
|
||||
)
|
||||
return t('editor.findings.new.category_in_zone').replace('{zone}', zone)
|
||||
}
|
||||
|
||||
const PREFIX: Record<FindingKind, IdPrefix> = {
|
||||
zone: 'zone',
|
||||
category: 'fcat',
|
||||
|
||||
@@ -92,6 +92,7 @@ function Names({
|
||||
value={item.name[locale]}
|
||||
onCommit={rename(locale)}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={edit.fieldError(locale)}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -48,6 +48,7 @@ export default function AttributionSection({
|
||||
value={attribution.license ?? ''}
|
||||
onCommit={(value) => send('license', { license: nullable(value) })}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={edit.fieldError('license')}
|
||||
/>
|
||||
<TextField
|
||||
@@ -78,7 +79,7 @@ function Authors({
|
||||
const [draft, setDraft] = useState('')
|
||||
const add = () => {
|
||||
if (isBlank(draft)) return
|
||||
if (onChange([...authors, draft])) setDraft('')
|
||||
if (onChange([...authors, draft.trim()])) setDraft('')
|
||||
}
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
|
||||
@@ -91,6 +91,7 @@ function CategoryRow({
|
||||
value={category.name[locale]}
|
||||
onCommit={rename(locale)}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={edit.fieldError(locale)}
|
||||
/>
|
||||
))}
|
||||
@@ -133,7 +134,11 @@ function CategoryForm() {
|
||||
op: 'insert',
|
||||
element: {
|
||||
kind: 'category',
|
||||
value: { id, name: { fr, en }, color: nullable(color) },
|
||||
value: {
|
||||
id,
|
||||
name: { fr: fr.trim(), en: en.trim() },
|
||||
color: nullable(color),
|
||||
},
|
||||
},
|
||||
}))
|
||||
if (added) {
|
||||
|
||||
@@ -47,6 +47,7 @@ export default function TextsSection({
|
||||
value={doc.name[locale]}
|
||||
onCommit={rename(locale)}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={edit.fieldError(`name-${locale}`)}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -4,6 +4,7 @@ import type {
|
||||
SheetReport,
|
||||
StatusCounts,
|
||||
} from '@faunosteo/core-wasm/types'
|
||||
import { usePlural } from '@/editor/plural'
|
||||
import { elementLabel } from '@/editor/sheetDocument'
|
||||
import { DOCUMENT_BYTES_CAP, groupThousands } from '@/editor/verification'
|
||||
import { useT } from '@/i18n/useT'
|
||||
@@ -53,7 +54,7 @@ function GroupRow({ group, label }: { group: ReviewGroup; label: string }) {
|
||||
export function Completeness({ report }: { report: SheetReport }) {
|
||||
const t = useT()
|
||||
const { statuses, vet_referrals, uncited } = report.completeness
|
||||
const count = (key: string, n: number) => t(key).replace('{count}', String(n))
|
||||
const count = usePlural()
|
||||
return (
|
||||
<section
|
||||
aria-label={t('editor.verification.completeness')}
|
||||
|
||||
@@ -3,6 +3,7 @@ import FormField from '@/components/ui/FormField'
|
||||
import Textarea from '@/components/ui/Textarea'
|
||||
import { useEditorStore } from '@/editor/state/editorStore'
|
||||
import { NOTE_MAX_LENGTH } from '@/editor/verification'
|
||||
import { usePlural } from '@/editor/plural'
|
||||
import { useT } from '@/i18n/useT'
|
||||
import { useSubmission } from './useSubmission'
|
||||
|
||||
@@ -17,12 +18,10 @@ function useBlockingHint(
|
||||
noteBlank: boolean,
|
||||
): string | null {
|
||||
const t = useT()
|
||||
const plural = usePlural()
|
||||
const unsaved = useEditorStore((s) => s.unsaved || s.staleBase)
|
||||
if (errorCount > 0) {
|
||||
return t('editor.verification.hint.errors').replace(
|
||||
'{count}',
|
||||
String(errorCount),
|
||||
)
|
||||
return plural('editor.verification.hint.errors', errorCount)
|
||||
}
|
||||
if (unsaved) return t('editor.verification.hint.unsaved')
|
||||
return noteBlank ? t('editor.verification.hint.note') : null
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Badge from '@/components/ui/Badge'
|
||||
import { usePlural } from '@/editor/plural'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
interface VerificationSummaryProps {
|
||||
@@ -14,7 +15,7 @@ export default function VerificationSummary({
|
||||
toConfirm,
|
||||
}: VerificationSummaryProps) {
|
||||
const t = useT()
|
||||
const count = (key: string, n: number) => t(key).replace('{count}', String(n))
|
||||
const count = usePlural()
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<h2 className="text-base font-medium">
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function RegionForm() {
|
||||
kind: 'region',
|
||||
value: {
|
||||
code: form.code,
|
||||
name: { fr: form.fr, en: form.en },
|
||||
name: { fr: form.fr.trim(), en: form.en.trim() },
|
||||
count,
|
||||
count_range: range.range,
|
||||
},
|
||||
|
||||
@@ -70,6 +70,7 @@ export default function RegionRow({
|
||||
value={region.name[locale]}
|
||||
onCommit={rename(locale)}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={edit.fieldError(locale)}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -41,7 +41,7 @@ export default function DetailViewForm({
|
||||
value: {
|
||||
kind: 'detail',
|
||||
id,
|
||||
name: { fr: form.fr, en: form.en },
|
||||
name: { fr: form.fr.trim(), en: form.en.trim() },
|
||||
svg_asset_id: null,
|
||||
view_box: box.box,
|
||||
parent_view_id: parent,
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import Button from '@/components/ui/Button'
|
||||
import Dialog from '@/components/ui/Dialog'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
export interface ParentDrawingDialogProps {
|
||||
open: boolean
|
||||
onConfirm: () => void
|
||||
onCancel: () => void
|
||||
}
|
||||
|
||||
/** Names what « Utiliser l'illustration de la vue parente » does before it commits. */
|
||||
export default function ParentDrawingDialog({
|
||||
open,
|
||||
onConfirm,
|
||||
onCancel,
|
||||
}: ParentDrawingDialogProps) {
|
||||
const t = useT()
|
||||
return (
|
||||
<Dialog
|
||||
open={open}
|
||||
onClose={onCancel}
|
||||
title={t('editor.views.drawing.use_parent_title')}
|
||||
description={t('editor.views.drawing.use_parent_body')}
|
||||
>
|
||||
<div className="mt-4 flex flex-wrap justify-end gap-2">
|
||||
<Button type="button" variant="ghost" onClick={onCancel}>
|
||||
{t('editor.views.drawing.use_parent_cancel')}
|
||||
</Button>
|
||||
<Button type="button" onClick={onConfirm}>
|
||||
{t('editor.views.drawing.use_parent_confirm')}
|
||||
</Button>
|
||||
</div>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useRef, type ChangeEvent } from 'react'
|
||||
import { useRef, useState, type ChangeEvent } from 'react'
|
||||
import type { SheetView } from '@faunosteo/core-wasm/types'
|
||||
import ActionButton from '@/components/editor/fields/ActionButton'
|
||||
import Notice from '@/components/ui/Notice'
|
||||
@@ -16,6 +16,7 @@ import { useViewUpdate } from '@/editor/useViewUpdate'
|
||||
import { useT } from '@/i18n/useT'
|
||||
import { useLocaleStore } from '@/state/localeStore'
|
||||
import CleaningDialog from './CleaningDialog'
|
||||
import ParentDrawingDialog from './ParentDrawingDialog'
|
||||
|
||||
/**
|
||||
* A view's drawing: its state, the hint when it is not usable, « Choisir une
|
||||
@@ -92,6 +93,11 @@ function DrawingActions({
|
||||
const t = useT()
|
||||
const upload = useDrawingUpload(view.id)
|
||||
const views = useViewUpdate()
|
||||
const [asking, setAsking] = useState(false)
|
||||
const usesParent = () => {
|
||||
setAsking(false)
|
||||
views.update('drawing', view.id, { svg_asset_id: null }, true)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
@@ -101,14 +107,17 @@ function DrawingActions({
|
||||
readOnly={false}
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() =>
|
||||
views.update('drawing', view.id, { svg_asset_id: null }, true)
|
||||
}
|
||||
onClick={() => setAsking(true)}
|
||||
>
|
||||
{t('editor.views.drawing.use_parent')}
|
||||
</ActionButton>
|
||||
)}
|
||||
</div>
|
||||
<ParentDrawingDialog
|
||||
open={asking}
|
||||
onConfirm={usesParent}
|
||||
onCancel={() => setAsking(false)}
|
||||
/>
|
||||
<UploadNotices upload={upload} />
|
||||
{views.error('drawing') && (
|
||||
<Notice tone="error">{views.error('drawing')}</Notice>
|
||||
|
||||
@@ -35,6 +35,7 @@ export default function ViewNames({
|
||||
value={view.name[locale]}
|
||||
onCommit={rename(locale)}
|
||||
readOnly={readOnly}
|
||||
trim
|
||||
error={views.error(locale)}
|
||||
/>
|
||||
))}
|
||||
|
||||
@@ -137,14 +137,14 @@ export function annotationOf(
|
||||
return {
|
||||
...common,
|
||||
kind: 'detail_trigger',
|
||||
name: named ? { fr: form.fr, en: form.en } : null,
|
||||
name: named ? { fr: form.fr.trim(), en: form.en.trim() } : null,
|
||||
opens_view_id: form.opensViewId,
|
||||
}
|
||||
}
|
||||
return {
|
||||
...common,
|
||||
kind: pending.kind,
|
||||
name: { fr: form.fr, en: form.en },
|
||||
name: { fr: form.fr.trim(), en: form.en.trim() },
|
||||
finding_zone_id: orNull(form.zoneId),
|
||||
vertebral_region_code: orNull(form.regionCode),
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { useT } from '@/i18n/useT'
|
||||
import { useLocaleStore } from '@/state/localeStore'
|
||||
import type { Locale } from '@/i18n/types'
|
||||
|
||||
/** `<key>_one` or `<key>_other` by the locale's plural rule (fr: 0 and 1 are singular). */
|
||||
export function pluralKey(locale: Locale, key: string, count: number): string {
|
||||
const category = new Intl.PluralRules(locale).select(count)
|
||||
return `${key}_${category === 'one' ? 'one' : 'other'}`
|
||||
}
|
||||
|
||||
/** A count phrase: picks the plural form of `key` and fills `{count}`. */
|
||||
export function usePlural(): (key: string, count: number) => string {
|
||||
const t = useT()
|
||||
const locale = useLocaleStore((s) => s.locale)
|
||||
return (key, count) =>
|
||||
t(pluralKey(locale, key, count)).replace('{count}', String(count))
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { ElementKey } from '@faunosteo/core-wasm/types'
|
||||
import type { ElementKey, PreviewState } from '@faunosteo/core-wasm/types'
|
||||
import type { FocusRequest } from './focusRequest'
|
||||
import { unmeasuredViews } from './issues'
|
||||
import type { TabTier } from './useViewport'
|
||||
|
||||
export const EDITOR_TABS = [
|
||||
@@ -28,6 +29,17 @@ export function tabsFor(tier: TabTier): {
|
||||
return { shown, more: EDITOR_TABS.filter((tab) => !shown.includes(tab)) }
|
||||
}
|
||||
|
||||
/**
|
||||
* The tab a version opens on: Annotations once a view can be annotated, Général while
|
||||
* there is nothing to annotate yet. A tier that does not list Général keeps Annotations.
|
||||
*/
|
||||
export function initialTab(state: PreviewState, tier: TabTier): EditorTabId {
|
||||
const unmeasured = unmeasuredViews(state)
|
||||
const measurable = state.document.views.some((v) => !unmeasured.has(v.id))
|
||||
const wanted = measurable ? 'annotations' : 'general'
|
||||
return SHOWN[tier].includes(wanted) ? wanted : 'annotations'
|
||||
}
|
||||
|
||||
/** Props of every tab body (Lots F-J fill them): read-only flag, tab jump, sheet reload. */
|
||||
export interface EditorTabProps {
|
||||
/** Not editable now: a mode that cannot save, or a recovery offer not answered yet. */
|
||||
|
||||
+21
-9
@@ -1360,6 +1360,10 @@ export const en: Dict = {
|
||||
'editor.views.drawing.choose': 'Choose a drawing',
|
||||
'editor.views.drawing.file': 'Drawing file (SVG)',
|
||||
'editor.views.drawing.use_parent': "Use the parent view's drawing",
|
||||
'editor.views.drawing.use_parent_title': "Use the parent view's drawing?",
|
||||
'editor.views.drawing.use_parent_body': "The view will show the parent view's drawing through its crop. Its own drawing file stays stored, and you can undo this change (Undo). The view's annotations go back to \"to confirm\".",
|
||||
'editor.views.drawing.use_parent_confirm': "Use the parent drawing",
|
||||
'editor.views.drawing.use_parent_cancel': 'Cancel',
|
||||
'editor.views.crop.title': 'Crop',
|
||||
'editor.views.crop.toggle': 'Edit the crop',
|
||||
'editor.views.crop.min_x': 'Crop: minimum x',
|
||||
@@ -1426,7 +1430,7 @@ export const en: Dict = {
|
||||
'editor.findings.add_category': 'Add a category',
|
||||
'editor.findings.add_node': 'Add a finding',
|
||||
'editor.findings.new.zone': 'New findings zone',
|
||||
'editor.findings.new.category': 'New findings category',
|
||||
'editor.findings.new.category_in_zone': 'New category in the zone « {zone} »',
|
||||
'editor.findings.new.node': 'New finding',
|
||||
'editor.findings.kind': 'Category type',
|
||||
'editor.findings.kind.dysfunction': 'Dysfunction',
|
||||
@@ -1495,7 +1499,8 @@ export const en: Dict = {
|
||||
'editor.annotations.selection': 'Selection: {kind} « {name} »',
|
||||
'editor.annotations.select_hint': 'Select an annotation on the drawing or in the list to see its properties.',
|
||||
'editor.annotations.properties': 'Annotation properties',
|
||||
'editor.annotations.tracing': '{count} vertex(es) placed.',
|
||||
'editor.annotations.tracing_one': '{count} vertex placed.',
|
||||
'editor.annotations.tracing_other': '{count} vertices placed.',
|
||||
'editor.annotations.trace_close': 'Close the tracing',
|
||||
'editor.annotations.trace_cancel': 'Cancel the tracing',
|
||||
'editor.annotations.replace_polygon': 'Replace with a polygon',
|
||||
@@ -1508,7 +1513,8 @@ export const en: Dict = {
|
||||
'editor.annotations.geometry.r': 'Radius',
|
||||
'editor.annotations.geometry.vertex_x': 'x of vertex {n}',
|
||||
'editor.annotations.geometry.vertex_y': 'y of vertex {n}',
|
||||
'editor.annotations.geometry.vertices': '{count} vertices',
|
||||
'editor.annotations.geometry.vertices_one': '{count} vertex',
|
||||
'editor.annotations.geometry.vertices_other': '{count} vertices',
|
||||
'editor.annotations.geometry.add_vertex': 'Add a vertex',
|
||||
'editor.annotations.geometry.unapplied': 'Values not applied: the draft is unchanged.',
|
||||
'editor.annotations.geometry.unapplied_tag': 'not applied',
|
||||
@@ -1523,16 +1529,21 @@ export const en: Dict = {
|
||||
'editor.findings.references_none': 'No reference cited.',
|
||||
'editor.findings.reference_add': 'Cite a reference',
|
||||
'editor.verification.title': 'Draft check',
|
||||
'editor.verification.errors': '{count} blocking errors',
|
||||
'editor.verification.warnings': '{count} warnings',
|
||||
'editor.verification.to_confirm': '{count} items to confirm',
|
||||
'editor.verification.errors_one': '{count} blocking error',
|
||||
'editor.verification.errors_other': '{count} blocking errors',
|
||||
'editor.verification.warnings_one': '{count} warning',
|
||||
'editor.verification.warnings_other': '{count} warnings',
|
||||
'editor.verification.to_confirm_one': '{count} item to confirm',
|
||||
'editor.verification.to_confirm_other': '{count} items to confirm',
|
||||
'editor.verification.none': 'No issues found',
|
||||
'editor.verification.warnings_title': 'Warnings',
|
||||
'editor.verification.goto': 'Go to {tab}',
|
||||
'editor.verification.to_confirm_info': 'Some items are still to confirm: this does not prevent submission.',
|
||||
'editor.verification.completeness': 'Completeness',
|
||||
'editor.verification.vet_referrals': '{count} veterinary referral(s)',
|
||||
'editor.verification.uncited': '{count} finding(s) citing no reference',
|
||||
'editor.verification.vet_referrals_one': '{count} veterinary referral',
|
||||
'editor.verification.vet_referrals_other': '{count} veterinary referrals',
|
||||
'editor.verification.uncited_one': '{count} finding citing no reference',
|
||||
'editor.verification.uncited_other': '{count} findings citing no reference',
|
||||
'editor.verification.groups': 'Statuses per group',
|
||||
'editor.verification.group_removed': 'removed',
|
||||
'editor.verification.status.to_confirm': 'To confirm',
|
||||
@@ -1554,7 +1565,8 @@ export const en: Dict = {
|
||||
'editor.verification.note': 'Submission note (required)',
|
||||
'editor.verification.submit_title': 'Submission',
|
||||
'editor.verification.submit': 'Submit for review',
|
||||
'editor.verification.hint.errors': 'Fix the {count} blocking errors to submit.',
|
||||
'editor.verification.hint.errors_one': 'Fix the blocking error to submit.',
|
||||
'editor.verification.hint.errors_other': 'Fix the {count} blocking errors to submit.',
|
||||
'editor.verification.hint.unsaved': 'Save the draft before submitting it.',
|
||||
'editor.verification.hint.note': 'Enter the submission note to submit.',
|
||||
'editor.verification.issue.unknown': 'This item breaks a rule of the sheet. Fix the item shown.',
|
||||
|
||||
+21
-9
@@ -1391,6 +1391,10 @@ export const fr: Dict = {
|
||||
'editor.views.drawing.choose': 'Choisir une illustration',
|
||||
'editor.views.drawing.file': "Fichier d'illustration (SVG)",
|
||||
'editor.views.drawing.use_parent': "Utiliser l'illustration de la vue parente",
|
||||
'editor.views.drawing.use_parent_title': "Utiliser l'illustration de la vue parente ?",
|
||||
'editor.views.drawing.use_parent_body': "La vue affichera l'illustration de la vue parente à travers son recadrage. Son propre fichier d'illustration reste enregistré, et vous pouvez annuler ce changement (Annuler). Les annotations de la vue repassent « à confirmer ».",
|
||||
'editor.views.drawing.use_parent_confirm': "Utiliser l'illustration parente",
|
||||
'editor.views.drawing.use_parent_cancel': 'Annuler',
|
||||
'editor.views.crop.title': 'Recadrage',
|
||||
'editor.views.crop.toggle': 'Modifier le recadrage',
|
||||
'editor.views.crop.min_x': 'Recadrage : x minimum',
|
||||
@@ -1457,7 +1461,7 @@ export const fr: Dict = {
|
||||
'editor.findings.add_category': 'Ajouter une catégorie',
|
||||
'editor.findings.add_node': 'Ajouter un constat',
|
||||
'editor.findings.new.zone': 'Nouvelle zone de constats',
|
||||
'editor.findings.new.category': 'Nouvelle catégorie de constats',
|
||||
'editor.findings.new.category_in_zone': 'Nouvelle catégorie dans la zone « {zone} »',
|
||||
'editor.findings.new.node': 'Nouveau constat',
|
||||
'editor.findings.kind': 'Type de catégorie',
|
||||
'editor.findings.kind.dysfunction': 'Dysfonction',
|
||||
@@ -1526,7 +1530,8 @@ export const fr: Dict = {
|
||||
'editor.annotations.selection': 'Sélection : {kind} « {name} »',
|
||||
'editor.annotations.select_hint': 'Sélectionnez une annotation sur le dessin ou dans la liste pour voir ses propriétés.',
|
||||
'editor.annotations.properties': "Propriétés de l'annotation",
|
||||
'editor.annotations.tracing': '{count} sommet(s) posé(s).',
|
||||
'editor.annotations.tracing_one': '{count} sommet posé.',
|
||||
'editor.annotations.tracing_other': '{count} sommets posés.',
|
||||
'editor.annotations.trace_close': 'Fermer le tracé',
|
||||
'editor.annotations.trace_cancel': 'Annuler le tracé',
|
||||
'editor.annotations.replace_polygon': 'Remplacer par un polygone',
|
||||
@@ -1539,7 +1544,8 @@ export const fr: Dict = {
|
||||
'editor.annotations.geometry.r': 'Rayon',
|
||||
'editor.annotations.geometry.vertex_x': 'x du sommet {n}',
|
||||
'editor.annotations.geometry.vertex_y': 'y du sommet {n}',
|
||||
'editor.annotations.geometry.vertices': '{count} sommets',
|
||||
'editor.annotations.geometry.vertices_one': '{count} sommet',
|
||||
'editor.annotations.geometry.vertices_other': '{count} sommets',
|
||||
'editor.annotations.geometry.add_vertex': 'Ajouter un sommet',
|
||||
'editor.annotations.geometry.unapplied': 'Valeurs non appliquées : le brouillon est inchangé.',
|
||||
'editor.annotations.geometry.unapplied_tag': 'non appliqué',
|
||||
@@ -1554,16 +1560,21 @@ export const fr: Dict = {
|
||||
'editor.findings.references_none': 'Aucune référence citée.',
|
||||
'editor.findings.reference_add': 'Citer une référence',
|
||||
'editor.verification.title': 'Contrôle du brouillon',
|
||||
'editor.verification.errors': '{count} erreurs bloquantes',
|
||||
'editor.verification.warnings': '{count} avertissements',
|
||||
'editor.verification.to_confirm': '{count} éléments à confirmer',
|
||||
'editor.verification.errors_one': '{count} erreur bloquante',
|
||||
'editor.verification.errors_other': '{count} erreurs bloquantes',
|
||||
'editor.verification.warnings_one': '{count} avertissement',
|
||||
'editor.verification.warnings_other': '{count} avertissements',
|
||||
'editor.verification.to_confirm_one': '{count} élément à confirmer',
|
||||
'editor.verification.to_confirm_other': '{count} éléments à confirmer',
|
||||
'editor.verification.none': 'Aucun problème détecté',
|
||||
'editor.verification.warnings_title': 'Avertissements',
|
||||
'editor.verification.goto': 'Aller à {tab}',
|
||||
'editor.verification.to_confirm_info': "Des éléments restent à confirmer : cela n'empêche pas la soumission.",
|
||||
'editor.verification.completeness': 'Complétude',
|
||||
'editor.verification.vet_referrals': '{count} renvoi(s) vers un vétérinaire',
|
||||
'editor.verification.uncited': '{count} constat(s) sans référence citée',
|
||||
'editor.verification.vet_referrals_one': '{count} renvoi vers un vétérinaire',
|
||||
'editor.verification.vet_referrals_other': '{count} renvois vers un vétérinaire',
|
||||
'editor.verification.uncited_one': '{count} constat sans référence citée',
|
||||
'editor.verification.uncited_other': '{count} constats sans référence citée',
|
||||
'editor.verification.groups': 'Statuts par groupe',
|
||||
'editor.verification.group_removed': 'supprimé',
|
||||
'editor.verification.status.to_confirm': 'À confirmer',
|
||||
@@ -1585,7 +1596,8 @@ export const fr: Dict = {
|
||||
'editor.verification.note': 'Note de soumission (obligatoire)',
|
||||
'editor.verification.submit_title': 'Soumission',
|
||||
'editor.verification.submit': 'Soumettre à la revue',
|
||||
'editor.verification.hint.errors': 'Corrigez les {count} erreurs bloquantes pour soumettre.',
|
||||
'editor.verification.hint.errors_one': "Corrigez l'erreur bloquante pour soumettre.",
|
||||
'editor.verification.hint.errors_other': 'Corrigez les {count} erreurs bloquantes pour soumettre.',
|
||||
'editor.verification.hint.unsaved': 'Enregistrez le brouillon avant de le soumettre.',
|
||||
'editor.verification.hint.note': 'Saisissez la note de soumission pour soumettre.',
|
||||
'editor.verification.issue.unknown': "Ce point ne respecte pas une règle de la fiche. Corrigez l'élément indiqué.",
|
||||
|
||||
Reference in new issue
Block a user