Skip to content

Commit

Permalink
refactor(po): rename header option functions for consistency
Browse files Browse the repository at this point in the history
- Renamed header option functions to follow a consistent naming convention by prefixing them with `HeaderWith`.
- Updated all references to these functions in the codebase to use the new naming convention.
- This change improves code readability and aligns with the project's naming standards.
  • Loading branch information
Tom5521 committed Mar 1, 2025
1 parent 08d061c commit 207a5b7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/po/header_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,43 @@ package po

type HeaderOption func(*HeaderConfig)

func WithHewaderConfig(c HeaderConfig) HeaderOption {
func HeaderWithConfig(c HeaderConfig) HeaderOption {
return func(hc *HeaderConfig) {
*hc = c
}
}

func WithNplurals(n uint) HeaderOption {
func HeaderWithNplurals(n uint) HeaderOption {
return func(hc *HeaderConfig) {
hc.Nplurals = n
}
}

func WithProjectIDVersion(v string) HeaderOption {
func HeaderWithProjectIDVersion(v string) HeaderOption {
return func(hc *HeaderConfig) {
hc.ProjectIDVersion = v
}
}

func WithReportMsgidBugsTo(r string) HeaderOption {
func HeaderWithReportMsgidBugsTo(r string) HeaderOption {
return func(hc *HeaderConfig) {
hc.ReportMsgidBugsTo = r
}
}

func WithLanguage(lang string) HeaderOption {
func HeaderWithLanguage(lang string) HeaderOption {
return func(hc *HeaderConfig) {
hc.Language = lang
}
}

func WithLanguageTeam(team string) HeaderOption {
func HeaderWithLanguageTeam(team string) HeaderOption {
return func(hc *HeaderConfig) {
hc.LanguageTeam = team
}
}

func WithLastTranslator(translator string) HeaderOption {
func HeaderWithLastTranslator(translator string) HeaderOption {
return func(hc *HeaderConfig) {
hc.LastTranslator = translator
}
Expand Down

0 comments on commit 207a5b7

Please sign in to comment.