Skip to content

Commit

Permalink
builder: i18n/desktop: rename to i18n/msgfmt
Browse files Browse the repository at this point in the history
Since this builder driver can do more than just creating .desktop files,
rename it accordingly.

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
  • Loading branch information
metux committed Dec 11, 2023
1 parent 60ff0f0 commit d54e4fa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions engine/builder/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func CreateBuilder(o target.TargetObject) (jobs.Job, error) {
/* locales */
case target.TypeI18nPo:
return i18n.MakeI18nPo(o, id), nil
case target.TypeI18nDesktop:
return i18n.MakeI18nDesktop(o, id), nil
case target.TypeI18nMsgfmt:
return i18n.MakeI18nMsgfmt(o, id), nil

/* documentation */
case target.TypeDocMan:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"github.com/metux/go-metabuild/util/fileutil"
)

type I18nDesktop struct {
type I18nMsgfmt struct {
base.BaseBuilder
}

// FIXME: scan for linguas
func (b I18nDesktop) JobRun() error {
func (b I18nMsgfmt) JobRun() error {
linguas := b.RequiredEntryStrList(target.KeyI18nLinguas)
podir := b.RequiredEntryStr(target.KeyI18nPoDir)
subdir := b.EntryStr(target.KeySourceDir)
Expand Down Expand Up @@ -51,6 +51,6 @@ func (b I18nDesktop) JobRun() error {
return nil
}

func MakeI18nDesktop(o spec.TargetObject, id string) I18nDesktop {
return I18nDesktop{base.BaseBuilder{o, id}}
func MakeI18nMsgfmt(o spec.TargetObject, id string) I18nMsgfmt {
return I18nMsgfmt{base.BaseBuilder{o, id}}
}
2 changes: 1 addition & 1 deletion examples/conf/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ platform:
name: ${@@^::domain}.mo

i18n/desktop:
builder/driver: i18n/desktop
builder/driver: i18n/msgfmt
builder/command: msgfmt
install: true
install/dir: ${buildconf::install-dirs::fdo-appdir}
Expand Down
4 changes: 2 additions & 2 deletions spec/target/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const (
TypeDataDesktop = Key("data/desktop")

/* locales */
TypeI18nPo = Key("i18n/po")
TypeI18nDesktop = Key("i18n/desktop")
TypeI18nPo = Key("i18n/po")
TypeI18nMsgfmt = Key("i18n/msgfmt")

/* documentation */
TypeDocMan = Key("doc/man")
Expand Down

0 comments on commit d54e4fa

Please sign in to comment.