Skip to content

Commit

Permalink
feat: Misc copy fixes (#1210)
Browse files Browse the repository at this point in the history
Adds missing ID prefixes and the Learn more link.
  • Loading branch information
bchu1 authored Oct 3, 2024
1 parent f904258 commit 2da6755
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function AnnotationAlignmentCallout({
>
<CalloutTitle>
<p className="text-sds-body-xs leading-sds-body-xs">
{t('annotationsMayRequireTransformation')}
<I18n i18nKey="annotationsMayRequireTransformation" />
</p>
</CalloutTitle>
<p className="text-sds-header-xs leading-sds-header-xs mt-sds-default font-semibold">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function ConfigureTomogramDownloadContent() {

{multipleTomogramsEnabled && (
<Callout intent="notice" className="!w-full !mt-0">
{t('annotationsMayRequireTransformation')}
<I18n i18nKey="annotationsMayRequireTransformation" />
</Callout>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { checkExhaustive } from 'app/types/utils'
import { useFeatureFlag } from 'app/utils/featureFlags'
import { getTomogramName } from 'app/utils/tomograms'

import { I18n } from '../I18n'
import { AnnotationAlignmentCallout } from './AnnotationAlignmentCallout'
import { APIDownloadTab } from './APIDownloadTab'
import { AWSDownloadTab } from './AWSDownloadTab'
Expand Down Expand Up @@ -177,7 +178,7 @@ export function DownloadOptionsContent() {
/>
) : (
<Callout intent="notice" className="!w-full !mt-sds-xl">
{t('annotationsMayRequireTransformation')}
<I18n i18nKey="annotationsMayRequireTransformation" />
</Callout>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ export function TomogramMetadataDrawer() {
},
{
label: t('depositionId'),
values: [tomogram.deposition?.id ?? ''],
values: [
tomogram.deposition?.id !== undefined
? `${IdPrefix.Dataset}-${tomogram.deposition.id}`
: '',
],
},
{
label: t('depositionDate'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, ButtonProps, TooltipProps } from '@czi-sds/components'

import { IdPrefix } from 'app/constants/idPrefixes'
import { useI18n } from 'app/hooks/useI18n'
import { EventPayloads, Events, usePlausible } from 'app/hooks/usePlausible'
import { useFeatureFlag } from 'app/utils/featureFlags'
Expand Down Expand Up @@ -35,7 +36,9 @@ export function ViewTomogramButton({

const enabled = tomogramId !== undefined && neuroglancerConfig != null
const enabledTooltipText = multipleTomogramsEnabled
? t('viewTomogramInNeuroglancer', { id: tomogramId })
? t('viewTomogramInNeuroglancer', {
id: `${IdPrefix.Tomogram}-${tomogramId}`,
})
: undefined
const disabledTooltipText = multipleTomogramsEnabled
? t('noTomogramsAvailable')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"annotationOverview": "Annotation Overview",
"annotationSoftware": "Annotation Software",
"annotations": "Annotations",
"annotationsMayRequireTransformation": "Annotations may require transformation if the desired tomogram has a different Alignment ID.",
"annotationsMayRequireTransformation": "Annotations may require transformation if the desired tomogram has a different Alignment ID. <url to='https://chanzuckerberg.github.io/cryoet-data-portal/cryoet_data_portal_docsite_data.html#annotations'>Learn about annotation transformation.</url>",
"annotationsSummary": "Annotations Summary",
"annotationsTotal": "Annotations (Total)",
"api": "API",
Expand Down

0 comments on commit 2da6755

Please sign in to comment.