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 Cancel(cx *core.Scope) string
- func CheckForUpdates(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 RoleComboBox(cx *core.Scope) string
- func RoleDialog(cx *core.Scope) string
- func RoleGrid(cx *core.Scope) string
- func RoleGroup(cx *core.Scope) string
- func RoleHeadingLevel(cx *core.Scope, level string) string
- func RoleLink(cx *core.Scope) string
- func RoleListBox(cx *core.Scope) string
- func RoleMenu(cx *core.Scope) string
- func RoleMenuItem(cx *core.Scope) string
- func RoleNavigation(cx *core.Scope) string
- func RoleOption(cx *core.Scope) string
- func RoleRegion(cx *core.Scope) string
- func RoleRow(cx *core.Scope) string
- func RoleSearchBox(cx *core.Scope) string
- func RoleSpinButton(cx *core.Scope) string
- func RoleStatus(cx *core.Scope) string
- func RoleTab(cx *core.Scope) string
- func RoleTable(cx *core.Scope) string
- func RoleToolbar(cx *core.Scope) string
- func RoleTree(cx *core.Scope) string
- func RoleTreeItem(cx *core.Scope) string
- func ScanCode(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 StateBusy(cx *core.Scope) string
- func StateCollapsed(cx *core.Scope) string
- func StateExpanded(cx *core.Scope) string
- func StateLevel(cx *core.Scope, level string) string
- func StatePartiallyChecked(cx *core.Scope) string
- func StatePressed(cx *core.Scope) string
- func StopSpeaking(cx *core.Scope) string
- func Supply(lang string, t Translation)
- func TakePhoto(cx *core.Scope) string
- 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) Cancel() string
- func (msgs Messages) CheckForUpdates() 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) RoleComboBox() string
- func (msgs Messages) RoleDialog() string
- func (msgs Messages) RoleGrid() string
- func (msgs Messages) RoleGroup() string
- func (msgs Messages) RoleHeadingLevel(level string) string
- func (msgs Messages) RoleLink() string
- func (msgs Messages) RoleListBox() string
- func (msgs Messages) RoleMenu() string
- func (msgs Messages) RoleMenuItem() string
- func (msgs Messages) RoleNavigation() string
- func (msgs Messages) RoleOption() string
- func (msgs Messages) RoleRegion() string
- func (msgs Messages) RoleRow() string
- func (msgs Messages) RoleSearchBox() string
- func (msgs Messages) RoleSpinButton() string
- func (msgs Messages) RoleStatus() string
- func (msgs Messages) RoleTab() string
- func (msgs Messages) RoleTable() string
- func (msgs Messages) RoleToolbar() string
- func (msgs Messages) RoleTree() string
- func (msgs Messages) RoleTreeItem() string
- func (msgs Messages) ScanCode() 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) StateBusy() string
- func (msgs Messages) StateCollapsed() string
- func (msgs Messages) StateExpanded() string
- func (msgs Messages) StateLevel(level string) string
- func (msgs Messages) StatePartiallyChecked() string
- func (msgs Messages) StatePressed() string
- func (msgs Messages) StopSpeaking() string
- func (msgs Messages) TakePhoto() 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"},
"RoleHeadingLevel": {"level"},
"StateLevel": {"level"},
}
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 CheckForUpdates ¶
CheckForUpdates says "Check for Updates…" in the language the app shows under cx.
The macOS app menu's item of an app that updates itself, which checks for a newer version now.
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 RoleComboBox ¶
RoleComboBox says "combo box" in the language the app shows under cx.
What Android's screen reader announces a select trigger or editable combo box 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 RoleGroup ¶
RoleGroup says "group" in the language the app shows under cx.
What Android's screen reader announces a group of related elements as.
func RoleHeadingLevel ¶
RoleHeadingLevel says "heading level {level}" in the language the app shows under cx.
What Android's screen reader announces a heading with a level as; level is the heading's level, from 1.
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 RoleListBox ¶
RoleListBox says "list box" in the language the app shows under cx.
What Android's screen reader announces a list of selectable options 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 RoleNavigation ¶
RoleNavigation says "navigation" in the language the app shows under cx.
What Android's screen reader announces a navigation landmark as.
func RoleOption ¶
RoleOption says "option" in the language the app shows under cx.
What Android's screen reader announces an option in a list box as.
func RoleRegion ¶
RoleRegion says "region" in the language the app shows under cx.
What Android's screen reader announces a landmark region of a page 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 RoleSpinButton ¶
RoleSpinButton says "spin button" in the language the app shows under cx.
What Android's screen reader announces a numeric spin button as.
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 RoleToolbar ¶
RoleToolbar says "toolbar" in the language the app shows under cx.
What Android's screen reader announces a toolbar of controls as.
func RoleTree ¶
RoleTree says "tree" in the language the app shows under cx.
What Android's screen reader announces a tree view as.
func RoleTreeItem ¶
RoleTreeItem says "tree item" in the language the app shows under cx.
What Android's screen reader announces an item in a tree view 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 StateBusy ¶
StateBusy says "busy" in the language the app shows under cx.
What Android's screen reader announces an element that is loading or busy as.
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 StateLevel ¶
StateLevel says "level {level}" in the language the app shows under cx.
What Android's screen reader announces a nested item's level, such as a tree item's depth, as; level is the item's level, from 1.
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 StatePressed ¶
StatePressed says "pressed" in the language the app shows under cx.
What Android's screen reader announces a toggle button that is pressed as.
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 TakePhoto ¶
TakePhoto says "Take Photo" in the language the app shows under cx.
The title of the desktop camera that TakePhoto shows, and its button that takes the photo.
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) CheckForUpdates ¶
CheckForUpdates is the package's CheckForUpdates 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) RoleComboBox ¶
RoleComboBox is the package's RoleComboBox 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) RoleHeadingLevel ¶
RoleHeadingLevel is the package's RoleHeadingLevel 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) RoleListBox ¶
RoleListBox is the package's RoleListBox 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) RoleNavigation ¶
RoleNavigation is the package's RoleNavigation in the language of msgs.
func (Messages) RoleOption ¶
RoleOption is the package's RoleOption in the language of msgs.
func (Messages) RoleRegion ¶
RoleRegion is the package's RoleRegion 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) RoleSpinButton ¶
RoleSpinButton is the package's RoleSpinButton 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) RoleToolbar ¶
RoleToolbar is the package's RoleToolbar in the language of msgs.
func (Messages) RoleTreeItem ¶
RoleTreeItem is the package's RoleTreeItem 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) StateLevel ¶
StateLevel is the package's StateLevel 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) StatePressed ¶
StatePressed is the package's StatePressed 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
RoleHeadingLevel func(level string) string
StateLevel func(level 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.