locales

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const Source = "en"

Source is the language the messages are written in.

Variables

View Source
var Catalog = i18n.NewCatalog("en", "zh-Hans")

Catalog holds the messages' languages: en, the source, zh-Hans, and those other packages supply.

View Source
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 About

func About(cx *core.Scope) string

About says "About" in the language the app shows under cx.

func AboutApp

func AboutApp(cx *core.Scope, app string) string

AboutApp says "About {app}" in the language the app shows under cx.

The macOS app menu's item, which names the app.

func Close

func Close(cx *core.Scope) string

Close says "Close" in the language the app shows under cx.

func Copy

func Copy(cx *core.Scope) string

Copy says "Copy" in the language the app shows under cx.

func Cut

func Cut(cx *core.Scope) string

Cut says "Cut" in the language the app shows under cx.

func Delete

func Delete(cx *core.Scope) string

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

func Edit(cx *core.Scope) string

Edit says "Edit" in the language the app shows under cx.

The title of the menu of the text editing items.

func EnterFullScreen

func EnterFullScreen(cx *core.Scope) string

EnterFullScreen says "Enter Full Screen" in the language the app shows under cx.

func ExitFullScreen

func ExitFullScreen(cx *core.Scope) string

ExitFullScreen says "Exit Full Screen" in the language the app shows under cx.

func GuideDrag

func GuideDrag(cx *core.Scope, app string, permission string) string

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

func GuideDragHint(cx *core.Scope) string

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 Hide

func Hide(cx *core.Scope) string

Hide says "Hide" in the language the app shows under cx.

func HideApp

func HideApp(cx *core.Scope, app string) string

HideApp says "Hide {app}" in the language the app shows under cx.

The macOS app menu's item, which names the app.

func HideOthers

func HideOthers(cx *core.Scope) string

HideOthers says "Hide Others" in the language the app shows under cx.

func Minimize

func Minimize(cx *core.Scope) string

Minimize says "Minimize" in the language the app shows under cx.

func Paste

func Paste(cx *core.Scope) string

Paste says "Paste" in the language the app shows under cx.

func PermissionAccessibility

func PermissionAccessibility(cx *core.Scope) string

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

func PermissionAppManagement(cx *core.Scope) string

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

func PermissionBluetooth(cx *core.Scope) string

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

func PermissionDeveloperTools(cx *core.Scope) string

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

func PermissionDeviceControl(cx *core.Scope) string

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

func PermissionFullDiskAccess(cx *core.Scope) string

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

func PermissionInputMonitoring(cx *core.Scope) string

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

func PermissionMediaLibrary(cx *core.Scope) string

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

func PermissionScreenAudioRecording(cx *core.Scope) string

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

func PermissionScreenRecording(cx *core.Scope) string

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 Quit

func Quit(cx *core.Scope) string

Quit says "Quit" in the language the app shows under cx.

func QuitApp

func QuitApp(cx *core.Scope, app string) string

QuitApp says "Quit {app}" in the language the app shows under cx.

The macOS app menu's item, which names the app.

func Redo

func Redo(cx *core.Scope) string

Redo says "Redo" in the language the app shows under cx.

func SelectAll

func SelectAll(cx *core.Scope) string

SelectAll says "Select All" in the language the app shows under cx.

func ShowAll

func ShowAll(cx *core.Scope) string

ShowAll says "Show All" 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

func ToggleFullScreen(cx *core.Scope) string

ToggleFullScreen says "Toggle Full Screen" in the language the app shows under cx.

func Undo

func Undo(cx *core.Scope) string

Undo says "Undo" in the language the app shows under cx.

func Window

func Window(cx *core.Scope) string

Window says "Window" in the language the app shows under cx.

The title of the menu of the window items.

func Zoom

func Zoom(cx *core.Scope) string

Zoom says "Zoom" 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

func For(cx *core.Scope) Messages

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

func In(locale string) Messages

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) About

func (msgs Messages) About() string

About is the package's About in the language of msgs.

func (Messages) AboutApp

func (msgs Messages) AboutApp(app string) string

AboutApp is the package's AboutApp in the language of msgs.

func (Messages) Close

func (msgs Messages) Close() string

Close is the package's Close in the language of msgs.

func (Messages) Copy

func (msgs Messages) Copy() string

Copy is the package's Copy in the language of msgs.

func (Messages) Cut

func (msgs Messages) Cut() string

Cut is the package's Cut in the language of msgs.

func (Messages) Delete

func (msgs Messages) Delete() string

Delete is the package's Delete in the language of msgs.

func (Messages) Edit

func (msgs Messages) Edit() string

Edit is the package's Edit in the language of msgs.

func (Messages) EnterFullScreen

func (msgs Messages) EnterFullScreen() string

EnterFullScreen is the package's EnterFullScreen in the language of msgs.

func (Messages) ExitFullScreen

func (msgs Messages) ExitFullScreen() string

ExitFullScreen is the package's ExitFullScreen in the language of msgs.

func (Messages) GuideDrag

func (msgs Messages) GuideDrag(app string, permission string) string

GuideDrag is the package's GuideDrag in the language of msgs.

func (Messages) GuideDragHint

func (msgs Messages) GuideDragHint() string

GuideDragHint is the package's GuideDragHint in the language of msgs.

func (Messages) Hide

func (msgs Messages) Hide() string

Hide is the package's Hide in the language of msgs.

func (Messages) HideApp

func (msgs Messages) HideApp(app string) string

HideApp is the package's HideApp in the language of msgs.

func (Messages) HideOthers

func (msgs Messages) HideOthers() string

HideOthers is the package's HideOthers in the language of msgs.

func (Messages) Minimize

func (msgs Messages) Minimize() string

Minimize is the package's Minimize in the language of msgs.

func (Messages) Paste

func (msgs Messages) Paste() string

Paste is the package's Paste in the language of msgs.

func (Messages) PermissionAccessibility

func (msgs Messages) PermissionAccessibility() string

PermissionAccessibility is the package's PermissionAccessibility in the language of msgs.

func (Messages) PermissionAppManagement

func (msgs Messages) PermissionAppManagement() string

PermissionAppManagement is the package's PermissionAppManagement in the language of msgs.

func (Messages) PermissionBluetooth

func (msgs Messages) PermissionBluetooth() string

PermissionBluetooth is the package's PermissionBluetooth in the language of msgs.

func (Messages) PermissionDeveloperTools

func (msgs Messages) PermissionDeveloperTools() string

PermissionDeveloperTools is the package's PermissionDeveloperTools in the language of msgs.

func (Messages) PermissionDeviceControl

func (msgs Messages) PermissionDeviceControl() string

PermissionDeviceControl is the package's PermissionDeviceControl in the language of msgs.

func (Messages) PermissionFullDiskAccess

func (msgs Messages) PermissionFullDiskAccess() string

PermissionFullDiskAccess is the package's PermissionFullDiskAccess in the language of msgs.

func (Messages) PermissionInputMonitoring

func (msgs Messages) PermissionInputMonitoring() string

PermissionInputMonitoring is the package's PermissionInputMonitoring in the language of msgs.

func (Messages) PermissionMediaLibrary

func (msgs Messages) PermissionMediaLibrary() string

PermissionMediaLibrary is the package's PermissionMediaLibrary in the language of msgs.

func (Messages) PermissionScreenAudioRecording

func (msgs Messages) PermissionScreenAudioRecording() string

PermissionScreenAudioRecording is the package's PermissionScreenAudioRecording in the language of msgs.

func (Messages) PermissionScreenRecording

func (msgs Messages) PermissionScreenRecording() string

PermissionScreenRecording is the package's PermissionScreenRecording in the language of msgs.

func (Messages) Quit

func (msgs Messages) Quit() string

Quit is the package's Quit in the language of msgs.

func (Messages) QuitApp

func (msgs Messages) QuitApp(app string) string

QuitApp is the package's QuitApp in the language of msgs.

func (Messages) Redo

func (msgs Messages) Redo() string

Redo is the package's Redo in the language of msgs.

func (Messages) SelectAll

func (msgs Messages) SelectAll() string

SelectAll is the package's SelectAll in the language of msgs.

func (Messages) ShowAll

func (msgs Messages) ShowAll() string

ShowAll is the package's ShowAll in the language of msgs.

func (Messages) ToggleFullScreen

func (msgs Messages) ToggleFullScreen() string

ToggleFullScreen is the package's ToggleFullScreen in the language of msgs.

func (Messages) Undo

func (msgs Messages) Undo() string

Undo is the package's Undo in the language of msgs.

func (Messages) Window

func (msgs Messages) Window() string

Window is the package's Window in the language of msgs.

func (Messages) Zoom

func (msgs Messages) Zoom() string

Zoom is the package's Zoom 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL