I did some modification of GnuCash website.

Tao Wang dancefire at gmail.com
Tue May 18 16:34:31 EDT 2010


Hi,

I looked through the search part, and fixed several problems, and I
think some of them are not introduced by my modification:

1) search/templates/NMZ.head.php_tmpl
Change $can_utf to 'true'. I don't know why this set to false, which
stop all translations in header and menu not be able to display. The
text in header/menu can only display correctly when the encoding is
utf-8. If it's not set, the default will be ISO-8859-1, which will
make other languages, especially CJK displays like chaos.

2) Merged search/template/*.ja to po/ja.po

3) Update copyright years to '2010'

4) Replace some "$top_dir" with "$home". This will fix the menu links
in maillist search pages. They are not working before.

5) Update 'php-gettext' to 1.0.10

6) Remove the line of $mimeline in 'externals/header.phtml'. It should
be removed long time ago.

7) Change the way of setting $home to "http://www.gnucash.org". The
original code is trying to check whether $_SERVER["HTTP_HOST"] is
equal to "lists.gnucash.org". However, the .php_html will only be
executed by command line, which make the setting of $home cannot
happened. It should also check whether it's command line or not.

8) Add code to match pre-defined $locale which contains only 2
letters, which is language part of the full locale. So, the Makefile
should be easier to transfer locale info to lang.php.

9) Modify the Makefile to make it correctly generate the template files.

10) Convert es.po, en_GB.po, pl.po, nb.po to UTF-8. Without this
conversion, 'make nmz' will show some warnings about the 'invalid
encoding' problem.

Besides the patch for 'htdocs/trunk', there are 2 more modifications
are necessary:

1) Add following line to '/etc/namazu/namazurc':

ContentType	"text/html; charset=utf-8"

2) Change default charset in '/etc/httpd/conf.d/namazu.conf' from
'iso-8859-1' to 'utf-8'.

This 2 modifications will make sure the text of header and menu are
displayed correctly.

On Wed, May 19, 2010 at 3:03 AM, Derek Atkins <warlord at mit.edu> wrote:
> Geert Janssens <janssens-geert at telenet.be> writes:
>
>> I don't know all the details of the installation. But here's what I know:
>> * The mailman and namazu services are run on a server managed by Derek.
>
> FYI, this is a machine running Fedora 10 (although I'll probably upgrade
> to FC13 shortly after it's released).
>
> [snip]
>> * If you need more information, you should ask Derek. The best place
>> is on irc (http://wiki.gnucash.org/wiki/IRC). His nick is warlord. You
>> may have to convince him though that your solution is better than what
>> we have already.
>
> Yeah, I'm wondering why we're going through this effort to change the
> way the website works when the website worked perfectly well before.
> "If it aint broke, don't fix it".  Because this "fixing" is really
> breaking it more than it was before!
>
> Seriously, adding new languages to the website happens so rarely that it
> seems really silly to go through all this trouble to make it a tiny bit
> easier.  As it is, we're in a really broken state right now, which
> seems... sub-optimal.
>
>> Geert
>
> -derek
> --
>       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
>       Member, MIT Student Information Processing Board  (SIPB)
>       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
>       warlord at MIT.EDU                        PGP key available
>



-- 
Regards

Tao Wang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash-htdocs_search_fix2.zip
Type: application/zip
Size: 22169 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100519/ef95b876/attachment.zip>


More information about the gnucash-devel mailing list