cmds

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 21 Imported by: 9

Documentation

Index

Constants

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

)

Variables

View Source
var BuildDate string
View Source
var GitRevision string
View Source
var Version string

Functions

func NewCheckupCommand added in v0.5.0

func NewCheckupCommand(options *common.Options) *cobra.Command

NewCheckupCommand implements 'i18n4go checkup' command

func NewCreateTranslations

func NewCreateTranslations(options *common.Options) *createTranslations

func NewCreateTranslationsCommand added in v0.5.0

func NewCreateTranslationsCommand(options *common.Options) *cobra.Command

NewCreateTranslationsCommand implements 'i18n4go create-translations' command

func NewExtractStrings

func NewExtractStrings(options *common.Options) *extractStrings

func NewExtractStringsCommand added in v0.5.0

func NewExtractStringsCommand(options *common.Options) *cobra.Command

NewExtractStringsCommand implements 'i18n extract-strings' command

func NewFixup

func NewFixup(options *common.Options) *fixup

func NewFixupCommand added in v0.5.0

func NewFixupCommand(options *common.Options) *cobra.Command

NewFixupCommand implements 'i18n fixup' command

func NewMergeStrings

func NewMergeStrings(options *common.Options) *mergeStrings

func NewMergeStringsCommand added in v0.5.0

func NewMergeStringsCommand(options *common.Options) *cobra.Command

NewMergeStringsCommand implements 'i18n4go merge-strings' command

func NewRewritePackage

func NewRewritePackage(options *common.Options) *rewritePackage

func NewRewritePackageCommand added in v0.5.0

func NewRewritePackageCommand(options *common.Options) *cobra.Command

NewRewritePackageCommand implements 'i18n4go rewrite-package' command

func NewShowMissingStrings

func NewShowMissingStrings(options *common.Options) *showMissingStrings

func NewShowMissingStringsCommand added in v0.5.0

func NewShowMissingStringsCommand(options *common.Options) *cobra.Command

NewShowMissingStringsCommand implements 'i18n show-missing-strings' command

func NewVerifyStrings

func NewVerifyStrings(options *common.Options) *verifyStrings

func NewVerifyStringsCommand added in v0.5.0

func NewVerifyStringsCommand(options *common.Options) *cobra.Command

NewVerifyStringsCommand implements 'i18n4go verify-strings' command

func NewVersionCommand added in v0.5.0

func NewVersionCommand(p *I18NParams) *cobra.Command

NewVersionCommand implements 'i18n version' command

Types

type CaptureGroupSubstrings added in v0.2.6

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

type Checkup

type Checkup struct {
	I18nStringInfos []common.I18nStringInfo
	IgnoreRegexp    *regexp.Regexp
	// 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 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 I18NParams added in v0.5.0

type I18NParams struct {
	Output io.Writer
}

I18NParams for creating commands. Useful for inserting mocks for testing and to have common parameters across commands.

Jump to

Keyboard shortcuts

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