pkg_recommend

package
v0.0.0-...-434a8ce Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LangInfoFile = "/usr/share/i18n/language_info.json"
)

Variables

This section is empty.

Functions

func GetByLocale

func GetByLocale(locale string) (DependentInfos, DependentInfos, error)

func GetByPackage

func GetByPackage(locale, pkg string) ([]string, []string, error)

func GetEnhancedLocalePackages

func GetEnhancedLocalePackages(lang string, pkg string) []string

func IsSupportedLocale

func IsSupportedLocale(locale string) bool

Types

type DependentInfo

type DependentInfo struct {
	Dependent string
	Packages  []string
}

type DependentInfos

type DependentInfos []DependentInfo

func (DependentInfos) GetConflictPackages

func (infos DependentInfos) GetConflictPackages() DependentInfos

func (DependentInfos) GetPackagesByDependent

func (infos DependentInfos) GetPackagesByDependent(dependent string) []string

type LangCodeInfo

type LangCodeInfo struct {
	LangCode    string
	CountryCode string
	Variant     string
}

func GetLangCodeInfo

func GetLangCodeInfo(locale, config string) (*LangCodeInfo, error)

type LangInfo

type LangInfo struct {
	Locale      string `json:"Locale"`
	Description string `json:"Description"`
	LangCode    string `json:"LangCode"`
	CountryCode string `json:"CountryCode"`
}

func (*LangInfo) ToLangCode

func (info *LangInfo) ToLangCode() *LangCodeInfo

type LangInfos

type LangInfos []LangInfo

func GetSupportedLangInfos

func GetSupportedLangInfos() (LangInfos, error)

func (LangInfos) Get

func (infos LangInfos) Get(locale string) (*LangInfo, error)

Jump to

Keyboard shortcuts

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