services

package
v0.0.0-...-0eb5974 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToCache

func AddToCache(jsonCachePath, k, originLang, language, translated string) error

AddToCache adds translation to cache

func CacheExists

func CacheExists(cachePath, key string) bool

find out if a given translation key exists

func GenerateMultiLanguageFilesFromTemplate

func GenerateMultiLanguageFilesFromTemplate(templatePath, outPath, fileName, ext string, languages []string, full bool, cachePath string) error

GenerateMultiLanguageFilesFromTemplate write multilanguage json files

func GenerateMultiLanguagesArbFilesFromJSONFiles

func GenerateMultiLanguagesArbFilesFromJSONFiles(dir, prefix, extFile, outExtFile string, full bool) error

GenerateMultiLanguagesArbFilesFromJSONFiles generate arb files from json files

func JSONMap

func JSONMap(data []byte) (*linkedhashmap.Map, error)

JSONMap convert json to arb

func WriteDataDumpFiles

func WriteDataDumpFiles(csvFilePath string, jsonDirPath string, sheet string) error

WriteDataDumpFiles exported

func WriteFiles

func WriteFiles(csvFilePath string, config config.Config, cleanTagsDir, cleanTagsFileName string) error

WriteFiles Write files

func WriteLanguageFiles

func WriteLanguageFiles(csvFilePath string, jsonDirPath string, sheet string) error

WriteLanguageFiles exported

Types

type ArbAttr

type ArbAttr struct {
	Description  string            `json:"description"`
	Type         string            `json:"type"`
	Placeholders map[string]string `json:"placeholders"`
}

ArbAttr struct

type TomlFormat

type TomlFormat struct {
	Key    string
	Values [][]string
}

TomlFormat struct

type Translate

type Translate struct {
	Lang string
	// Words string
	Words map[string]string
}

Translate struct

type TranslatedMaps

type TranslatedMaps struct {
	Langs []string
	Maps  []*linkedhashmap.Map
}

TranslatedMaps struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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