parser

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCodeForLocalizationFunctions

func CheckCodeForLocalizationFunctions(mapLangToToml map[Language]TomlFile, path string) (errs []error)

CheckCodeForLocalizationFunctions is function for finding go files and recursive search in directories.

func LoadTomlFiles

func LoadTomlFiles() (map[Language]TomlFile, error)

LoadTomlFiles loads toml files from given paths.

func TomlValidation

func TomlValidation(mapLangToToml map[Language]TomlFile) (errs []error)

TomlValidation is function for validating toml files. It checks for duplicate and missing messages. It also checks for missing description and other keys.

Types

type Language added in v0.0.2

type Language string

Language is type for language. It is used as key in map. e.g. en, fa, ...

type MessageID added in v0.0.2

type MessageID string

MessageID is type for message id. message id is the main key in toml file. e.g. [NotFound]

type TomlArgs added in v0.0.2

type TomlArgs map[string]interface{}

TomlArgs is type for toml args. you can unmarshal args of message to this type. e.g. other, description, ...

type TomlFile added in v0.0.2

type TomlFile map[MessageID]TomlArgs

TomlFile is type for toml file. you can unmarshal toml file to this type.

Jump to

Keyboard shortcuts

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