-
Notifications
You must be signed in to change notification settings - Fork 872
Coding conventions
evgenyfadeev edited this page Sep 13, 2010
·
31 revisions
We need to develop some conventions that will make collaboration smoother.
Let’s discuss these on the newsgroup and add/remove items.
- if you want your new work to be included by others – keep your branch up-to date as much as possible or send a patch by email.
- keep your master branch (or whichever branch you want others to pull into the master) free of experimental features and local modifications
- discuss experimental features on the newsgroup before moving them onto the master branch
- have all text files in UNIX mode (use dos2unix if necessary)
- do not copy-paste code and templates
- newly written code should run on Python2.4 and later version 2
- Django 1.0 and later should be supported unless there is a compelling reason to use a later version
- keep all messages in
{% trans %} and {% blocktrans %} tags - do not copy-paste significant portions of html between templates
- if you change templates – make sure they validate with http://validator.w3.org before publishing your changes
- do not use empty elements for formatting (i.e. empty paragraph to make some space,
<br/>tags where css would do the job) - do not use table-based layout in new templates
- check validation of new translation messages containing html markup
- all non-admin interface urls must be translated
- if you change contents of msgstr or message key in templates and .py files – change it everywhere – including other language .po files
- Translation document has some more details
- pull/merge early – this will make resolving merge conflicts easier.