mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Added i18n to the 'skincurses' plugin
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for a Video Disk Recorder plugin
|
||||
#
|
||||
# $Id: Makefile 1.9 2007/08/15 13:05:54 kls Exp $
|
||||
# $Id: Makefile 1.10 2007/08/15 14:00:27 kls Exp $
|
||||
|
||||
# The official name of this plugin.
|
||||
# This name will be used in the '-P...' option of VDR to load the plugin.
|
||||
@@ -49,7 +49,7 @@ OBJS = $(PLUGIN).o
|
||||
|
||||
### The main target:
|
||||
|
||||
all: libvdr-$(PLUGIN).so
|
||||
all: libvdr-$(PLUGIN).so i18n
|
||||
|
||||
### Implicit rules:
|
||||
|
||||
@@ -65,6 +65,31 @@ $(DEPFILE): Makefile
|
||||
|
||||
-include $(DEPFILE)
|
||||
|
||||
### Internationalization (I18N):
|
||||
|
||||
PODIR = po
|
||||
LOCALEDIR = $(VDRDIR)/locale
|
||||
I18Npo = $(wildcard $(PODIR)/*.po)
|
||||
I18Nmo = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Ndirs = $(notdir $(foreach file, $(I18Npo), $(basename $(file))))
|
||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||
|
||||
%.mo: %.po
|
||||
msgfmt -c -o $@ $<
|
||||
|
||||
$(I18Npot): $(wildcard *.c)
|
||||
xgettext -C -cTRANSLATORS --no-wrap -F -k -ktr -ktrNOOP --msgid-bugs-address='<vdr-bugs@cadsoft.de>' -o $@ $(wildcard *.c)
|
||||
|
||||
$(I18Npo): $(I18Npot)
|
||||
msgmerge -U --no-wrap -F --backup=none -q $@ $<
|
||||
|
||||
i18n: $(I18Nmo)
|
||||
@mkdir -p $(LOCALEDIR)
|
||||
for i in $(I18Ndirs); do\
|
||||
mkdir -p $(LOCALEDIR)/$$i/LC_MESSAGES;\
|
||||
cp $(PODIR)/$$i.mo $(LOCALEDIR)/$$i/LC_MESSAGES/$(PLUGIN).mo;\
|
||||
done
|
||||
|
||||
### Targets:
|
||||
|
||||
libvdr-$(PLUGIN).so: $(OBJS)
|
||||
@@ -80,4 +105,5 @@ dist: clean
|
||||
@echo Distribution package created as $(PACKAGE).tgz
|
||||
|
||||
clean:
|
||||
@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
|
||||
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
|
||||
|
||||
Reference in New Issue
Block a user