I did some modification of GnuCash website.

Tao Wang dancefire at gmail.com
Fri May 14 11:51:32 EDT 2010


Hi,

I did some modification on the GnuCash website, and have following improvements.

1) Change the structure of l10n.
Previous: /zh_CN/index.phtml
Now: /index.phtml?lang=zh_CN

And the parameter "?lang=zh_CN" is optional, only necessary when
changing the locale. The locale will be saved as cookie, so, after
selecting language, it's not necessary to set the parameter
"?lang=xx_XX" to every link.

So, there will not be several set of pages, only one set pages is enough.

2) Centralize the *.mo files
Previously: /xx_XX/LC_MESSAGE and mixed with the *.phtml.
Now: /locale/xx_XX/LC_MESSAGE, the '/locale' is only for *.mo files.

3) Using php-gettext instead of system gettext.
I put {gettext.inc, gettext.php, stream.php} to 'externals', so we can
use php-gettext, which has the ability to support locale which the
system didn't support. It will directly read the .mo file if the
system doesn't support the locale. Otherwise, it will use the system's
gettext. So, we can use it as a fallback.

To use php-gettext, just replace _("") to T_("").

Could you have a try to see whether it's acceptable? Thanks.

-- 
Regards

Tao Wang
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnucash-htdocs.tar.gz
Type: application/x-gzip
Size: 362866 bytes
Desc: not available
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20100515/e3f025d1/attachment-0001.gz>


More information about the gnucash-devel mailing list