Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithConfig ¶
func WithConfig(ctx context.Context, cfg *Configuration) context.Context
Types ¶
type Configuration ¶
type Configuration struct {
Localize LocalizeConfiguration `yaml:"localize"`
}
func LoadConfig ¶
func LoadConfig(configDirPath string) (*Configuration, error)
type HTMLConfiguration ¶ added in v0.17.0
type HTMLConfiguration struct {
// OutputPath is the file path the combined translation report is written to.
OutputPath string `yaml:"outputPath"`
}
type IOSConfiguration ¶ added in v0.15.0
type LocalizeConfiguration ¶
type LocalizeConfiguration struct {
// LocalesDir is the root directory containing locale subdirectories (e.g., "en-US", "es-US")
LocalesDir string `yaml:"localesDir"`
// RubricPath is an optional path to a text/markdown file containing translation rules,
// legal terms, and pre-defined translation strings to guide the LLM.
RubricPath string `yaml:"rubricPath"`
// Mobile configures generation of platform localization bundles from gotext catalogs.
Mobile MobileConfiguration `yaml:"mobile"`
// HTML configures generation of a combined English -> locale translation report.
HTML HTMLConfiguration `yaml:"html"`
}
type MobileConfiguration ¶ added in v0.15.0
type MobileConfiguration struct {
// SourceLanguage is the locale whose catalog must contain every registered mobile string.
SourceLanguage string `yaml:"sourceLanguage"`
// RegistryPath is the Go source file that declares mobile strings with message.Printer.Sprintf.
RegistryPath string `yaml:"registryPath"`
// IOS configures generation of iOS localization bundles from gotext catalogs.
IOS IOSConfiguration `yaml:"ios"`
}
Click to show internal directories.
Click to hide internal directories.