Skip to content

Commit 7954c4f

Browse files
committed
Merge tag 'linux-cpupower-6.13-rc1-update2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux
Merge one more cpupower utility update for 6.13-rc1 from Shuah Khan: "- add Chinese Simplified translation for cpufrequtils package - add checks for dependencies, xgettext and msgfmt before attempting to generate GNU gettext Language Translations." * tag 'linux-cpupower-6.13-rc1-update2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: add checks for xgettext and msgfmt cpupower: Add Chinese Simplified translation
2 parents 5066654 + 47d7650 commit 7954c4f

File tree

2 files changed

+955
-1
lines changed

2 files changed

+955
-1
lines changed

tools/power/cpupower/Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ LIB_MIN= 1
5757

5858
PACKAGE = cpupower
5959
PACKAGE_BUGREPORT = linux-pm@vger.kernel.org
60-
LANGUAGES = de fr it cs pt ka
60+
LANGUAGES = de fr it cs pt ka zh_CN
6161

6262

6363
# Directory definitions. These are default and most probably
@@ -218,17 +218,28 @@ else
218218
endif
219219
$(QUIET) $(STRIPCMD) $@
220220

221+
ifeq (, $(shell which xgettext))
222+
$(warning "Install xgettext to extract translatable strings.")
223+
else
221224
$(OUTPUT)po/$(PACKAGE).pot: $(UTIL_SRC)
222225
$(ECHO) " GETTEXT " $@
223226
$(QUIET) xgettext --default-domain=$(PACKAGE) --add-comments \
224227
--keyword=_ --keyword=N_ $(UTIL_SRC) -p $(@D) -o $(@F)
228+
endif
225229

230+
ifeq (, $(shell which msgfmt))
231+
$(warning "Install msgfmt to generate binary message catalogs.")
232+
else
226233
$(OUTPUT)po/%.gmo: po/%.po
227234
$(ECHO) " MSGFMT " $@
228235
$(QUIET) msgfmt -o $@ po/$*.po
236+
endif
229237

230238
create-gmo: ${GMO_FILES}
231239

240+
ifeq (, $(shell which msgmerge))
241+
$(warning "Install msgmerge to merge translations.")
242+
else
232243
update-po: $(OUTPUT)po/$(PACKAGE).pot
233244
$(ECHO) " MSGMRG " $@
234245
$(QUIET) @for HLANG in $(LANGUAGES); do \
@@ -241,6 +252,7 @@ update-po: $(OUTPUT)po/$(PACKAGE).pot
241252
rm -f $(OUTPUT)po/$$HLANG.new.po; \
242253
fi; \
243254
done;
255+
endif
244256

245257
compile-bench: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
246258
@V=$(V) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT)

0 commit comments

Comments
 (0)