localization

package
v0.0.0-...-347cd60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 44

Documentation

Index

Constants

View Source
const DefaultLocale = "en_us"

Variables

View Source
var (
	ErrorFriendNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorKeyNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorKeyAlreadySet = Translations{
						// contains filtered or unexported fields
	}
	ErrorEntryNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorAccountNotFound = Translations{
							// contains filtered or unexported fields
	}
	ErrorSessionNotFound = Translations{
							// contains filtered or unexported fields
	}
	ErrorInvitesEmpty = Translations{
						// contains filtered or unexported fields
	}
)
View Source
var (
	ErrorUsernameTaken = Translations{
						// contains filtered or unexported fields
	}
	ErrorUsernameInvalid = Translations{
							// contains filtered or unexported fields
	}
	ErrorDisplayNameInvalid = Translations{
							// contains filtered or unexported fields
	}
	ErrorEmailInvalid = Translations{
						// contains filtered or unexported fields
	}
	ErrorEmailAlreadyInUse = Translations{
							// contains filtered or unexported fields
	}
	ErrorEmailNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorEmailCodeInvalid = Translations{
							// contains filtered or unexported fields
	}
	ErrorSessionNotVerified = Translations{
							// contains filtered or unexported fields
	}
	ErrorPasswordIncorrect = Translations{
							// contains filtered or unexported fields
	}
	ErrorPasswordsDontMatch = Translations{
							// contains filtered or unexported fields
	}
	ErrorAuthRatelimit = Translations{
						// contains filtered or unexported fields
	}
	ErrorInviteInvalid = Translations{
						// contains filtered or unexported fields
	}
	ErrorSSONotCompleted = Translations{
							// contains filtered or unexported fields
	}

	// Localization for general auth stuff
	AuthNextStepButton = Translations{
						// contains filtered or unexported fields
	}
	AuthSubmitButton = Translations{
						// contains filtered or unexported fields
	}
	AuthFinishButton = Translations{
						// contains filtered or unexported fields
	}
	AuthResendEmailButton = Translations{
							// contains filtered or unexported fields
	}

	// Localization for the auth start page
	AuthStartTitle = Translations{
					// contains filtered or unexported fields
	}
	AuthStartEmailPlaceholder = Translations{
								// contains filtered or unexported fields
	}
	AuthStartCreateButton = Translations{
							// contains filtered or unexported fields
	}

	// Localization for the password page
	LoginPasswordTitle = Translations{
						// contains filtered or unexported fields
	}
	LoginPasswordPlaceholder = Translations{
								// contains filtered or unexported fields
	}

	// Localization for register invite form
	RegisterInviteTitle = Translations{
						// contains filtered or unexported fields
	}
	RegisterInvitePlaceholder = Translations{
								// contains filtered or unexported fields
	}

	// Localization for the email validate form
	RegisterCodeTitle = Translations{
						// contains filtered or unexported fields
	}
	RegisterCodeDescription = Translations{
							// contains filtered or unexported fields
	}
	RegisterCodePlaceholder = Translations{
							// contains filtered or unexported fields
	}
	RegisterResendEmailDescription = Translations{
									// contains filtered or unexported fields
	}

	// Localization for username registration form
	RegisterUsernameTitle = Translations{
							// contains filtered or unexported fields
	}
	RegisterUsername = Translations{
						// contains filtered or unexported fields
	}
	RegisterUsernameRequirements = Translations{
									// contains filtered or unexported fields
	}
	RegisterUsernamePlaceholder = Translations{
								// contains filtered or unexported fields
	}
	RegisterDisplayName = Translations{
						// contains filtered or unexported fields
	}
	RegisterDisplayNameRequirements = Translations{
									// contains filtered or unexported fields
	}
	RegisterDisplayNamePlaceholder = Translations{
									// contains filtered or unexported fields
	}

	// Localization for the password adding form
	RegisterPasswordTitle = Translations{
							// contains filtered or unexported fields
	}
	RegisterPasswordRequirements = Translations{
									// contains filtered or unexported fields
	}
	RegisterPasswordPlaceholder = Translations{
								// contains filtered or unexported fields
	}
	RegisterPasswordConfirmPlaceholder = Translations{
										// contains filtered or unexported fields
	}

	// Localization for SSO start
	RegisterSSOTitle = Translations{
						// contains filtered or unexported fields
	}
	RegisterSSODescription = Translations{
							// contains filtered or unexported fields
	}
	RegisterSSOButton = Translations{
						// contains filtered or unexported fields
	}
	RegisterSSOStatus = Translations{
						// contains filtered or unexported fields
	}
	RegisterSSOComplete = Translations{
						// contains filtered or unexported fields
	}
)
View Source
var (
	ErrorAlreadyInSpace = Translations{
						// contains filtered or unexported fields
	}
	ErrorKickNoPermission = Translations{
							// contains filtered or unexported fields
	}
	ErrorGroupDataTooLong = Translations{
							// contains filtered or unexported fields
	}
	ErrorMessageAlreadyDeleted = Translations{
								// contains filtered or unexported fields
	}
	ErrorMessageTooLong = Translations{
						// contains filtered or unexported fields
	}
	ErrorMessageDeleteNoPermission = Translations{
									// contains filtered or unexported fields
	}
	ErrorDecentralizationDisabled = Translations{
									// contains filtered or unexported fields
	}
)
View Source
var (
	ErrorFileNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorFileDisabled = Translations{
						// contains filtered or unexported fields
	}
)
View Source
var (
	ErrorInvalidRequest = Translations{
						// contains filtered or unexported fields
	}
	ErrorInvalidRequestContent = Translations{
								// contains filtered or unexported fields
	}
	ErrorServer = Translations{
				// contains filtered or unexported fields
	}
	ErrorOtherServer = Translations{
						// contains filtered or unexported fields
	}
	ErrorNode = Translations{
				// contains filtered or unexported fields
	}
	ErrorSpacesNotSetup = Translations{
						// contains filtered or unexported fields
	}
	ErrorMail = Translations{
				// contains filtered or unexported fields
	}
	ErrorNotSetup = Translations{
					// contains filtered or unexported fields
	}
	ErrorNoPermission = Translations{
						// contains filtered or unexported fields
	}
	ErrorNoUnsafeConnections = Translations{
								// contains filtered or unexported fields
	}
	ErrorInvalidCredentials = Translations{
							// contains filtered or unexported fields
	}
	ErrorJapanese = Translations{
					// contains filtered or unexported fields
	}

	DialogTitleError = Translations{
						// contains filtered or unexported fields
	}
	DialogTitleSuccess = Translations{
						// contains filtered or unexported fields
	}
)
View Source
var (
	// Categories
	SettingCategoryFiles = Translations{
							// contains filtered or unexported fields
	}
	SettingCategoryDecentralization = Translations{
									// contains filtered or unexported fields
	}

	// File settings
	SettingFilesMaxUploadSize = Translations{
								// contains filtered or unexported fields
	}
	SettingFilesMaxTotalStorage = Translations{
								// contains filtered or unexported fields
	}

	// Decentralization settings
	SettingDecentralizationEnabled = Translations{
									// contains filtered or unexported fields
	}
	SettingDecentralizationAllowUnsafe = Translations{
										// contains filtered or unexported fields
	}
)
View Source
var (
	ErrorTableNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorTableAlreadyJoined = Translations{
							// contains filtered or unexported fields
	}
	ErrorTableCreationIssue = Translations{
							// contains filtered or unexported fields
	}
	ErrorObjectNotFound = Translations{
						// contains filtered or unexported fields
	}
	ErrorObjectAlreadyHeld = Translations{
							// contains filtered or unexported fields
	}
	ErrorObjectNotInQueue = Translations{
							// contains filtered or unexported fields
	}
	ErrorInvalidAction = Translations{
						// contains filtered or unexported fields
	}
	ErrorTableClientNotFound = Translations{
								// contains filtered or unexported fields
	}
	ErrorRoomNotFound = Translations{
						// contains filtered or unexported fields
	}
)
View Source
var (
	ErrorOneAdminNeeded = Translations{
		// contains filtered or unexported fields
	}
)

Functions

func Locale

func Locale(c *fiber.Ctx) string

Extract the locale from any request

func Translate

func Translate(c *fiber.Ctx, message Translations) string

Translate any message on a request

func TranslateLocale

func TranslateLocale(locale string, message Translations) string

Translate any message using a locale

Types

type Translations

type Translations map[string]string

func AuthRegisterCodeEmailCooldown

func AuthRegisterCodeEmailCooldown(seconds int64) Translations

func ErrorDisplayNameMaxLength

func ErrorDisplayNameMaxLength(maxLength int) Translations

func ErrorDisplayNameMinLength

func ErrorDisplayNameMinLength(minLength int) Translations

func ErrorFileStorageLimit

func ErrorFileStorageLimit(maxSize int64) Translations

func ErrorFileTooLarge

func ErrorFileTooLarge(maxSize int64) Translations

func ErrorFriendLimitReached

func ErrorFriendLimitReached(limit int) Translations

func ErrorGroupMemberLimit

func ErrorGroupMemberLimit(limit int) Translations

func ErrorPasswordInvalid

func ErrorPasswordInvalid(minLength int) Translations

func ErrorRegistrationFailed

func ErrorRegistrationFailed(msg Translations) Translations

func ErrorStoredActionLimitReached

func ErrorStoredActionLimitReached(limit int) Translations

func ErrorUsernameMaxLength

func ErrorUsernameMaxLength(maxLength int) Translations

func ErrorUsernameMinLength

func ErrorUsernameMinLength(minLength int) Translations

func ErrorVaultLimitReached

func ErrorVaultLimitReached(limit int) Translations

func None

func None() Translations

func TranslateFileSize

func TranslateFileSize(fileSize float64) Translations

Format amount of bytes to a translated string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL