objectTranslations

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const OBJECT_TRANSLATIONS_NAME = "CustomObjectTranslation"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildComponentProvider

type ChildComponentProvider interface {
	Items(metadataType string) []metadata.RegisterableMetadata
}

ChildComponentProvider provides access to child components for composition

type CustomObjectTranslation

type CustomObjectTranslation struct {
	metadata.MetadataInfo
	XMLName    xml.Name `xml:"CustomObjectTranslation"`
	Xmlns      string   `xml:"xmlns,attr"`
	CaseValues []struct {
		Article *struct {
			Text string `xml:",chardata"`
		} `xml:"article"`
		CaseType *struct {
			Text string `xml:",chardata"`
		} `xml:"caseType"`
		Plural *struct {
			Text string `xml:",chardata"`
		} `xml:"plural"`
		PossessivePlural *struct {
			Text string `xml:",chardata"`
		} `xml:"possessivePlural"`
		Value *struct {
			Text string `xml:",chardata"`
		} `xml:"value"`
	} `xml:"caseValues"`
	FieldSets []struct {
		Label struct {
			Text string `xml:",chardata"`
		} `xml:"label"`
		Name struct {
			Text string `xml:",chardata"`
		} `xml:"name"`
	} `xml:"fieldSets"`
	Gender *struct {
		Text string `xml:",chardata"`
	} `xml:"gender"`
	Layouts []struct {
		Layout struct {
			Text string `xml:",chardata"`
		} `xml:"layout"`
		Sections []struct {
			Label struct {
				Text string `xml:",chardata"`
			} `xml:"label"`
			Section struct {
				Text string `xml:",chardata"`
			} `xml:"section"`
		} `xml:"sections"`
	} `xml:"layouts"`
	NameFieldLabel *struct {
		Text string `xml:",chardata"`
	} `xml:"nameFieldLabel"`
	QuickActions []struct {
		Label struct {
			Text string `xml:",chardata"`
		} `xml:"label"`
		Name struct {
			Text string `xml:",chardata"`
		} `xml:"name"`
	} `xml:"quickActions"`
	SharingReasons []struct {
		Label struct {
			Text string `xml:",chardata"`
		} `xml:"label"`
		Name struct {
			Text string `xml:",chardata"`
		} `xml:"name"`
	} `xml:"sharingReasons"`
	StartsWith *struct {
		Text string `xml:",chardata"`
	} `xml:"startsWith"`
	WebLinks []struct {
		Label struct {
			Text string `xml:",chardata"`
		} `xml:"label"`
		Name struct {
			Text string `xml:",chardata"`
		} `xml:"name"`
	} `xml:"webLinks"`
	WorkflowTasks []struct {
		Description *struct {
			Text string `xml:",chardata"`
		} `xml:"description"`
		Name struct {
			Text string `xml:",chardata"`
		} `xml:"name"`
		Subject *struct {
			Text string `xml:",chardata"`
		} `xml:"subject"`
	} `xml:"workflowTasks"`
	Fields          FieldList          `xml:"fields"`
	RecordTypes     RecordTypeList     `xml:"recordTypes"`
	ValidationRules ValidationRuleList `xml:"validationRules"`
	// contains filtered or unexported fields
}

func ComposeFromChildren

func ComposeFromChildren(objectTranslationName string, provider ChildComponentProvider) *CustomObjectTranslation

ComposeFromChildren creates a composed CustomObjectTranslation by merging child components from a provider. This is used when converting from source format (where components are separate) to metadata format. The returned CustomObjectTranslation needs to have SetName called before using Files() method.

func Open

func Open(path string) (*CustomObjectTranslation, error)

func (*CustomObjectTranslation) Files

func (c *CustomObjectTranslation) Files(format metadata.Format) (map[string][]byte, error)

func (*CustomObjectTranslation) SetMetadata

func (c *CustomObjectTranslation) SetMetadata(m metadata.MetadataInfo)

func (*CustomObjectTranslation) Tidy

func (c *CustomObjectTranslation) Tidy()

Tidy sorts the fields, record types, and validation rules in the CustomObjectTranslation

func (*CustomObjectTranslation) Type

type FieldList

type FieldList []field.Field

type RecordTypeList

type RecordTypeList []recordtype.RecordType

type ValidationRuleList

type ValidationRuleList []validationrule.ValidationRule

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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