locales

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package locales says base's own messages in the language the app shows. Apps supply other languages in their catalogs, under the key github.com/nsgo-dev/nsgo/base/locales.

Index

Constants

View Source
const Source = "en"

Source is the language the messages are written in.

Variables

View Source
var Catalog = i18n.NewCatalog("en", "zh-Hans")

Catalog holds the messages' languages: en, the source, zh-Hans, and those other packages supply.

View Source
var Parameters = map[string][]string{
	"SortBy":             {"column"},
	"DiffUnchangedLines": {"n"},
	"CalendarMonth":      {"d"},
	"CalendarMonthName":  {"d"},
	"CalendarWeekday":    {"d"},
	"FlowLabel":          {"nodes", "edges"},
}

Parameters names the parameters of each message that has some, by its method, for the TSX declarations of the messages (tsx.RegisterMessages).

Functions

func BreadcrumbsMore(cx *core.Scope) string

BreadcrumbsMore says "More" in the language the app shows under cx.

What screen readers say of the button listing a breadcrumb path's collapsed ancestors.

func CalendarMonth

func CalendarMonth(cx *core.Scope, d time.Time) string

CalendarMonth says "{d, date, ::yMMMM}" in the language the app shows under cx.

A date in a calendar's header, grid of months or weekday headings.

func CalendarMonthName

func CalendarMonthName(cx *core.Scope, d time.Time) string

CalendarMonthName says "{d, date, ::MMM}" in the language the app shows under cx.

A date in a calendar's header, grid of months or weekday headings.

func CalendarNext

func CalendarNext(cx *core.Scope) string

CalendarNext says "Next month" in the language the app shows under cx.

What a styled picker says for this part.

func CalendarPrevious

func CalendarPrevious(cx *core.Scope) string

CalendarPrevious says "Previous month" in the language the app shows under cx.

What a styled picker says for this part.

func CalendarWeekday

func CalendarWeekday(cx *core.Scope, d time.Time) string

CalendarWeekday says "{d, date, ::EEEEE}" in the language the app shows under cx.

A date in a calendar's header, grid of months or weekday headings.

func CollapseMerge

func CollapseMerge(cx *core.Scope) string

CollapseMerge says "Collapse Merge" in the language the app shows under cx.

What screen readers say of a commit graph's button hiding the commits a merge brings in.

func ColorAlpha

func ColorAlpha(cx *core.Scope) string

ColorAlpha says "Opacity" in the language the app shows under cx.

What a styled picker says for this part.

func ColorBlue

func ColorBlue(cx *core.Scope) string

ColorBlue says "Blue" in the language the app shows under cx.

What a styled picker says for this part.

func ColorBrightnessPercent

func ColorBrightnessPercent(cx *core.Scope) string

ColorBrightnessPercent says "Brightness percent" in the language the app shows under cx.

What a styled picker says for this part.

func ColorCopy

func ColorCopy(cx *core.Scope) string

ColorCopy says "Copy color" in the language the app shows under cx.

What a styled picker says for this part.

func ColorEyeDropper

func ColorEyeDropper(cx *core.Scope) string

ColorEyeDropper says "Pick a color from the screen" in the language the app shows under cx.

What a styled picker says for this part.

func ColorFormat

func ColorFormat(cx *core.Scope) string

ColorFormat says "Color format" in the language the app shows under cx.

What a styled picker says for this part.

func ColorGreen

func ColorGreen(cx *core.Scope) string

ColorGreen says "Green" in the language the app shows under cx.

What a styled picker says for this part.

func ColorHex

func ColorHex(cx *core.Scope) string

ColorHex says "Hex color" in the language the app shows under cx.

What a styled picker says for this part.

func ColorHue

func ColorHue(cx *core.Scope) string

ColorHue says "Hue" in the language the app shows under cx.

What a styled picker says for this part.

func ColorHueDegrees

func ColorHueDegrees(cx *core.Scope) string

ColorHueDegrees says "Hue degrees" in the language the app shows under cx.

What a styled picker says for this part.

func ColorLightnessPercent

func ColorLightnessPercent(cx *core.Scope) string

ColorLightnessPercent says "Lightness percent" in the language the app shows under cx.

What a styled picker says for this part.

func ColorOpacityPercent

func ColorOpacityPercent(cx *core.Scope) string

ColorOpacityPercent says "Opacity percent" in the language the app shows under cx.

What a styled picker says for this part.

func ColorRed

func ColorRed(cx *core.Scope) string

ColorRed says "Red" in the language the app shows under cx.

What a styled picker says for this part.

func ColorSaturationBrightness

func ColorSaturationBrightness(cx *core.Scope) string

ColorSaturationBrightness says "Saturation and brightness" in the language the app shows under cx.

What a styled picker says for this part.

func ColorSaturationPercent

func ColorSaturationPercent(cx *core.Scope) string

ColorSaturationPercent says "Saturation percent" in the language the app shows under cx.

What a styled picker says for this part.

func CommandList

func CommandList(cx *core.Scope) string

CommandList says "Commands" in the language the app shows under cx.

What screen readers say of a command palette's list of results.

func CommandLoading

func CommandLoading(cx *core.Scope) string

CommandLoading says "Loading…" in the language the app shows under cx.

What a command palette says while a search is under way.

func CommandNoMatches

func CommandNoMatches(cx *core.Scope) string

CommandNoMatches says "No matching commands" in the language the app shows under cx.

What a command palette says while no command matches its query.

func CommandSearch

func CommandSearch(cx *core.Scope) string

CommandSearch says "Search commands" in the language the app shows under cx.

What screen readers say of a command palette's search field.

func CommandSearchPlaceholder

func CommandSearchPlaceholder(cx *core.Scope) string

CommandSearchPlaceholder says "Search commands…" in the language the app shows under cx.

The hint in a command palette's empty search field.

func DiffDiscardChanges

func DiffDiscardChanges(cx *core.Scope) string

DiffDiscardChanges says "Discard Changes…" in the language the app shows under cx.

The button that, after asking, throws away the lines of a diff's change.

func DiffExpandAll

func DiffExpandAll(cx *core.Scope) string

DiffExpandAll says "Expand all" in the language the app shows under cx.

What screen readers say of the button showing all of a diff's collapsed lines.

func DiffStage

func DiffStage(cx *core.Scope) string

DiffStage says "Stage" in the language the app shows under cx.

The button staging the lines of a diff's change for a commit.

func DiffUnchangedLines

func DiffUnchangedLines(cx *core.Scope, n int) string

DiffUnchangedLines says "{n, plural, one {# unchanged line} other {# unchanged lines}}" in the language the app shows under cx.

What a diff says of the unchanged lines it collapses.

func EmojiCategories

func EmojiCategories(cx *core.Scope) string

EmojiCategories says "Emoji categories" in the language the app shows under cx.

What screen readers say of an emoji picker's category bar.

func EmojiCategoryActivities

func EmojiCategoryActivities(cx *core.Scope) string

EmojiCategoryActivities says "Activities" in the language the app shows under cx.

The section and category label for activities emoji.

func EmojiCategoryAnimals

func EmojiCategoryAnimals(cx *core.Scope) string

EmojiCategoryAnimals says "Animals & Nature" in the language the app shows under cx.

The section and category label for animals and nature emoji.

func EmojiCategoryFlags

func EmojiCategoryFlags(cx *core.Scope) string

EmojiCategoryFlags says "Flags" in the language the app shows under cx.

The section and category label for flags emoji.

func EmojiCategoryFood

func EmojiCategoryFood(cx *core.Scope) string

EmojiCategoryFood says "Food & Drink" in the language the app shows under cx.

The section and category label for food and drink emoji.

func EmojiCategoryObjects

func EmojiCategoryObjects(cx *core.Scope) string

EmojiCategoryObjects says "Objects" in the language the app shows under cx.

The section and category label for objects emoji.

func EmojiCategoryPeople

func EmojiCategoryPeople(cx *core.Scope) string

EmojiCategoryPeople says "People & Body" in the language the app shows under cx.

The section and category label for people and body emoji.

func EmojiCategoryRecent

func EmojiCategoryRecent(cx *core.Scope) string

EmojiCategoryRecent says "Recently used" in the language the app shows under cx.

The section and category label for recently used emoji.

func EmojiCategorySmileys

func EmojiCategorySmileys(cx *core.Scope) string

EmojiCategorySmileys says "Smileys & Emotion" in the language the app shows under cx.

The section and category label for smileys and emotion emoji.

func EmojiCategorySymbols

func EmojiCategorySymbols(cx *core.Scope) string

EmojiCategorySymbols says "Symbols" in the language the app shows under cx.

The section and category label for symbols emoji.

func EmojiCategoryTravel

func EmojiCategoryTravel(cx *core.Scope) string

EmojiCategoryTravel says "Travel & Places" in the language the app shows under cx.

The section and category label for travel and places emoji.

func EmojiNoMatches

func EmojiNoMatches(cx *core.Scope) string

EmojiNoMatches says "No matching emoji" in the language the app shows under cx.

What an emoji picker says while no emoji matches its query.

func EmojiPicker

func EmojiPicker(cx *core.Scope) string

EmojiPicker says "Emoji picker" in the language the app shows under cx.

What screen readers say of an emoji picker the app gives no label.

func EmojiSearch

func EmojiSearch(cx *core.Scope) string

EmojiSearch says "Search emoji" in the language the app shows under cx.

What screen readers say of an emoji picker's search field.

func EmojiSearchPlaceholder

func EmojiSearchPlaceholder(cx *core.Scope) string

EmojiSearchPlaceholder says "Search emoji…" in the language the app shows under cx.

The hint in an emoji picker's empty search field.

func EmojiSkinTone

func EmojiSkinTone(cx *core.Scope) string

EmojiSkinTone says "Skin tone" in the language the app shows under cx.

What screen readers say of an emoji picker's skin tone selector.

func EmojiSkinToneDark

func EmojiSkinToneDark(cx *core.Scope) string

EmojiSkinToneDark says "Dark skin tone" in the language the app shows under cx.

What screen readers say of the dark skin tone option.

func EmojiSkinToneDefault

func EmojiSkinToneDefault(cx *core.Scope) string

EmojiSkinToneDefault says "Default skin tone" in the language the app shows under cx.

What screen readers say of the default yellow skin tone option.

func EmojiSkinToneLight

func EmojiSkinToneLight(cx *core.Scope) string

EmojiSkinToneLight says "Light skin tone" in the language the app shows under cx.

What screen readers say of the light skin tone option.

func EmojiSkinToneMedium

func EmojiSkinToneMedium(cx *core.Scope) string

EmojiSkinToneMedium says "Medium skin tone" in the language the app shows under cx.

What screen readers say of the medium skin tone option.

func EmojiSkinToneMediumDark

func EmojiSkinToneMediumDark(cx *core.Scope) string

EmojiSkinToneMediumDark says "Medium-dark skin tone" in the language the app shows under cx.

What screen readers say of the medium-dark skin tone option.

func EmojiSkinToneMediumLight

func EmojiSkinToneMediumLight(cx *core.Scope) string

EmojiSkinToneMediumLight says "Medium-light skin tone" in the language the app shows under cx.

What screen readers say of the medium-light skin tone option.

func ExpandMerge

func ExpandMerge(cx *core.Scope) string

ExpandMerge says "Expand Merge" in the language the app shows under cx.

What screen readers say of a commit graph's button showing the commits a merge brings in.

func FlowLabel

func FlowLabel(cx *core.Scope, nodes int, edges int) string

FlowLabel says "{nodes, plural, one {# node} other {# nodes}}, {edges, plural, one {# edge} other {# edges}}" in the language the app shows under cx.

What screen readers say of a flow diagram the app gives no label, its counts of nodes and edges.

func ListClear

func ListClear(cx *core.Scope) string

ListClear says "Clear" in the language the app shows under cx.

What a styled picker says for this part.

func ListNothingFound

func ListNothingFound(cx *core.Scope) string

ListNothingFound says "Nothing found" in the language the app shows under cx.

What a styled picker says for this part.

func ListSearch

func ListSearch(cx *core.Scope) string

ListSearch says "Search" in the language the app shows under cx.

What a styled picker says for this part.

func SortBy

func SortBy(cx *core.Scope, column string) string

SortBy says "Sort by {column}" in the language the app shows under cx.

What screen readers say of a data table column's sort button.

func Supply

func Supply(lang string, t Translation)

Supply adds the messages t has in lang to the catalog, over its own. nsgo writes the calls, in the package that supplies them, which runs them as it initializes.

Types

type Messages

type Messages struct {
	// contains filtered or unexported fields
}

Messages say the messages in one language, their times in the hour cycle hc the user set; with mark, the source's with their arguments marked, which a pseudo locale transforms.

func For

func For(cx *core.Scope) Messages

For returns the messages in the language the app shows under cx (i18n.Language), their times as the user reads them; a binding that says them follows both as they change.

func In

func In(locale string) Messages

In returns the messages in the catalog's language that suits locale best, as zh-Hant suits zh-TW, else in the source language.

func (Messages) BreadcrumbsMore

func (msgs Messages) BreadcrumbsMore() string

BreadcrumbsMore is the package's BreadcrumbsMore in the language of msgs.

func (Messages) CalendarMonth

func (msgs Messages) CalendarMonth(d time.Time) string

CalendarMonth is the package's CalendarMonth in the language of msgs.

func (Messages) CalendarMonthName

func (msgs Messages) CalendarMonthName(d time.Time) string

CalendarMonthName is the package's CalendarMonthName in the language of msgs.

func (Messages) CalendarNext

func (msgs Messages) CalendarNext() string

CalendarNext is the package's CalendarNext in the language of msgs.

func (Messages) CalendarPrevious

func (msgs Messages) CalendarPrevious() string

CalendarPrevious is the package's CalendarPrevious in the language of msgs.

func (Messages) CalendarWeekday

func (msgs Messages) CalendarWeekday(d time.Time) string

CalendarWeekday is the package's CalendarWeekday in the language of msgs.

func (Messages) CollapseMerge

func (msgs Messages) CollapseMerge() string

CollapseMerge is the package's CollapseMerge in the language of msgs.

func (Messages) ColorAlpha

func (msgs Messages) ColorAlpha() string

ColorAlpha is the package's ColorAlpha in the language of msgs.

func (Messages) ColorBlue

func (msgs Messages) ColorBlue() string

ColorBlue is the package's ColorBlue in the language of msgs.

func (Messages) ColorBrightnessPercent

func (msgs Messages) ColorBrightnessPercent() string

ColorBrightnessPercent is the package's ColorBrightnessPercent in the language of msgs.

func (Messages) ColorCopy

func (msgs Messages) ColorCopy() string

ColorCopy is the package's ColorCopy in the language of msgs.

func (Messages) ColorEyeDropper

func (msgs Messages) ColorEyeDropper() string

ColorEyeDropper is the package's ColorEyeDropper in the language of msgs.

func (Messages) ColorFormat

func (msgs Messages) ColorFormat() string

ColorFormat is the package's ColorFormat in the language of msgs.

func (Messages) ColorGreen

func (msgs Messages) ColorGreen() string

ColorGreen is the package's ColorGreen in the language of msgs.

func (Messages) ColorHex

func (msgs Messages) ColorHex() string

ColorHex is the package's ColorHex in the language of msgs.

func (Messages) ColorHue

func (msgs Messages) ColorHue() string

ColorHue is the package's ColorHue in the language of msgs.

func (Messages) ColorHueDegrees

func (msgs Messages) ColorHueDegrees() string

ColorHueDegrees is the package's ColorHueDegrees in the language of msgs.

func (Messages) ColorLightnessPercent

func (msgs Messages) ColorLightnessPercent() string

ColorLightnessPercent is the package's ColorLightnessPercent in the language of msgs.

func (Messages) ColorOpacityPercent

func (msgs Messages) ColorOpacityPercent() string

ColorOpacityPercent is the package's ColorOpacityPercent in the language of msgs.

func (Messages) ColorRed

func (msgs Messages) ColorRed() string

ColorRed is the package's ColorRed in the language of msgs.

func (Messages) ColorSaturationBrightness

func (msgs Messages) ColorSaturationBrightness() string

ColorSaturationBrightness is the package's ColorSaturationBrightness in the language of msgs.

func (Messages) ColorSaturationPercent

func (msgs Messages) ColorSaturationPercent() string

ColorSaturationPercent is the package's ColorSaturationPercent in the language of msgs.

func (Messages) CommandList

func (msgs Messages) CommandList() string

CommandList is the package's CommandList in the language of msgs.

func (Messages) CommandLoading

func (msgs Messages) CommandLoading() string

CommandLoading is the package's CommandLoading in the language of msgs.

func (Messages) CommandNoMatches

func (msgs Messages) CommandNoMatches() string

CommandNoMatches is the package's CommandNoMatches in the language of msgs.

func (Messages) CommandSearch

func (msgs Messages) CommandSearch() string

CommandSearch is the package's CommandSearch in the language of msgs.

func (Messages) CommandSearchPlaceholder

func (msgs Messages) CommandSearchPlaceholder() string

CommandSearchPlaceholder is the package's CommandSearchPlaceholder in the language of msgs.

func (Messages) DiffDiscardChanges

func (msgs Messages) DiffDiscardChanges() string

DiffDiscardChanges is the package's DiffDiscardChanges in the language of msgs.

func (Messages) DiffExpandAll

func (msgs Messages) DiffExpandAll() string

DiffExpandAll is the package's DiffExpandAll in the language of msgs.

func (Messages) DiffStage

func (msgs Messages) DiffStage() string

DiffStage is the package's DiffStage in the language of msgs.

func (Messages) DiffUnchangedLines

func (msgs Messages) DiffUnchangedLines(n int) string

DiffUnchangedLines is the package's DiffUnchangedLines in the language of msgs.

func (Messages) EmojiCategories

func (msgs Messages) EmojiCategories() string

EmojiCategories is the package's EmojiCategories in the language of msgs.

func (Messages) EmojiCategoryActivities

func (msgs Messages) EmojiCategoryActivities() string

EmojiCategoryActivities is the package's EmojiCategoryActivities in the language of msgs.

func (Messages) EmojiCategoryAnimals

func (msgs Messages) EmojiCategoryAnimals() string

EmojiCategoryAnimals is the package's EmojiCategoryAnimals in the language of msgs.

func (Messages) EmojiCategoryFlags

func (msgs Messages) EmojiCategoryFlags() string

EmojiCategoryFlags is the package's EmojiCategoryFlags in the language of msgs.

func (Messages) EmojiCategoryFood

func (msgs Messages) EmojiCategoryFood() string

EmojiCategoryFood is the package's EmojiCategoryFood in the language of msgs.

func (Messages) EmojiCategoryObjects

func (msgs Messages) EmojiCategoryObjects() string

EmojiCategoryObjects is the package's EmojiCategoryObjects in the language of msgs.

func (Messages) EmojiCategoryPeople

func (msgs Messages) EmojiCategoryPeople() string

EmojiCategoryPeople is the package's EmojiCategoryPeople in the language of msgs.

func (Messages) EmojiCategoryRecent

func (msgs Messages) EmojiCategoryRecent() string

EmojiCategoryRecent is the package's EmojiCategoryRecent in the language of msgs.

func (Messages) EmojiCategorySmileys

func (msgs Messages) EmojiCategorySmileys() string

EmojiCategorySmileys is the package's EmojiCategorySmileys in the language of msgs.

func (Messages) EmojiCategorySymbols

func (msgs Messages) EmojiCategorySymbols() string

EmojiCategorySymbols is the package's EmojiCategorySymbols in the language of msgs.

func (Messages) EmojiCategoryTravel

func (msgs Messages) EmojiCategoryTravel() string

EmojiCategoryTravel is the package's EmojiCategoryTravel in the language of msgs.

func (Messages) EmojiNoMatches

func (msgs Messages) EmojiNoMatches() string

EmojiNoMatches is the package's EmojiNoMatches in the language of msgs.

func (Messages) EmojiPicker

func (msgs Messages) EmojiPicker() string

EmojiPicker is the package's EmojiPicker in the language of msgs.

func (Messages) EmojiSearch

func (msgs Messages) EmojiSearch() string

EmojiSearch is the package's EmojiSearch in the language of msgs.

func (Messages) EmojiSearchPlaceholder

func (msgs Messages) EmojiSearchPlaceholder() string

EmojiSearchPlaceholder is the package's EmojiSearchPlaceholder in the language of msgs.

func (Messages) EmojiSkinTone

func (msgs Messages) EmojiSkinTone() string

EmojiSkinTone is the package's EmojiSkinTone in the language of msgs.

func (Messages) EmojiSkinToneDark

func (msgs Messages) EmojiSkinToneDark() string

EmojiSkinToneDark is the package's EmojiSkinToneDark in the language of msgs.

func (Messages) EmojiSkinToneDefault

func (msgs Messages) EmojiSkinToneDefault() string

EmojiSkinToneDefault is the package's EmojiSkinToneDefault in the language of msgs.

func (Messages) EmojiSkinToneLight

func (msgs Messages) EmojiSkinToneLight() string

EmojiSkinToneLight is the package's EmojiSkinToneLight in the language of msgs.

func (Messages) EmojiSkinToneMedium

func (msgs Messages) EmojiSkinToneMedium() string

EmojiSkinToneMedium is the package's EmojiSkinToneMedium in the language of msgs.

func (Messages) EmojiSkinToneMediumDark

func (msgs Messages) EmojiSkinToneMediumDark() string

EmojiSkinToneMediumDark is the package's EmojiSkinToneMediumDark in the language of msgs.

func (Messages) EmojiSkinToneMediumLight

func (msgs Messages) EmojiSkinToneMediumLight() string

EmojiSkinToneMediumLight is the package's EmojiSkinToneMediumLight in the language of msgs.

func (Messages) ExpandMerge

func (msgs Messages) ExpandMerge() string

ExpandMerge is the package's ExpandMerge in the language of msgs.

func (Messages) FlowLabel

func (msgs Messages) FlowLabel(nodes int, edges int) string

FlowLabel is the package's FlowLabel in the language of msgs.

func (Messages) ListClear

func (msgs Messages) ListClear() string

ListClear is the package's ListClear in the language of msgs.

func (Messages) ListNothingFound

func (msgs Messages) ListNothingFound() string

ListNothingFound is the package's ListNothingFound in the language of msgs.

func (Messages) ListSearch

func (msgs Messages) ListSearch() string

ListSearch is the package's ListSearch in the language of msgs.

func (Messages) SortBy

func (msgs Messages) SortBy(column string) string

SortBy is the package's SortBy in the language of msgs.

type Translation

type Translation struct {
	Texts              map[string]string
	SortBy             func(column string) string
	DiffUnchangedLines func(n int) string
	CalendarMonth      func(hc string, d time.Time) string
	CalendarMonthName  func(hc string, d time.Time) string
	CalendarWeekday    func(hc string, d time.Time) string
	FlowLabel          func(nodes int, edges int) string
}

Translation is a language's messages another package supplies: those without arguments in Texts, by key, and a function for each of the others; a key or a field left out leaves the message to the catalog.

Jump to

Keyboard shortcuts

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