-
Notifications
You must be signed in to change notification settings - Fork 432
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
feat(i18n): convert document actions strings to use i18n primitives #4968
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Full Reportsanity
@sanity/types
sanity/desk
@sanity/diff
@sanity/block-tools
@sanity/portable-text-editor
@sanity/mutator
@sanity/cli
@sanity/schema/_internal
@sanity/util/paths
sanity/router
@sanity/util/legacyDateFormat
@sanity/schema
sanity/cli
@sanity/vision
@sanity/util/fs
sanity/_internal
@sanity/util/content
|
Component Testing Report Updated Oct 12, 2023 7:52 PM (UTC)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should align on camelCase vs kebab-case for the i18n resources, eg action.delete.disabled.notReady
vs action.delete.disabled.not-ready
.
I am personally leaning towards kebab-case, but open to input.
'action.restore.label': 'Restore', | ||
|
||
/** Fallback tooltip for when user is looking at the initial version */ | ||
'action.restore.disabled.cantRestoreInitial': "You can't restore to the initial version", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we do not use contractions in identifiers, so I would write this as action.restore.disabled.cannot-restore-initial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Fixed in 8dde36d
Agree. Unless we think these will appear as object keys I don't see any point of using camel case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we agree, it would be great if you changed the keys here to be kebabcase, so action.restore.confirmDialog.confirmDiscardChanges
=> action.restore.confirmDialog.confirm-discard-changes
etc.
Fixed in c07fd19 - thanks for pointing out! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still seems to be using camelcase? Examples:
- discardChanges => discard-changes
- confirmDialog => confirm-dialog
- notPublished => not-published
- notReady => not-ready
- nothingToDelete => nothing-to-delete
There's more, but you get the idea
🤦🏼 aight, new attempt. Also kebab-cased some existing keys for the publish action. |
Description
This converts various document action strings into 18n-keys
Also includes some minor cleanup. Commits can be reviewed one-by-one.