Documentation
¶
Overview ¶
Package locales holds the mobile components' localized messages.
Index ¶
- Constants
- Variables
- func ShareCancel(cx *core.Scope) string
- func ShareDone(cx *core.Scope) string
- func ShareFailed(cx *core.Scope, app string) string
- func ShareSaved(cx *core.Scope, app string) string
- func ShareTooLarge(cx *core.Scope) string
- func Supply(lang string, t Translation)
- func TabBadgeNew(cx *core.Scope) string
- type Messages
- 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{
"ShareSaved": {"app"},
"ShareFailed": {"app"},
}
Parameters names the parameters of each message that has some, by its method, for the TSX declarations of the messages (tsx.RegisterMessages).
Functions ¶
func ShareCancel ¶
ShareCancel says "Cancel" in the language the app shows under cx.
The iOS share extension's button that stops receiving and closes its sheet.
func ShareDone ¶
ShareDone says "Done" in the language the app shows under cx.
The iOS share extension's button that closes its sheet once it shows the result.
func ShareFailed ¶
ShareFailed says "{app} couldn't receive this. Try sharing it again." in the language the app shows under cx.
The iOS share extension's sheet, when copying what was shared failed; {app} is the app's name.
func ShareSaved ¶
ShareSaved says "Saved. Open {app} to continue." in the language the app shows under cx.
The iOS share extension's sheet, once what was shared waits for the app; {app} is the app's name.
func ShareTooLarge ¶
ShareTooLarge says "This is too much to share at once. Share fewer or smaller items." in the language the app shows under cx.
The iOS share extension's sheet, when what was shared is over 128 items or 512 MB.
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.
func TabBadgeNew ¶
TabBadgeNew says "New" in the language the app shows under cx.
What assistive technology announces for a tab's dot badge.
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) ShareCancel ¶
ShareCancel is the package's ShareCancel in the language of msgs.
func (Messages) ShareFailed ¶
ShareFailed is the package's ShareFailed in the language of msgs.
func (Messages) ShareSaved ¶
ShareSaved is the package's ShareSaved in the language of msgs.
func (Messages) ShareTooLarge ¶
ShareTooLarge is the package's ShareTooLarge in the language of msgs.
func (Messages) TabBadgeNew ¶
TabBadgeNew is the package's TabBadgeNew in the language of msgs.
type Translation ¶
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.