Documentation
¶
Index ¶
- Constants
- Variables
- func ExpressPreSession(app *fiber.App, uiAssets embed.FS)
- func IsValid(langcode string) bool
- type AttributeContainer
- type Hook
- func (h *Hook) DequeueHook(key, id string)
- func (h *Hook) EnqueueGetLineHtmlForExportHook(ctx func(ctx any))
- func (h *Hook) EnqueueGetPluginTranslationHooks(cb func(ctx *events.LocaleLoadContext))
- func (h *Hook) EnqueueHook(key string, ctx func(ctx any)) string
- func (h *Hook) EnqueuePreAuthorizeHook(cb func(ctx *events.PreAuthorizeContext)) string
- func (h *Hook) EnqueuePreAuthzFailureHook(cb func(ctx *events.PreAuthzFailureContext)) string
- func (h *Hook) ExecuteGetLineHtmlForExportHooks(ctx any)
- func (h *Hook) ExecuteGetPluginTranslationHooks(ctx *events.LocaleLoadContext)
- func (h *Hook) ExecuteHooks(key string, ctx any)
- func (h *Hook) ExecutePreAuthorizeHooks(ctx *events.PreAuthorizeContext)
- func (h *Hook) ExecutePreAuthzFailureHooks(ctx *events.PreAuthzFailureContext)
- type LanguageContainer
- type LanguageEntry
- type LanguageInfo
- type Locales
Constants ¶
const PadCopyString = "padCopy"
const PadCreateString = "padCreate"
const PadDefaultContentString = "padDefaultContent"
const PadLoadString = "padLoad"
const PadRemoveString = "padRemove"
const PadUpdateString = "padUpdate"
const PreAuthorizeString = "preAuthorize"
const PreAuthzFailureString = "preAuthzFailure"
Variables ¶
var AllLocales = map[string]map[string]string{}
AllLocales holds every loaded locale's translation map keyed by language tag (e.g. "en", "de"). Each value is map[string]string. Populated by ExpressPreSession at startup. Server-side renderers (e.g. socialmeta) look up translations here without re-parsing the embedded locale files. Upstream #7635 (refactor that exposes i18n.locales for server use).
var AvailableLangs = map[string]LanguageInfo{}
var SortedAvailableLangs []LanguageEntry
Functions ¶
Types ¶
type AttributeContainer ¶
type AttributeContainer struct {
// contains filtered or unexported fields
}
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
func (*Hook) DequeueHook ¶
func (*Hook) EnqueueGetLineHtmlForExportHook ¶ added in v0.0.4
func (*Hook) EnqueueGetPluginTranslationHooks ¶ added in v0.0.4
func (h *Hook) EnqueueGetPluginTranslationHooks(cb func(ctx *events.LocaleLoadContext))
func (*Hook) EnqueuePreAuthorizeHook ¶ added in v0.6.3
func (h *Hook) EnqueuePreAuthorizeHook(cb func(ctx *events.PreAuthorizeContext)) string
EnqueuePreAuthorizeHook registers a callback for the preAuthorize hook, which lets plugins permit or deny a request before authentication runs (see events.PreAuthorizeContext).
func (*Hook) EnqueuePreAuthzFailureHook ¶ added in v0.6.3
func (h *Hook) EnqueuePreAuthzFailureHook(cb func(ctx *events.PreAuthzFailureContext)) string
EnqueuePreAuthzFailureHook registers a callback for the preAuthzFailure hook, which lets plugins override the default 403 response after a preAuthorize deny (see events.PreAuthzFailureContext).
func (*Hook) ExecuteGetLineHtmlForExportHooks ¶ added in v0.0.4
func (*Hook) ExecuteGetPluginTranslationHooks ¶ added in v0.0.4
func (h *Hook) ExecuteGetPluginTranslationHooks(ctx *events.LocaleLoadContext)
func (*Hook) ExecuteHooks ¶
func (*Hook) ExecutePreAuthorizeHooks ¶ added in v0.6.3
func (h *Hook) ExecutePreAuthorizeHooks(ctx *events.PreAuthorizeContext)
func (*Hook) ExecutePreAuthzFailureHooks ¶ added in v0.6.3
func (h *Hook) ExecutePreAuthzFailureHooks(ctx *events.PreAuthzFailureContext)
type LanguageContainer ¶
type LanguageContainer struct {
// contains filtered or unexported fields
}
type LanguageEntry ¶ added in v0.6.0
type LanguageEntry struct {
Code string
Info LanguageInfo
}
LanguageEntry is the ordered (code, info) pair used by templates that render the language dropdown. Go maps have no stable iteration order, so SortedAvailableLangs provides the alphabetical-by-native-name ordering that upstream #7477 added on the Node side.