Files
RenewCMS/internal/domain/localization/localizationDomain.go
T

48 lines
1.3 KiB
Go

package localization
import "errors"
var (
ErrSetupRequired = errors.New("the site has no confirmed default language")
ErrLanguagesChanged = errors.New("the languages changed since they were read")
ErrLanguageInUse = errors.New("a language still used by a version cannot be removed")
ErrDefaultNotEnabled = errors.New("the default language must be one of the enabled languages")
ErrNoEnabledLanguage = errors.New("at least one language must stay enabled")
ErrDuplicateLanguage = errors.New("the same language is listed twice")
ErrInvalidSocialLocale = errors.New("invalid social locale")
ErrSetupInProgress = errors.New("another language setup is running")
ErrSetupIncomplete = errors.New("every pending site needs a language")
ErrDuplicateSite = errors.New("the same site is listed twice")
)
const (
SocialLocaleSet = "set"
SocialLocaleDerived = "derived"
SocialLocaleNotSet = "not_set"
)
type Row struct {
Tag string
IsDefault bool
Enabled bool
Confirmed bool
SocialLocale *string
}
type VersionCount struct {
Total int
Published int
Trashed int
}
type Entry struct {
Tag string
Enabled bool
SocialLocale *string
}
type Change struct {
Default string
Languages []Entry
}