UNPKG

@worktif/purei

Version:

Work TIF Material UI Theme Provider and Customization Suite for React applications with dark mode support and dynamic color schemes

40 lines 1.81 kB
"use strict"; /* * Business Source License 1.1 * * Copyright (C) 2025 Raman Marozau, raman@worktif.com * Use of this software is governed by the Business Source License included in the LICENSE file and at www.mariadb.com/bsl11. * * Change Date: Never * On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file. * Additional Use Grant: Free for personal and non-commercial research use only. * * * SPDX-License-Identifier: BUSL-1.1 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_I18N_FORM_FIELD_LABEL = void 0; exports.getFormFieldLabel = getFormFieldLabel; /** * A default label string used for internationalized form fields. * This string serves as a fallback label to guide users * when customized field-specific labels might not be provided * or when internationalization support is lacking. * * The purpose of this constant is to indicate that the administrator * should provide assistance in understanding or filling out the field. * * @constant {string} DEFAULT_I18N_FORM_FIELD_LABEL */ exports.DEFAULT_I18N_FORM_FIELD_LABEL = 'Administrator Should Help You'; /** * Retrieves the label for a form field based on a given internationalization schema and field key. * * @param {any} i18nSchema - The internationalization schema object containing field labels. * @param {string} fieldKey - The key corresponding to the desired form field label within the schema. * @return {string} The label for the specified form field, or a default message if the key is not found. */ function getFormFieldLabel(i18nSchema, fieldKey) { return i18nSchema ? i18nSchema[fieldKey] : exports.DEFAULT_I18N_FORM_FIELD_LABEL; } //# sourceMappingURL=i18n.js.map