cmds

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INIT_CODE_SNIPPET = `` /* 253-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func CreateI18nStringInfoMap added in v0.2.7

func CreateI18nStringInfoMap(i18nStringInfos []I18nStringInfo) (map[string]I18nStringInfo, error)

func NewCreateTranslations

func NewCreateTranslations(options common.Options) createTranslations

func NewExtractStrings

func NewExtractStrings(options common.Options) extractStrings

func NewRewritePackage

func NewRewritePackage(options common.Options) rewritePackage

func NewVerifyStrings

func NewVerifyStrings(options common.Options) verifyStrings

func SaveI18nStringInfos added in v0.2.7

func SaveI18nStringInfos(printer common.PrinterInterface, options common.Options, i18nStringInfos []I18nStringInfo, fileName string) error

Types

type CaptureGroupSubstrings added in v0.2.6

type CaptureGroupSubstrings struct {
	RegexpsStrings []string `json:"captureGroupSubstrings"`
}

type Checkup

type Checkup struct {
	I18nStringInfos []common.I18nStringInfo
	// contains filtered or unexported fields
}

func NewCheckup

func NewCheckup(options common.Options) Checkup

func (*Checkup) Options

func (cu *Checkup) Options() common.Options

func (*Checkup) Printf

func (cu *Checkup) Printf(msg string, a ...interface{}) (int, error)

func (*Checkup) Println

func (cu *Checkup) Println(a ...interface{}) (int, error)

func (*Checkup) Run

func (cu *Checkup) Run() error

type CommandInterface

type CommandInterface interface {
	common.PrinterInterface
	Options() common.Options
	Run() error
}

type Fixup

type Fixup struct {
	I18nStringInfos []common.I18nStringInfo
	English         []common.I18nStringInfo
	Source          map[string]int
	Locales         map[string]map[string]string
	// contains filtered or unexported fields
}

func NewFixup

func NewFixup(options common.Options) Fixup

func (*Fixup) Options

func (fix *Fixup) Options() common.Options

func (*Fixup) Printf

func (fix *Fixup) Printf(msg string, a ...interface{}) (int, error)

func (*Fixup) Println

func (fix *Fixup) Println(a ...interface{}) (int, error)

func (*Fixup) Run

func (fix *Fixup) Run() error

type GoogleTranslateData

type GoogleTranslateData struct {
	Data GoogleTranslateTranslations `json:"data"`
}

type GoogleTranslateTranslation

type GoogleTranslateTranslation struct {
	TranslatedText         string `json:"translatedText"`
	DetectedSourceLanguage string `json:"detectedSourceLanguage"`
}

type GoogleTranslateTranslations

type GoogleTranslateTranslations struct {
	Translations []GoogleTranslateTranslation `json:"translations"`
}

type I18nStringInfo added in v0.2.7

type I18nStringInfo struct {
	ID          string      `json:"id"`
	Translation interface{} `json:"translation"`
	Modified    bool        `json:"modified"`
}

func LoadI18nStringInfos added in v0.2.7

func LoadI18nStringInfos(fileName string) ([]I18nStringInfo, error)

func (I18nStringInfo) Translations added in v0.2.7

func (info I18nStringInfo) Translations() (translations []string)

type MergeStrings

type MergeStrings struct {
	I18nStringInfos []common.I18nStringInfo

	Recurse        bool
	SourceLanguage string
	Directory      string
	// contains filtered or unexported fields
}

func NewMergeStrings

func NewMergeStrings(options common.Options) MergeStrings

func (*MergeStrings) Len

func (ms *MergeStrings) Len() int

func (*MergeStrings) Less

func (ms *MergeStrings) Less(i, j int) bool

func (*MergeStrings) Options

func (ms *MergeStrings) Options() common.Options

func (*MergeStrings) Printf

func (ms *MergeStrings) Printf(msg string, a ...interface{}) (int, error)

func (*MergeStrings) Println

func (ms *MergeStrings) Println(a ...interface{}) (int, error)

func (*MergeStrings) Run

func (ms *MergeStrings) Run() error

func (*MergeStrings) Swap

func (ms *MergeStrings) Swap(i, j int)

type ShowMissingStrings

type ShowMissingStrings struct {
	I18nStringInfos     []common.I18nStringInfo
	TranslatedStrings   []string
	I18nStringsFilename string
	Directory           string
	// contains filtered or unexported fields
}

func NewShowMissingStrings

func NewShowMissingStrings(options common.Options) ShowMissingStrings

func (*ShowMissingStrings) Options

func (sms *ShowMissingStrings) Options() common.Options

func (*ShowMissingStrings) Printf

func (sms *ShowMissingStrings) Printf(msg string, a ...interface{}) (int, error)

func (*ShowMissingStrings) Println

func (sms *ShowMissingStrings) Println(a ...interface{}) (int, error)

func (*ShowMissingStrings) Run

func (sms *ShowMissingStrings) Run() error

Jump to

Keyboard shortcuts

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