-
Notifications
You must be signed in to change notification settings - Fork 596
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
Feature batch localization #4852
base: main
Are you sure you want to change the base?
Conversation
PRO-6856: batch localization UI and backend
try { | ||
await manager.localize(req, item, locale, { | ||
update: !payload.relationship ? true : update, | ||
batch: true |
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.
This flag is still not accounted anywhere. The idea is to be passed down to the localization event handlers.
if (e.data?.parentNotLocalized) { | ||
payload.detail = 'apostrophe:parentNotLocalized'; | ||
} else { | ||
payload.detail = e.data?.detail; |
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.
error.data.detail
is a proposed standard in the context of the localization process. If the localization or any underlying event handling throws apos error and provides detail
data property, it will be used in the UI error reporting.
// human-readable message is a standard error payload property. | ||
// For example `error.data.detail`. | ||
if (e.data?.parentNotLocalized) { | ||
payload.detail = 'apostrophe:parentNotLocalized'; |
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 may want to add detail: 'apostrophe:parentNotLocalized'
where parentNotLocalized
is calculated and assigned. This way we can remove the redundant checks here and in the i18n UI.
Summary
The batch localization feature.
What are the specific steps to test this change?
See PRO-6856 and PRO-6965
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.
Other information: