Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61830
b: refs/heads/master
c: b70e325
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg committed Jul 16, 2007
1 parent 29885fa commit 37180ff
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c6f2eb979c314b6362e655f3ff15749af565f86
refs/heads/master: b70e325cfe824ea0f6a1666b8b8db986e99c9603
35 changes: 18 additions & 17 deletions trunk/scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,25 @@ oldconfig: $(obj)/conf
silentoldconfig: $(obj)/conf
$< -s arch/$(ARCH)/Kconfig

# Create new linux.po file
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
# The symlink is used to repair a deficiency in arch/um
update-po-config: $(obj)/kxgettext
xgettext --default-domain=linux \
--add-comments --keyword=_ --keyword=N_ \
--files-from=scripts/kconfig/POTFILES.in \
--output scripts/kconfig/config.pot
$(Q)ln -fs Kconfig_i386 arch/um/Kconfig_arch
$(Q)for i in `ls arch/`; \
do \
scripts/kconfig/kxgettext arch/$$i/Kconfig \
| msguniq -o scripts/kconfig/linux_$${i}.pot; \
done
$(Q)msgcat scripts/kconfig/config.pot \
`find scripts/kconfig/ -type f -name linux_*.pot` \
--output scripts/kconfig/linux_raw.pot
$(Q)msguniq --sort-by-file scripts/kconfig/linux_raw.pot \
--output scripts/kconfig/linux.pot
$(Q)rm -f arch/um/Kconfig_arch
$(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot
xgettext --default-domain=linux \
--add-comments --keyword=_ --keyword=N_ \
--from-code=UTF-8 \
--files-from=scripts/kconfig/POTFILES.in \
--output $(obj)/config.pot
$(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
$(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch
(for i in `ls arch/`; \
do \
$(obj)/kxgettext arch/$$i/Kconfig; \
done ) >> $(obj)/config.pot
msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
--output $(obj)/linux.pot
$(Q)rm -f arch/um/Kconfig.arch
$(Q)rm -f $(obj)/config.pot

PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig

Expand Down
4 changes: 3 additions & 1 deletion trunk/scripts/kconfig/kxgettext.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ void menu__xgettext(void)
struct message *m = message__list;

while (m != NULL) {
message__print_gettext_msgid_msgstr(m);
/* skip empty lines ("") */
if (strlen(m->msg) > sizeof("\"\""))
message__print_gettext_msgid_msgstr(m);
m = m->next;
}
}
Expand Down

0 comments on commit 37180ff

Please sign in to comment.