Skip to content

Commit

Permalink
Merge tag 'linux-cpupower-6.13-rc1-update2' of ssh://gitolite.kernel.…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Rafael J. Wysocki committed Nov 4, 2024
2 parents 5066654 + 47d7650 commit 7954c4f
Show file tree
Hide file tree
Showing 2 changed files with 955 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tools/power/cpupower/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ LIB_MIN= 1

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


# Directory definitions. These are default and most probably
Expand Down Expand Up @@ -218,17 +218,28 @@ else
endif
$(QUIET) $(STRIPCMD) $@

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

ifeq (, $(shell which msgfmt))
$(warning "Install msgfmt to generate binary message catalogs.")
else
$(OUTPUT)po/%.gmo: po/%.po
$(ECHO) " MSGFMT " $@
$(QUIET) msgfmt -o $@ po/$*.po
endif

create-gmo: ${GMO_FILES}

ifeq (, $(shell which msgmerge))
$(warning "Install msgmerge to merge translations.")
else
update-po: $(OUTPUT)po/$(PACKAGE).pot
$(ECHO) " MSGMRG " $@
$(QUIET) @for HLANG in $(LANGUAGES); do \
Expand All @@ -241,6 +252,7 @@ update-po: $(OUTPUT)po/$(PACKAGE).pot
rm -f $(OUTPUT)po/$$HLANG.new.po; \
fi; \
done;
endif

compile-bench: $(OUTPUT)libcpupower.so.$(LIB_MAJ)
@V=$(V) confdir=$(confdir) $(MAKE) -C bench O=$(OUTPUT)
Expand Down
Loading

0 comments on commit 7954c4f

Please sign in to comment.