mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 10:34:08 +00:00
Simplified pot-update code.
This commit is contained in:
parent
f4376d916b
commit
f968eb3f3b
@ -47,31 +47,21 @@ if "pot-update" in COMMAND_LINE_TARGETS:
|
|||||||
"utils/wmlxgettext --directory=. --domain=%s $SOURCES > $TARGET" % domain
|
"utils/wmlxgettext --directory=. --domain=%s $SOURCES > $TARGET" % domain
|
||||||
)
|
)
|
||||||
|
|
||||||
pot = os.path.join(domain, domain + ".pot")
|
pot = File(os.path.join(domain, domain + ".pot"))
|
||||||
env.Precious(pot)
|
env.Precious(pot)
|
||||||
NoClean(pot)
|
NoClean(pot)
|
||||||
if cfgs and sources:
|
if cfgs and sources:
|
||||||
env.AddPostAction(
|
env.Command(pot, [source_pot, wml_pot],
|
||||||
env.Command(
|
|
||||||
pot,
|
|
||||||
[source_pot, wml_pot],
|
|
||||||
"msgcat --sort-by-file $SOURCES -o $TARGET"
|
|
||||||
),
|
|
||||||
[
|
[
|
||||||
|
"msgcat --sort-by-file $SOURCES -o $TARGET",
|
||||||
Delete(wml_pot),
|
Delete(wml_pot),
|
||||||
Delete(source_pot)
|
Delete(source_pot)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
elif cfgs:
|
elif cfgs:
|
||||||
env.AddPostAction(
|
env.Command(pot, wml_pot, Move(pot.path, wml_pot))
|
||||||
env.InstallAs(pot, wml_pot),
|
|
||||||
Delete(wml_pot)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
env.AddPostAction(
|
env.Command(pot, source_pot, Move(pot.path, source_pot))
|
||||||
env.InstallAs(pot, source_pot),
|
|
||||||
Delete(source_pot)
|
|
||||||
)
|
|
||||||
|
|
||||||
env.Alias("pot-update", pot)
|
env.Alias("pot-update", pot)
|
||||||
env.Alias("pot-update", "../translations")
|
env.Alias("pot-update", "../translations")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user