[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1466] Update coding standards to reflect how most of
From: |
Michael Sheldon |
Subject: |
[Librefm-commits] [1466] Update coding standards to reflect how most of the code currently uses curly braces and add instructions for translations |
Date: |
Sun, 10 May 2009 13:32:00 +0000 |
Revision: 1466
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1466
Author: elleo
Date: 2009-05-10 13:32:00 +0000 (Sun, 10 May 2009)
Log Message:
-----------
Update coding standards to reflect how most of the code currently uses curly
braces and add instructions for translations
Modified Paths:
--------------
trunk/docs/coding_standards.txt
Modified: trunk/docs/coding_standards.txt
===================================================================
--- trunk/docs/coding_standards.txt 2009-05-10 13:28:30 UTC (rev 1465)
+++ trunk/docs/coding_standards.txt 2009-05-10 13:32:00 UTC (rev 1466)
@@ -23,12 +23,9 @@
7) 'If' statements need to use the following format:
- if ($var == 'example')
- {
+ if ($var == 'example') {
echo 'This is only an example';
- }
- else
- {
+ } else {
echo 'This is not a test. This is the real thing';
}
@@ -46,20 +43,15 @@
/**
* This class is for testing
*/
- class ModuleTesting
- {
+ class ModuleTesting {
/**
* Output the value of $my_var the user
*/
- public function printToScreen()
- {
+ public function printToScreen() {
$my_var = new Monkey();
- if ($my_var->name == 'example')
- {
+ if ($my_var->name == 'example') {
echo 'This is only an example';
- }
- else
- {
+ } else {
echo 'This is not a test. This is the real
thing';
}
}
@@ -67,8 +59,7 @@
10) Associative arrays must be written in the following manner:
- $array = array
- (
+ $array = array (
'var' => 'value',
'var2' => 'value2'
);
@@ -98,4 +89,8 @@
the closing tag is sent to the browser and cause errors, so don't
include
them.
-18) If you see code which doesn't comply with the above, please fix it :)
+18) Translatable strings in templates should be surrounded by a {t} block,
+ (e.g. {t}Translate me!{/t}). See the smarty gettext documentation for
more
+ advanced usage.
+
+19) If you see code which doesn't comply with the above, please fix it :)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1466] Update coding standards to reflect how most of the code currently uses curly braces and add instructions for translations,
Michael Sheldon <=