Documentation
¶
Overview ¶
Package locales says the words of the platforms' menus and of macOS's permission guide, which the backends show in the language the app shows: the standard items', the menus apps build around them, and the guide's panel with the titles of System Settings' privacy panes. 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 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 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 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 SelectAll(cx *core.Scope) string
- func ShowAll(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) 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) 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) 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) SelectAll() string
- func (msgs Messages) ShowAll() 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 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 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 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 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) 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) 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) 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.