Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrysweel committed Apr 8, 2015
2 parents 7efe79a + 3905ef2 commit c5e730e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Api/Model/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\Regex;
use Ant\Bundle\ChateaClientBundle\Validator\Constraints\Language;

/**
* Class Channel
Expand Down Expand Up @@ -63,7 +64,7 @@ public static function getManager()

/**
* @var
* @Regex(pattern = "/([#&]\w+)/",
* @Regex(pattern = "/([#&][^\s,&\cG]+)/",
* match = true,
* message = "form.rfc_1459") RFC-1459(http://www.irchelp.org/irchelp/rfc/chapter1.html#c1_3)
*/
Expand All @@ -80,6 +81,7 @@ public static function getManager()
/**
* The value for the lnaguage field.
* @var string
* @Language
*/
protected $language;

Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG-0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ To get the diff between two versions, go to https://github.com/antwebes/ChateaCl

* 0.1.8 (2015-03-29)
* Include captcha in page reset password
* Include constraint to language of user
* Include constraint to language of user

* 0.1.9 (2015-04-08)
* Fix error with file language.yml
* Irc channel name can not containt the & char
2 changes: 1 addition & 1 deletion DependencyInjection/ChateaClientExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function load(array $configs, ContainerBuilder $container)

if(array_key_exists('languages',$config) && array_key_exists('dir',$config['languages'])){
if($config['languages']['dir'] == null){
$container->setParameter('chatea_client.languages_dir', $container->getParameter('kernel.root_dir').'/config');
$container->setParameter('chatea_client.languages_dir', __DIR__.'/../Resources/config');
}else{
$container->setParameter('chatea_client.languages_dir', $config['languages']['dir']);
}
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getConfigTreeBuilder()
->children()
->arrayNode('languages')->addDefaultsIfNotSet()->children()
->scalarNode('dir')->defaultNull()->end()
->scalarNode('file')->defaultValue('config/languages.yml')->end()
->scalarNode('file')->defaultValue('languages.yml')->end()
->scalarNode('header')->defaultValue('languages')->end()
->end()
->end();
Expand Down
31 changes: 31 additions & 0 deletions Resources/config/languages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
languages:
af:
name: "Afrikaans"
nativeName: "Afrikaans"
es:
name: "Spanish; Castilian"
nativeName: "español, castellano"
en:
name: "English"
nativeName: "English"
de:
name: "German"
nativeName: "Deutsch"
fr:
name: "French"
nativeName: "français, langue française"
id:
name: "Indonesian"
nativeName: "Bahasa Indonesia"
it:
name: "Italian"
nativeName: "Italiano"
nl:
name: "Dutch"
nativeName: "Nederlands, Vlaams"
qu:
name: "Quechua"
nativeName: "Runa Simi, Kichwa"
pt:
name: "Portuguese"
nativeName: "Português"

0 comments on commit c5e730e

Please sign in to comment.