Update of /cvsroot/phpwiki/phpwiki/doc
In directory usw-pr-cvs1:/tmp/cvs-serv26842/phpwiki/doc
Modified Files:
README.coding
Log Message:
Added a note how to auto-activate po-mode in emacs.
Minor text reformatting.
Index: README.coding
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/doc/README.coding,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** README.coding 2001/12/16 18:33:25 1.2
--- README.coding 2001/12/27 07:58:36 1.3
***************
*** 1,3 ****
- $Id$
Here are the coding guidelines for PhpWiki.
--- 1,2 ----
***************
*** 7,11 ****
We follow, for the most part, the PEAR coding standards:
! * http://www.php.net/manual/en/pear.standards.php
There's code snippets for configuring Emacs and Vim as well as several
--- 6,10 ----
We follow, for the most part, the PEAR coding standards:
! <http://www.php.net/manual/en/pear.standards.php>
There's code snippets for configuring Emacs and Vim as well as several
***************
*** 18,27 ****
but I think we're better off using just spaces because aligned
comments in the right region will not align correctly. For a detailed
! argument see http://www.jwz.org/doc/tabs-vs-spaces.html.
! Also use a tab-width of eight, so that just in case tabs do creep
! into the source code, they have a standard width.
Use php-mode as well. This is freely available on the net
! (http://sourceforge.net/projects/php-mode/). Put something like this
in your .emacs file:
--- 17,26 ----
but I think we're better off using just spaces because aligned
comments in the right region will not align correctly. For a detailed
! argument see <http://www.jwz.org/doc/tabs-vs-spaces.html>. Also use a
! tab-width of eight, so that just in case tabs do creep into the source
! code, they have a standard width.
Use php-mode as well. This is freely available on the net
! <http://sourceforge.net/projects/php-mode/>. Put something like this
in your .emacs file:
***************
*** 47,68 ****
!!! I18N: Using gettext()
! String literals which end up making it into the HTML output should be wrapped
! with a call to ''gettext()''. This allows translations to be substituted when
! PhpWiki is run in non-english environments.
!
! Since xgettext (part of the "GNU gettext utilities") is used to find strings
! for translation, It is important that the argument of ''gettext()'' be a constant
! string literal, in double quotes (").
! (You can now use _("foo") as an alias for gettext("foo").)
OKAY: gettext("This is a message.");
OKAY: _("Fazool.");
! OKAY: sprintf(gettext("Hello %s"), $name);
OKAY: sprintf(_("Hello %s"), $name);
! BAD: gettext('This will be ignored by xgettext.');
BAD: _("Howdy" . ", wazoo");
! BAD: gettext("Hello $name");
BAD: define("MES", "howdy"); gettext(MES);
! BAD: gettext($string);
--- 46,77 ----
!!! I18N: Using gettext()
! String literals which end up making it into the HTML output should be
! wrapped with a call to ''gettext()''. This allows translations to be
! substituted when PhpWiki is run in non-english environments.
!
! Since xgettext (part of the "GNU gettext utilities") is used to find
! strings for translation, It is important that the argument of
! ''gettext()'' be a constant string literal, in double quotes (").
! You can now use _("foo") as an alias for gettext("foo").
OKAY: gettext("This is a message.");
OKAY: _("Fazool.");
! OKAY: sprintf(_("Hello %s"), $name);
OKAY: sprintf(_("Hello %s"), $name);
! BAD: _('This will be ignored by xgettext.');
BAD: _("Howdy" . ", wazoo");
! BAD: _("Hello $name");
BAD: define("MES", "howdy"); gettext(MES);
! BAD: _($string);
!
! If you want Emacs po mode to automatically kick-in when you edit a po
! file, add the following to your .emacs file:
!
! (setq auto-mode-alist
! (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode) auto-mode-alist))
! (autoload 'po-mode "po-mode")
!
!
! $Id$
|