You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/utils/i18n/scripts/generateSupportedLangs.js
+44-33Lines changed: 44 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,17 @@ NAME
5
5
generateSupportedLangs.js — Script to generate the 'src/i18n/messages/currentlySupportedLangs.jsx' file which contains static import for react-intl data.
6
6
7
7
SYNOPSIS
8
-
generateSupportedLangs.js [comma separated list of languages]
This script will generate the 'src/i18n/messages/currentlySupportedLangs.jsx' file which contains static import for
18
+
react-intl data based on the JSON language files present in the 'src/i18n/messages' directory.
17
19
18
20
This script is intended as a temporary solution until the studio-frontend can dynamically load the languages from the react-intl data like the other micro-frontends.
19
21
`;
@@ -24,26 +26,24 @@ const path = require('path');
24
26
constloggingPrefix=path.basename(`${__filename}`);// the name of this JS file
25
27
26
28
// Header note for generated src/i18n/index.js file
27
-
constfilesCodeGeneratorNoticeHeader='// This file is generated by the "i18n/scripts/generateSupportedLangs.js" script.';
29
+
constfilesCodeGeneratorNoticeHeader='// This file is generated by the "generateSupportedLangs.js" script.';
28
30
29
31
/**
30
32
* Create main `src/i18n/index.js` messages import file.
31
33
*
32
34
*
33
35
* @param languages - List of directories with a boolean flag whether its "index.js" file is written
34
36
* The format is "[\{ directory: "frontend-component-example", isWritten: false \}, ...]"
0 commit comments