Skip to content

Commit

Permalink
re #225.
Browse files Browse the repository at this point in the history
'arz' => __('Egyptian Arabic', true),
'bel' => __('Belarusian', true),
'hun' => __('Hungarian', true),
'isl' => __('Icelandic', true),
'sqi' => __('Albanian', true),
'yue' => __('Cantonese', true)
  • Loading branch information
trang committed Apr 24, 2010
1 parent e498314 commit 8456929
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
23 changes: 12 additions & 11 deletions app/models/sentence.php
Expand Up @@ -48,13 +48,14 @@ class Sentence extends AppModel
const MAX_CORRECTNESS = 6;

public $languages = array(
'ara' ,'bul' ,'deu' ,'ell' ,'eng',
'epo' ,'spa' ,'fra' ,'heb' ,'ind',
'jpn' ,'kor' ,'nld' ,'por' ,'rus',
'vie' ,'cmn' ,'ces' ,'fin' ,'ita',
'tur' ,'ukr' ,'wuu' ,'swe' ,'zsm',
'nob' ,'est' ,'kat' ,'pol' ,'swh',
'lat' ,null
'ara', 'bul', 'deu', 'ell', 'eng',
'epo', 'spa', 'fra', 'heb', 'ind',
'jpn', 'kor', 'nld', 'por', 'rus',
'vie', 'cmn', 'ces', 'fin', 'ita',
'tur', 'ukr', 'wuu', 'swe', 'zsm',
'nob', 'est', 'kat', 'pol', 'swh',
'lat', 'arz', 'bel', 'hun', 'isl',
'sqi', 'yue', null
);
public $validate = array(
'lang' => array(
Expand Down Expand Up @@ -261,7 +262,7 @@ public function getRandomId($lang = null)
*
* @return array An array of ids.
*/
public function getSeveralRandomIds($lang = null , $numberOfIdWanted = 10)
public function getSeveralRandomIds($lang = null, $numberOfIdWanted = 10)
{
$ids = array ();
// exit if we don't have good params
Expand Down Expand Up @@ -422,7 +423,7 @@ public function delete($id, $userId)
'first',
array(
'condition' => array('Sentence.id' => $id)
, 'contain' => array ('Translation', 'User')
, 'contain' => array ('Translation', 'User')
)
);

Expand Down Expand Up @@ -450,7 +451,7 @@ public function delete($id, $userId)
public function getStatistics()
{
$query = "
SELECT ifnull(lang, 'und') as lang , numberOfSentences
SELECT ifnull(lang, 'und') as lang, numberOfSentences
FROM langStats
ORDER BY numberOfSentences DESC ;
";
Expand Down Expand Up @@ -604,7 +605,7 @@ public function getTranslationsOf($id,$excludeId = null)
//pr ( $results ) ;

$orderedResults = array(
"Translation" => array() ,
"Translation" => array(),
"IndirectTranslation" => array()
);
foreach ($results as $result) {
Expand Down
8 changes: 7 additions & 1 deletion app/views/helpers/languages.php
Expand Up @@ -75,7 +75,13 @@ public function onlyLanguagesArray()
'pol' => __('Polish', true),
'swh' => __('Swahili', true),
'lat' => __('Latin', true),
'wuu' => __('Shanghainese', true)
'wuu' => __('Shanghainese', true),
'arz' => __('Egyptian Arabic', true),
'bel' => __('Belarusian', true),
'hun' => __('Hungarian', true),
'isl' => __('Icelandic', true),
'sqi' => __('Albanian', true),
'yue' => __('Cantonese', true)
// TODO to change when shanghainese will not be the only wu dialect
);
asort($languages);
Expand Down

0 comments on commit 8456929

Please sign in to comment.