diff --git a/src/ChatterServiceProvider.php b/src/ChatterServiceProvider.php
index e6394ac4..a349b09e 100644
--- a/src/ChatterServiceProvider.php
+++ b/src/ChatterServiceProvider.php
@@ -2,10 +2,18 @@
namespace DevDojo\Chatter;
+use Illuminate\Routing\Router;
use Illuminate\Support\ServiceProvider;
class ChatterServiceProvider extends ServiceProvider
{
+ /**
+ * Where publish routes can be written, and will be registered by Chatter.
+ *
+ * @var string
+ */
+ public $publishRouteFile = '/routes/chatter/web.php';
+
/**
* Bootstrap the application services.
*
@@ -34,8 +42,11 @@ public function boot()
__DIR__.'/Lang' => resource_path('lang/vendor/chatter'),
], 'chatter_lang');
- // include the routes file
- include __DIR__.'/Routes/web.php';
+ $this->publishes([
+ __DIR__.'/Routes' => base_path('routes/chatter'),
+ ], 'chatter_routes');
+
+ $this->setupRoutes($this->app->router);
}
/**
@@ -58,4 +69,19 @@ public function register()
$this->loadViewsFrom(__DIR__.'/Views', 'chatter');
}
+
+ /**
+ * Define the routes for the application.
+ *
+ * @param \Illuminate\Routing\Router $router
+ *
+ * @return void
+ */
+ public function setupRoutes(Router $router)
+ {
+ // if the custom routes file is published, register its routes
+ if (file_exists(base_path().$this->publishRouteFile)) {
+ $this->loadRoutesFrom(base_path().$this->publishRouteFile);
+ }
+ }
}
diff --git a/src/Lang/fr/alert.php b/src/Lang/fr/alert.php
new file mode 100644
index 00000000..5336c021
--- /dev/null
+++ b/src/Lang/fr/alert.php
@@ -0,0 +1,37 @@
+ [
+ 'title' => 'Bravo !!',
+ 'reason' => [
+ 'submitted_to_post' => 'Réponse envoyée avec succès à '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ 'updated_post' => 'Mis à jour avec succès du '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ 'destroy_post' => 'Suppression réussie de la réponse et '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ 'destroy_from_discussion' => 'Suppression réussie de la réponse du '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ 'created_discussion' => 'Création réussie d\'un nouveau '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ ],
+ ],
+ 'info' => [
+ 'title' => 'Heads Up!',
+ ],
+ 'warning' => [
+ 'title' => 'Wuh Oh!',
+ ],
+ 'danger' => [
+ 'title' => 'Oh Snap!',
+ 'reason' => [
+ 'errors' => 'Veuillez corriger les éléments suivant errors:',
+ 'prevent_spam' => 'Afin d\'éviter le spam, veuillez prévoir au moins :minutes après la soumission du contenu.',
+ 'trouble' => 'Désolé, il semble y avoir eu un problème lors de la soumission de votre réponse.',
+ 'update_post' => 'Nah ah ah ... Impossible de mettre à jour votre réponse. Assurez-vous de ne rien faire de louche.',
+ 'destroy_post' => 'Nah ah ah ... Impossible de supprimer la réponse. Assurez-vous de ne rien faire de louche.',
+ 'create_discussion' => 'Whoops :( Il semble y avoir un problème à créer votre '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ 'title_required' => 'Le titre est requis',
+ 'title_min' => 'Le titre doit avoir au moins :min caractères.',
+ 'title_max' => 'Le titre ne doit pas avoir plus de :max caractères.',
+ 'content_required' => 'Le contenu est requis',
+ 'content_min' => 'Le contenu ne doit pas avoir moins de :min caractères',
+ 'category_required' => 'Choisissez une catégorie',
+ ],
+ ],
+];
diff --git a/src/Lang/fr/email.php b/src/Lang/fr/email.php
new file mode 100644
index 00000000..19977571
--- /dev/null
+++ b/src/Lang/fr/email.php
@@ -0,0 +1,14 @@
+ 'Je voulais juste vous faire savoir que quelqu\'un a répondu à un message sur le forum.',
+ 'greeting' => 'Salut,',
+ 'body' => 'Je voulais juste vous faire savoir que quelqu\'un a répondu à un message sur le forum à',
+ 'view_discussion' => 'Voir le '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ 'farewell' => 'Passez une bonne journée!',
+ 'unsuscribe' => [
+ 'message' => 'Si vous ne souhaitez plus être averti lorsque quelqu\'un répond à ce formulaire, assurez-vous de décocher le paramètre de notification au bas de la page :)',
+ 'action' => 'Vous n\'aimez pas ces emails?',
+ 'link' => 'Se désabonner à cette '.mb_strtolower(trans('chatter::intro.titles.discussion')).'.',
+ ],
+];
diff --git a/src/Lang/fr/intro.php b/src/Lang/fr/intro.php
new file mode 100644
index 00000000..53db6847
--- /dev/null
+++ b/src/Lang/fr/intro.php
@@ -0,0 +1,39 @@
+ [
+ 'discussion' => 'Sujet',
+ 'discussions' => 'Sujets',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | The main headline and description of your forum
+ |--------------------------------------------------------------------------
+ |
+ | Your headline and your description will be shown on the homepage of your
+ | forum, unless you change the default theme.
+ |
+ | *headline*: This is the main headline on the forum homepage
+ |
+ | *description*: This is the main description that will show under the
+ | headline on the forum homepage.
+ |
+ */
+
+ 'headline' => 'Forum',
+ 'description' => 'Discutons du code, des bugs et de tout ce qui concerne le développement / design.',
+
+];
+
+
diff --git a/src/Lang/fr/messages.php b/src/Lang/fr/messages.php
new file mode 100644
index 00000000..e96b29ff
--- /dev/null
+++ b/src/Lang/fr/messages.php
@@ -0,0 +1,44 @@
+ [
+ 'cancel' => 'Annuler',
+ 'delete' => 'Supprimer',
+ 'edit' => 'Modifier',
+ 'yes' => 'Oui',
+ 'no' => 'Non',
+ 'minutes' => '1 minute| :count minutes',
+ ],
+
+ 'discussion' => [
+ 'new' => 'Nouveau '.trans('chatter::intro.titles.discussion'),
+ 'all' => 'Tous les '.trans('chatter::intro.titles.discussions'),
+ 'create' => 'Créér '.trans('chatter::intro.titles.discussion'),
+ 'posted_by' => 'Par',
+ 'head_details' => 'Posté dans la Catégorie',
+
+ ],
+ 'response' => [
+ 'confirm' => 'Êtes-vous sûr de vouloir supprimer cette réponse?',
+ 'yes_confirm' => 'Oui le Supprimer',
+ 'no_confirm' => 'Non Merci',
+ 'submit' => 'Envoyer une réponse',
+ 'update' => 'Mise à jour',
+ ],
+
+ 'editor' => [
+ 'title' => 'Titre de '.trans('chatter::intro.titles.discussion'),
+ 'select' => 'Choisir une Catégorie',
+ 'tinymce_placeholder' => 'Tapez votre '.trans('chatter::intro.titles.discussion').' Ici...',
+ 'select_color_text' => 'Choissisez une couleur pour ce '.trans('chatter::intro.titles.discussion').' (optionel)',
+ ],
+
+ 'email' => [
+ 'notify' => 'Avertissez-moi quand quelqu\'un répond',
+ ],
+
+ 'auth' => 'S\'il vous plait Connectez-vous
+ ou Créér un compte
+ pour repondre.',
+
+];
diff --git a/src/Routes/web.php b/src/Routes/web.php
index 87eff492..f9c1b8e5 100644
--- a/src/Routes/web.php
+++ b/src/Routes/web.php
@@ -6,12 +6,12 @@
// Route helper.
$route = function ($accessor, $default = '') {
- return $this->app->config->get('chatter.routes.'.$accessor, $default);
+ return app()->config->get('chatter.routes.'.$accessor, $default);
};
// Middleware helper.
$middleware = function ($accessor, $default = []) {
- return $this->app->config->get('chatter.middleware.'.$accessor, $default);
+ return app()->config->get('chatter.middleware.'.$accessor, $default);
};
// Authentication middleware helper.