Update:Remora Standards: Difference between revisions
Jump to navigation
Jump to search
m (added fullstop) |
No edit summary |
||
Line 26: | Line 26: | ||
= Testing = | = Testing = | ||
* [[Update:Remora_Testing|Remora Testing Page]] | * [[Update:Remora_Testing|Remora Testing Page]] | ||
= l10n = | |||
* If the string is a "widget" as defined in the shavictionary: (labels, common navigational elements like "Home" or "Top" or "Next") | |||
**element_name_additional | |||
*If the string is prose for explanations, error messages, instructions | |||
**type_name_additional | |||
*If the string is structural text like headers, titles, breadcrumbs, etc. | |||
**If the string is not in a form: | |||
***namespace_pagename_name_additional | |||
**If the string is inside of a form: | |||
***namespace_pagename_formname_element_name_additional | |||
Where: | |||
*namespace is the location in cake of the view, so if it's under /views/developers/ the namespace is "developers" | |||
*pagename is the name of the file, with underscores taken out | |||
*formname is just what you think the form should be called with "form" appended, since cake is actually naming them... (should we make this more specific?) | |||
*name is a unique name for the element (preferably it's id) | |||
*element is the closest tag or parameter, so for an images alt tag it would be "alt". For a label it would be "label" | |||
*additional is anything else needed to make a string unique | |||
*type is a global category, like "error" |
Revision as of 02:25, 16 September 2006
Style
Follow the PEAR Coding Standards with one exception:
No new line at EOF
Leaving a new line at the end of a .php file after the ?> will make horrible things happen for HTTP headers. Do not follow this standard.
Comments and PHPDoc
- Read and understand the PHPDoc reference when needed.
- Make a concerted effort to [write out comments], especially before function definitions. Bare minimum comments for function defs:
- What it is for
- @param - define all inputs and their type/purpose
- @return - define all retvals and their type/purpose
- // style comments can be used for smaller statements, just footnotes. If the footnote turns into an essay, use /** */
HTML
HTML 4.01 Strict. Close and nest your tags correctly, as if you were writing XHTML.
CSS
Valid
JavaScript
No errors with javascript.options.strict set to true
Testing
l10n
- If the string is a "widget" as defined in the shavictionary: (labels, common navigational elements like "Home" or "Top" or "Next")
- element_name_additional
- If the string is prose for explanations, error messages, instructions
- type_name_additional
- If the string is structural text like headers, titles, breadcrumbs, etc.
- If the string is not in a form:
- namespace_pagename_name_additional
- If the string is inside of a form:
- namespace_pagename_formname_element_name_additional
- If the string is not in a form:
Where:
- namespace is the location in cake of the view, so if it's under /views/developers/ the namespace is "developers"
- pagename is the name of the file, with underscores taken out
- formname is just what you think the form should be called with "form" appended, since cake is actually naming them... (should we make this more specific?)
- name is a unique name for the element (preferably it's id)
- element is the closest tag or parameter, so for an images alt tag it would be "alt". For a label it would be "label"
- additional is anything else needed to make a string unique
- type is a global category, like "error"