nocode-js / sequential-workflow-editor

Powerful workflow editor builder for any workflow designer.
https://nocode-js.com/
MIT License
86 stars 8 forks source link

Add more support for i18n #37

Closed mythsman closed 4 months ago

mythsman commented 5 months ago

It seems that the alert strings in this file (or more) model/src/validator/variable-name-validator.ts have not been converted using context.i18n:

export function variableNameValidator(name: string): string | null {
        if (!name) {
                return 'Variable name is required.';
        }
        if (name.length > MAX_LENGTH) {
                return `Variable name must be ${MAX_LENGTH} characters or less.`;
        }
        if (!/^[A-Za-z][a-zA-Z_0-9-]*$/.test(name)) {
                return 'Variable name contains invalid characters.';
        }
        return null;
}

Could you please provide support for this?

b4rtaz commented 5 months ago

Thanks for reporting, will be fixed soon.

b4rtaz commented 5 months ago

Hello @mythsman, please check the 0.13.1 version.

mythsman commented 5 months ago

Solved , thanks a lot !

mythsman commented 4 months ago

And I also find these lines 😏

https://github.com/nocode-js/sequential-workflow-editor/blob/bd0f449270346fd8e292b1ec63bcee93c15a5f0b/editor/src/value-editors/variable-definitions/variable-definitions-value-editor.ts#L32

https://github.com/nocode-js/sequential-workflow-editor/blob/bd0f449270346fd8e292b1ec63bcee93c15a5f0b/editor/src/value-editors/variable-definitions/variable-definitions-value-editor.ts#L37

b4rtaz commented 4 months ago

Oh, you're right. Thanks! Please check the 0.13.2 version.