@undp/carbon-library 1.0.156 → 1.0.157-CARBON-339.1
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.
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Components/Internationalization/i18n.d.ts +2 -0
- package/dist/cjs/types/Components/index.d.ts +1 -0
- package/dist/esm/index.js +46 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Components/Internationalization/i18n.d.ts +2 -0
- package/dist/esm/types/Components/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/locales/i18n/addCompany/en.json +38 -0
- package/dist/locales/i18n/addProgramme/en.json +45 -0
- package/dist/locales/i18n/addUser/en.json +24 -0
- package/dist/locales/i18n/coBenifits/en.json +39 -0
- package/dist/locales/i18n/common/en.json +22 -0
- package/dist/locales/i18n/common/es.json +10 -0
- package/dist/locales/i18n/common/fr.json +10 -0
- package/dist/locales/i18n/company/en.json +22 -0
- package/dist/locales/i18n/companyProfile/en.json +43 -0
- package/dist/locales/i18n/creditTransfer/en.json +34 -0
- package/dist/locales/i18n/dashboard/en.json +71 -0
- package/dist/locales/i18n/dashboard/es.json +0 -0
- package/dist/locales/i18n/dashboard/fr.json +0 -0
- package/dist/locales/i18n/economic/en.json +35 -0
- package/dist/locales/i18n/environment/en.json +41 -0
- package/dist/locales/i18n/forgotPassword/en.json +9 -0
- package/dist/locales/i18n/genderParity/en.json +14 -0
- package/dist/locales/i18n/homepage/en.json +32 -0
- package/dist/locales/i18n/login/en.json +10 -0
- package/dist/locales/i18n/login/es.json +9 -0
- package/dist/locales/i18n/login/fr.json +9 -0
- package/dist/locales/i18n/mrvdashboard/en.json +29 -0
- package/dist/locales/i18n/mrvdashboard/es.json +0 -0
- package/dist/locales/i18n/mrvdashboard/fr.json +0 -0
- package/dist/locales/i18n/nav/en.json +11 -0
- package/dist/locales/i18n/ndcAction/en.json +89 -0
- package/dist/locales/i18n/passwordReset/en.json +10 -0
- package/dist/locales/i18n/programme/en.json +77 -0
- package/dist/locales/i18n/resetPassword/en.json +8 -0
- package/dist/locales/i18n/safeguards/en.json +73 -0
- package/dist/locales/i18n/social/en.json +41 -0
- package/dist/locales/i18n/user/en.json +16 -0
- package/dist/locales/i18n/userProfile/en.json +34 -0
- package/dist/locales/i18n/view/en.json +138 -0
- package/dist/locales/i18n/view/es.json +46 -0
- package/package.json +3 -1
package/dist/cjs/index.js
CHANGED
@@ -12,6 +12,11 @@ var Icon = require('react-bootstrap-icons');
|
|
12
12
|
require('react-phone-number-input/style.css');
|
13
13
|
var mapboxgl = require('mapbox-gl');
|
14
14
|
require('mapbox-gl/dist/mapbox-gl.css');
|
15
|
+
var i18n = require('i18next');
|
16
|
+
var reactI18next = require('react-i18next');
|
17
|
+
var Backend = require('i18next-http-backend');
|
18
|
+
var LanguageDetector = require('i18next-browser-languagedetector');
|
19
|
+
var path = require('path');
|
15
20
|
|
16
21
|
function _interopNamespaceDefault(e) {
|
17
22
|
var n = Object.create(null);
|
@@ -26394,6 +26399,47 @@ var TimelineBody = function (props) {
|
|
26394
26399
|
React.createElement("div", { className: "remark-body" }, remark)))));
|
26395
26400
|
};
|
26396
26401
|
|
26402
|
+
var modulePath = new URL((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.js', document.baseURI).href))).pathname;
|
26403
|
+
var localesPath = path.join(path.dirname(path.dirname(path.dirname(modulePath))), 'src', 'locales');
|
26404
|
+
console.log("localesPath : ", localesPath);
|
26405
|
+
i18n
|
26406
|
+
.use(Backend)
|
26407
|
+
.use(LanguageDetector)
|
26408
|
+
.use(reactI18next.initReactI18next)
|
26409
|
+
.init({
|
26410
|
+
backend: {
|
26411
|
+
// translation file path
|
26412
|
+
loadPath: localesPath + '/i18n/{{ns}}/{{lng}}.json',
|
26413
|
+
},
|
26414
|
+
//NOTE - Uncomment to reset the language to english once the user coming back again
|
26415
|
+
// lng: 'en',
|
26416
|
+
fallbackLng: 'en',
|
26417
|
+
//NOTE - Disabled in production
|
26418
|
+
debug: true,
|
26419
|
+
//separate name spaces for each pages
|
26420
|
+
ns: [
|
26421
|
+
'common',
|
26422
|
+
'login',
|
26423
|
+
'dashboard',
|
26424
|
+
'nav',
|
26425
|
+
'company',
|
26426
|
+
'user',
|
26427
|
+
'programme',
|
26428
|
+
'view',
|
26429
|
+
'homepage',
|
26430
|
+
'ndcAction',
|
26431
|
+
'coBenifits',
|
26432
|
+
'environment',
|
26433
|
+
'genderParity',
|
26434
|
+
'safeguards',
|
26435
|
+
'social',
|
26436
|
+
'economic',
|
26437
|
+
'creditTransfer',
|
26438
|
+
'addProgramme',
|
26439
|
+
],
|
26440
|
+
});
|
26441
|
+
|
26442
|
+
exports.i18n = i18n;
|
26397
26443
|
exports.AddNdcActionComponent = AddNdcActionComponent;
|
26398
26444
|
exports.AddNewCompanyComponent = AddNewCompanyComponent;
|
26399
26445
|
exports.AddNewUserComponent = AddNewUserComponent;
|