Documentation
¶
Overview ¶
Package locales says the words the backends show and announce in the language the app shows: those of the platforms' menus, the standard items' and the menus apps build around them, of macOS's permission guide, its panel with the titles of System Settings' privacy panes, and the roles and states the screen readers of Android and Windows announce where the system has no word of its own. Apps supply other languages in their catalogs, under the key github.com/nsgo-dev/nsgo/desktop/locales.
Index ¶
- Constants
- Variables
- func About(cx *core.Scope) string
- func AboutApp(cx *core.Scope, app string) string
- func AuthSessionDone(cx *core.Scope) string
- func BringAllToFront(cx *core.Scope) string
- func Close(cx *core.Scope) string
- func Copy(cx *core.Scope) string
- func Cut(cx *core.Scope) string
- func Delete(cx *core.Scope) string
- func Edit(cx *core.Scope) string
- func EnterFullScreen(cx *core.Scope) string
- func ExitFullScreen(cx *core.Scope) string
- func GuideDrag(cx *core.Scope, app string, permission string) string
- func GuideDragHint(cx *core.Scope) string
- func Help(cx *core.Scope) string
- func Hide(cx *core.Scope) string
- func HideApp(cx *core.Scope, app string) string
- func HideOthers(cx *core.Scope) string
- func Minimize(cx *core.Scope) string
- func Paste(cx *core.Scope) string
- func PasteAndMatchStyle(cx *core.Scope) string
- func PermissionAccessibility(cx *core.Scope) string
- func PermissionAppManagement(cx *core.Scope) string
- func PermissionBluetooth(cx *core.Scope) string
- func PermissionDeveloperTools(cx *core.Scope) string
- func PermissionDeviceControl(cx *core.Scope) string
- func PermissionFullDiskAccess(cx *core.Scope) string
- func PermissionInputMonitoring(cx *core.Scope) string
- func PermissionMediaLibrary(cx *core.Scope) string
- func PermissionScreenAudioRecording(cx *core.Scope) string
- func PermissionScreenRecording(cx *core.Scope) string
- func Quit(cx *core.Scope) string
- func QuitApp(cx *core.Scope, app string) string
- func Redo(cx *core.Scope) string
- func RoleAlert(cx *core.Scope) string
- func RoleCell(cx *core.Scope) string
- func RoleColumnHeader(cx *core.Scope) string
- func RoleDialog(cx *core.Scope) string
- func RoleGrid(cx *core.Scope) string
- func RoleLink(cx *core.Scope) string
- func RoleMenu(cx *core.Scope) string
- func RoleMenuItem(cx *core.Scope) string
- func RoleRow(cx *core.Scope) string
- func RoleSearchBox(cx *core.Scope) string
- func RoleStatus(cx *core.Scope) string
- func RoleTab(cx *core.Scope) string
- func RoleTable(cx *core.Scope) string
- func SelectAll(cx *core.Scope) string
- func Services(cx *core.Scope) string
- func ShowAll(cx *core.Scope) string
- func SpokenSeparator(cx *core.Scope) string
- func StartSpeaking(cx *core.Scope) string
- func StateCollapsed(cx *core.Scope) string
- func StateExpanded(cx *core.Scope) string
- func StatePartiallyChecked(cx *core.Scope) string
- func StopSpeaking(cx *core.Scope) string
- func Supply(lang string, t Translation)
- func ToggleFullScreen(cx *core.Scope) string
- func Undo(cx *core.Scope) string
- func Window(cx *core.Scope) string
- func Zoom(cx *core.Scope) string
- type Messages
- func (msgs Messages) About() string
- func (msgs Messages) AboutApp(app string) string
- func (msgs Messages) AuthSessionDone() string
- func (msgs Messages) BringAllToFront() string
- func (msgs Messages) Close() string
- func (msgs Messages) Copy() string
- func (msgs Messages) Cut() string
- func (msgs Messages) Delete() string
- func (msgs Messages) Edit() string
- func (msgs Messages) EnterFullScreen() string
- func (msgs Messages) ExitFullScreen() string
- func (msgs Messages) GuideDrag(app string, permission string) string
- func (msgs Messages) GuideDragHint() string
- func (msgs Messages) Help() string
- func (msgs Messages) Hide() string
- func (msgs Messages) HideApp(app string) string
- func (msgs Messages) HideOthers() string
- func (msgs Messages) Minimize() string
- func (msgs Messages) Paste() string
- func (msgs Messages) PasteAndMatchStyle() string
- func (msgs Messages) PermissionAccessibility() string
- func (msgs Messages) PermissionAppManagement() string
- func (msgs Messages) PermissionBluetooth() string
- func (msgs Messages) PermissionDeveloperTools() string
- func (msgs Messages) PermissionDeviceControl() string
- func (msgs Messages) PermissionFullDiskAccess() string
- func (msgs Messages) PermissionInputMonitoring() string
- func (msgs Messages) PermissionMediaLibrary() string
- func (msgs Messages) PermissionScreenAudioRecording() string
- func (msgs Messages) PermissionScreenRecording() string
- func (msgs Messages) Quit() string
- func (msgs Messages) QuitApp(app string) string
- func (msgs Messages) Redo() string
- func (msgs Messages) RoleAlert() string
- func (msgs Messages) RoleCell() string
- func (msgs Messages) RoleColumnHeader() string
- func (msgs Messages) RoleDialog() string
- func (msgs Messages) RoleGrid() string
- func (msgs Messages) RoleLink() string
- func (msgs Messages) RoleMenu() string
- func (msgs Messages) RoleMenuItem() string
- func (msgs Messages) RoleRow() string
- func (msgs Messages) RoleSearchBox() string
- func (msgs Messages) RoleStatus() string
- func (msgs Messages) RoleTab() string
- func (msgs Messages) RoleTable() string
- func (msgs Messages) SelectAll() string
- func (msgs Messages) Services() string
- func (msgs Messages) ShowAll() string
- func (msgs Messages) SpokenSeparator() string
- func (msgs Messages) StartSpeaking() string
- func (msgs Messages) StateCollapsed() string
- func (msgs Messages) StateExpanded() string
- func (msgs Messages) StatePartiallyChecked() string
- func (msgs Messages) StopSpeaking() string
- func (msgs Messages) ToggleFullScreen() string
- func (msgs Messages) Undo() string
- func (msgs Messages) Window() string
- func (msgs Messages) Zoom() 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{
"AboutApp": {"app"},
"HideApp": {"app"},
"QuitApp": {"app"},
"GuideDrag": {"app", "permission"},
}
Parameters names the parameters of each message that has some, by its method, for the TSX declarations of the messages (tsx.RegisterMessages).
Functions ¶
func AboutApp ¶
AboutApp says "About {app}" in the language the app shows under cx.
The macOS app menu's item, which names the app.
func AuthSessionDone ¶ added in v0.2.0
AuthSessionDone says "You can close this page and return to the app." in the language the app shows under cx.
The page the default browser shows once a sign-in started from the app redirects back to it on desktops.
func BringAllToFront ¶ added in v0.2.0
BringAllToFront says "Bring All to Front" in the language the app shows under cx.
func Delete ¶
Delete says "Delete" in the language the app shows under cx.
The item of a text field's context menu that removes the selection.
func Edit ¶
Edit says "Edit" in the language the app shows under cx.
The title of the menu of the text editing items.
func EnterFullScreen ¶
EnterFullScreen says "Enter Full Screen" in the language the app shows under cx.
func ExitFullScreen ¶
ExitFullScreen says "Exit Full Screen" in the language the app shows under cx.
func GuideDrag ¶
GuideDrag says "Drag {app} to the list above to allow {permission}." in the language the app shows under cx.
The macOS guide's panel under System Settings, which holds the app for the user to drag into the list of a privacy pane; app is the app's name and permission the pane's title, both shown in bold.
func GuideDragHint ¶
GuideDragHint says "Drag" in the language the app shows under cx.
The hint on the card the user drags from the macOS guide's panel into System Settings.
func Help ¶ added in v0.2.0
Help says "Help" in the language the app shows under cx.
The title of the menu of the help items.
func HideApp ¶
HideApp says "Hide {app}" in the language the app shows under cx.
The macOS app menu's item, which names the app.
func HideOthers ¶
HideOthers says "Hide Others" in the language the app shows under cx.
func PasteAndMatchStyle ¶ added in v0.2.0
PasteAndMatchStyle says "Paste and Match Style" in the language the app shows under cx.
func PermissionAccessibility ¶
PermissionAccessibility says "Accessibility" in the language the app shows under cx.
The title of macOS's privacy pane before macOS 27, as System Settings shows it.
func PermissionAppManagement ¶
PermissionAppManagement says "App Management" in the language the app shows under cx.
The title of macOS's privacy pane, as System Settings shows it.
func PermissionBluetooth ¶
PermissionBluetooth says "Bluetooth" in the language the app shows under cx.
The title of macOS's privacy pane, as System Settings shows it.
func PermissionDeveloperTools ¶
PermissionDeveloperTools says "Developer Tools" in the language the app shows under cx.
The title of macOS's privacy pane, as System Settings shows it.
func PermissionDeviceControl ¶
PermissionDeviceControl says "Device Control and Data Access" in the language the app shows under cx.
The title of macOS's Accessibility pane from macOS 27, as System Settings shows it.
func PermissionFullDiskAccess ¶
PermissionFullDiskAccess says "Full Disk Access" in the language the app shows under cx.
The title of macOS's privacy pane, as System Settings shows it.
func PermissionInputMonitoring ¶
PermissionInputMonitoring says "Input Monitoring" in the language the app shows under cx.
The title of macOS's privacy pane, as System Settings shows it.
func PermissionMediaLibrary ¶
PermissionMediaLibrary says "Media & Apple Music" in the language the app shows under cx.
The title of macOS's privacy pane, as System Settings shows it.
func PermissionScreenAudioRecording ¶
PermissionScreenAudioRecording says "Screen & System Audio Recording" in the language the app shows under cx.
The title of macOS's Screen Recording pane from macOS 15, as System Settings shows it.
func PermissionScreenRecording ¶
PermissionScreenRecording says "Screen Recording" in the language the app shows under cx.
The title of macOS's privacy pane before macOS 15, as System Settings shows it.
func QuitApp ¶
QuitApp says "Quit {app}" in the language the app shows under cx.
The macOS app menu's item, which names the app.
func RoleAlert ¶ added in v0.2.0
RoleAlert says "alert" in the language the app shows under cx.
What Android's screen reader announces an urgent message as.
func RoleCell ¶ added in v0.2.0
RoleCell says "cell" in the language the app shows under cx.
What Android's screen reader announces a cell of a table or grid as.
func RoleColumnHeader ¶ added in v0.2.0
RoleColumnHeader says "column header" in the language the app shows under cx.
What Android's screen reader announces the header of a table's column as.
func RoleDialog ¶ added in v0.2.0
RoleDialog says "dialog" in the language the app shows under cx.
What Android's screen reader announces a dialog as.
func RoleGrid ¶ added in v0.2.0
RoleGrid says "grid" in the language the app shows under cx.
What Android's screen reader announces a grid of cells the user moves between as.
func RoleLink ¶ added in v0.2.0
RoleLink says "link" in the language the app shows under cx.
What Android's screen reader announces a link as.
func RoleMenu ¶ added in v0.2.0
RoleMenu says "menu" in the language the app shows under cx.
What Android's screen reader announces a menu as.
func RoleMenuItem ¶ added in v0.2.0
RoleMenuItem says "menu item" in the language the app shows under cx.
What Android's screen reader announces an item of a menu as.
func RoleRow ¶ added in v0.2.0
RoleRow says "row" in the language the app shows under cx.
What Android's screen reader announces a row of a table or grid as.
func RoleSearchBox ¶ added in v0.2.0
RoleSearchBox says "search box" in the language the app shows under cx.
What Android's and Windows' screen readers announce a search field as, in place of a text field.
func RoleStatus ¶ added in v0.2.0
RoleStatus says "status" in the language the app shows under cx.
What Android's screen reader announces a status area, which reports changes as they happen, as.
func RoleTab ¶ added in v0.2.0
RoleTab says "tab" in the language the app shows under cx.
What Android's screen reader announces a tab of a tab list as.
func RoleTable ¶ added in v0.2.0
RoleTable says "table" in the language the app shows under cx.
What Android's screen reader announces a table as.
func Services ¶ added in v0.2.0
Services says "Services" in the language the app shows under cx.
The title of the macOS app menu's submenu the system fills with other apps' services.
func SpokenSeparator ¶ added in v0.2.0
SpokenSeparator says ", " in the language the app shows under cx.
The separator Android's screen reader reads between a node's localized state parts.
func StartSpeaking ¶ added in v0.2.0
StartSpeaking says "Start Speaking" in the language the app shows under cx.
func StateCollapsed ¶ added in v0.2.0
StateCollapsed says "collapsed" in the language the app shows under cx.
What Android's screen reader announces an expandable element that hides its content as.
func StateExpanded ¶ added in v0.2.0
StateExpanded says "expanded" in the language the app shows under cx.
What Android's screen reader announces an expandable element that shows its content as.
func StatePartiallyChecked ¶ added in v0.2.0
StatePartiallyChecked says "partially checked" in the language the app shows under cx.
What Android's screen reader announces a checkbox in its mixed state as, checked for some of the items it stands for.
func StopSpeaking ¶ added in v0.2.0
StopSpeaking says "Stop Speaking" in the language the app shows under cx.
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 ToggleFullScreen ¶
ToggleFullScreen says "Toggle Full Screen" in the language the app shows under cx.
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) AuthSessionDone ¶ added in v0.2.0
AuthSessionDone is the package's AuthSessionDone in the language of msgs.
func (Messages) BringAllToFront ¶ added in v0.2.0
BringAllToFront is the package's BringAllToFront in the language of msgs.
func (Messages) EnterFullScreen ¶
EnterFullScreen is the package's EnterFullScreen in the language of msgs.
func (Messages) ExitFullScreen ¶
ExitFullScreen is the package's ExitFullScreen in the language of msgs.
func (Messages) GuideDragHint ¶
GuideDragHint is the package's GuideDragHint in the language of msgs.
func (Messages) HideOthers ¶
HideOthers is the package's HideOthers in the language of msgs.
func (Messages) PasteAndMatchStyle ¶ added in v0.2.0
PasteAndMatchStyle is the package's PasteAndMatchStyle in the language of msgs.
func (Messages) PermissionAccessibility ¶
PermissionAccessibility is the package's PermissionAccessibility in the language of msgs.
func (Messages) PermissionAppManagement ¶
PermissionAppManagement is the package's PermissionAppManagement in the language of msgs.
func (Messages) PermissionBluetooth ¶
PermissionBluetooth is the package's PermissionBluetooth in the language of msgs.
func (Messages) PermissionDeveloperTools ¶
PermissionDeveloperTools is the package's PermissionDeveloperTools in the language of msgs.
func (Messages) PermissionDeviceControl ¶
PermissionDeviceControl is the package's PermissionDeviceControl in the language of msgs.
func (Messages) PermissionFullDiskAccess ¶
PermissionFullDiskAccess is the package's PermissionFullDiskAccess in the language of msgs.
func (Messages) PermissionInputMonitoring ¶
PermissionInputMonitoring is the package's PermissionInputMonitoring in the language of msgs.
func (Messages) PermissionMediaLibrary ¶
PermissionMediaLibrary is the package's PermissionMediaLibrary in the language of msgs.
func (Messages) PermissionScreenAudioRecording ¶
PermissionScreenAudioRecording is the package's PermissionScreenAudioRecording in the language of msgs.
func (Messages) PermissionScreenRecording ¶
PermissionScreenRecording is the package's PermissionScreenRecording in the language of msgs.
func (Messages) RoleAlert ¶ added in v0.2.0
RoleAlert is the package's RoleAlert in the language of msgs.
func (Messages) RoleCell ¶ added in v0.2.0
RoleCell is the package's RoleCell in the language of msgs.
func (Messages) RoleColumnHeader ¶ added in v0.2.0
RoleColumnHeader is the package's RoleColumnHeader in the language of msgs.
func (Messages) RoleDialog ¶ added in v0.2.0
RoleDialog is the package's RoleDialog in the language of msgs.
func (Messages) RoleGrid ¶ added in v0.2.0
RoleGrid is the package's RoleGrid in the language of msgs.
func (Messages) RoleLink ¶ added in v0.2.0
RoleLink is the package's RoleLink in the language of msgs.
func (Messages) RoleMenu ¶ added in v0.2.0
RoleMenu is the package's RoleMenu in the language of msgs.
func (Messages) RoleMenuItem ¶ added in v0.2.0
RoleMenuItem is the package's RoleMenuItem in the language of msgs.
func (Messages) RoleSearchBox ¶ added in v0.2.0
RoleSearchBox is the package's RoleSearchBox in the language of msgs.
func (Messages) RoleStatus ¶ added in v0.2.0
RoleStatus is the package's RoleStatus in the language of msgs.
func (Messages) RoleTable ¶ added in v0.2.0
RoleTable is the package's RoleTable in the language of msgs.
func (Messages) Services ¶ added in v0.2.0
Services is the package's Services in the language of msgs.
func (Messages) SpokenSeparator ¶ added in v0.2.0
SpokenSeparator is the package's SpokenSeparator in the language of msgs.
func (Messages) StartSpeaking ¶ added in v0.2.0
StartSpeaking is the package's StartSpeaking in the language of msgs.
func (Messages) StateCollapsed ¶ added in v0.2.0
StateCollapsed is the package's StateCollapsed in the language of msgs.
func (Messages) StateExpanded ¶ added in v0.2.0
StateExpanded is the package's StateExpanded in the language of msgs.
func (Messages) StatePartiallyChecked ¶ added in v0.2.0
StatePartiallyChecked is the package's StatePartiallyChecked in the language of msgs.
func (Messages) StopSpeaking ¶ added in v0.2.0
StopSpeaking is the package's StopSpeaking in the language of msgs.
func (Messages) ToggleFullScreen ¶
ToggleFullScreen is the package's ToggleFullScreen in the language of msgs.
type Translation ¶
type Translation struct {
Texts map[string]string
AboutApp func(app string) string
HideApp func(app string) string
QuitApp func(app string) string
GuideDrag func(app string, permission string) 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.