From e2af267fb71daaa817de2787cda27403c0d1e5a2 Mon Sep 17 00:00:00 2001 From: src386 Date: Thu, 10 Sep 2015 10:11:09 +0200 Subject: [PATCH] rollback to movim 0.9-2015-08-25 --- README.md | 4 +- sources/app/helpers/StringHelper.php | 35 +- sources/app/models/conference/Conference.php | 24 +- sources/app/models/config/Config.php | 4 +- sources/app/models/contact/Contact.php | 106 ++-- sources/app/models/message/Message.php | 59 +- sources/app/models/postn/Postn.php | 49 +- sources/app/models/presence/Presence.php | 118 ++-- sources/app/models/rosterlink/RosterLink.php | 53 +- .../app/models/subscription/Subscription.php | 24 +- sources/app/views/about.tpl | 1 - sources/app/views/page.tpl | 4 +- sources/app/widgets/About/about.tpl | 2 +- sources/app/widgets/About/locales.ini | 15 +- sources/app/widgets/Account/Account.php | 2 +- sources/app/widgets/Account/account.js | 4 - .../app/widgets/AccountNext/AccountNext.php | 24 +- sources/app/widgets/AdminLogin/adminlogin.tpl | 4 +- sources/app/widgets/AdminMain/AdminMain.php | 4 +- sources/app/widgets/AdminMain/adminmain.tpl | 2 +- sources/app/widgets/AdminTest/AdminTest.php | 2 +- sources/app/widgets/AdminTest/admintest.tpl | 3 +- sources/app/widgets/Blog/blog.tpl | 2 +- sources/app/widgets/Bookmark/Bookmark.php | 14 + sources/app/widgets/Chat/Chat.php | 9 +- sources/app/widgets/Chat/chat.js | 2 +- sources/app/widgets/Config/Config.php | 4 +- sources/app/widgets/Contact/Contact.php | 20 + sources/app/widgets/Contact/_contact.tpl | 41 +- sources/app/widgets/Group/Group.php | 8 +- sources/app/widgets/Group/_group_header.tpl | 2 +- sources/app/widgets/Group/_group_posts.tpl | 18 +- sources/app/widgets/Groups/groups.js | 2 +- sources/app/widgets/Help/help.tpl | 4 +- sources/app/widgets/Login/locales.ini | 9 +- sources/app/widgets/Login/login.js | 2 +- sources/app/widgets/Login/login.tpl | 2 +- sources/app/widgets/Notifs/notifs.css | 3 +- sources/app/widgets/Post/_post.tpl | 2 +- sources/app/widgets/Publish/Publish.php | 38 +- .../app/widgets/Publish/_publish_embed.tpl | 4 +- sources/app/widgets/Rooms/Rooms.php | 10 +- sources/app/widgets/Rooms/_rooms.tpl | 19 +- sources/app/widgets/Rooms/locales.ini | 1 - sources/app/widgets/Roster/roster.tpl | 6 +- sources/app/widgets/Vcard4/_vcard4_form.tpl | 46 +- sources/app/widgets/Vcard4/locales.ini | 3 +- sources/bootstrap.php | 28 +- sources/composer.json | 3 +- sources/index.php | 11 +- sources/linker.php | 8 +- sources/locales/fr.po | 513 ++++++++++++++---- sources/system/User.php | 3 +- sources/system/Utils.php | 20 +- sources/system/widget/WidgetBase.php | 40 +- sources/themes/material/css/article.css | 17 +- sources/themes/material/css/list.css | 1 - sources/themes/material/css/style.css | 21 +- 58 files changed, 886 insertions(+), 593 deletions(-) diff --git a/README.md b/README.md index 316e4ef..27db349 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ Warning: BETA. You need a valid SSL certificate to use Movim, auto-signed is not allowed. -Current Movim version : 0.9 git2015-09-10 +Current Movim version : 0.9 git2015-08-25 **Changelog** 0.9b 2015-0 -- Update to Movim 0.9 git2015-09-10 +- Update to Movim 0.9 git2015-08-25 - Add notes in README about public pods & whitelisting - script/install now check if path is empty. - script/remove now delete /etc/php/fpm/pool.d/movim.conf (fix #8). diff --git a/sources/app/helpers/StringHelper.php b/sources/app/helpers/StringHelper.php index 2ff9590..3a6edce 100644 --- a/sources/app/helpers/StringHelper.php +++ b/sources/app/helpers/StringHelper.php @@ -47,9 +47,17 @@ class MovimEmoji } } -function addUrls($string, $preview = false) { +/** + * @desc Prepare the string (add the a to the links and show the smileys) + * + * @param string $string + * @param boolean display large emojis + * @param check the links and convert them to pictures (heavy) + * @return string + */ +function prepareString($string, $large = false, $preview = false) { // Add missing links - return preg_replace_callback( + $string = preg_replace_callback( "/([\w\"'>]+\:\/\/[\w-?&;#+%:~=\.\/\@]+[\w\/])/", function ($match) use($preview) { if(!in_array(substr($match[0], 0, 1), array('>', '"', '\''))) { $content = $match[0]; @@ -76,18 +84,6 @@ function addUrls($string, $preview = false) { }, $string ); -} - -/** - * @desc Prepare the string (add the a to the links and show the smileys) - * - * @param string $string - * @param boolean display large emojis - * @param check the links and convert them to pictures (heavy) - * @return string - */ -function prepareString($string, $large = false, $preview = false) { - $string = addUrls($string, $preview); // We remove all the style attributes $string = preg_replace_callback( @@ -98,7 +94,16 @@ function prepareString($string, $large = false, $preview = false) { // Twitter hashtags $string = preg_replace_callback( - "/ #[a-zA-Z0-9_-]{3,}/", function ($match) { return ' '. trim($match[0]). ''; }, ' ' . $string); + "/ #[a-zA-Z0-9_-]{3,}/", function ($match) { + return + ' '. + trim($match[0]). + ''; + }, ' ' . $string + ); + $string = preg_replace_callback( "/ @[a-zA-Z0-9_-]{3,}/", function ($match) { return diff --git a/sources/app/models/conference/Conference.php b/sources/app/models/conference/Conference.php index 81c094d..3f95153 100644 --- a/sources/app/models/conference/Conference.php +++ b/sources/app/models/conference/Conference.php @@ -2,31 +2,31 @@ namespace modl; -class Conference extends Model { +class Conference extends Model { public $jid; - protected $conference; - protected $name; - protected $nick; + public $conference; + public $name; + public $nick; public $autojoin; public $status; - + public function __construct() { $this->_struct = ' { - "jid" : + "jid" : {"type":"string", "size":128, "mandatory":true, "key":true }, - "conference" : + "conference" : {"type":"string", "size":128, "mandatory":true, "key":true }, - "name" : + "name" : {"type":"string", "size":128, "mandatory":true }, - "nick" : + "nick" : {"type":"string", "size":128 }, - "autojoin" : + "autojoin" : {"type":"int", "size":1 }, - "status" : + "status" : {"type":"int", "size":1 } }'; - + parent::__construct(); } } diff --git a/sources/app/models/config/Config.php b/sources/app/models/config/Config.php index e4c514a..7d72bdb 100644 --- a/sources/app/models/config/Config.php +++ b/sources/app/models/config/Config.php @@ -31,7 +31,7 @@ class Config extends Model { "loglevel" : {"type":"string", "size":16, "mandatory":true }, "timezone" : - {"type":"string", "size":32, "mandatory":true }, + {"type":"string", "size":16, "mandatory":true }, "xmppwhitelist" : {"type":"text" }, "info" : @@ -50,7 +50,7 @@ class Config extends Model { parent::__construct(); - $this->description = 'Description';//__('global.description'); + $this->description = __('global.description'); $this->theme = 'material'; $this->locale = 'en'; $this->maxusers = -1; diff --git a/sources/app/models/contact/Contact.php b/sources/app/models/contact/Contact.php index f27132c..d657101 100644 --- a/sources/app/models/contact/Contact.php +++ b/sources/app/models/contact/Contact.php @@ -2,8 +2,6 @@ namespace modl; -use Respect\Validation\Validator; - class Contact extends Model { public $jid; @@ -160,36 +158,37 @@ class Contact extends Model { } public function set($vcard, $jid) { - $this->__set('jid', \echapJid($jid)); + $this->jid = \echapJid($jid); - $validate_date = Validator::date('Y-m-d'); if(isset($vcard->vCard->BDAY) - && $validate_date->validate($vcard->vCard->BDAY)) - $this->__set('date', (string)$vcard->vCard->BDAY); + && (string)$vcard->vCard->BDAY != '') + $this->date = (string)$vcard->vCard->BDAY; + else + $this->date = null; - $this->__set('date', date(DATE_ISO8601, strtotime($this->date))); + $this->date = date(DATE_ISO8601, strtotime($this->date)); - $this->__set('name', (string)$vcard->vCard->NICKNAME); - $this->__set('fn', (string)$vcard->vCard->FN); - $this->__set('url', (string)$vcard->vCard->URL); + $this->name = (string)$vcard->vCard->NICKNAME; + $this->fn = (string)$vcard->vCard->FN; + $this->url = (string)$vcard->vCard->URL; - $this->__set('gender', (string)$vcard->vCard->{'X-GENDER'}); - $this->__set('marital', (string)$vcard->vCard->MARITAL->STATUS); + $this->gender = (string)$vcard->vCard->{'X-GENDER'}; + $this->marital = (string)$vcard->vCard->MARITAL->STATUS; - $this->__set('email', (string)$vcard->vCard->EMAIL->USERID); + $this->email = (string)$vcard->vCard->EMAIL->USERID; - $this->__set('adrlocality', (string)$vcard->vCard->ADR->LOCALITY); - $this->__set('adrpostalcode', (string)$vcard->vCard->ADR->PCODE); - $this->__set('adrcountry', (string)$vcard->vCard->ADR->CTRY); + $this->adrlocality = (string)$vcard->vCard->ADR->LOCALITY; + $this->adrpostalcode = (string)$vcard->vCard->ADR->PCODE; + $this->adrcountry = (string)$vcard->vCard->ADR->CTRY; if(filter_var((string)$vcard->vCard->PHOTO, FILTER_VALIDATE_URL)) { - $this->__set('photobin', base64_encode( - requestUrl((string)$vcard->vCard->PHOTO, 1))); + $this->photobin = base64_encode( + requestUrl((string)$vcard->vCard->PHOTO, 1)); } else { - $this->__set('photobin', (string)$vcard->vCard->PHOTO->BINVAL); + $this->photobin = (string)$vcard->vCard->PHOTO->BINVAL; } - $this->__set('description', (string)$vcard->vCard->DESC); + $this->description = (string)$vcard->vCard->DESC; } public function createThumbnails() { @@ -251,32 +250,32 @@ class Contact extends Model { } public function setTune($stanza) { - $this->__set('tuneartist', (string)$stanza->items->item->tune->artist); - $this->__set('tunelenght', (int)$stanza->items->item->tune->lenght); - $this->__set('tunerating', (int)$stanza->items->item->tune->rating); - $this->__set('tunesource', (string)$stanza->items->item->tune->source); - $this->__set('tunetitle', (string)$stanza->items->item->tune->title); - $this->__set('tunetrack', (string)$stanza->items->item->tune->track); + $this->tuneartist = (string)$stanza->items->item->tune->artist; + $this->tunelenght = (int)$stanza->items->item->tune->lenght; + $this->tunerating = (int)$stanza->items->item->tune->rating; + $this->tunesource = (string)$stanza->items->item->tune->source; + $this->tunetitle = (string)$stanza->items->item->tune->title; + $this->tunetrack = (string)$stanza->items->item->tune->track; } public function setVcard4($vcard) { - $validate_date = Validator::date('Y-m-d'); - if(isset($vcard->bday->date) - && $validate_date->validate($vcard->bday->date)) - $this->__set('date', (string)$vcard->bday->date); + if(isset($vcard->bday->date)) + $this->date = (string)$vcard->bday->date; + if(empty($this->date)) + $this->date = null; - $this->__set('name', (string)$vcard->nickname->text); - $this->__set('fn', (string)$vcard->fn->text); - $this->__set('url', (string)$vcard->url->uri); + $this->name = (string)$vcard->nickname->text; + $this->fn = (string)$vcard->fn->text; + $this->url = (string)$vcard->url->uri; if(isset($vcard->gender)) - $this->__set('gender ', (string)$vcard->gender->sex->text); + $this->gender = (string)$vcard->gender->sex->text; if(isset($vcard->marital)) - $this->__set('marital', (string)$vcard->marital->status->text); + $this->marital = (string)$vcard->marital->status->text; - $this->__set('adrlocality', (string)$vcard->adr->locality); - $this->__set('adrcountry', (string)$vcard->adr->country); - $this->__set('adrpostalcode', (string)$vcard->adr->code); + $this->adrlocality = (string)$vcard->adr->locality; + $this->adrcountry = (string)$vcard->adr->country; + $this->adrpostalcode = (string)$vcard->adr->code; if(isset($vcard->impp)) { foreach($vcard->impp->children() as $c) { @@ -284,20 +283,21 @@ class Contact extends Model { switch($key) { case 'twitter' : - $this->__set('twitter', str_replace('@', '', $value)); + $this->twitter = str_replace('@', '', $value); break; case 'skype' : - $this->__set('skype', (string)$value); + $this->skype = (string)$value; break; case 'ymsgr' : - $this->__set('yahoo', (string)$value); + $this->yahoo = (string)$value; break; } } } - $this->__set('email', (string)$vcard->email->text); - $this->__set('description', trim((string)$vcard->note->text)); + $this->email = (string)$vcard->email->text; + + $this->description = trim((string)$vcard->note->text); } public function getPlace() { @@ -389,26 +389,6 @@ class Contact extends Model { } } - function getAlbum() - { - $uri = str_replace( - ' ', - '%20', - 'http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=80c1aa3abfa9e3d06f404a2e781e38f9&artist='. - $this->tuneartist. - '&album='. - $this->tunesource. - '&format=json' - ); - - $json = json_decode(requestURL($uri, 2)); - - if($json->album) { - $json->album->url = $json->album->image[2]->{'#text'}; - return $json->album; - } - } - function toRoster() { return array( 'jid' => $this->jid, diff --git a/sources/app/models/message/Message.php b/sources/app/models/message/Message.php index 4b3bb46..654f974 100644 --- a/sources/app/models/message/Message.php +++ b/sources/app/models/message/Message.php @@ -6,15 +6,15 @@ class Message extends Model { public $session; public $jidto; public $jidfrom; - - protected $resource; - + + public $resource; + public $type; - protected $subject; - protected $thread; - protected $body; - protected $html; + public $subject; + public $thread; + public $body; + public $html; public $published; public $delivered; @@ -25,30 +25,30 @@ class Message extends Model { { $this->_struct = ' { - "session" : + "session" : {"type":"string", "size":128, "mandatory":true }, - "jidto" : + "jidto" : {"type":"string", "size":128, "mandatory":true }, - "jidfrom" : + "jidfrom" : {"type":"string", "size":128, "mandatory":true }, - "resource" : + "resource" : {"type":"string", "size":128 }, - "type" : + "type" : {"type":"string", "size":20 }, - "subject" : + "subject" : {"type":"text"}, - "thread" : + "thread" : {"type":"string", "size":128 }, - "body" : + "body" : {"type":"text"}, - "html" : + "html" : {"type":"text"}, - "published" : + "published" : {"type":"date"}, - "delivered" : + "delivered" : {"type":"date"} }'; - + parent::__construct(); } @@ -66,15 +66,15 @@ class Message extends Model { $this->jidfrom = $jid[0]; if(isset($jid[1])) - $this->__set('resource', $jid[1]); + $this->resource = $jid[1]; $this->type = 'chat'; if($stanza->attributes()->type) { $this->type = (string)$stanza->attributes()->type; } - $this->__set('body', (string)$stanza->body); - $this->__set('subject', (string)$stanza->subject); + $this->body = (string)$stanza->body; + $this->subject = (string)$stanza->subject; $images = (bool)($this->type == 'chat'); @@ -83,9 +83,9 @@ class Message extends Model { $this->html = \fixSelfClosing($this->html); $this->html = \prepareString($this->html, false, $images); } else {*/ - // $this->html = \prepareString($this->body, false, $images); + $this->html = \prepareString($this->body, false, $images); //} - + if($stanza->delay) $this->published = gmdate('Y-m-d H:i:s', strtotime($stanza->delay->attributes()->stamp)); elseif($parent && $parent->delay) @@ -95,15 +95,4 @@ class Message extends Model { $this->delivered = gmdate('Y-m-d H:i:s'); } } - - public function convertEmojis() - { - $emoji = \MovimEmoji::getInstance(); - $this->body = $emoji->replace($this->body); - } - - public function addUrls() - { - $this->body = addUrls($this->body); - } } diff --git a/sources/app/models/postn/Postn.php b/sources/app/models/postn/Postn.php index ee4f512..8eae785 100644 --- a/sources/app/models/postn/Postn.php +++ b/sources/app/models/postn/Postn.php @@ -109,33 +109,33 @@ class Postn extends Model { else $entry = $item; - $this->__set('origin', $from); + $this->origin = $from; if($node) - $this->__set('node', $node); + $this->node = $node; else - $this->__set('node', (string)$item->attributes()->node); + $this->node = (string)$item->attributes()->node; - $this->__set('nodeid', (string)$entry->attributes()->id); + $this->nodeid = (string)$entry->attributes()->id; if($entry->entry->id) - $this->__set('nodeid', (string)$entry->entry->id); + $this->nodeid = (string)$entry->entry->id; // Get some informations on the author if($entry->entry->author->name) - $this->__set('aname', (string)$entry->entry->author->name); + $this->aname = (string)$entry->entry->author->name; if($entry->entry->author->uri) - $this->__set('aid', substr((string)$entry->entry->author->uri, 5)); + $this->aid = substr((string)$entry->entry->author->uri, 5); if($entry->entry->author->email) - $this->__set('aemail', (string)$entry->entry->author->email); + $this->aemail = (string)$entry->entry->author->email; // Non standard support if($entry->entry->source && $entry->entry->source->author->name) - $this->__set('aname', (string)$entry->entry->source->author->name); + $this->aname = (string)$entry->entry->source->author->name; if($entry->entry->source && $entry->entry->source->author->uri) - $this->__set('aid', substr((string)$entry->entry->source->author->uri, 5)); + $this->aid = substr((string)$entry->entry->source->author->uri, 5); - $this->__set('title', (string)$entry->entry->title); + $this->title = (string)$entry->entry->title; // Content if($entry->entry->summary && (string)$entry->entry->summary != '') @@ -153,22 +153,23 @@ class Postn extends Model { $content = $summary.$content; if($entry->entry->updated) - $this->__set('updated', (string)$entry->entry->updated); + $this->updated = (string)$entry->entry->updated; else - $this->__set('updated', gmdate(DATE_ISO8601)); + $this->updated = gmdate(DATE_ISO8601); if($entry->entry->published) - $this->__set('published', (string)$entry->entry->published); + $this->published = (string)$entry->entry->published; elseif($entry->entry->updated) - $this->__set('published', (string)$entry->entry->updated); + $this->published = (string)$entry->entry->updated; else - $this->__set('published', gmdate(DATE_ISO8601)); + $this->published = gmdate(DATE_ISO8601); if($delay) - $this->__set('delay', $delay); + $this->delay = $delay; $contentimg = $this->setAttachements($entry->entry->link); + // Tags parsing if($entry->entry->category) { $this->tags = array(); @@ -182,24 +183,22 @@ class Postn extends Model { } if(!empty($this->tags)) - $this->__set('tags', serialize($this->tags)); + $this->tags = serialize($this->tags); if($contentimg != '') $content .= '
'.$contentimg; if(!isset($this->commentplace)) - $this->__set('commentplace', $this->origin); + $this->commentplace = $this->origin; - $this->__set('content', trim($content)); - //$this->__set('contentcleaned', prepareString(html_entity_decode($this->content))); - $purifier = new \HTMLPurifier(); - $this->contentcleaned = $purifier->purify(html_entity_decode($this->content)); + $this->content = trim($content); + $this->contentcleaned = prepareString(html_entity_decode($this->content)); if($entry->entry->geoloc) { if($entry->entry->geoloc->lat != 0) - $this->__set('lat', (string)$entry->entry->geoloc->lat); + $this->lat = (string)$entry->entry->geoloc->lat; if($entry->entry->geoloc->lon != 0) - $this->__set('lon', (string)$entry->entry->geoloc->lon); + $this->lon = (string)$entry->entry->geoloc->lon; } } diff --git a/sources/app/models/presence/Presence.php b/sources/app/models/presence/Presence.php index 0f64f7a..002e785 100644 --- a/sources/app/models/presence/Presence.php +++ b/sources/app/models/presence/Presence.php @@ -4,23 +4,23 @@ namespace Modl; class Presence extends Model { protected $id; - + protected $session; protected $jid; - + // General presence informations protected $resource; protected $value; protected $priority; protected $status; - + // Client Informations protected $node; protected $ver; - + // Delay - XEP 0203 protected $delay; - + // Last Activity - XEP 0256 protected $last; @@ -33,84 +33,84 @@ class Presence extends Model { // vcard-temp:x:update, not saved in the DB public $photo = false; - + public function __construct() { $this->_struct = ' { - "id" : + "id" : {"type":"string", "size":128, "mandatory":true }, - "session" : + "session" : {"type":"string", "size":64, "mandatory":true, "key":true }, - "jid" : + "jid" : {"type":"string", "size":64, "mandatory":true, "key":true }, - "resource" : + "resource" : {"type":"string", "size":64, "key":true }, - "value" : + "value" : {"type":"int", "size":11, "mandatory":true }, - "priority" : + "priority" : {"type":"int", "size":11 }, - "status" : + "status" : {"type":"text"}, - "node" : + "node" : {"type":"string", "size":128 }, - "ver" : + "ver" : {"type":"string", "size":128 }, - "delay" : + "delay" : {"type":"date"}, - "last" : + "last" : {"type":"int", "size":11 }, - "publickey" : + "publickey" : {"type":"text"}, - "muc" : + "muc" : {"type":"int", "size":1 }, - "mucjid" : + "mucjid" : {"type":"string", "size":64 }, - "mucaffiliation" : + "mucaffiliation" : {"type":"string", "size":32 }, - "mucrole" : + "mucrole" : {"type":"string", "size":32 } }'; - + parent::__construct(); } - + public function setPresence($stanza) { $jid = explode('/',(string)$stanza->attributes()->from); - + if($stanza->attributes()->to) $to = current(explode('/',(string)$stanza->attributes()->to)); else $to = $jid[0]; - $this->__set('session', $to); - $this->__set('jid', $jid[0]); + $this->session = $to; + $this->jid = $jid[0]; if(isset($jid[1])) - $this->__set('resource', $jid[1]); + $this->resource = $jid[1]; else - $this->__set('resource', 'default'); - - $this->__set('status', (string)$stanza->status); - + $this->resource = 'default'; + + $this->status = (string)$stanza->status; + if($stanza->c) { - $this->__set('node', (string)$stanza->c->attributes()->node); - $this->__set('ver', (string)$stanza->c->attributes()->ver); + $this->node = (string)$stanza->c->attributes()->node; + $this->ver = (string)$stanza->c->attributes()->ver; } - + if($stanza->priority) - $this->__set('priority', (string)$stanza->priority); - + $this->priority = (string)$stanza->priority; + if((string)$stanza->attributes()->type == 'error') { - $this->__set('value', 6); + $this->value = 6; } elseif((string)$stanza->attributes()->type == 'unavailable') { - $this->__set('value', 5); + $this->value = 5; } elseif((string)$stanza->show == 'away') { - $this->__set('value', 2); + $this->value = 2; } elseif((string)$stanza->show == 'dnd') { - $this->__set('value', 3); + $this->value = 3; } elseif((string)$stanza->show == 'xa') { - $this->__set('value', 4); + $this->value = 4; } else { - $this->__set('value', 1); + $this->value = 1; } // Specific XEP @@ -118,41 +118,41 @@ class Presence extends Model { foreach($stanza->children() as $name => $c) { switch($c->attributes()->xmlns) { case 'jabber:x:signed' : - $this->__set('publickey', (string)$c); + $this->publickey = (string)$c; break; case 'http://jabber.org/protocol/muc#user' : - $this->__set('muc ', true); + $this->muc = true; if($c->item->attributes()->jid) - $this->__set('mucjid', cleanJid((string)$c->item->attributes()->jid)); + $this->mucjid = cleanJid((string)$c->item->attributes()->jid); else - $this->__set('mucjid', (string)$stanza->attributes()->from); + $this->mucjid = (string)$stanza->attributes()->from; - $this->__set('mucrole', (string)$c->item->attributes()->role); - $this->__set('mucaffiliation', (string)$c->item->attributes()->affiliation); + $this->mucrole = (string)$c->item->attributes()->role; + $this->mucaffiliation = (string)$c->item->attributes()->affiliation; break; case 'vcard-temp:x:update' : - $this->__set('photo', true); + $this->photo = true; break; } } } - + if($stanza->delay) { - $this->__set('delay', + $this->delay = gmdate( - 'Y-m-d H:i:s', + 'Y-m-d H:i:s', strtotime( (string)$stanza->delay->attributes()->stamp ) ) - ); + ; } - + if($stanza->query) { - $this->__set('last', (int)$stanza->query->attributes()->seconds); + $this->last = (int)$stanza->query->attributes()->seconds; } } - + public function getPresence() { $txt = array( 1 => 'online', @@ -162,7 +162,7 @@ class Presence extends Model { 5 => 'offline', 6 => 'server_error' ); - + $arr = array(); $arr['jid'] = $this->jid; $arr['resource'] = $this->resource; @@ -172,7 +172,7 @@ class Presence extends Model { $arr['status'] = $this->status; $arr['node'] = $this->node; $arr['ver'] = $this->ver; - + return $arr; } diff --git a/sources/app/models/rosterlink/RosterLink.php b/sources/app/models/rosterlink/RosterLink.php index 61595da..2668c41 100644 --- a/sources/app/models/rosterlink/RosterLink.php +++ b/sources/app/models/rosterlink/RosterLink.php @@ -2,57 +2,56 @@ namespace modl; -class RosterLink extends Model { +class RosterLink extends Model { public $session; public $jid; - - protected $rostername; + + public $rostername; public $rosterask; public $rostersubscription; - - protected $realname; - - protected $groupname; - + + public $realname; + + public $groupname; + public $chaton; public $publickey; - + public function __construct() { $this->_struct = ' { - "session" : + "session" : {"type":"string", "size":128, "mandatory":true, "key":true }, - "jid" : + "jid" : {"type":"string", "size":128, "mandatory":true, "key":true }, - "rostername" : + "rostername" : {"type":"string", "size":128 }, - "rosterask" : + "rosterask" : {"type":"string", "size":128 }, - "rostersubscription" : + "rostersubscription" : {"type":"string", "size":128 }, - "realname" : + "realname" : {"type":"string", "size":128 }, - "groupname" : + "groupname" : {"type":"string", "size":128 }, - "chaton" : + "chaton" : {"type":"int", "size":11 } }'; - + parent::__construct(); } - + function set($stanza) { $this->jid = (string)$stanza->attributes()->jid; - - if(isset($stanza->attributes()->name) - && (string)$stanza->attributes()->name != '') - $this->__set('rostername', (string)$stanza->attributes()->name); + + if(isset($stanza->attributes()->name) && (string)$stanza->attributes()->name != '') + $this->rostername = (string)$stanza->attributes()->name; else - $this->__set('rostername', (string)$stanza->attributes()->jid); - $this->__set('rosterask', (string)$stanza->attributes()->ask); - $this->__set('rostersubscription', (string)$stanza->attributes()->subscription); - $this->__set('groupname', (string)$stanza->group); + $this->rostername = (string)$stanza->attributes()->jid; + $this->rosterask = (string)$stanza->attributes()->ask; + $this->rostersubscription = (string)$stanza->attributes()->subscription; + $this->groupname = (string)$stanza->group; } } diff --git a/sources/app/models/subscription/Subscription.php b/sources/app/models/subscription/Subscription.php index 6dd273f..6fe980d 100644 --- a/sources/app/models/subscription/Subscription.php +++ b/sources/app/models/subscription/Subscription.php @@ -4,11 +4,11 @@ namespace modl; class Subscription extends Model { public $jid; - protected $server; - protected $node; - protected $subscription; - protected $subid; - protected $title; + public $server; + public $node; + public $subscription; + public $subid; + public $title; public $description; public $tags; public $timestamp; @@ -40,13 +40,13 @@ class Subscription extends Model { } function set($jid, $server, $node, $s) { - $this->__set('jid', $jid); - $this->__set('server', $server); - $this->__set('node', $node); - $this->__set('jid', (string)$s->attributes()->jid); - $this->__set('subscription', (string)$s->attributes()->subscription); - $this->__set('subid', (string)$s->attributes()->subid); - $this->__set('tags', serialize(array())); + $this->jid = $jid; + $this->server = $server; + $this->node = $node; + $this->jid = (string)$s->attributes()->jid; + $this->subscription = (string)$s->attributes()->subscription; + $this->subid = (string)$s->attributes()->subid; + $this->tags = serialize(array()); if($this->subid = '') $this->subid = 'default'; diff --git a/sources/app/views/about.tpl b/sources/app/views/about.tpl index 61f570c..51f4f82 100644 --- a/sources/app/views/about.tpl +++ b/sources/app/views/about.tpl @@ -5,7 +5,6 @@ widget('Tabs');?> widget('About');?> - widget('Help');?> widget('Caps');?> diff --git a/sources/app/views/page.tpl b/sources/app/views/page.tpl index f11aaac..34e897c 100644 --- a/sources/app/views/page.tpl +++ b/sources/app/views/page.tpl @@ -11,8 +11,8 @@ - + + diff --git a/sources/app/widgets/About/about.tpl b/sources/app/widgets/About/about.tpl index 60e2226..5e33396 100644 --- a/sources/app/widgets/About/about.tpl +++ b/sources/app/widgets/About/about.tpl @@ -20,7 +20,7 @@ {$c->__('about.translators')}

- {$c->__('about.translators_text')} www.transifex.com/projects/p/movim/ + Thanks to all the translators translations.launchpad.net/movim

  • {$c->__('about.software')}
  • diff --git a/sources/app/widgets/About/locales.ini b/sources/app/widgets/About/locales.ini index 0581b91..decc689 100644 --- a/sources/app/widgets/About/locales.ini +++ b/sources/app/widgets/About/locales.ini @@ -1,9 +1,8 @@ [about] -thanks = Thanks -developers = Developers -translators = Translators -translators_text = "Thanks to all the translators" -software = Software -resources = Resources -api = API -info = Movim is an XMPP-based communication platform. All the project, except the following software and resources, is under +thanks = Thanks +developers = Developers +translators = Translators +software = Software +resources = Resources +api = API +info = Movim is an XMPP-based communication platform. All the project, except the following software and resources, is under diff --git a/sources/app/widgets/Account/Account.php b/sources/app/widgets/Account/Account.php index c56e7b5..ff4ebd8 100644 --- a/sources/app/widgets/Account/Account.php +++ b/sources/app/widgets/Account/Account.php @@ -13,7 +13,7 @@ class Account extends WidgetBase $this->addjs('account.js'); $this->registerEvent('register_changepassword_handle', 'onPasswordChanged'); $this->registerEvent('register_remove_handle', 'onRemoved'); - $this->registerEvent('register_get_handle', 'onRegister', 'account'); + $this->registerEvent('register_get_handle', 'onRegister'); } function onPasswordChanged() diff --git a/sources/app/widgets/Account/account.js b/sources/app/widgets/Account/account.js index d6f3724..85bf564 100644 --- a/sources/app/widgets/Account/account.js +++ b/sources/app/widgets/Account/account.js @@ -10,7 +10,3 @@ var Account = { Presence_ajaxLogout(); } } - -MovimWebsocket.attach(function() { - Notification.current('account'); -}); diff --git a/sources/app/widgets/AccountNext/AccountNext.php b/sources/app/widgets/AccountNext/AccountNext.php index ba1086a..3089be3 100644 --- a/sources/app/widgets/AccountNext/AccountNext.php +++ b/sources/app/widgets/AccountNext/AccountNext.php @@ -9,12 +9,12 @@ class AccountNext extends WidgetBase { { $this->addjs('accountnext.js'); $this->addcss('accountnext.css'); - + $this->registerEvent('register_get_handle', 'onForm'); $this->registerEvent('register_set_handle', 'onRegistered'); - $this->registerEvent('register_set_errorconflict', 'onRegisterError', 'accountnext'); - $this->registerEvent('register_set_errornotacceptable', 'onRegisterNotAcceptable', 'accountnext'); - $this->registerEvent('register_get_errorserviceunavailable', 'onServiceUnavailable', 'accountnext'); + $this->registerEvent('register_set_errorconflict', 'onRegisterError'); + $this->registerEvent('register_set_errornotacceptable', 'onRegisterNotAcceptable'); + $this->registerEvent('register_get_errorserviceunavailable', 'onServiceUnavailable'); } function display() @@ -35,7 +35,7 @@ class AccountNext extends WidgetBase { switch($form->x->attributes()->xmlns) { case 'jabber:x:data' : $formview = $this->tpl(); - + $formh = $xtf->getHTML($form->x->asXML()); $formview->assign('submitdata', $this->call('ajaxRegister', "movim_form_to_json('data')")); @@ -47,13 +47,13 @@ class AccountNext extends WidgetBase { case 'jabber:x:oob' : $oobview = $this->tpl(); $oobview->assign('url', (string)$form->x->url); - + $html = $oobview->draw('_accountnext_oob', true); - + RPC::call('movim_fill', 'subscription_form', $html); break; } - + } else{ $formh = $xtf->getHTML($form->asXML()); } @@ -65,9 +65,9 @@ class AccountNext extends WidgetBase { $view = $this->tpl(); $view->assign('url', (string)$form->x->url); - + $html = $view->draw('_accountnext_registered', true); - + RPC::call('movim_fill', 'subscription_form', $html); RPC::call('setUsername', $data->username->value); } @@ -77,12 +77,12 @@ class AccountNext extends WidgetBase { $error = $package->content; Notification::append(null, $error); } - + function onRegisterNotAcceptable() { Notification::append(null, $this->__('error.not_acceptable')); } - + function onServiceUnavailable() { Notification::append(null, $this->__('error.service_unavailable')); diff --git a/sources/app/widgets/AdminLogin/adminlogin.tpl b/sources/app/widgets/AdminLogin/adminlogin.tpl index 5a8f1fa..5d40df7 100644 --- a/sources/app/widgets/AdminLogin/adminlogin.tpl +++ b/sources/app/widgets/AdminLogin/adminlogin.tpl @@ -12,10 +12,10 @@ + value="{$c->__('button.submit')}" /> diff --git a/sources/app/widgets/AdminMain/AdminMain.php b/sources/app/widgets/AdminMain/AdminMain.php index 2888cc4..9ec3d7f 100644 --- a/sources/app/widgets/AdminMain/AdminMain.php +++ b/sources/app/widgets/AdminMain/AdminMain.php @@ -72,8 +72,6 @@ class AdminMain extends WidgetBase $cd = new \Modl\ConfigDAO(); $config = $cd->get(); - $l = Locale::start(); - $this->view->assign('conf', $cd->get()); $this->view->assign('logs', array( @@ -98,6 +96,6 @@ class AdminMain extends WidgetBase } $this->view->assign('timezones', getTimezoneList()); - $this->view->assign('langs', $l->getList()); + $this->view->assign('langs', loadLangArray()); } } diff --git a/sources/app/widgets/AdminMain/adminmain.tpl b/sources/app/widgets/AdminMain/adminmain.tpl index a3f7979..79de4cd 100644 --- a/sources/app/widgets/AdminMain/adminmain.tpl +++ b/sources/app/widgets/AdminMain/adminmain.tpl @@ -155,7 +155,7 @@ + value="{$c->__('button.submit')}"/>
    diff --git a/sources/app/widgets/AdminTest/AdminTest.php b/sources/app/widgets/AdminTest/AdminTest.php index 8f8cdda..0b3aeb3 100644 --- a/sources/app/widgets/AdminTest/AdminTest.php +++ b/sources/app/widgets/AdminTest/AdminTest.php @@ -46,7 +46,7 @@ class AdminTest extends WidgetBase $config = $cd->get(); $this->view->assign('dbconnected', $md->_connected); - $this->view->assign('dbtype', $supported[$config->type]); + $this->view->assign('dbtype', $supported[$conf['type']]); $this->view->assign('dbinfos', sizeof($md->check())); $this->view->assign('websocketurl', $config->websocketurl); } diff --git a/sources/app/widgets/AdminTest/admintest.tpl b/sources/app/widgets/AdminTest/admintest.tpl index a08ecd8..39968fa 100644 --- a/sources/app/widgets/AdminTest/admintest.tpl +++ b/sources/app/widgets/AdminTest/admintest.tpl @@ -34,11 +34,10 @@ @@ -52,9 +52,9 @@ {loop="$years"} - {/loop} @@ -76,9 +76,9 @@ {loop="$gender"} - {/loop} @@ -106,9 +106,9 @@
    - +
    +
    - +
    - +
    - +
    - +
    @@ -173,9 +173,9 @@ onclick=" {$submit} movim_button_save('#vcard4validate'); - this.value = '{$c->__('Submitting')}'; - this.className='button oppose inactive';" - class="button color oppose" + this.value = '{$c->__('Submitting')}'; + this.className='button oppose inactive';" + class="button color oppose" id="vcard4validate" > {$c->__('button.save')} diff --git a/sources/app/widgets/Vcard4/locales.ini b/sources/app/widgets/Vcard4/locales.ini index 5635727..8fc2a84 100644 --- a/sources/app/widgets/Vcard4/locales.ini +++ b/sources/app/widgets/Vcard4/locales.ini @@ -25,8 +25,9 @@ country = Country accounts_title = Accounts twitter = Twitter skype = Skype -yahoo = Yahoo Account +yahoo = Yahoo accounts_nickname = Nickname +accounts_yahoo = Yahoo Account [privacy] privacy_title = Privacy Level diff --git a/sources/bootstrap.php b/sources/bootstrap.php index eba2b2c..14d6892 100644 --- a/sources/bootstrap.php +++ b/sources/bootstrap.php @@ -81,7 +81,7 @@ class Bootstrap { DOCUMENT_ROOT.'/log/php.log', DOCUMENT_ROOT.'/cache/test.tmp', ); - $errors = array(); + $errors=array(); if(!is_writable(DOCUMENT_ROOT)) $errors[] = 'We\'re unable to write to folder '.DOCUMENT_ROOT.': check rights'; @@ -201,8 +201,7 @@ class Bootstrap { private function loadSystem() { // Loads up all system libraries. - //require_once(SYSTEM_PATH . "/i18n/i18n.php"); - require_once(SYSTEM_PATH . "/i18n/Locale.php"); + require_once(SYSTEM_PATH . "/i18n/i18n.php"); require_once(SYSTEM_PATH . "Session.php"); require_once(SYSTEM_PATH . "Sessionx.php"); @@ -220,8 +219,8 @@ class Bootstrap { require_once(LIB_PATH . "XMPPtoForm.php"); // SDPtoJingle and JingletoSDP lib :) - //require_once(LIB_PATH . "SDPtoJingle.php"); - //require_once(LIB_PATH . "JingletoSDP.php"); + require_once(LIB_PATH . "SDPtoJingle.php"); + require_once(LIB_PATH . "JingletoSDP.php"); } private function loadHelpers() { @@ -242,7 +241,7 @@ class Bootstrap { require_once(SYSTEM_PATH . "widget/WidgetBase.php"); require_once(SYSTEM_PATH . "widget/WidgetWrapper.php"); - //require_once(APP_PATH . "widgets/WidgetCommon/WidgetCommon.php"); + require_once(APP_PATH . "widgets/WidgetCommon/WidgetCommon.php"); require_once(APP_PATH . "widgets/Notification/Notification.php"); } @@ -256,23 +255,20 @@ class Bootstrap { $cd = new \Modl\ConfigDAO(); $config = $cd->get(); - $l = Locale::start(); - if($user->isLogged()) { $lang = $user->getConfig('language'); if(isset($lang)) { - $l->load($lang); + loadLanguage($lang); } else { // Load default language. - $l->load($config->locale); + loadLanguage($config->locale); } } - elseif(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - $l->detect(); - $l->loadPo(); + else if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + loadLanguageAuto(); } else { - $l->load($config->locale); + loadLanguage($config->locale); } } @@ -325,7 +321,7 @@ class Bootstrap { if(file_exists(DOCUMENT_ROOT.'/config/db.inc.php')) { require DOCUMENT_ROOT.'/config/db.inc.php'; } else { - throw new Exception('Cannot find config/db.inc.php file'); + throw new MovimException('Cannot find config/db.inc.php file'); } $db->setConnectionArray($conf); @@ -391,7 +387,7 @@ class Bootstrap { $s->load(); $user = new User; - $db = Modl\Modl::getInstance(); + $db = modl\Modl::getInstance(); $db->setUser($user->getLogin()); } } diff --git a/sources/composer.json b/sources/composer.json index 5fdc027..0d91fec 100644 --- a/sources/composer.json +++ b/sources/composer.json @@ -22,7 +22,6 @@ "react/socket-client": "0.4.*@dev", "forxer/Gravatar": "~1.2", - "respect/validation": "0.8.*", - "ezyang/htmlpurifier": "^4.7" + "respect/validation": "0.8.*" } } diff --git a/sources/index.php b/sources/index.php index d34ba59..5bc0caa 100644 --- a/sources/index.php +++ b/sources/index.php @@ -40,14 +40,9 @@ define('DOCUMENT_ROOT', dirname(__FILE__)); require_once(DOCUMENT_ROOT.'/bootstrap.php'); -try { - $bootstrap = new Bootstrap(); - $bootstrap->boot(); -} catch(Exception $e) { - error_log($e->getMessage()); - echo 'Oops, something went wrong, please check the log files'; - return; -} +$bootstrap = new Bootstrap(); + +$bootstrap->boot(); $rqst = new FrontController(); $rqst->handle(); diff --git a/sources/linker.php b/sources/linker.php index 6d80f07..821d982 100644 --- a/sources/linker.php +++ b/sources/linker.php @@ -52,8 +52,8 @@ $stdin_behaviour = function ($data) use (&$conn, $loop, &$buffer, &$connector, & $port = 5222; $dns = \Moxl\Utils::resolveHost($msg->host); - if(isset($dns->target) && $dns->target != null) $msg->host = $dns->target; - if(isset($dns->port) && $dns->port != null) $port = $dns->port; + if(isset($dns[0]['target']) && $dns[0]['target'] != null) $msg->host = $dns[0]['target']; + if(isset($dns[0]['port']) && $dns[0]['port'] != null) $port = $dns[0]['port']; #fwrite(STDERR, colorize('open a socket to '.$domain, 'yellow')." : ".colorize('sent to XMPP', 'green')."\n"); $connector->create($msg->host, $port)->then($xmpp_behaviour); } @@ -111,8 +111,6 @@ $xmpp_behaviour = function (React\Stream\Stream $stream) use (&$conn, $loop, &$s || $message == '') { stream_set_blocking($conn->stream, 1); stream_context_set_option($conn->stream, 'ssl', 'allow_self_signed', true); - #stream_context_set_option($conn->stream, 'ssl', 'verify_peer_name', false); - #stream_context_set_option($conn->stream, 'ssl', 'verify_peer', false); $out = stream_socket_enable_crypto($conn->stream, 1, STREAM_CRYPTO_METHOD_TLS_CLIENT); $restart = true; @@ -139,7 +137,7 @@ $xmpp_behaviour = function (React\Stream\Stream $stream) use (&$conn, $loop, &$s \RPC::clear(); if(!empty($msg)) { - //echo json_encode($msg).""; + //[MaJ[MaJ[MaJ[MaI[MaI[MaI[MaI[MaI[MaI[MaI[MaI[MaIecho json_encode($msg).""; echo base64_encode(gzcompress(json_encode($msg), 9)).""; //fwrite(STDERR, colorize(json_encode($msg).' '.strlen($msg), 'yellow')." : ".colorize('sent to browser', 'green')."\n"); } diff --git a/sources/locales/fr.po b/sources/locales/fr.po index 9ac1c06..6c6142a 100644 --- a/sources/locales/fr.po +++ b/sources/locales/fr.po @@ -1,9 +1,6 @@ -# -# Translators: -# Éfrit, 2015 -# Jaussoin Timothée , 2015 -# Maxime Buquet , 2015 -# Tom , 2015 +# French translations for Movim Website package. +# This file is distributed under the same license as the Movim Website package. +# This file was translated from CodingTeam at . #. #-#-#-#-# locales.po (PACKAGE VERSION) #-#-#-#-# #. extracted from ../app/widgets/About/locales.ini #. #-#-#-#-# locales.po (PACKAGE VERSION) #-#-#-#-# @@ -94,18 +91,18 @@ #. extracted from ../locales/locales.ini msgid "" msgstr "" -"Project-Id-Version: movim\n" +"Project-Id-Version: Movim Website\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-08-20 15:17+0200\n" -"PO-Revision-Date: 2015-08-21 09:30+0000\n" -"Last-Translator: Jaussoin Timothée \n" -"Language-Team: French (France) (http://www.transifex.com/movim/movim/language/fr_FR/)\n" -"Language: fr_FR\n" +"PO-Revision-Date: 2015-06-10 08:09+0000\n" +"Last-Translator: Axelos \n" +"Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Translate Toolkit 1.12.0\n" +"X-Launchpad-Export-Date: 2015-06-18 21:08+0000\n" +"X-Generator: Launchpad (build 17570)\n" #: [about]thanks msgid "Thanks" @@ -140,8 +137,9 @@ msgid "Account" msgstr "Compte" #: [account]password_change_title +#, fuzzy msgid "Change my password" -msgstr "Changer de mot de passe" +msgstr "Mot de passe incorrect" #: [account]password [db]password [credentials]password [form]password #: [input]password @@ -149,8 +147,9 @@ msgid "Password" msgstr "Mot de passe" #: [account]password_confirmation +#, fuzzy msgid "Password confirmation" -msgstr "Confirmation du mot de passe" +msgstr "%s – Configuration" #: [account]password_changed msgid "The password has been updated" @@ -158,7 +157,7 @@ msgstr "Le mot de passe a été mis à jour" #: [account]password_not_valid msgid "Please provide a valid password (6 characters minimum)" -msgstr "Veuillez entrer un mot de passe valide (6 caractères minimum)" +msgstr "Veuillez entrer un mot de passe valide (6 lettres minimum)" #: [account]password_not_same msgid "The provided passwords are not the same" @@ -169,16 +168,17 @@ msgid "Delete my account" msgstr "Supprimer mon compte" #: [account]delete +#, fuzzy msgid "Delete your account" -msgstr "Supprimer votre compte" +msgstr "Supprimer mon compte" #: [account]delete_text msgid "You will delete your XMPP account and all the relative information linked to it (profile, contacts and publications)." -msgstr "Vous allez supprimer votre compte XMPP ainsi que l’ensemble des informations qui y sont liées (profil, contacts et billets)." +msgstr "Vous allez supprimer votre compte XMPP ainsi que l'ensemble des informations liés à celui-ci (profil, contacts et billets)." #: [account]delete_text_confirm msgid "Are you sure that you want to delete it ?" -msgstr "Êtes-vous sûr de vouloir le supprimer ?" +msgstr "Êtes-vous sûr de vouloir le supprimer?" #: [account]gateway_title msgid "Gateway" @@ -198,11 +198,11 @@ msgstr "sur" #: [create]successfull msgid "Your acccount has been successfully registered" -msgstr "Compte créé avec succès" +msgstr "Votre compte a été correctement enregistré" #: [create]loading msgid "Loading" -msgstr "Chargement" +msgstr "Chargement en cours" #: [error]not_acceptable msgid "Not Acceptable" @@ -210,11 +210,11 @@ msgstr "Non acceptable" #: [error]service_unavailable msgid "The registration system of this server is currently unavailable" -msgstr "Le système d’inscription de ce serveur est actuellement indisponible" +msgstr "Le système d’enregistrement de ce serveur est actuellement indisponible" #: [oob]about msgid "This server use an external system for the registration, please click on the following URL." -msgstr "Ce serveur utilise un service externe pour enregistrer les nouveaux utilisateurs, cliquer sur lien suivant pour y accéder." +msgstr "Ce serveur utilise un service externe pour enregistrer les nouveaux utilisateurs, veuillez s’il vous plaît cliquer sur le lien suivant." #: [adhoc]title msgid "Actions" @@ -226,7 +226,7 @@ msgstr "Base de données" #: [db]connect_error msgid "Modl wasn't able to connect to the database" -msgstr "Modl n’a pas pu se connecter à la base de données" +msgstr "Modl n’a pas été en mesure de se connecter à la base de données" #: [db]connect_success msgid "Movim is connected to the database" @@ -246,7 +246,7 @@ msgstr "Type de base de données" #: [db]username [credentials]username [input]username msgid "Username" -msgstr "Nom d’utilisateur" +msgstr "Identifiant" #: [db]host msgid "Host" @@ -257,8 +257,9 @@ msgid "Port" msgstr "Port" #: [db]name +#, fuzzy msgid "Database sName" -msgstr "" +msgstr "Nom de la base de données" #: [admin]general msgid "General Settings" @@ -274,7 +275,7 @@ msgstr "Langue par défaut" #: [general]log_verbosity msgid "Log verbosity" -msgstr "Niveau de détails des journaux" +msgstr "Niveau de détail des journaux" #: [general]timezone msgid "Server Timezone" @@ -290,7 +291,7 @@ msgstr "Configuration du WebSocket" #: [websocket]info msgid "Enter here a valid WebSocket URI in the form" -msgstr "Veuillez saisir une URI du WebSocket valide dans le formulaire" +msgstr "Veuillez saisir une URI WebSocket valide dans le formulaire" #: [websocket]label msgid "WebSocket URI" @@ -298,7 +299,7 @@ msgstr "URI du WebSocket" #: [websocket]save_info msgid "If you change the URI, please restart the daemon to reload the configuration" -msgstr "Veuillez relancer le démon si vous changer l’URI, afin de prendre en compte la configuration" +msgstr "Si vous changez l’URI, veuillez relancer le démon afin de prendre en compte la configuration" #: [websocket]publics msgid "Public WebSockets" @@ -310,7 +311,7 @@ msgstr "Identification de l’administrateur" #: [credentials]info msgid "Change the default credentials admin/password" -msgstr "Modifiez les paramètres d’identification admin/mot de passe" +msgstr "Modifiez les paramètres d’identification admin / password" #: [credentials]re_password msgid "Retype password" @@ -322,7 +323,7 @@ msgstr "Serveurs XMPP : Liste blanche" #: [whitelist]info1 msgid "If you want to specify a list of authorized XMPP servers on your Movim pod and forbid the connection on all the others please put their domain name here, with comma (ex: movim.eu,jabber.fr)" -msgstr "Si vous souhaitez établir une liste de serveurs XMPP autorisés sur votre pod Movim et interdire la connexion à tous les autres, saisissez la liste de leurs noms de domaine, séparés par une virgule (ex : movim.eu, jabber.fr)." +msgstr "Si vous souhaitez établir une liste de serveurs XMPP autorisés sur votre pod Movim et interdire la connexion à tous les autres, veuillez saisir la liste de leurs noms de domaine, séparés par une virgule (ex : movim.eu, jabber.fr)." #: [whitelist]info2 msgid "Leave this field blank if you allow the access to all the XMPP accounts." @@ -333,6 +334,7 @@ msgid "List of whitelisted XMPP servers" msgstr "Liste blanche des serveurs XMPP" #: [information]title +#, fuzzy msgctxt "[information]title" msgid "Information Message" msgstr "Message d’information" @@ -346,10 +348,12 @@ msgid "This message will be displayed on the login page" msgstr "Ce message sera affiché sur la page de connexion." #: [information]info2 +#, fuzzy msgid "Leave this field blank if you dont want to show any message." msgstr "Laissez ce champ vide si vous ne voulez afficher aucun message." #: [information]label +#, fuzzy msgctxt "[information]label" msgid "Information Message" msgstr "Message d’information" @@ -368,11 +372,11 @@ msgstr "Journal système et fichiers" #: [rewrite]title msgid "URL Rewriting" -msgstr "Réécriture d’URL" +msgstr "Réécriture d'URL" #: [rewrite]info msgid "The URL Rewriting can be enabled" -msgstr "La réécriture d’URL peut être activée" +msgstr "La réécriture d'URL peut être activée" #: [admin]compatibility msgid "General Overview" @@ -380,7 +384,7 @@ msgstr "Aperçu général" #: [compatibility]info msgid "Movim has found some issues or things that need to be fixed or improved" -msgstr "Movim a rencontré des problèmes ou des soucis qui doivent être corrigés ou améliorés" +msgstr "Movim a rencontré des problèmes ou des choses qui doivent être corrigés ou améliorés" #: [compatibility]php1 msgid "Update your PHP-Version: %s" @@ -403,6 +407,7 @@ msgid "Install the php5-gd library" msgstr "Installez la librairie php5-gd" #: [compatibility]rights +#, fuzzy msgid "Read and write rights for the webserver in Movims root directory" msgstr "Droits de lecture et d’écriture pour le serveur web dans le dossier racine de Movim" @@ -416,11 +421,11 @@ msgstr "La base de données doit être mise à jour, allez dans son panneau pour #: [compatibility]websocket msgid "WebSocket connection error, check if the Movim Daemon is running and is reachable" -msgstr "Erreur de connexion WebSocket, vérifiez si le démon Movim est en cours d’exécution et s’il est joignable" +msgstr "" #: [compatibility]xmpp_websocket msgid "XMPP Websocket connection error, please check the validity of the URL given in the General Configuration" -msgstr "Erreur de connexion XMPP Websocket, veuillez vérifier la validité de l’URL donnée dans la configuration générale" +msgstr "Erreur de connexion XMPP Websocket, s'il vous plaît vérifier la validité de l'URL donnée dans la configuration générale" #: [schema]browser msgid "Browser" @@ -428,7 +433,7 @@ msgstr "Navigateur" #: [schema]movim msgid "Movim Core" -msgstr "Cœur de Movim" +msgstr "" #: [schema]daemon msgid "Movim Daemon" @@ -444,11 +449,11 @@ msgstr "Vous pouvez enregistrer ici votre pod sur %sl’API officielle%s et êtr #: [api]register msgid "Your pod is not registered on the API" -msgstr "Votre pod n’est pas enregistré dans l’API" +msgstr "Votre pod n’est pas enregistré sur l’API" #: [api]registered msgid "Your pod is registered on the API" -msgstr "Votre pod est enregistré dans l’API" +msgstr "Votre pod est enregistré sur l’API" #: [api]wait msgid "Your pod is not yet validated" @@ -476,7 +481,7 @@ msgstr "Utiliser" #: [avatar]webcam msgid "Webcam" -msgstr "Webcam" +msgstr "Caméra" #: [avatar]cheese msgid "Cheese !" @@ -500,7 +505,7 @@ msgstr "Flux de %s" #: [blog]empty msgid "This user has not posted anything right now" -msgstr "Cet utilisateur n’a rien publié pour le moment" +msgstr "Cet utilisateur n'a rien publié pour le moment" #: [title]conferences msgid "Conferences" @@ -519,6 +524,7 @@ msgid "Chat Room ID" msgstr "Identifiant du salon" #: [chatroom]name +#, fuzzy msgctxt "[chatroom]name" msgid "Name" msgstr "Nom" @@ -544,6 +550,7 @@ msgid "Bookmarks updated" msgstr "Signets mis à jour" #: [bookmarks]error +#, fuzzy msgid "An error occured :" msgstr "Une erreur s’est produite : " @@ -560,6 +567,7 @@ msgid "URL" msgstr "URL" #: [url]name +#, fuzzy msgctxt "[url]name" msgid "Name" msgstr "Nom" @@ -606,7 +614,7 @@ msgstr "Discuter avec vos contacts" #: [chat]frequent [chats]frequent msgid "Frequent contacts" -msgstr "Contacts fréquents" +msgstr "Contacts fréquent" #: [chatroom]members msgid "Members" @@ -637,12 +645,14 @@ msgid "Subject changed" msgstr "Sujet mis à jour" #: [chats]empty_title +#, fuzzy msgid "No chats yet..." -msgstr "Pas de discussions pour le moment" +msgstr "Pas de commentaires pour le moment" #: [chats]empty +#, fuzzy msgid "Open a new conversation by clicking on the plus button bellow or visit the Contacts page." -msgstr "Commencez une nouvelle conversation en cliquant sur le bouton plus ci-dessous ou visitez la page Contacts." +msgstr "Commencez une nouvelle conversation en cliquant sur le bouton plus ci-dessous" #: [chats]add msgid "Chat with a contact" @@ -697,6 +707,7 @@ msgid "Appearence" msgstr "Apparence" #: [config]info +#, fuzzy msgid "This configuration is shared wherever you are connected" msgstr "Cette configuration est partagée partout où vous vous connectez !" @@ -821,40 +832,44 @@ msgid "Last public post" msgstr "Derniers billets public" #: [subscription]to +#, fuzzy msgid "You can see this contact status" -msgstr "Vous pouvez voir l'état de ce contact" +msgstr "Pas de flux public pour ce contact" #: [subscription]to_button msgid "Share my status" -msgstr "Partager mon état" +msgstr "" #: [subscription]to_text msgid "But this contact cannot see yours" -msgstr "Mais ce contact ne peux pas voir le votre" +msgstr "" #: [subscription]from +#, fuzzy msgid "You are not subscribed to this contact" -msgstr "Vous n’êtes pas abonné à ce contact" +msgstr "Vous allez vous désinscrire de ce Groupe." #: [subscription]from_button +#, fuzzy msgid "Ask to subscribe" -msgstr "Demander pour s’abonner" +msgstr "%s souscrits" #: [subscription]from_text msgid "But this contact can still see if you are online" -msgstr "Mais ce contact peut tout de même voir votre présence en ligne" +msgstr "" #: [subscription]nil +#, fuzzy msgid "No subscriptions" -msgstr "" +msgstr "Abonnements" #: [subscription]nil_button msgid "Invite" -msgstr "Inviter" +msgstr "" #: [subscription]nil_text msgid "This contact is in your contact list but there is no subscriptions between the two accounts" -msgstr "Ce contact est dans votre liste de contacts mais il n’y a pas d’abonnements entre les deux comptes" +msgstr "" #: [group]subscribe msgid "Subscribe" @@ -890,7 +905,7 @@ msgstr "Êtes-vous sûr ?" #: [group]empty_text msgid "Discover, follow and share" -msgstr "Découvrir, suivre et partager" +msgstr "Découvrire, suivre et partager" #: [group]empty msgid "Something bad happened to this group" @@ -914,15 +929,16 @@ msgstr "Il semblerait que que groupe n'existe plus. Souhaitez-vous le supprimer #: [group]counter msgid "%s groups on this server" -msgstr "%s groupes sur ce serveur" +msgstr "" #: [group]subscriptions [statistics]subscriptions msgid "Subscriptions" msgstr "Abonnements" #: [group]servers +#, fuzzy msgid "Groups servers" -msgstr "" +msgstr "Groupes" #: [group]search_server msgid "Search for a new server" @@ -986,11 +1002,11 @@ msgstr "Groupe supprimé avec succès" #: [groups]name_error msgid "Please provide a valid group name (4 characters minimum)" -msgstr "Merci d'entrer un nom de groupe valide (4 caractères minimum)" +msgstr "" #: [groups]no_creation msgid "You cannot create a new Group on this server" -msgstr "Aucun formulaire de création de compte n’a été trouvé sur le serveur" +msgstr "" #: [groups]sub msgid "%s subscribers" @@ -1001,8 +1017,9 @@ msgid "%s posts" msgstr "%s billets" #: [groups]disco_error +#, fuzzy msgid "This server doesn't exists" -msgstr "" +msgstr "Ce serveur héberge %s comptes" #: [menu]all msgid "All" @@ -1013,12 +1030,14 @@ msgid "Refresh all the streams" msgstr "Rafraîchir tous les flux" #: [roster]search +#, fuzzy msgid "Search in your contacts" -msgstr "Chercher dans vos contacts " +msgstr "Discuter avec vos contacts" #: [hello]active_contacts +#, fuzzy msgid "Active contacts" -msgstr "Contacts actifs" +msgstr "Vos contacts" #: [hello]chat msgid "Go on the Chat page" @@ -1034,7 +1053,7 @@ msgstr "Lire tous ces articles sur la page Actualité" #: [hello]blog_title msgid "Visit your public blog" -msgstr "Aller sur votre blog public" +msgstr "Aller sur votre blog publique" #: [hello]blog_text msgid "See your public posts and share them with all your contacts" @@ -1150,7 +1169,7 @@ msgstr "Mettre à jour ma position" #: [login_anonymous]bad_username msgid "Bad nickname (between 4 and 40 characters)" -msgstr "Mauvais surnom (entre 4 et 40 caractères)" +msgstr "" #: [error]username msgid "Wrong username" @@ -1189,6 +1208,7 @@ msgid "Account successfully created" msgstr "Compte créé avec succès" #: [error]xmpp_unauthorized +#, fuzzy msgctxt "[error]xmpp_unauthorized" msgid "Your XMPP server is unauthorized" msgstr "Votre compte XMPP n’est pas autorisé à se connecter" @@ -1226,6 +1246,7 @@ msgid "Invalid password format" msgstr "Mot de passe non valide" #: [error]unauthorized +#, fuzzy msgctxt "[error]unauthorized" msgid "Your XMPP server is unauthorized" msgstr "Votre compte XMPP n’est pas autorisé à se connecter" @@ -1279,10 +1300,12 @@ msgid "Population" msgstr "Population" #: [menu]empty_title +#, fuzzy msgid "No news yet..." msgstr "Pas de commentaires pour le moment" #: [menu]empty +#, fuzzy msgid "Welcome on your news feed, here you will see all the posts published by your contacts and in the groups you have subscribed." msgstr "Bienvenue sur flux d’actualité, ici vous verrez tous les billets publiés dans les groupes auxquels vous vous êtes abonnés." @@ -1416,15 +1439,16 @@ msgstr "Vous pouvez également utiliser des services comme Imgur ou Flickr pour #: [post]repost msgid "This is a re-post from %s" -msgstr "Ceci est une republication de %s" +msgstr "" #: [post]repost_profile msgid "See %s profile" -msgstr "Voir le profil de %s" +msgstr "" #: [post]public +#, fuzzy msgid "Publish this post publicly?" -msgstr "" +msgstr "Publier ce billet sur votre flux public?" #: [post]blog_add msgid "Post published on your blog" @@ -1472,11 +1496,11 @@ msgstr "Présence" #: [status]online msgid "Online with Movim" -msgstr "En ligne avec Movim" +msgstr "" #: [publish]title msgid "Publish" -msgstr "Publier" +msgstr "" #: [publish]attach msgid "Add a file or a picture to your post" @@ -1484,11 +1508,11 @@ msgstr "" #: [publish]no_publication msgid "You cannot publish a post on this Group" -msgstr "Vous ne pouvez pas publier de billet sur ce groupe" +msgstr "" #: [publish]form_filled msgid "Some fields have been filled in. Do you still want to go back and loose their content?" -msgstr "Certains champs ont été remplis. Êtes-vous sûr de vouloir revenir en arrière et de perdre le contenu déjà saisi ?" +msgstr "" #: [public_groups]shared msgid "Shared" @@ -1524,31 +1548,31 @@ msgstr "Utilisateurs du salon" #: [chatrooms]bad_nickname msgid "Please enter a correct nickname (2 to 40 characters)" -msgstr "Merci d'entrer un surnom valide (entre 2 et 40 caractères)" +msgstr "" #: [room]anonymous_title msgid "Public chatroom" -msgstr "Salon public" +msgstr "" #: [room]no_room msgid "Please provide a room address" -msgstr "Merci d'entrer l'adresse d'un salon" +msgstr "" #: [room]anonymous_text1 msgid "You are currently logued as an anonymous user." -msgstr "Vous êtes actuellement connecté en tant qu'anonyme" +msgstr "" #: [room]anonymous_text2 msgid "You can join using your own account or create one on the login page by loging out using the cross in the top-right corner." -msgstr "Vous pouvez vous connecter en utilisant votre propre compte ou en créer un sur la page de connexion, en cliquant sur la croix en haut à droite." +msgstr "" #: [room]anonymous_login msgid "Login on %s" -msgstr "Connexion sur %s" +msgstr "" #: [room]nick msgid "Your nickname" -msgstr "Votre surnom" +msgstr "" #: [roster]ungrouped msgid "Ungrouped" @@ -1575,12 +1599,14 @@ msgid "Please enter a valid Jabber ID" msgstr "Veuillez entrer un identifiant Jabber valide" #: [roster]no_contacts_title +#, fuzzy msgid "No contacts ?" -msgstr "" +msgstr "Vos contacts" #: [roster]no_contacts_text +#, fuzzy msgid "You can add one using the + button bellow" -msgstr "" +msgstr "Pas de contacts ? Vous pouvez en ajouter un en cliquant sur le bouton + ci-dessous ou aller sur la page Explorer" #: [roster]show_hide msgid "Show/Hide" @@ -1663,8 +1689,9 @@ msgid "No contact specified" msgstr "Aucun contact indiqué" #: [upload]title +#, fuzzy msgid "Upload a file" -msgstr "" +msgstr "Téléverser" #: [upload]choose msgid "Choose a file to upload" @@ -1691,9 +1718,10 @@ msgid "Your profile is now restricted" msgstr "Votre profil est maintenant restreint" #: [general]nickname +#, fuzzy msgctxt "[general]nickname" msgid "Nickname" -msgstr "Surnom" +msgstr "Pseudonyme" #: [accounts]twitter msgid "Twitter" @@ -1708,13 +1736,15 @@ msgid "Yahoo" msgstr "Yahoo" #: [accounts]accounts_nickname +#, fuzzy msgctxt "[accounts]accounts_nickname" msgid "Nickname" -msgstr "Surnom" +msgstr "Pseudonyme" #: [accounts]accounts_yahoo +#, fuzzy msgid "Yahoo Account" -msgstr "Compte Yahoo" +msgstr "Compte" #: [privacy]privacy_title msgid "Privacy Level" @@ -1850,7 +1880,7 @@ msgstr "Partager" #: [page]room msgid "Room" -msgstr "Salon" +msgstr "" #: [error]error msgid "Error: %s" @@ -2018,11 +2048,11 @@ msgstr "Connexion" #: [button]bool_yes msgid "Yes" -msgstr "" +msgstr "Oui" #: [button]bool_no msgid "No" -msgstr "" +msgstr "Non" #: [button]return msgid "Return" @@ -2081,9 +2111,10 @@ msgid "Sunday" msgstr "Dimanche" #: [gender]nil +#, fuzzy msgctxt "[gender]nil" msgid "None" -msgstr "" +msgstr "Aucun" #: [gender]male msgid "Male" @@ -2118,9 +2149,10 @@ msgid "Registered" msgstr "Inscrit" #: [marital]nil +#, fuzzy msgctxt "[marital]nil" msgid "None" -msgstr "" +msgstr "Aucun" #: [marital]single msgid "Single" @@ -2595,6 +2627,7 @@ msgid "Yesterday" msgstr "Hier" #: [date]ago +#, fuzzy msgid "%d days ago" msgstr " Il y a %d jours" @@ -2624,11 +2657,11 @@ msgstr "courriel" #: [post]no_comments msgid "No comments yet" -msgstr "" +msgstr "Pas de commentaires pour le moment" #: [post]no_comments_stream msgid "No comments stream" -msgstr "" +msgstr "Pas de flux de commentaires" #: [post]no_load msgid "Your feed cannot be loaded." @@ -2651,8 +2684,9 @@ msgid "Show the older comments" msgstr "Afficher les commentaires plus anciens" #: [post]comments_loading +#, fuzzy msgid "Loading comments..." -msgstr "" +msgstr "Chargement des commentaires…" #: [post]comments_get msgid "Get the comments" @@ -2697,3 +2731,300 @@ msgstr "L’API est indisponible pour le moment, réessayez plus tard." #: [field]type_here msgid "Type here" msgstr "Rédigez votre message ici" + +#~ msgid "Environment" +#~ msgstr "Environnement" + +#~ msgid "You can login with Facebook (chat only) using %syour.id@chat.facebook.com%s and your password" +#~ msgstr "Vous pouvez vous connecter avec Facebook (messagerie instantanée uniquement) en entrant %svotre.id@chat.facebook.com%s et votre mot de passe" + +#~ msgid "%sGmail accounts are also compatible%s but are not fully supported" +#~ msgstr "%sLes comptes Gmail sont aussi compatibles%s mais ne sont pas complètement pris en charge" + +#~ msgid "You can login using your favorite Jabber account" +#~ msgstr "Vous pouvez vous connecter avec votre compte Jabber favori" + +#~ msgid "or with our demonstration account" +#~ msgstr "ou avec notre compte de démonstration" + +#~ msgid "%s has been removed from your public groups" +#~ msgstr "%s a été supprimé de vos groupes publics" + +#~ msgid "Remove a chatroom" +#~ msgstr "Enlever un salon de discussion" + +#~ msgid "You are going to remove the following chatroom. Please confirm your action." +#~ msgstr "Vous allez supprimer le salon de discussion suivant de vos signets. Confirmez s’il vous plaît." + +#~ msgid "Remote application incompatible" +#~ msgstr "L’application distante est incompatible" + +#~ msgid "Remove" +#~ msgstr "Retirer" + +#~ msgid "remorseful" +#~ msgstr "plein de remords" + +#~ msgid "Movim's folder must be writable." +#~ msgstr "Le dossier racine de Movim doit être accessible en écriture." + +#~ msgid "Couldn't create directory '%s'." +#~ msgstr "La création du répertoire '%s' est impossible." + +#~ msgid "Couldn't create configuration file '%s'." +#~ msgstr "La création du fichier de configuration '%s' est impossible." + +#~ msgid "Compatibility Test" +#~ msgstr "Test de compatibilité" + +#~ msgid "User not logged in." +#~ msgstr "Vous n'êtes pas authentifié." + +#~ msgid "JID not provided." +#~ msgstr "JID indisponible." + +#~ msgid "jid '%s' is incorrect" +#~ msgstr "Le JID '%s' n'est pas valide" + +#~ msgid "Cannot open log file '%s'" +#~ msgstr "Le journal '%s' ne peut être ouvert" + +#~ msgid "%s - Account Creation" +#~ msgstr "%s - Création de compte" + +#~ msgid "Remove this contact" +#~ msgstr "Supprimer ce contact" + +#~ msgid "Debug console" +#~ msgstr "Console de débogage" + +#~ msgid "Logout" +#~ msgstr "Se déconnecter" + +#~ msgid "Decline" +#~ msgstr "Refuser" + +#~ msgid "Loading the contact feed ..." +#~ msgstr "Chargement du flux ..." + +#~ msgid "wants to talk with you" +#~ msgstr "veut discuter avec vous" + +#~ msgid "or" +#~ msgstr "ou" + +#~ msgid "Actual version : " +#~ msgstr "Version actuelle : " + +#~ msgid "Install %s and %s packages" +#~ msgstr "Veuillez installer les paquets %s et %s" + +#~ msgid "Update your PHP version or contact your server administrator" +#~ msgstr "Mettez à jour votre version de PHP ou contactez l'administrateur de votre serveur" + +#~ msgid "Enable read and write rights on Movim's root folder" +#~ msgstr "Activez les droits de lecture et d'écriture sur le dossier racine de Movim" + +#~ msgid "Please remove the %s folder in order to complete the installation" +#~ msgstr "Veuillez supprimer le dossier %s pour terminer l'installation" + +#~ msgid "Database Movim schema installed" +#~ msgstr "Le schéma des tables a été installé" + +#~ msgid "Valid Bosh" +#~ msgstr "Bosh valide" + +#~ msgid "Success !" +#~ msgstr "Bravo !" + +#~ msgid "The current BOSH URL in invalid" +#~ msgstr "L'URL Bosh donnée n'est pas valide" + +#~ msgid "Loading your feed ..." +#~ msgstr "Chargement de votre flux ..." + +#~ msgid "Show All" +#~ msgstr "Tout afficher" + +#~ msgid "Follow" +#~ msgstr "Suivre" + +#~ msgid "Database Detected" +#~ msgstr "Base de données détectée" + +#~ msgid "Movim requires the %s extension." +#~ msgstr "Movim a besoin de l'extension %s." + +#~ msgid "The following requirements were not met. Please make sure they are all satisfied in order to install Movim." +#~ msgstr "Les dépendances ci-dessous ne sont pas satisfaites. Assurez-vous qu'elles le soient afin d'installer Movim." + +#~ msgid "You can now access your shiny Movim instance %sJump In !%s" +#~ msgstr "Vous pouvez maintenant accéder à votre version fraîchement installée de Movim %sAllons y !%s" + +#~ msgid "Install the %s package" +#~ msgstr "Installer le paquet %s" + +#~ msgid "XMPP Connection Preferences" +#~ msgstr "Configuration de la connexion XMPP" + +#~ msgid "You entered different passwords" +#~ msgstr "Vous avez entré des mots de passe différents" + +#~ msgid "BOSH Connection Preferences" +#~ msgstr "Configuration de la connexion BOSH" + +#~ msgid "Wrong ID" +#~ msgstr "Mauvais identifiant" + +#~ msgid "Only alphanumerics elements are authorized" +#~ msgstr "Seul des éléments alphanumériques sont autorisés" + +#~ msgid "Make sure your password is safe :" +#~ msgstr "Soyez sur que votre mot de passe est suffisamment robuste :" + +#~ msgid "Example :" +#~ msgstr "Exemple :" + +#~ msgid "Same here !" +#~ msgstr "Même chôse ici !" + +#~ msgid "Retype" +#~ msgstr "Retaper" + +#~ msgid "Pseudo" +#~ msgstr "Pseudo" + +#~ msgid "Create" +#~ msgstr "Créer" + +#~ msgid "Create my vCard" +#~ msgstr "Créer ma vCard" + +#~ msgid "A capital letter, a digit and a special character are recommended" +#~ msgstr "Un bon mot de passe est composé d'au moins une majuscule, un chiffre et un caractère spécial" + +#~ msgid "8 characters" +#~ msgstr "8 caractères" + +#~ msgid "Proxy Preferences" +#~ msgstr "Préférences du Proxy" + +#~ msgid "Address" +#~ msgstr "Adresse" + +#~ msgid "Firstly fill in this blank with a brand new account ID, this address will follow you on all the Movim network !" +#~ msgstr "Tout d'abord remplir ce vide avec un ID de tout nouveau compte, cette adresse vous suivra sur tout le réseau Movim !" + +#~ msgid "%s - Add An Account" +#~ msgstr "%s - Ajouter Un Compte" + +#~ msgid "Add your login informations" +#~ msgstr "Ajoutez vos informations de connexion" + +#~ msgid "Client Name" +#~ msgstr "Nom du client" + +#~ msgid "Client Type" +#~ msgstr "Type de Client" + +#~ msgid "Contacts (%s)" +#~ msgstr "Contacts (%s)" + +#~ msgid "Your server doesn't support post publication, you can only read contact's feeds" +#~ msgstr "Votre serveur ne gère pas la publication des billets, vous ne pouvez que lire les flux de vos contacts." + +#~ msgid "No profile yet ?" +#~ msgstr "Pas encore de profil ?" + +#~ msgid "Edit my Profile" +#~ msgstr "Modifier mon profil" + +#~ msgid "PHP version mismatch. Movim requires PHP 5.3 minimum." +#~ msgstr "La version de PHP ne correspond pas. Movim nécessite la version 5.3 au minimum." + +#~ msgid "normal" +#~ msgstr "standard" + +#~ msgid "terse" +#~ msgstr "concis" + +#~ msgid "empty" +#~ msgstr "vide" + +#~ msgid "Keep in mind that Movim is still under development and will handle many personal details. Its use can potentially endanger your data. Always pay attention to information that you submit." +#~ msgstr "Gardez à l'esprit que Movim est encore en développement et va manipuler des informations personnelles. Son utilisation peut donc les mettre en danger. Faites donc toujours attention aux informations que vous envoyez." + +#~ msgid "Before you enjoy your social network, a few adjustements are required." +#~ msgstr "Avant que vous utilisiez votre réseau social, quelques ajustements sont nécessaires." + +#~ msgid "ultimate" +#~ msgstr "complet" + +#~ msgid "talkative" +#~ msgstr "bavard" + +#~ msgid "Although Movim is evolving fast, many (many) features are missing. Be patient ;). You can have a look %s at next versions's roadmaps %s to know if the one you want is on its way." +#~ msgstr "Même si Movim avance vite, il manque encore de (très) nombreuses fonctionnalités. Soyez patient ;). Vous pouvez aller jeter un œil aux %s feuilles de routes des prochaines version %s pour voir si celle-ci n'est pas déjà prévue." + +#~ msgid "Go to the %s to the Frequently Asked Questions %s or come ask your question on the official chatroom %s or via our mailing-list (%s see the dedicated page %s)." +#~ msgstr "Allez jeter un oeil %s à la Foire aux Questions %s ou venez nous la poser directement sur le salon officiel %s ou sur la mailing-list (%s voir la page dédiée %s)." + +#~ msgid "Don't forget that Movim is an open source project, a helping hand is always welcome (see %s Can I participate %s)" +#~ msgstr "Et n'oubliez pas que Movim est un logiciel libre, un petit coup de main est toujours le bienvenu (voir la page %s Puis-je participer %s)." + +#~ msgid "Link my current account" +#~ msgstr "Lier mon compte actuel" + +#~ msgid "Connecting..." +#~ msgstr "Connexion…" + +#~ msgid "Invite this user" +#~ msgstr "Inviter cet utilisateur" + +#~ msgid "Bosh connection failed with error '%s'" +#~ msgstr "La connection Bosh a échoué avec l'erreur '%s'" + +#~ msgid "Database connection failed with error '%s'" +#~ msgstr "La connexion à la base de données à échoué avec l'erreur '%s'" + +#~ msgid "XMPP connection through Bosh failed with error '%s'" +#~ msgstr "La connection XMPP à travers Bosh a échoué avec l'erreur '%s'" + +#~ msgid "Send request" +#~ msgstr "Envoyer la demande" + +#~ msgid "Thank you for downloading Movim!" +#~ msgstr "Merci d'avoir téléchargé Movim !" + +#~ msgid "Some errors were detected. Please correct them for the installation to proceed." +#~ msgstr "Des erreurs ont été détectées. Veuillez les corriger pour terminer correctement l'installation." + +#~ msgid "Cannot load element value '%s'" +#~ msgstr "Impossible de charger la valeur de l'élément « %s »" + +#~ msgid "Invalid name" +#~ msgstr "Nom incorrect" + +#~ msgid "Username already taken" +#~ msgstr "Identifiant déjà utilisé" + +#~ msgid "What is Movim?" +#~ msgstr "Qu’est-ce que Movim ?" + +#~ msgid "My Posts" +#~ msgstr "Mes billets" + +#~ msgid "I can't find the answer to my question here" +#~ msgstr "Ma question n’est pas listée ici" + +#~ msgid "Visit the page %s What is Movim ? %s to know more about the project, its aims and understand how it works." +#~ msgstr "Visitez la page %s Qu’est-ce que Movim ? %s pour en savoir plus le projet, ses buts et comprendre son fonctionnement." + +#~ msgid "Some features are missing/I can't do everything I used to do on other social networks" +#~ msgstr "Il manque des fonctionnalités / Je n’arrive pas à faire ce que je faisais sur les autres réseaux sociaux" + +#~ msgid "Could not communicate with the XMPP server" +#~ msgstr "Erreur de communication avec le serveur XMPP" + +#~ msgid "Could not connect to the XMPP server" +#~ msgstr "Erreur de connexion au serveur XMPP" diff --git a/sources/system/User.php b/sources/system/User.php index b422715..925daa0 100644 --- a/sources/system/User.php +++ b/sources/system/User.php @@ -53,8 +53,7 @@ class User { $this->config = $session->config; $lang = $this->getConfig('language'); if(isset($lang)) { - $l = Locale::start(); - $l->load($lang); + loadLanguage($lang); } $cd = new modl\CapsDAO; diff --git a/sources/system/Utils.php b/sources/system/Utils.php index 4c87564..a4960f6 100644 --- a/sources/system/Utils.php +++ b/sources/system/Utils.php @@ -20,25 +20,6 @@ use Monolog\Logger; use Monolog\Handler\SyslogHandler; use Monolog\Handler\StreamHandler; -class Utils { - public static function log($message, $priority = '') - { - if(LOG_LEVEL != null && LOG_LEVEL > 0) { - $log = new Logger('movim'); - - $handler = new SyslogHandler('movim'); - - if(LOG_LEVEL > 1) - $log->pushHandler(new StreamHandler(LOG_PATH.'/movim.log', Logger::DEBUG)); - - $log->pushHandler($handler, Logger::DEBUG); - - $errlines = explode("\n",$message); - foreach ($errlines as $txt) { $log->addDebug($txt); } - } - } -} - /** * Return the list of gender */ @@ -521,6 +502,7 @@ function generateUUID($string = false) { return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); } + function movim_log($logs) { $log = new Logger('movim'); $log->pushHandler(new SyslogHandler('movim')); diff --git a/sources/system/widget/WidgetBase.php b/sources/system/widget/WidgetBase.php index 98673c2..e981249 100644 --- a/sources/system/widget/WidgetBase.php +++ b/sources/system/widget/WidgetBase.php @@ -27,7 +27,7 @@ class WidgetBase protected $user; protected $name; protected $pure; // To render the widget without the container - //protected $translations = array(); // Set translations in the controller + protected $translations = array(); // Set translations in the controller protected $_view; public $events; public $filters; @@ -73,6 +73,11 @@ class WidgetBase 'tpl_ext' => 'tpl', 'auto_escape' => false ); + + if(file_exists($this->respath('locales.ini', true))) { + $this->translations = parse_ini_file($this->respath('locales.ini', true), true, INI_SCANNER_RAW); + } + // We load the template engine $this->view = new Tpl; $this->view->objectConfigure($config); @@ -82,14 +87,30 @@ class WidgetBase $this->pure = false; } - function __() - { + function __() { $args = func_get_args(); - return call_user_func_array('__', $args); + global $translationshash; + + if(!is_array($this->translations)) $this->translations = array(); + + $tmp_trans = array_merge_recursive($this->translations, $translationshash); + $arr = explode('.', $args[0]); + + if(is_array($tmp_trans) + && array_key_exists($arr[0], $tmp_trans) + && array_key_exists($arr[1], $tmp_trans[$arr[0]])) { + $vars = $tmp_trans[$arr[0]][$arr[1]]; + if(is_array($vars)) + $args[0] = $vars[0]; + else + $args[0] = $vars; + return call_user_func_array('t', $args); + } else { + return $args[0]; + } } - function ___() - { + function ___() { echo call_user_func_array(array(&$this, '__'), func_get_args()); } @@ -98,8 +119,7 @@ class WidgetBase return $this->user->isSupported($key); } - function route() - { + function route() { return call_user_func_array('Route::urlize',func_get_args()); } @@ -127,7 +147,9 @@ class WidgetBase function display() {} /** - * àdesc Return the template's HTML code + * Return the template's HTML code + * @param a specific template name to load (like Ruby partials) + * @param load the parent template, like for WidgetCommon */ function draw() { diff --git a/sources/themes/material/css/article.css b/sources/themes/material/css/article.css index 03f550a..b36e3b7 100644 --- a/sources/themes/material/css/article.css +++ b/sources/themes/material/css/article.css @@ -89,8 +89,7 @@ article section content em { /* Some CSS to style the quote XHTML generated by Movim */ article section content blockquote, -article section content q, -article section content div.quote { +article section content q { display: block; border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.12); @@ -98,34 +97,34 @@ article section content div.quote { box-sizing: border-box; } -article section content div.quote:before, -article section content div.quote:after { +article section content q:before, +article section content q:after { content: ''; display: none; } -article section content div.quote ul { +article section content q ul { display: flex; flex-flow: row wrap; } -article section content div.quote li { +article section content q li { flex: 1 25%; list-style-type: none; padding-left: 0; } -article section content div.quote li:first-child { +article section content q li:first-child { flex: 1 75%; } @media screen and (max-width: 1024px) { - article section content div.quote li { + article section content q li { flex: 1 100%; } } -article section content div.quote li img { +article section content q li img { max-height: 10rem; max-width: 100%; float: right; diff --git a/sources/themes/material/css/list.css b/sources/themes/material/css/list.css index 6396130..834c764 100644 --- a/sources/themes/material/css/list.css +++ b/sources/themes/material/css/list.css @@ -13,7 +13,6 @@ ul li { } ul > a { - max-width: 100%; display: block; } diff --git a/sources/themes/material/css/style.css b/sources/themes/material/css/style.css index 58049e8..ee701c0 100644 --- a/sources/themes/material/css/style.css +++ b/sources/themes/material/css/style.css @@ -152,13 +152,11 @@ body > nav.active { width: 45rem; } -@media screen and (min-width: 1024px) { - body > div.dialog:not(:empty) ~ main, - body > div.dialog:not(:empty) ~ nav, - body > nav.active + main { - opacity: 0.5; - pointer-events: none; - } +body > div.dialog:not(:empty) ~ main, +body > div.dialog:not(:empty) ~ nav, +body > nav.active + main { + opacity: 0.5; + pointer-events: none; } body > nav li { /* Little hack for the navbar */ @@ -229,7 +227,6 @@ main { background-color: white; -webkit-transition: opacity 0.3s ease-in-out; transition: opacity 0.3s ease-in-out; - transform: translateZ(0); } nav + main { @@ -711,7 +708,6 @@ main section > div:first-child:nth-last-child(2) ~ div .actions.fixed > div:last width: 40rem; pointer-events: none; transition: opacity 0.2s ease, bottom 0.4s ease; - transform: translateX(0); } .snackbar p, @@ -881,7 +877,6 @@ dl dd { .spinner:before, .spinner:after { transition: top .3s ease-in-out; - transform: translateX(0); content: ''; position: absolute; left: calc(50% - 3.5rem); @@ -895,8 +890,8 @@ dl dd { } .spinner.on:before { - animation: 1s spinner infinite linear; - -webkit-animation: 1s spinner 1s infinite linear; + animation: spinner 1s linear infinite; + -webkit-animation: spinner 1s linear infinite; } .spinner:before { @@ -921,12 +916,10 @@ dl dd { } @keyframes spinner { - from { transform: rotate(0deg); } to {transform: rotate(360deg);} } @-webkit-keyframes spinner { - from { transform: rotate(0deg); } to {-webkit-transform: rotate(360deg);} }