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
- Variables
- func BreadcrumbsMore(cx *core.Scope) string
- func CalendarMonth(cx *core.Scope, d time.Time) string
- func CalendarMonthName(cx *core.Scope, d time.Time) string
- func CalendarNext(cx *core.Scope) string
- func CalendarPrevious(cx *core.Scope) string
- func CalendarWeekday(cx *core.Scope, d time.Time) string
- func CollapseMerge(cx *core.Scope) string
- func ColorAlpha(cx *core.Scope) string
- func ColorBlue(cx *core.Scope) string
- func ColorBrightnessPercent(cx *core.Scope) string
- func ColorCopy(cx *core.Scope) string
- func ColorEyeDropper(cx *core.Scope) string
- func ColorFormat(cx *core.Scope) string
- func ColorGreen(cx *core.Scope) string
- func ColorHex(cx *core.Scope) string
- func ColorHue(cx *core.Scope) string
- func ColorHueDegrees(cx *core.Scope) string
- func ColorLightnessPercent(cx *core.Scope) string
- func ColorOpacityPercent(cx *core.Scope) string
- func ColorRed(cx *core.Scope) string
- func ColorSaturationBrightness(cx *core.Scope) string
- func ColorSaturationPercent(cx *core.Scope) string
- func CommandList(cx *core.Scope) string
- func CommandLoading(cx *core.Scope) string
- func CommandNoMatches(cx *core.Scope) string
- func CommandSearch(cx *core.Scope) string
- func CommandSearchPlaceholder(cx *core.Scope) string
- func DiffDiscardChanges(cx *core.Scope) string
- func DiffExpandAll(cx *core.Scope) string
- func DiffStage(cx *core.Scope) string
- func DiffUnchangedLines(cx *core.Scope, n int) string
- func EmojiCategories(cx *core.Scope) string
- func EmojiCategoryActivities(cx *core.Scope) string
- func EmojiCategoryAnimals(cx *core.Scope) string
- func EmojiCategoryFlags(cx *core.Scope) string
- func EmojiCategoryFood(cx *core.Scope) string
- func EmojiCategoryObjects(cx *core.Scope) string
- func EmojiCategoryPeople(cx *core.Scope) string
- func EmojiCategoryRecent(cx *core.Scope) string
- func EmojiCategorySmileys(cx *core.Scope) string
- func EmojiCategorySymbols(cx *core.Scope) string
- func EmojiCategoryTravel(cx *core.Scope) string
- func EmojiNoMatches(cx *core.Scope) string
- func EmojiPicker(cx *core.Scope) string
- func EmojiSearch(cx *core.Scope) string
- func EmojiSearchPlaceholder(cx *core.Scope) string
- func EmojiSkinTone(cx *core.Scope) string
- func EmojiSkinToneDark(cx *core.Scope) string
- func EmojiSkinToneDefault(cx *core.Scope) string
- func EmojiSkinToneLight(cx *core.Scope) string
- func EmojiSkinToneMedium(cx *core.Scope) string
- func EmojiSkinToneMediumDark(cx *core.Scope) string
- func EmojiSkinToneMediumLight(cx *core.Scope) string
- func ExpandMerge(cx *core.Scope) string
- func FlowLabel(cx *core.Scope, nodes int, edges int) string
- func ListClear(cx *core.Scope) string
- func ListNothingFound(cx *core.Scope) string
- func ListSearch(cx *core.Scope) string
- func SortBy(cx *core.Scope, column string) string
- func Supply(lang string, t Translation)
- type Messages
- func (msgs Messages) BreadcrumbsMore() string
- func (msgs Messages) CalendarMonth(d time.Time) string
- func (msgs Messages) CalendarMonthName(d time.Time) string
- func (msgs Messages) CalendarNext() string
- func (msgs Messages) CalendarPrevious() string
- func (msgs Messages) CalendarWeekday(d time.Time) string
- func (msgs Messages) CollapseMerge() string
- func (msgs Messages) ColorAlpha() string
- func (msgs Messages) ColorBlue() string
- func (msgs Messages) ColorBrightnessPercent() string
- func (msgs Messages) ColorCopy() string
- func (msgs Messages) ColorEyeDropper() string
- func (msgs Messages) ColorFormat() string
- func (msgs Messages) ColorGreen() string
- func (msgs Messages) ColorHex() string
- func (msgs Messages) ColorHue() string
- func (msgs Messages) ColorHueDegrees() string
- func (msgs Messages) ColorLightnessPercent() string
- func (msgs Messages) ColorOpacityPercent() string
- func (msgs Messages) ColorRed() string
- func (msgs Messages) ColorSaturationBrightness() string
- func (msgs Messages) ColorSaturationPercent() string
- func (msgs Messages) CommandList() string
- func (msgs Messages) CommandLoading() string
- func (msgs Messages) CommandNoMatches() string
- func (msgs Messages) CommandSearch() string
- func (msgs Messages) CommandSearchPlaceholder() string
- func (msgs Messages) DiffDiscardChanges() string
- func (msgs Messages) DiffExpandAll() string
- func (msgs Messages) DiffStage() string
- func (msgs Messages) DiffUnchangedLines(n int) string
- func (msgs Messages) EmojiCategories() string
- func (msgs Messages) EmojiCategoryActivities() string
- func (msgs Messages) EmojiCategoryAnimals() string
- func (msgs Messages) EmojiCategoryFlags() string
- func (msgs Messages) EmojiCategoryFood() string
- func (msgs Messages) EmojiCategoryObjects() string
- func (msgs Messages) EmojiCategoryPeople() string
- func (msgs Messages) EmojiCategoryRecent() string
- func (msgs Messages) EmojiCategorySmileys() string
- func (msgs Messages) EmojiCategorySymbols() string
- func (msgs Messages) EmojiCategoryTravel() string
- func (msgs Messages) EmojiNoMatches() string
- func (msgs Messages) EmojiPicker() string
- func (msgs Messages) EmojiSearch() string
- func (msgs Messages) EmojiSearchPlaceholder() string
- func (msgs Messages) EmojiSkinTone() string
- func (msgs Messages) EmojiSkinToneDark() string
- func (msgs Messages) EmojiSkinToneDefault() string
- func (msgs Messages) EmojiSkinToneLight() string
- func (msgs Messages) EmojiSkinToneMedium() string
- func (msgs Messages) EmojiSkinToneMediumDark() string
- func (msgs Messages) EmojiSkinToneMediumLight() string
- func (msgs Messages) ExpandMerge() string
- func (msgs Messages) FlowLabel(nodes int, edges int) string
- func (msgs Messages) ListClear() string
- func (msgs Messages) ListNothingFound() string
- func (msgs Messages) ListSearch() string
- func (msgs Messages) SortBy(column string) string
- type Translation
Constants ¶
const Source = "en"
Source is the language the messages are written in.
Variables ¶
var Catalog = i18n.NewCatalog("en", "zh-Hans")
Catalog holds the messages' languages: en, the source, zh-Hans, and those other packages supply.
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 ¶
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 ¶
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 ¶
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 ¶
CalendarNext says "Next month" in the language the app shows under cx.
What a styled picker says for this part.
func CalendarPrevious ¶
CalendarPrevious says "Previous month" in the language the app shows under cx.
What a styled picker says for this part.
func CalendarWeekday ¶
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 ¶
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 ¶
ColorAlpha says "Opacity" in the language the app shows under cx.
What a styled picker says for this part.
func ColorBlue ¶
ColorBlue says "Blue" in the language the app shows under cx.
What a styled picker says for this part.
func ColorBrightnessPercent ¶
ColorBrightnessPercent says "Brightness percent" in the language the app shows under cx.
What a styled picker says for this part.
func ColorCopy ¶
ColorCopy says "Copy color" in the language the app shows under cx.
What a styled picker says for this part.
func ColorEyeDropper ¶
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 ¶
ColorFormat says "Color format" in the language the app shows under cx.
What a styled picker says for this part.
func ColorGreen ¶
ColorGreen says "Green" in the language the app shows under cx.
What a styled picker says for this part.
func ColorHex ¶
ColorHex says "Hex color" in the language the app shows under cx.
What a styled picker says for this part.
func ColorHue ¶
ColorHue says "Hue" in the language the app shows under cx.
What a styled picker says for this part.
func ColorHueDegrees ¶
ColorHueDegrees says "Hue degrees" in the language the app shows under cx.
What a styled picker says for this part.
func ColorLightnessPercent ¶
ColorLightnessPercent says "Lightness percent" in the language the app shows under cx.
What a styled picker says for this part.
func ColorOpacityPercent ¶
ColorOpacityPercent says "Opacity percent" in the language the app shows under cx.
What a styled picker says for this part.
func ColorRed ¶
ColorRed says "Red" in the language the app shows under cx.
What a styled picker says for this part.
func ColorSaturationBrightness ¶
ColorSaturationBrightness says "Saturation and brightness" in the language the app shows under cx.
What a styled picker says for this part.
func ColorSaturationPercent ¶
ColorSaturationPercent says "Saturation percent" in the language the app shows under cx.
What a styled picker says for this part.
func CommandList ¶
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 ¶
CommandLoading says "Loading…" in the language the app shows under cx.
What a command palette says while a search is under way.
func CommandNoMatches ¶
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 ¶
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 ¶
CommandSearchPlaceholder says "Search commands…" in the language the app shows under cx.
The hint in a command palette's empty search field.
func DiffDiscardChanges ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
EmojiCategoryActivities says "Activities" in the language the app shows under cx.
The section and category label for activities emoji.
func EmojiCategoryAnimals ¶
EmojiCategoryAnimals says "Animals & Nature" in the language the app shows under cx.
The section and category label for animals and nature emoji.
func EmojiCategoryFlags ¶
EmojiCategoryFlags says "Flags" in the language the app shows under cx.
The section and category label for flags emoji.
func EmojiCategoryFood ¶
EmojiCategoryFood says "Food & Drink" in the language the app shows under cx.
The section and category label for food and drink emoji.
func EmojiCategoryObjects ¶
EmojiCategoryObjects says "Objects" in the language the app shows under cx.
The section and category label for objects emoji.
func EmojiCategoryPeople ¶
EmojiCategoryPeople says "People & Body" in the language the app shows under cx.
The section and category label for people and body emoji.
func EmojiCategoryRecent ¶
EmojiCategoryRecent says "Recently used" in the language the app shows under cx.
The section and category label for recently used emoji.
func EmojiCategorySmileys ¶
EmojiCategorySmileys says "Smileys & Emotion" in the language the app shows under cx.
The section and category label for smileys and emotion emoji.
func EmojiCategorySymbols ¶
EmojiCategorySymbols says "Symbols" in the language the app shows under cx.
The section and category label for symbols emoji.
func EmojiCategoryTravel ¶
EmojiCategoryTravel says "Travel & Places" in the language the app shows under cx.
The section and category label for travel and places emoji.
func EmojiNoMatches ¶
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 ¶
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 ¶
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 ¶
EmojiSearchPlaceholder says "Search emoji…" in the language the app shows under cx.
The hint in an emoji picker's empty search field.
func EmojiSkinTone ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
ListClear says "Clear" in the language the app shows under cx.
What a styled picker says for this part.
func ListNothingFound ¶
ListNothingFound says "Nothing found" in the language the app shows under cx.
What a styled picker says for this part.
func ListSearch ¶
ListSearch says "Search" in the language the app shows under cx.
What a styled picker says for this part.
func SortBy ¶
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 ¶
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 ¶
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 ¶
BreadcrumbsMore is the package's BreadcrumbsMore in the language of msgs.
func (Messages) CalendarMonth ¶
CalendarMonth is the package's CalendarMonth in the language of msgs.
func (Messages) CalendarMonthName ¶
CalendarMonthName is the package's CalendarMonthName in the language of msgs.
func (Messages) CalendarNext ¶
CalendarNext is the package's CalendarNext in the language of msgs.
func (Messages) CalendarPrevious ¶
CalendarPrevious is the package's CalendarPrevious in the language of msgs.
func (Messages) CalendarWeekday ¶
CalendarWeekday is the package's CalendarWeekday in the language of msgs.
func (Messages) CollapseMerge ¶
CollapseMerge is the package's CollapseMerge in the language of msgs.
func (Messages) ColorAlpha ¶
ColorAlpha is the package's ColorAlpha in the language of msgs.
func (Messages) ColorBrightnessPercent ¶
ColorBrightnessPercent is the package's ColorBrightnessPercent in the language of msgs.
func (Messages) ColorEyeDropper ¶
ColorEyeDropper is the package's ColorEyeDropper in the language of msgs.
func (Messages) ColorFormat ¶
ColorFormat is the package's ColorFormat in the language of msgs.
func (Messages) ColorGreen ¶
ColorGreen is the package's ColorGreen in the language of msgs.
func (Messages) ColorHueDegrees ¶
ColorHueDegrees is the package's ColorHueDegrees in the language of msgs.
func (Messages) ColorLightnessPercent ¶
ColorLightnessPercent is the package's ColorLightnessPercent in the language of msgs.
func (Messages) ColorOpacityPercent ¶
ColorOpacityPercent is the package's ColorOpacityPercent in the language of msgs.
func (Messages) ColorSaturationBrightness ¶
ColorSaturationBrightness is the package's ColorSaturationBrightness in the language of msgs.
func (Messages) ColorSaturationPercent ¶
ColorSaturationPercent is the package's ColorSaturationPercent in the language of msgs.
func (Messages) CommandList ¶
CommandList is the package's CommandList in the language of msgs.
func (Messages) CommandLoading ¶
CommandLoading is the package's CommandLoading in the language of msgs.
func (Messages) CommandNoMatches ¶
CommandNoMatches is the package's CommandNoMatches in the language of msgs.
func (Messages) CommandSearch ¶
CommandSearch is the package's CommandSearch in the language of msgs.
func (Messages) CommandSearchPlaceholder ¶
CommandSearchPlaceholder is the package's CommandSearchPlaceholder in the language of msgs.
func (Messages) DiffDiscardChanges ¶
DiffDiscardChanges is the package's DiffDiscardChanges in the language of msgs.
func (Messages) DiffExpandAll ¶
DiffExpandAll is the package's DiffExpandAll in the language of msgs.
func (Messages) DiffUnchangedLines ¶
DiffUnchangedLines is the package's DiffUnchangedLines in the language of msgs.
func (Messages) EmojiCategories ¶
EmojiCategories is the package's EmojiCategories in the language of msgs.
func (Messages) EmojiCategoryActivities ¶
EmojiCategoryActivities is the package's EmojiCategoryActivities in the language of msgs.
func (Messages) EmojiCategoryAnimals ¶
EmojiCategoryAnimals is the package's EmojiCategoryAnimals in the language of msgs.
func (Messages) EmojiCategoryFlags ¶
EmojiCategoryFlags is the package's EmojiCategoryFlags in the language of msgs.
func (Messages) EmojiCategoryFood ¶
EmojiCategoryFood is the package's EmojiCategoryFood in the language of msgs.
func (Messages) EmojiCategoryObjects ¶
EmojiCategoryObjects is the package's EmojiCategoryObjects in the language of msgs.
func (Messages) EmojiCategoryPeople ¶
EmojiCategoryPeople is the package's EmojiCategoryPeople in the language of msgs.
func (Messages) EmojiCategoryRecent ¶
EmojiCategoryRecent is the package's EmojiCategoryRecent in the language of msgs.
func (Messages) EmojiCategorySmileys ¶
EmojiCategorySmileys is the package's EmojiCategorySmileys in the language of msgs.
func (Messages) EmojiCategorySymbols ¶
EmojiCategorySymbols is the package's EmojiCategorySymbols in the language of msgs.
func (Messages) EmojiCategoryTravel ¶
EmojiCategoryTravel is the package's EmojiCategoryTravel in the language of msgs.
func (Messages) EmojiNoMatches ¶
EmojiNoMatches is the package's EmojiNoMatches in the language of msgs.
func (Messages) EmojiPicker ¶
EmojiPicker is the package's EmojiPicker in the language of msgs.
func (Messages) EmojiSearch ¶
EmojiSearch is the package's EmojiSearch in the language of msgs.
func (Messages) EmojiSearchPlaceholder ¶
EmojiSearchPlaceholder is the package's EmojiSearchPlaceholder in the language of msgs.
func (Messages) EmojiSkinTone ¶
EmojiSkinTone is the package's EmojiSkinTone in the language of msgs.
func (Messages) EmojiSkinToneDark ¶
EmojiSkinToneDark is the package's EmojiSkinToneDark in the language of msgs.
func (Messages) EmojiSkinToneDefault ¶
EmojiSkinToneDefault is the package's EmojiSkinToneDefault in the language of msgs.
func (Messages) EmojiSkinToneLight ¶
EmojiSkinToneLight is the package's EmojiSkinToneLight in the language of msgs.
func (Messages) EmojiSkinToneMedium ¶
EmojiSkinToneMedium is the package's EmojiSkinToneMedium in the language of msgs.
func (Messages) EmojiSkinToneMediumDark ¶
EmojiSkinToneMediumDark is the package's EmojiSkinToneMediumDark in the language of msgs.
func (Messages) EmojiSkinToneMediumLight ¶
EmojiSkinToneMediumLight is the package's EmojiSkinToneMediumLight in the language of msgs.
func (Messages) ExpandMerge ¶
ExpandMerge is the package's ExpandMerge in the language of msgs.
func (Messages) ListNothingFound ¶
ListNothingFound is the package's ListNothingFound in the language of msgs.
func (Messages) ListSearch ¶
ListSearch is the package's ListSearch 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.