@crowdin/crowdin-apps-functions
Version:
Utility library to easily and quickly develop Crowdin App
40 lines (39 loc) • 1.48 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBundleConfigurationForm = void 0;
/**
*
* @returns UI template for custom formatters
*/
function getBundleConfigurationForm() {
return {
formSchema: {
type: 'object',
properties: {
plurals: {
type: 'string',
title: 'Plurals Serialization',
enum: ['array', 'icu', 'concat'],
enumNames: ['JSON Array', 'ICU', 'Concat (with | as a separator)'],
default: 'array',
},
placeholders: {
type: 'string',
title: 'Placeholders Format',
enum: ['none', 'mustache', 'xlf'],
enumNames: ['None', 'Mustache ( {$1} )', 'XLIFF ( <x>$1</x> )'],
default: 'none',
},
},
},
formUiSchema: {
plurals: {
'ui:help': 'Use this option only if you have plural strings in your project.',
},
placeholders: {
'ui:help': 'This option can only be used if you have enabled the "Unified placeholders" option in your Crowdin project. Use this field to configure your preferred format of placeholders in the resulting resource file.',
},
},
};
}
exports.getBundleConfigurationForm = getBundleConfigurationForm;