中文 man

新手涉及到的教学或入门贴,推荐新手必看,版主维护
回复
the_owl
帖子: 190
注册时间: 2006-02-18 20:42

#16

帖子 the_owl » 2006-03-14 18:26

:D 多谢楼主的分享,我也弄好了

to eexpress 其实这个make并不是编译任何东西,只是像gnix_oag说的那样,就是一个命令,生成一个UTF8目录而已,
NAME=man-pages-zh_CN
DESTDIR=/usr/share
CONFDIR=/etc
TRANSLATED=DOCS/00TRANSLATED

MAN=1 1p 8 2 3 3p 4 5 6 7 9 0p tcl n l p o 3pm 3perl
MAN=1 8 2 3 4 5 6 7 9 n l

u8:
mkdir UTF-8
cp -r src/man* UTF-8/
gb:
for i in $(MAN) ; do \
mkdir -p GB/man$$i ; \
done
for f in `cat $(TRANSLATED)` ; do \
iconv -f utf8 -t gb18030 src/$$f > GB/$$f ; \
done
cp src/man.macros GB/

....
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#17

帖子 gnix_oag » 2006-03-15 23:45

改了一下, 可以同时用中文和英文
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#18

帖子 eexpress » 2006-03-16 0:33

make是bash啊。天。
● 鸣学
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#19

帖子 gnix_oag » 2006-03-16 10:31

:D :D

本来就是 目标判断+bash
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#20

帖子 gnix_oag » 2006-03-16 11:13

man bash

好啊
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#21

帖子 eexpress » 2006-03-16 11:21

我想。源的编码不对。是不是可以 iconv 命令转一下。
● 鸣学
头像
yang119345
帖子: 570
注册时间: 2005-06-19 14:22
来自: 上海
联系:

#22

帖子 yang119345 » 2006-03-16 15:10

有多少内容是中文恴?
ynzheng
帖子: 74
注册时间: 2005-12-28 14:12
联系:

不成功啊

#23

帖子 ynzheng » 2006-03-16 16:52

按照这个为啥我不成功呢!

我之前安装过manpages-zh

然后按照楼主方法,不能成功
--------

代码: 全选

username@colinux:/usr/share/man$ ls zh_CN
man1  man2  man3  man4  man5  man6  man7  man8  man9  manl  man.macros  mann
username@colinux:/usr/share/man$ ls zh_CN.ori
man1  man2  man3  man4  man5  man6  man7  man8  man9
username@colinux:/usr/share/man$ ls zh_CN.ori/man8
badblocks.8.gz     groupadd.8.gz          lilo.8.gz            nmbd.8.gz        rootflags.8.gz  smbspool.8.gz   usermod.8.gz
bdflush.8.gz       groupdel.8.gz          losetup.8.gz         ntsysv.8.gz      route.8.gz      smbumount.8.gz  vidmode.8.gz
blockdev.8.gz      groupmod.8.gz          lspci.8.gz           ping.8.gz        rpm.8.gz        svnserve.8.gz   vmstat.8.gz
chat.8.gz          halt.8.gz              mailstats.8.gz       pppd.8.gz        setclock.8.gz   swapoff.8.gz    xinetd.8.gz
chpasswd.8.gz      hdparm.8.gz            MAKEDEV.8.gz         printcap.8.gz    setquota.8.gz   swapon.8.gz     zdump.8.gz
convertquota.8.gz  ifconfig.8.gz          makemap.8.gz         quotacheck.8.gz  setserial.8.gz  swat.8.gz       zic.8.gz
cron.8.gz          imapd.8.gz             mingetty.8.gz        quotaoff.8.gz    showmount.8.gz  sync.8.gz
dmesg.8.gz         inetd.8.gz             mkfs.8.gz            quotaon.8.gz     shutdown.8.gz   tcpdump.8.gz
edquota.8.gz       init.8.gz              mkswap.8.gz          quotastats.8.gz  smbd.8.gz       tzselect.8.gz
exportfs.8.gz      iptables.8.gz          modinfo.8.gz         ramsize.8.gz     smbmnt.8.gz     umount.8.gz
fdisk.8.gz         iptables-restore.8.gz  named-bootconf.8.gz  rdev.8.gz        smbmount.8.gz   useradd.8.gz
fsck.8.gz          iptables-save.8.gz     netstat.8.gz         repquota.8.gz    smbpasswd.8.gz  userdel.8.gz
username@colinux:/usr/share/man$ ls zh_CN/man8
ls: zh_CN/man8: 权限不够
username@colinux:/usr/share/man$ sudo ls zh_CN/man8
badblocks.8     exportfs.8  init.8              mingetty.8        printcap.8    rpm.8        smbmnt.8     tzselect.8
bdflush.8       fdisk.8     iptables.8          mkfs.8            quotacheck.8  rpmbuild.8   smbmount.8   umount.8
blockdev.8      fsck.8      iptables-restore.8  mkswap.8          quotaoff.8    rpmcache.8   smbpasswd.8  useradd.8
chat.8          groupadd.8  iptables-save.8     modinfo.8         quotaon.8     rpmdeps.8    smbspool.8   userdel.8
chpasswd.8      groupdel.8  lilo.8              mount.8           quotastats.8  rpmgraph.8   smbumount.8  usermod.8
convertquota.8  groupmod.8  logrotate.8         named-bootconf.8  ramsize.8     setclock.8   svnserve.8   vidmode.8
cron.8          halt.8      losetup.8           netstat.8         rdev.8        setquota.8   swapoff.8    vmstat.8
crond.8         hdparm.8    lspci.8             nmbd.8            repquota.8    setserial.8  swapon.8     xinetd.8
CVS             ifconfig.8  mailstats.8         ntsysv.8          rootflags.8   showmount.8  swat.8       zdump.8
dmesg.8         imapd.8     MAKEDEV.8           ping.8            route.8       shutdown.8   sync.8       zic.8
edquota.8       inetd.8     makemap.8           pppd.8            rpm2cpio.8    smbd.8       tcpdump.8
username@colinux:/usr/share/man$ locale
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
username@colinux:/usr/share/man$ man mount
No manual entry for mount
See 'man 7 undocumented' for help when manual pages are not available.
username@colinux:/usr/share/man$
ynzheng
帖子: 74
注册时间: 2005-12-28 14:12
联系:

我的配置

#24

帖子 ynzheng » 2006-03-16 16:55

代码: 全选

# manpath.config
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH			manpath_element
# MANPATH_MAP		path_element	manpath_element
# MANDB_MAP		global_manpath	[relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH 			/usr/src/pvm3/man
#
MANDATORY_MANPATH			/usr/man

#MANDATORY_MANPATH                       /usr/share/man
MANDATORY_MANPATH                       /usr/share/man/zh_CN
#MANDATORY_MANPATH                       /usr/share/man

MANDATORY_MANPATH			/usr/X11R6/man
MANDATORY_MANPATH			/usr/local/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
#		*PATH*        ->	*MANPATH*
#
#MANPATH_MAP	/bin			/usr/share/man
MANPATH_MAP     /bin                    /usr/share/man/zh_CN
#MANPATH_MAP     /bin                    /usr/share/man

#MANPATH_MAP	/usr/bin		/usr/share/man
MANPATH_MAP     /usr/bin                /usr/share/man/zh_CN
#MANPATH_MAP     /usr/bin                /usr/share/man

#MANPATH_MAP	/sbin			/usr/share/man
MANPATH_MAP     /sbin                   /usr/share/man/zh_CN
#MANPATH_MAP     /sbin                   /usr/share/man

#MANPATH_MAP	/usr/sbin		/usr/share/man
MANPATH_MAP     /usr/sbin               /usr/share/man/zh_CN
#MANPATH_MAP     /usr/sbin               /usr/share/man

MANPATH_MAP	/usr/local/bin		/usr/local/man
MANPATH_MAP	/usr/local/bin		/usr/local/share/man
MANPATH_MAP	/usr/local/sbin		/usr/local/man
MANPATH_MAP	/usr/local/sbin		/usr/local/share/man
MANPATH_MAP     /usr/local/sbin         /usr/local/man
MANPATH_MAP	/usr/X11R6/bin		/usr/X11R6/man
MANPATH_MAP	/usr/bin/X11		/usr/X11R6/man

#MANPATH_MAP	/usr/games		/usr/share/man
MANPATH_MAP     /usr/games              /usr/share/man/zh_CN
#MANPATH_MAP     /usr/games              /usr/share/man

MANPATH_MAP	/opt/bin		/opt/man
MANPATH_MAP	/opt/sbin		/opt/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
#		*MANPATH*     ->	*CATPATH*
#
MANDB_MAP	/usr/man		/var/cache/man/fsstnd

#MANDB_MAP	/usr/share/man		/var/cache/man
MANDB_MAP       /usr/share/man/zh_CN    /var/cache/man 
#MANDB_MAP       /usr/share/man          /var/cache/man

MANDB_MAP	/usr/local/man		/var/cache/man/oldlocal
MANDB_MAP	/usr/local/share/man	/var/cache/man/local
MANDB_MAP	/usr/X11R6/man		/var/cache/man/X11R6
MANDB_MAP	/opt/man		/var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions.  These are commented out by default as the value
# of the definition is already the default.  To change: uncomment a
# definition and modify it.
#
#DEFINE 	pager	/usr/bin/pager -s
#DEFINE 	cat	/bin/cat
#DEFINE 	tr	/usr/bin/tr '\255\267\264\327' '\055\157\047\170'
#DEFINE		grep	/bin/grep
#DEFINE 	troff 	/usr/bin/groff -mandoc
#DEFINE 	nroff 	/usr/bin/nroff -mandoc
#DEFINE 	eqn 	/usr/bin/eqn
#DEFINE 	neqn	/usr/bin/neqn
#DEFINE 	tbl 	/usr/bin/tbl
#DEFINE 	col 	/usr/bin/col
#DEFINE 	vgrind 	/usr/bin/vgrind
#DEFINE 	refer 	/usr/bin/refer
#DEFINE 	grap 	/usr/bin/grap
#DEFINE 	pic 	/usr/bin/pic -S
#
#DEFINE		decompressor	/bin/gzip -dc
#DEFINE		compressor	/bin/gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE		whatis_grep_flags		-i
#DEFINE		apropos_grep_flags		-iEw
#DEFINE		apropos_regex_grep_flags	-iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
SECTION		1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
ynzheng
帖子: 74
注册时间: 2005-12-28 14:12
联系:

#25

帖子 ynzheng » 2006-03-17 11:31

在ubuntu上搞定了

http://dlnow.com/blog/?p=51
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#26

帖子 gnix_oag » 2006-03-17 11:45

:D :D
SunApricot
帖子: 20
注册时间: 2006-02-27 23:22

#27

帖子 SunApricot » 2006-03-29 20:22

非常感谢~~:)
按照说明,一次到位~

由于今天重新装了一次,一开始连make都没有装~~:(
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#28

帖子 gnix_oag » 2006-03-29 23:10

:D :D :D
头像
rosn
帖子: 1014
注册时间: 2006-01-14 18:33

#29

帖子 rosn » 2006-04-01 23:02

可是我做到这里就出错了,是怎么回事啊:

wj712@wjtxg:~/Desktop$ cd man-pages-zh_CN-1.5
wj712@wjtxg:~/Desktop/man-pages-zh_CN-1.5$ make
mkdir UTF-8
cp -r src/man* UTF-8/
wj712@wjtxg:~/Desktop/man-pages-zh_CN-1.5$ sudo cp -r UTF-8/* /usr/share/man/zh_CN/
Password:
cp: ‘/usr/share/man/zh_CN/’: specified destination directory does not exist
请尝试执行‘cp --help’来获取更多信息。
wj712@wjtxg:~/Desktop/man-pages-zh_CN-1.5$
头像
rosn
帖子: 1014
注册时间: 2006-01-14 18:33

#30

帖子 rosn » 2006-04-02 20:31

楼主,为什么我做到make就不行了啊,如下:

rosn@fanzhe:~/Desktop$ cd man-pages-zh_CN-1.5
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ make
bash: make: command not found
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ sudo make
sudo: make: command not found

make不行我就跳过,进行下一步也不行:

rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$ sudo cp -r UTF-8/* /usr/share/man/zh_CN/
cp: stat‘UTF-8/*’失败: 没有那个文件或目录
rosn@fanzhe:~/Desktop/man-pages-zh_CN-1.5$
怎么办才好呢
回复