From: "Grigory Batalov" <grisxa@mail.ru>
To: mandrake-russian@altlinux.ru
Subject: Re: [mdk-re] gettext and Makefiles
Date: Mon Mar 25 10:17:07 2002
Message-ID: <20020325101734.249873f4.grisxa@mail.ru> (raw)
In-Reply-To: <20020325100625.600f675f.a_prokudin@pub.tmb.ru>
On Mon, 25 Mar 2002 10:06:25 +0300
"Alexandre Prokoudine" <a_prokudin@pub.tmb.ru> wrote:
> Имеем вот такой текст: в Makefile из папки locale, где должен лежать PO-файл
>
> # locale/Makefile
> #
> # Matt Brubeck 2002-01-12
> # based on the locale makefile from wxWindows 2.2.9
> #
> # This is the makefile for generating the message catalog file and
> # building lang.mo files from the translated lang.po catalogs.
> # This makefile may be invoked to build either audacity.pot or any lang.mo
>
> # Autodetect the languages we support. Currently this relies on make
> # being called with this dir as the cwd, but if we generate this file
> # with configure an explicit path should be specified -- RL.
>
> WX_LINGUAS := `ls *.po 2> /dev/null | sed -n 's/^\(.*\)\.po$$/\1/p'`
>
> # the programs we use (TODO: use configure to detect them)
> MSGFMT=msgfmt -v
> MSGMERGE=msgmerge
> XGETTEXT=xgettext
> XARGS=xargs
>
> # common xgettext args: C++ syntax, use the specified macro names as markers
> XGETTEXT_ARGS=-C -k_ -kwxGetTranslation -kwxTRANSLATE -s -j
>
> # implicit rules
> %.mo: %.po
> $(MSGFMT) -o $@ $<
>
> # a PO file must be updated from the template to include new translations
> POTFILE=audacity.pot
>
> %.po: $(POTFILE)
> if [ -f $@ ]; then $(MSGMERGE) $@ $(POTFILE) > $@.new && mv $@.new $@; \
> else cp $(POTFILE) $@; fi
>
> $(POTFILE):
> touch $@
> find ../src -name "*.h" \
> | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o $(POTFILE)
> find ../src -name "*.cpp" \
> | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o $(POTFILE)
>
> allpo: update
> @for t in $(WX_LINGUAS); do $(MAKE) $$t.po; done
>
> allmo:
> @for t in $(WX_LINGUAS); do $(MAKE) $$t.mo; done
>
> update:
> $(RM) $(POTFILE)
> $(MAKE) $(POTFILE)
>
> # targets depending on this one will be always remade
> FORCE:
>
> .PHONY: allpo allmo force-update
>
>
> Вопрос: КАК сделать из всего этого обычный PO-файл, который можно редактировать?
А что, 'make allpo' не работает?
--
Баталов Григорий,
системный администратор
АО "Ковдорский ГОК"
next prev parent reply other threads:[~2002-03-25 10:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-25 10:01 Alexandre Prokoudine
2002-03-25 10:17 ` Grigory Batalov [this message]
2002-03-25 10:46 ` Alexandre Prokoudine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020325101734.249873f4.grisxa@mail.ru \
--to=grisxa@mail.ru \
--cc=mandrake-russian@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git