Hi Tao, Thank you for your patch. Unfortunately, you are mixing several unrelated changes into one big patch. I'd prefer to see this split into several separate patches for good reasons.
Before I make a suggestion to split the changes, I'll add my comments in your message: On Tuesday 18 May 2010, Tao Wang wrote: > 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. > The reason search is not utf-8 encoded is that most of the list archives are not utf-8 encoded. For the English lists this doesn't make much of a difference, but for the foreign language lists like the German list, it does. namazu doesn't do any encoding conversion itself, so if you search for and display a German article, you will have proper menus and headers and garbage in the displayed message. > 2) Merged search/template/*.ja to po/ja.po > The Japanese templates are separate exactly to work around this issue utf-8/iso issue. Granted, it's not a good solution, but the whole utf-8 stuff needs a broader fix. > 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. > These changes may fix the header and menu, but as said will break the message content for non-English lists. You also didn't answer Derek's question of why these changes ? I understand the code is cleaner, but is it worth all this effort ? Anyway, I propose you make three separate patches: 1. a patch that makes the search part work with the cookie/lang url parameter. This patch should ignore anything utf-8 related. 2. a patch for the utf-8 improvements. This patch may be different from what you have proposed so far, and should take the non-utf-8 content of the archive into account. 3. a patch for the minor fixes, such as copyright year, the mimeline removal and so on. The first patch is the most urgent right now. Geert _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
