Studio: get basic translations working kindoff

This commit is contained in:
Pieter Vander Vennet 2023-06-30 13:36:02 +02:00
parent 2923020575
commit b58ba665b5
36 changed files with 13542 additions and 15486 deletions

View file

@ -0,0 +1,16 @@
import { Validator } from "../Validator"
export default class TranslationValidator extends Validator {
constructor() {
super("translation", "Makes sure the the string is of format `Record<string, string>` ")
}
isValid(value: string, getCountry?: () => string): boolean {
try {
JSON.parse(value)
return true
} catch (e) {
return false
}
}
}