-
Notifications
You must be signed in to change notification settings - Fork 47
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): add options field #478
Conversation
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.
Approach seems good, given the limitations we're dealing with.
* Add options field that can be passed into the instance. These options then will be passed to the annotator in Preview SDK.
* Add language field in type
* PR Feedback
* Add intl wrapper object for options
viewerOptions?: ViewerOptions | null; | ||
|
||
/** | ||
* [constructor] | ||
* | ||
* @param {Object} viewerOptions - Viewer-specific annotator options | ||
* @param {AnnotationsOptions } options - options passed to the annotations instance |
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.
nit: space between { and AnnotationsOptions
@@ -157,4 +157,17 @@ describe('BoxAnnotations', () => { | |||
expect(loader.determineAnnotator(options, config)).toBeNull(); | |||
}); | |||
}); | |||
|
|||
describe('getOptions', () => { | |||
it.each([undefined, { intl: { messages: { test: 'Hello' } } }])( |
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.
Should this be test
rather than it
?
determineAnnotator
. These options will then be passed to the annotator configs in Preview SDK and use the currentintl
framework