How to use the sharp.lang function in sharp

To help you get started, we’ve selected a few sharp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github code16 / sharp / packages / form / src / components / fields / date / Date.vue View on Github external
handleInput(e) {
                let m = moment(e.target.value, this.displayFormat, true);
                this.localInputValue = e.target.value;
                if(!m.isValid()) {
                    this.$field.$emit('error', `${lang('form.date.validation_error.format')} (${this.displayFormat})`);
                    this.showPicker = false;
                }
                else {
                    this.rollback();
                    this.$emit('input', m);
                    this.showPicker = true;
                }
            },
github code16 / sharp / packages / form / src / components / ActionBar.vue View on Github external
submitLabel() {
                if(this.uploading) {
                    return lang('action_bar.form.submit_button.pending.upload')
                }
                return this.create
                    ? lang('action_bar.form.submit_button.create')
                    : lang('action_bar.form.submit_button.update');
            },
        },
github code16 / sharp / packages / form / src / components / ActionBar.vue View on Github external
label(element, extra) {
                let localeKey = `action_bar.form.${element}`, stateLabel;
                if(this.actionsState) {
                    let { state, modifier } = this.actionsState;
                    stateLabel = lang(`${localeKey}.${state}.${modifier}`);
                }
                if(!stateLabel && extra) localeKey+=`.${extra}`;
                return stateLabel || lang(localeKey);
            },
            emitAction() {
github code16 / sharp / packages / form / src / components / ActionBar.vue View on Github external
label(element, extra) {
                let localeKey = `action_bar.form.${element}`, stateLabel;
                if(this.actionsState) {
                    let { state, modifier } = this.actionsState;
                    stateLabel = lang(`${localeKey}.${state}.${modifier}`);
                }
                if(!stateLabel && extra) localeKey+=`.${extra}`;
                return stateLabel || lang(localeKey);
            },
            emitAction() {
github code16 / sharp / packages / form / src / components / ActionBar.vue View on Github external
submitLabel() {
                if(this.uploading) {
                    return lang('action_bar.form.submit_button.pending.upload')
                }
                return this.create
                    ? lang('action_bar.form.submit_button.create')
                    : lang('action_bar.form.submit_button.update');
            },
        },
github code16 / sharp / packages / entity-list / src / components / EntityList.vue View on Github external
.catch(error => {
                        const { data } = error.response;
                        if(error.response.status === 422) {
                            showAlert(data.message, {
                                title: lang('modals.state.422.title'),
                                isError: true,
                            });
                        }
                    })
            },

sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images

Apache-2.0
Latest version published 1 month ago

Package Health Score

94 / 100
Full package analysis