storybook-i18n 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -23,6 +23,7 @@ import type { Renderer, ProjectAnnotations } from '@storybook/types';
23
23
  import i18n from 'storybook-i18n/preview';
24
24
  import { withYourI18nDecorator } from './withYourDecorator';
25
25
 
26
+ // @ts-ignore
26
27
  const i18nDecorators = i18n?.decorators || [];
27
28
 
28
29
  const preview: ProjectAnnotations<Renderer> = {
@@ -33,6 +34,8 @@ const preview: ProjectAnnotations<Renderer> = {
33
34
  export default preview;
34
35
  ```
35
36
 
37
+ Due to an issue with Storybook (pending resolution), you will need that `@ts-ignore` above the decorators line.
38
+
36
39
  The currently selected locale is available in the `locale` global, so you can access it in a decorator using the following snippet:
37
40
 
38
41
  ```typscript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-i18n",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "Tool to set the locale in Storybook for i18n",
5
5
  "keywords": [
6
6
  "storybook-addons",