Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Job ¶
type Job struct {
ID string `json:"id"`
Status string `json:"status"` // running, done, error
Message string `json:"message,omitempty"`
Done int `json:"done"`
Total int `json:"total"`
UpdatedAt time.Time `json:"updatedAt"`
}
Job tracks long-running translation progress.
type Payload ¶
type Payload struct {
FileName string `json:"fileName"`
SourceLanguage string `json:"sourceLanguage"`
AvailableLanguages []string `json:"availableLanguages"`
TotalStrings int `json:"totalStrings"`
Entries []UILocalization `json:"entries"`
Warning string `json:"warning,omitempty"`
}
Payload represents the data returned to the UI.
type ProviderConfig ¶
type ProviderConfig struct {
APIKey string `json:"apiKey"`
APIBaseURL string `json:"apiBaseUrl"`
Model string `json:"model"`
Glossary string `json:"glossary"`
AppID string `json:"appId"`
AppSecret string `json:"appSecret"`
Temperature float64 `json:"temperature"`
MaxTokens int `json:"maxTokens"`
Formality string `json:"formality"`
IsFree bool `json:"isFree"`
}
ProviderConfig is the union of provider-specific options we support.
type ServerState ¶
type ServerState struct {
// contains filtered or unexported fields
}
ServerState holds the in-memory working copy of the xcstrings data.
type TranslateRequest ¶
type TranslateRequest struct {
Provider string `json:"provider"`
TargetLanguages []string `json:"targetLanguages"`
SourceLanguage string `json:"sourceLanguage"`
Concurrency int `json:"concurrency"`
TimeoutSeconds int `json:"timeoutSeconds"`
Config ProviderConfig `json:"config"`
}
TranslateRequest describes the batch translate payload from the UI.
Click to show internal directories.
Click to hide internal directories.