Update with I18N info.
This commit is contained in:
parent
32e81efaf4
commit
85c559d6e3
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=11718
1 changed files with 47 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
<p>General instructions can be found in the
|
||||
<a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/index.html">FreeBSD Porter's Handbook</a>.
|
||||
</p>
|
||||
<h2>GNOME Makefile Macros</h2>
|
||||
<p>For ports that <i>require</i> GNOME, you should define the following
|
||||
in your port's Makefile:</p>
|
||||
|
||||
|
@ -68,6 +69,52 @@ WANT_GNOME= yes
|
|||
</ul>
|
||||
<!-- End GNOME-related Makefile macros -->
|
||||
|
||||
<!-- Begine GNOME I18N -->
|
||||
<h2>GNOME Internationalization</h2>
|
||||
<p>GNOME relies on the <tt>gettext</tt> port to do
|
||||
internationalization (I18N). FreeBSD currently supports two versions
|
||||
of <tt>gettext</tt>: 0.10.35 and 0.10.40. Most ports can use
|
||||
0.10.35. However, if, when compiling your port, you get an error
|
||||
building the .po translation files similar to the following you will
|
||||
need to use the newer version of <tt>gettext</tt>:</p>
|
||||
|
||||
<pre>
|
||||
/usr/local/bin/msgfmt -o zh_TW.mo zh_TW.po
|
||||
zh_TW.po:255: end-of-line within string
|
||||
zh_TW.po:912: illegal control sequence
|
||||
zh_TW.po:2806: end-of-line within string
|
||||
zh_TW.po:2856: end-of-line within string
|
||||
zh_TW.po:2879: illegal control sequence
|
||||
zh_TW.po:2982: end-of-line within string
|
||||
found 6 fatal errors
|
||||
</pre>
|
||||
|
||||
<p>To use the newer <tt>gettext</tt>, add the following to your port's
|
||||
Makefile:</p>
|
||||
|
||||
<pre>
|
||||
BUILD_DEPENDS= msgfmt-new:${PORTSDIR}/devel/gettext-devel
|
||||
CONFIGURE_ENV+= MSGFMT=${LOCALBASE}/bin/msgfmt-new \
|
||||
XGETTEXT=${LOCALBASE}/bin/xgettext-new
|
||||
</pre>
|
||||
|
||||
<p>When installing GNOME applications, make sure the translation
|
||||
files are put in <tt>/usr/X11R6/share/locale</tt> and
|
||||
not <tt>/usr/X11R6/share/gnome/locale</tt>. To do this, add the
|
||||
following to your port's Makefile's <tt>pre-patch:</tt> section:</p>
|
||||
|
||||
<pre>
|
||||
pre-patch:
|
||||
@find ${WRKSRC} -name "Makefile.in*" | xargs ${PERL} -pi -e \
|
||||
's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
|
||||
s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g'
|
||||
</pre>
|
||||
|
||||
<p>Also, make sure the translation files are installed as .mo files and
|
||||
not .gmo files. To do this, you can generally use this
|
||||
<a href="../patches/patch-po::Makefile.in.in">patch</a>.</p>
|
||||
<!-- End GNOME I18N -->
|
||||
|
||||
<p>The more ported applications we have, the better.
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue