Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(i18n): add the i18next/no-literal-string eslint rule #4998

Closed
wants to merge 163 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
3a5a911
feat(i18n): proof of concept i18n framework
snorrees May 10, 2023
cbf5893
fix(core): adjust mismatched tsdoc visibility
rexxars Jul 5, 2023
992513e
fix(i18n): fallback when no localStorage is available
rexxars Jul 5, 2023
f96d1e0
refactor(i18n): drop ability to provide i18n init options
rexxars Jul 13, 2023
cd78d61
chore(i18n): provide example of local studio localization
rexxars Jul 13, 2023
d732047
refactor(core): dedupe localStorage checks
rexxars Jul 14, 2023
c05629f
refactor(config): improve i18n config error messages
rexxars Jul 17, 2023
c117b87
refactor(i18n): align naming to `locale` over `language`/`i18n`
rexxars Jul 17, 2023
fb83bbf
refactor(i18n): drop default namespace exception in backend
rexxars Jul 20, 2023
e354ee5
feat(i18n): make backend retry on failure to load bundles
rexxars Jul 20, 2023
a341382
refactor(i18n): simplify i18next initialization, providers
rexxars Jul 20, 2023
c4f2582
refactor(i18n): limit exposure to i18next library
rexxars Jul 20, 2023
72c9860
refactor(i18n): drop unused resource key test
rexxars Jul 20, 2023
c9cb31a
refactor(i18n): add `i18n` property to config context
rexxars Jul 20, 2023
f578469
refactor(i18n): provide a smaller locales object through context
rexxars Jul 20, 2023
4047670
fix(i18n): drop use of flags for languages
rexxars Jul 20, 2023
7f618aa
fix(i18n): change tsdoc visibility tag for `LocaleSource`
rexxars Jul 20, 2023
64602a8
fix(i18n): annotate alpha/beta items with `@hidden`
rexxars Jul 31, 2023
e40581e
feat(i18n): weave locale source into validation context
rexxars Jul 21, 2023
97c52f1
refactor(types): use interface instead of type for `ValidationContext`
rexxars Jul 21, 2023
c9af0bf
refactor(i18n): do not load language variations for now
rexxars Jul 21, 2023
021ec17
fix(desk): show all validation errors for a given path
rexxars Jul 21, 2023
c6971ad
feat(i18n): add `loadNamespaces` method to i18n source
rexxars Jul 27, 2023
d95b646
feat(i18n): localize default validation messages
rexxars Jul 27, 2023
6dc815b
fix(i18n): error in minimal seconds/minutes localization string
rexxars Jul 27, 2023
20bc64a
feat(i18n): allow specifying object of localized validation messages
rexxars Jul 27, 2023
90d4306
chore(test-studio): provide norwegian validation strings
rexxars Jul 27, 2023
1d73b94
fix(i18n): hide internal helper method, use explicit exports
rexxars Jul 27, 2023
eaaab22
chore(test-studio): remove unused i18n document from desk structure
rexxars Aug 1, 2023
06c52b3
chore(test-studio): include validation example with "all" types
rexxars Aug 1, 2023
702af41
fix(core): re-export `ValidationContext` from `sanity` module
rexxars Aug 1, 2023
570f461
feat(i18n) allow returning localized messages from custom validators
rexxars Aug 1, 2023
5e57311
refactor: do not expose locale namespaces as exports
rexxars Aug 11, 2023
03984ac
feat(desk): add i18n primitives to ChangesInspector
RitaDias Aug 8, 2023
47505b2
feat(desk): add i18n primitives to NoChanges
RitaDias Aug 8, 2023
e455e5c
feat(desk): add i18n primitives to LoadingContent
RitaDias Aug 8, 2023
9d16586
feat(desk): add i18n primitives to ChangeList - Change all button
RitaDias Aug 8, 2023
3d88afe
feat(desk): add i18n primitives to FieldChange
RitaDias Aug 8, 2023
1f412f4
feat(desk): add i18n primitives to GroupChange
RitaDias Aug 8, 2023
c91c888
feat(desk): add i18n primitives to DiffTooltip
RitaDias Aug 8, 2023
2185f02
feat(desk): add i18n primitives to timelineMenu
RitaDias Aug 8, 2023
2120401
feat(desk): add i18n primitives to TimelineError
RitaDias Aug 8, 2023
afe77a0
feat(desk): add i18n primitives to timeline
RitaDias Aug 9, 2023
9aa8234
feat(desk): add i18n primitives to timelineItem + removal of unused c…
RitaDias Aug 9, 2023
1616b0a
refactor(desk): capitalisation on i18n for timeline
RitaDias Aug 14, 2023
71e27e7
refactor(desk): remove unneeded method for revLabel
RitaDias Aug 14, 2023
b89f2d9
refactor(desk): remove unused imports + rely on i18n translate for ti…
RitaDias Aug 14, 2023
fcc0fc5
refactor(desk): remove "desk" prefix from resources
RitaDias Aug 14, 2023
c4bdcff
refactor(desk): remove "core" prefix from studio
RitaDias Aug 14, 2023
0119f72
refactor(core): add plural to diff "revert changes"
RitaDias Aug 14, 2023
6b3d155
refactor(desk): update error subgroup
RitaDias Aug 14, 2023
8c121f2
chore(desk): remove unused usememo
RitaDias Aug 14, 2023
550e177
fix(core): add 'action' subgroup to core (change panel)
RitaDias Aug 14, 2023
982c699
fix(core): add 'action' subgroup to desk (change panel)
RitaDias Aug 14, 2023
47b93b0
refactor: move all change-related resources to core
rexxars Aug 30, 2023
a4cddf7
refactor: pluralize revert changes confirmation
rexxars Aug 30, 2023
634a09c
refactor: sort dependencies of useMemo call
rexxars Aug 30, 2023
bc40bb9
refactor: use unabbreviated resource strings
rexxars Aug 30, 2023
ed5a6e9
refactor: move timeline resources into core
rexxars Aug 30, 2023
af5da0a
refactor: import from sanity, not i18next
rexxars Sep 6, 2023
84fe085
refactor: remove unused import
rexxars Sep 6, 2023
e682670
feat(core): add i18n primitives to SlugInput
RitaDias Aug 24, 2023
f22639f
refactor(i18n): use `inputs` subgroup for resource keys
rexxars Sep 7, 2023
26c04ac
feat(vision): add translation bundle + "dataset" translate key
RitaDias Aug 15, 2023
9b58c70
feat(vision): add i18n primitives to VisionGui
RitaDias Aug 17, 2023
6149f87
feat(vision): add i18n primitives to PerspectivePopover
RitaDias Aug 17, 2023
bbe9142
feat(vision): add i18n primitives to perspectives dropdown (adjust co…
RitaDias Aug 17, 2023
eee1f2d
feat(vision): add i18n primitives to QueryErrorDetails
RitaDias Aug 17, 2023
2e15819
feat(vision): add i18n primitives to tryParseParams
RitaDias Aug 17, 2023
667596a
fix(vision): add missing 't' param to tryParseParams in ParamsEditor
RitaDias Aug 17, 2023
741813d
refactor(vision): reorganize strings by responsibility, move i18n int…
rexxars Sep 7, 2023
78d1833
feat(core): add i18n primitives to StudioNavBar
RitaDias Aug 17, 2023
1093869
feat(core): add i18n primitives to WorkspaceMenuButton
RitaDias Aug 17, 2023
dffe098
feat(core): add i18n primitives to NewDocumentButton
RitaDias Aug 17, 2023
955cdb8
feat(core): add i18n primitives to SearchDialog
RitaDias Aug 17, 2023
3ffd850
feat(core): add i18n primitives to Filters
RitaDias Aug 17, 2023
ea3b0f6
feat(core): add i18n primitives to FilterPopoverContentHeader + Docum…
RitaDias Aug 17, 2023
ca86644
feat(core): add i18n primitives to FilterButton
RitaDias Aug 17, 2023
e31c858
feat(core): add i18n primitives to AddFilterButton
RitaDias Aug 17, 2023
a4fee28
feat(core): add i18n primitives to AddFilterPopoverContent + add plur…
RitaDias Aug 17, 2023
6b753ce
feat(core): add i18n primitives to NoResults
RitaDias Aug 17, 2023
551fb43
feat(core): add i18n primitives to SearchPopover
RitaDias Aug 17, 2023
c08f5ad
feat(core): add i18n primitives to SearchResults
RitaDias Aug 17, 2023
bfef9f5
feat(core): add i18n primitives to SearchError
RitaDias Aug 17, 2023
04d0431
feat(core): add i18n primitives to RecentSearches
RitaDias Aug 17, 2023
b41fe80
feat(core): add i18n primitives to Instructions
RitaDias Aug 17, 2023
c56beac
feat(core): add i18n primitives to ConfigIssuesButton
RitaDias Aug 17, 2023
67d1827
feat(core): add i18n primitives to SchemaProblemGroups
RitaDias Aug 17, 2023
c12244e
feat(core): add i18n primitives to ResourcesButton
RitaDias Aug 17, 2023
d8e89c3
feat(core): add i18n primitives to ResourcesMenuItems
RitaDias Aug 17, 2023
a505d3d
feat(core): add i18n primitives to UserMenu + AppearanceMenu
RitaDias Aug 21, 2023
e36b46b
feat(core): add i18n primitives to LocaleMenu
RitaDias Aug 21, 2023
21aaf9e
feat(core): add i18n primitives to NavDrawer
RitaDias Aug 21, 2023
3c9df09
feat(core): add i18n primitives to NewDocumentList
RitaDias Aug 21, 2023
c78b115
feat(core): add i18n primitives to NewDocumentListOption
RitaDias Aug 21, 2023
494a2fc
feat(core): add i18n primitives to PresenceMenu
RitaDias Aug 21, 2023
3952fd1
feat(core): add i18n primitives to PresenceMenuItem
RitaDias Aug 21, 2023
1d42169
feat(core): add i18n primitives to FilterTooltip
RitaDias Aug 21, 2023
310a9cf
feat(core): add i18n primitives to createFilterMenuItems
RitaDias Aug 21, 2023
e402e5e
feat(core): add i18n primitives to ButtonValue
RitaDias Aug 21, 2023
6f25217
feat(core): add i18n primitives to Asset
RitaDias Aug 22, 2023
3e1459a
feat(core): add i18n primitives to AssetSourceError
RitaDias Aug 22, 2023
cf732ab
feat(core): add i18n primitives to Boolean
RitaDias Aug 22, 2023
dd1d590
feat(core): add i18n primitives to Number
RitaDias Aug 22, 2023
05ac3b5
feat(core): add i18n primitives to NumberRange
RitaDias Aug 22, 2023
76d8ab6
feat(core): add i18n primitives to Reference
RitaDias Aug 22, 2023
ea119fc
feat(core): add i18n primitives to ReferenceAutocomplete
RitaDias Aug 22, 2023
bc9e482
feat(core): add i18n primitives to String
RitaDias Aug 22, 2023
3c0201b
feat(core): add i18n primitives to StringList
RitaDias Aug 22, 2023
8be5e9e
feat(core): add i18n primitives to FilterError
RitaDias Aug 22, 2023
082c5b7
feat(core): add i18n primitives to SearchHeader
RitaDias Aug 22, 2023
c1acdcb
feat(core): add i18n primitives to useSearchState
RitaDias Aug 22, 2023
1b09b74
feat(core): add i18n primitives to documentTypesTruncated
RitaDias Aug 22, 2023
b2d67c4
fix(core): workplace -> workspace
RitaDias Aug 22, 2023
502b56a
feat(core): add i18n primitives to Layout (in WorkspaceAuth)
RitaDias Aug 22, 2023
f492704
feat(core): add i18n primitives to WorkspaceAuth
RitaDias Aug 22, 2023
e2c3df2
refactor(core): way that intruction for search was being called
RitaDias Aug 24, 2023
32f2779
chore(core): update packages/sanity/src/core/i18n/bundles/studio.ts typo
RitaDias Aug 28, 2023
2706896
chore(core): remove unused keys from workspace menu
RitaDias Aug 28, 2023
66573ab
chore(core): update comments for fall back links for help and resources
RitaDias Aug 28, 2023
914d4c1
refactor(core): use component in NewDocumentList + ReferenceAutocomp…
RitaDias Aug 28, 2023
e65d9d6
refactor(core): use `Trans` component in SchemaProblemGroups
RitaDias Aug 28, 2023
8fbcf8c
fix(core): inconsistent navbar prefix
rexxars Sep 7, 2023
3a6ae15
fix(core): fix namespace generic for TFunction
rexxars Sep 8, 2023
f808fba
refactor: improve resource string names for new documents menu, works…
rexxars Sep 9, 2023
6cbefb8
feat(core): add `sliceString`/`truncateString` unicode utility functions
rexxars Sep 12, 2023
360df63
refactor(i18n): move search resources out of `navbar` prefix
rexxars Sep 12, 2023
0188a66
refactor(i18n): align remaining search filter resources
rexxars Sep 13, 2023
052f666
refactor(i18n): drop configuration issues translations for now
rexxars Sep 13, 2023
5f0c4c6
refactor(i18n): drop navbar prefix for help & resources menu
rexxars Sep 13, 2023
6b26b22
refactor(i18n): prepare to send locale for help & resources request
rexxars Sep 13, 2023
3fa89c2
refactor(i18n): drop navbar prefix for user menu resources
rexxars Sep 13, 2023
a0b3c3f
refactor(i18n): drop navbar prefix for presence resources
rexxars Sep 13, 2023
0f4a09a
feat(i18n): implement simplified `Translate` component (#4921)
bjoerge Sep 18, 2023
9018949
refactor(i18n): drop unused imports in `useLocale` hook
rexxars Sep 27, 2023
4125419
refactor(i18n): allow string arrays as <Translate> values
rexxars Sep 27, 2023
3942229
refactor(i18n): make `components` prop required for <Translate>
rexxars Sep 27, 2023
ab1477a
feat(i18n): convert date/datetime input strings to use i18n primitive…
bjoerge Oct 6, 2023
c98dd0f
feat(i18n): add `useIntlListFormat` hook
rexxars Sep 27, 2023
c22bff1
feat(i18n): localize reference input
rexxars Sep 28, 2023
936455a
fix(i18n): improve error message on whitespace in translation components
rexxars Oct 5, 2023
93717bc
feat(i18n): localize reference preview
rexxars Oct 4, 2023
f7d0872
chore: minor norwegian i18n fix (timeAgo needs complete refactoring)
rexxars Oct 5, 2023
eb88a09
refactor(i18n): drop unused value in locale message
rexxars Oct 5, 2023
681387d
refactor(i18n): use consistent naming (searchTerm over searchString)
rexxars Oct 5, 2023
b7e9bc5
refactor(i18n): add missing visibility tag to `useIntlListFormat`
rexxars Oct 5, 2023
796533a
feat(core): add i18n primitives to Grid/ErrorItem + List/ErrorItem
RitaDias Aug 24, 2023
1bfe3ef
feat(core): add i18n primitives to GridArrayInput + ListArrayInput
RitaDias Aug 24, 2023
0a4bf47
feat(core): add i18n primitives to IncompatibleItemType (array, grid,…
RitaDias Aug 24, 2023
49e8d84
feat(core): add i18n primitives to GridItem + PreviewItem
RitaDias Aug 24, 2023
7ee3f25
feat(core): add i18n primitives to ArrayOfObjectsFunctions + ArrayOfP…
RitaDias Aug 24, 2023
7a2afc7
refactor(core): use `Trans` component in InsertMenu
RitaDias Aug 29, 2023
9a1bc01
feat(core): add i18n primitives to uploadTarget in array inputs
RitaDias Aug 29, 2023
47f6095
feat(core): add i18n primitives to ArrayOfObjectsItem
RitaDias Aug 29, 2023
c6906f6
refactor: drop unused imports
rexxars Sep 13, 2023
87ec072
refactor(i18n): drop use of `<Trans />` component
rexxars Oct 5, 2023
934cd0c
fix(i18n): use translated strings for primitive array item row actions
rexxars Oct 5, 2023
d8635aa
refactor(i18n): remove unused import
rexxars Oct 11, 2023
786b7cc
chore(test-studio): use norwegian schema for `allTypes` type
rexxars Oct 11, 2023
cff28db
feat(i18n): convert document actions strings to use i18n primitives (…
bjoerge Oct 13, 2023
0f6f7a5
feat(i18n): convert file, image and imagetool input strings to use i1…
bjoerge Oct 13, 2023
49cbdc6
feat(i18n): convert review changes button to use i18n primitives (#4993)
jtpetty Oct 16, 2023
5422e0e
chore(i18n): add the i18next/no-literal-string eslint rule
jtpetty Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const baseConfig = {
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['import', '@typescript-eslint', 'prettier', 'react', 'tsdoc'],
plugins: ['import', '@typescript-eslint', 'prettier', 'react', 'tsdoc','i18next'],
rules: {
'@typescript-eslint/no-var-requires': 'off', // prefer import/no-dynamic-require
'import/extensions': ['error', {pattern: {cjs: 'always', json: 'always'}}],
Expand All @@ -32,6 +32,7 @@ const baseConfig = {
additionalHooks: '(useMemoObservable|useObservableCallback|useAsync)',
},
],
'i18next/no-literal-string': 2,
},
settings: {
'import/extensions': ['.cjs', '.mjs', '.js', '.jsx', '.ts', '.tsx'],
Expand Down
4 changes: 3 additions & 1 deletion dev/test-studio/components/Branding.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {Box, Text} from '@sanity/ui'
import React from 'react'
import {useTranslation} from 'sanity'

export function Branding() {
const {t} = useTranslation('testStudio')
return (
<Box padding={3}>
<Text weight="bold">Test Studio&trade;</Text>
<Text weight="bold">{t('studio.logo.title')}&trade;</Text>
</Box>
)
}
27 changes: 27 additions & 0 deletions dev/test-studio/components/TranslateExample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {Translate, useTranslation} from 'sanity'
import React from 'react'
import {Card, Text} from '@sanity/ui'
import {InfoFilledIcon} from '@sanity/icons'

export function TranslateExample() {
const {t} = useTranslation('testStudio')
return (
<Card padding={4}>
<Text>
<Translate
t={t}
i18nKey="translate.example"
components={{
Icon: () => <InfoFilledIcon />,
Red: ({children}) => <span style={{color: 'red'}}>{children}</span>,
Bold: ({children}) => <b>{children}</b>,
}}
values={{
keyword: 'something',
duration: '30',
}}
/>
</Text>
</Card>
)
}
31 changes: 31 additions & 0 deletions dev/test-studio/locales/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import {defineLocaleResourceBundle} from 'sanity'

export const testStudioLocaleNamespace = 'testStudio' as const

const enUSStrings = {
'studio.logo.title': 'English logo',
'structure.root.title': 'Content 🇺🇸',
'translate.example':
'<Icon/> Your search for "<Red>{{keyword}}</Red>" took <Bold>{{duration}}ms</Bold>',
}

const enUS = defineLocaleResourceBundle({
locale: 'en-US',
namespace: testStudioLocaleNamespace,
resources: enUSStrings,
})

const noNB = defineLocaleResourceBundle({
locale: 'no-NB',
namespace: testStudioLocaleNamespace,
resources: {
'studio.logo.title': 'Norsk logo',
'structure.root.title': 'Innhold 🇳🇴',
'translate.example':
'<Icon/> Ditt søk på "<Red>{{keyword}}</Red>" tok <Bold>{{duration}}</Bold> millisekunder',
},
})

export type TestStudioLocaleResourceKeys = keyof typeof enUSStrings

export const testStudioLocaleBundles = [enUS, noNB]
118 changes: 118 additions & 0 deletions dev/test-studio/plugins/locale-no-nb/bundles/desk.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import type {DeskLocaleResourceKeys} from 'sanity/desk'

const deskResources: Record<DeskLocaleResourceKeys, string> = {
/** --- PUBLISH ACTION --- */
/** Tooltip when action is disabled because the studio is not ready.*/
'action.publish.disabled.not-ready': 'Operasjonen er ikke klar',

/** Label for action when there are pending changes.*/
'action.publish.draft.label': 'Publiser',

/** Label for the "Publish" document action while publish is being executed.*/
'action.publish.running.label': 'Publiserer…',

/** Label for the "Publish" document action when there are no changes.*/
'action.publish.published.label': 'Publisert',

/** Label for the "Publish" document action when the document has live edit enabled.*/
'action.publish.live-edit.label': 'Publiser',

/** Tooltip for the "Publish" document action when the document has live edit enabled.*/
'action.publish.live-edit.tooltip':
'"Live Edit" er skrudd på for denne dokumenttypen og publisering skjer automatisk når du gjør endringer',

/** Fallback tooltip for the "Publish" document action when publish is invoked for a document with live edit enabled.*/
'action.publish.live-edit.publish-disabled':
'Kan ikke publisere fordi "Live Edit" er skrudd på for denne dokumenttypen.',

/** Tooltip when the "Publish" document action is disabled due to validation issues */
'action.publish.validation-issues.tooltip':
'Valideringsfeil som må rettes før dokumentet kan publiseres',

/** Tooltip when publish button is disabled because the document is already published.*/
'action.publish.already-published.tooltip': 'Publisert for {{timeSincePublished}} siden',

/** Tooltip when publish button is disabled because the document is already published, and published time is unavailable.*/
'action.publish.already-published.no-time-ago.tooltip': 'Allerede publisert',

/** Tooltip when publish button is disabled because there are no changes.*/
'action.publish.tooltip.no-changes': 'Ingen upubliserte endringer',

/** Tooltip when publish button is waiting for validation and async tasks to complete.*/
'action.publish.waiting': 'Venter på at andre oppgaver skal fullføre',

/** --- DELETE ACTION --- **/
/** Tooltip when action button is disabled because the operation is not ready */
'action.delete.disabled.not-ready': 'Operasjonen er ikke klar',

/** Tooltip when action button is disabled because the document does not exist */
'action.delete.disabled.nothing-to-delete':
'Dette dokumentet eksisterer ikke eller har allerede blitt slettet',

/** Label for the "Delete" document action button */
'action.delete.label': 'Slett',

/** Label for the "Delete" document action while the document is being deleted */
'action.delete.running.label': 'Sletter…',

/** --- DISCARD CHANGES ACTION --- **/
/** Tooltip when action button is disabled because the operation is not ready */
'action.discard-changes.disabled.not-ready': 'Operasjonen er ikke klar',

/** Label for the "Discard changes" document action */
'action.discard-changes.label': 'Forkast endringer',

/** Tooltip when action is disabled because the document has no unpublished changes */
'action.discard-changes.disabled.no-change': 'Dette dokumentet har ingen endringer',

/** Tooltip when action is disabled because the document is not published */
'action.discard-changes.disabled.not-published': 'Dette dokumentet er ikke publisert',

/** Message prompting the user to confirm discarding changes */
'action.discard-changes.confirm-dialog.confirm-discard-changes':
'Er du sikker på at du vil forkaste alle endringer siden forrige gang dette dokumentet ble publisert?',

/** --- DUPLICATE ACTION --- */
/** Tooltip when action is disabled because the operation is not ready */
'action.duplicate.disabled.not-ready': 'Operasjonen er ikke klar',

/** Tooltip when action is disabled because the document doesn't exist */
'action.duplicate.disabled.nothing-to-duplicate':
'Dette dokumentet er tomt og kan ikke dupliseres',

/** Label for the "Duplicate" document action */
'action.duplicate.label': 'Duplisèr',

/** Label for the "Duplicate" document action while the document is being duplicated */
'action.duplicate.running.label': 'Duplisèrer…',

/** --- UNPUBLISH ACTION --- */
/** Tooltip when action is disabled because the operation is not ready */
'action.unpublish.disabled.not-ready': 'Operasjonen er ikke klar',

/** Label for the "Unpublish" document action */
'action.unpublish.label': 'Avpubliser',

/** Tooltip when action is disabled because the document is not already published */
'action.unpublish.disabled.not-published': 'Dette dokumentet er ikke publisert',

/** Fallback tooltip for the Unpublish document action when publish is invoked for a document with live edit enabled.*/
'action.unpublish.live-edit.disabled':
'Dette dokumentet har "Live Edit" skrudd på og kan ikke avpubliseres',

/** --- RESTORE ACTION --- */
/** Label for the "Restore" document action */
'action.restore.label': 'Gjenopprett',

/** Fallback tooltip for when user is looking at the initial version */
'action.restore.disabled.cannot-restore-initial': 'Kan ikke gjenopprette til første version',

/** Default tooltip for the action */
'action.restore.tooltip': 'Gjenopprett til denne versjonen',

/** Message prompting the user to confirm that they want to restore to an earlier version*/
'action.restore.confirm-dialog.confirm-discard-changes':
'Er du sikker på at du vil gjenopprette til valgte versjon?',
}

export default deskResources
Loading
Loading