@sap-ux/project-input-validator
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -6,3 +6,3 @@ import type { TOptions } from 'i18next'; | ||
*/ | ||
export declare function initI18n(): Promise<void>; | ||
export declare function initI18nProjectValidators(): Promise<void>; | ||
/** | ||
@@ -9,0 +9,0 @@ * Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used. |
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.t = exports.initI18n = exports.PROJECT_INPUT_VALIDATOR_NS = void 0; | ||
exports.t = exports.initI18nProjectValidators = exports.PROJECT_INPUT_VALIDATOR_NS = void 0; | ||
const i18next_1 = __importDefault(require("i18next")); | ||
@@ -23,18 +23,8 @@ const project_input_validator_i18n_json_1 = __importDefault(require("./translations/project-input-validator.i18n.json")); | ||
*/ | ||
function initI18n() { | ||
function initI18nProjectValidators() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield i18next_1.default.init({ | ||
resources: { | ||
en: { | ||
[exports.PROJECT_INPUT_VALIDATOR_NS]: project_input_validator_i18n_json_1.default | ||
} | ||
}, | ||
lng: 'en', | ||
fallbackLng: 'en', | ||
defaultNS: exports.PROJECT_INPUT_VALIDATOR_NS, | ||
ns: [exports.PROJECT_INPUT_VALIDATOR_NS] | ||
}); | ||
yield i18next_1.default.init({ lng: 'en', fallbackLng: 'en' }, () => i18next_1.default.addResourceBundle('en', exports.PROJECT_INPUT_VALIDATOR_NS, project_input_validator_i18n_json_1.default)); | ||
}); | ||
} | ||
exports.initI18n = initI18n; | ||
exports.initI18nProjectValidators = initI18nProjectValidators; | ||
/** | ||
@@ -54,5 +44,5 @@ * Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used. | ||
exports.t = t; | ||
initI18n().catch(() => { | ||
initI18nProjectValidators().catch(() => { | ||
// needed by lint | ||
}); | ||
//# sourceMappingURL=i18n.js.map |
@@ -43,3 +43,3 @@ { | ||
"invalidModuleName": "Invalid module name", | ||
"moduleAlreadyExists": "The folder: {{folderName}} already exists at the specified path" | ||
"moduleAlreadyExists": "The module folder named: {{folderName}} already exists at the specified path" | ||
}, | ||
@@ -46,0 +46,0 @@ "general": { |
@@ -137,7 +137,7 @@ "use strict"; | ||
'name can no longer contain more than 214 characters': (0, i18n_1.t)('ui5.nameTooLong', { length: 214 }), | ||
'name can no longer contain capital letters': (0, i18n_1.t)('ui5.INPUT_VALUE_CONTAINS_CAPITAL', { | ||
'name can no longer contain capital letters': (0, i18n_1.t)('ui5.inputValueContainsCapital', { | ||
promptName: 'Module' | ||
}), | ||
'name can no longer contain special characters ("~\'!()*")': (0, i18n_1.t)('ui5.NAME_CONTAINS_SPECIAL_CHARACTERS'), | ||
'name can only contain URL-friendly characters': (0, i18n_1.t)('ui5.NAME_NOT_URL_FRIENDLY') | ||
'name can no longer contain special characters ("~\'!()*")': (0, i18n_1.t)('ui5.nameContainsSpecialCharacters'), | ||
'name can only contain URL-friendly characters': (0, i18n_1.t)('ui5.nameNotUrlFriendly') | ||
}; | ||
@@ -144,0 +144,0 @@ const valid = (0, validate_npm_package_name_1.default)(moduleName); |
{ | ||
"name": "@sap-ux/project-input-validator", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Library to validate Fiori project input formats", | ||
@@ -17,3 +17,3 @@ "repository": { | ||
"dependencies": { | ||
"i18next": "20.6.1", | ||
"i18next": "23.5.1", | ||
"validate-npm-package-name": "5.0.0" | ||
@@ -20,0 +20,0 @@ }, |
37455
536
+ Addedi18next@23.5.1(transitive)
- Removedi18next@20.6.1(transitive)
Updatedi18next@23.5.1