Browse Source

- Update the locales

- Fix some CSS issues
- Fix the HTML chat messages display
- Fix the loaded language value in the running daemon
pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
2644cfb56f
  1. 2
      app/widgets/Chat/_chat_messages.tpl
  2. 2
      app/widgets/Chats/Chats.php
  3. 2
      app/widgets/Chats/locales.ini
  4. 3
      app/widgets/Config/Config.php
  5. 2
      app/widgets/Config/locales.ini
  6. 1
      app/widgets/Login/login.css
  7. 2
      app/widgets/Menu/Menu.php
  8. 11
      app/widgets/Presence/Presence.php
  9. 1
      app/widgets/Presence/presence.js
  10. 4
      app/widgets/Rooms/_rooms_list.tpl
  11. 1
      bootstrap.php
  12. 1470
      locales/ar.po
  13. 1351
      locales/be.po
  14. 1347
      locales/bn.po
  15. 1418
      locales/br.po
  16. 1369
      locales/da.po
  17. 1608
      locales/de.po
  18. 1395
      locales/el.po
  19. 1375
      locales/eo.po
  20. 1559
      locales/es.po
  21. 1347
      locales/fa.po
  22. 1486
      locales/fi.po
  23. 1669
      locales/fr.po
  24. 1356
      locales/gl.po
  25. 1535
      locales/he.po
  26. 1347
      locales/hr.po
  27. 1396
      locales/id.po
  28. 1347
      locales/io.po
  29. 1540
      locales/it.po
  30. 1419
      locales/ja.po
  31. 1347
      locales/kk.po
  32. 1377
      locales/lv.po
  33. 1264
      locales/messages.pot
  34. 1490
      locales/nl.po
  35. 1352
      locales/no.po
  36. 1454
      locales/oc.po
  37. 1488
      locales/pt.po
  38. 1365
      locales/ro.po
  39. 1590
      locales/ru.po
  40. 1391
      locales/uk.po
  41. 1423
      locales/zh.po
  42. 3
      system/RPC.php
  43. 1
      system/Sessionx.php
  44. 26
      system/User.php
  45. 2
      themes/material/css/list.css

2
app/widgets/Chat/_chat_messages.tpl

@ -20,7 +20,7 @@
<i class="md md-lock"></i> {$c->__('message.encrypted')} <i class="md md-lock"></i> {$c->__('message.encrypted')}
{else} {else}
{if="isset($value->html)"} {if="isset($value->html)"}
{$value->body}
{$value->html|prepareString}
{else} {else}
{$value->body|htmlentities:ENT_COMPAT,'UTF-8'|prepareString} {$value->body|htmlentities:ENT_COMPAT,'UTF-8'|prepareString}
{/if} {/if}

2
app/widgets/Chats/Chats.php

@ -56,7 +56,7 @@ class Chats extends WidgetCommon
$chats = Cache::c('chats'); $chats = Cache::c('chats');
if($chats == null) $chats = array(); if($chats == null) $chats = array();
if(!array_key_exists($jid, $chats)) {
if(!array_key_exists($jid, $chats) && $jid != $this->user->getLogin()) {
$chats[$jid] = 1; $chats[$jid] = 1;
Cache::c('chats', $chats); Cache::c('chats', $chats);

2
app/widgets/Chats/locales.ini

@ -1,5 +1,5 @@
[chats] [chats]
chats.empty = 'Open a new conversation here by clicking on the plus button bellow'
chats.empty = 'Open a new conversation by clicking on the plus button in the header'
chats.add = 'Chat with a contact' chats.add = 'Chat with a contact'
[message] [message]

3
app/widgets/Config/Config.php

@ -70,7 +70,8 @@ class Config extends WidgetBase
Notification::append(null, $this->__('config.updated')); Notification::append(null, $this->__('config.updated'));
} }
function ajaxSubmit($data) {
function ajaxSubmit($data)
{
$config = $this->user->getConfig(); $config = $this->user->getConfig();
if(isset($config)) if(isset($config))
$data = array_merge($config, $data); $data = array_merge($config, $data);

2
app/widgets/Config/locales.ini

@ -9,5 +9,5 @@ config.pattern = 'Pattern'
config.info = 'This configuration is shared wherever you are connected !' config.info = 'This configuration is shared wherever you are connected !'
config.updated = 'Configuration updated' config.updated = 'Configuration updated'
notifications.message = 'Notifify on incoming message'
notifications.message = 'Notify on incoming message'
notifications.desktop = 'Use desktop notifications' notifications.desktop = 'Use desktop notifications'

1
app/widgets/Login/login.css

@ -48,6 +48,7 @@ body main {
#login_widget form ul input { #login_widget form ul input {
margin: 0; margin: 0;
display: block;
} }
ul.admin { ul.admin {

2
app/widgets/Menu/Menu.php

@ -123,7 +123,7 @@ class Menu extends WidgetCommon
$items = $pd->getNode($server, $node, $page*$this->_paging, $this->_paging); $items = $pd->getNode($server, $node, $page*$this->_paging, $this->_paging);
break; break;
} }
$view->assign('items', $items); $view->assign('items', $items);
$view->assign('page', $page); $view->assign('page', $page);

11
app/widgets/Presence/Presence.php

@ -127,7 +127,7 @@ class Presence extends WidgetBase
->request(); ->request();
} }
// We refresh the bookmarks
// We refresh the bookmarks
function ajaxBookmarksGet() function ajaxBookmarksGet()
{ {
$session = \Sessionx::start(); $session = \Sessionx::start();
@ -136,6 +136,15 @@ class Presence extends WidgetBase
->request(); ->request();
} }
// We refresh the user (local) configuration
function ajaxUserRefresh()
{
$language = $this->user->getConfig('language');
if(isset($language)) {
loadLanguage($language);
}
}
function ajaxOpenDialog() function ajaxOpenDialog()
{ {
Dialog::fill($this->preparePresenceList()); Dialog::fill($this->preparePresenceList());

1
app/widgets/Presence/presence.js

@ -7,6 +7,7 @@ function postStart() {
//Presence_ajaxConfigGet(); //Presence_ajaxConfigGet();
Presence_ajaxServerCapsGet(); Presence_ajaxServerCapsGet();
Presence_ajaxBookmarksGet(); Presence_ajaxBookmarksGet();
Presence_ajaxUserRefresh();
//Menu_ajaxRefresh(); //Menu_ajaxRefresh();
localStorage.postStart = 0; localStorage.postStart = 0;
} }

4
app/widgets/Rooms/_rooms_list.tpl

@ -4,12 +4,12 @@
<ul> <ul>
{$presence = getPresencesTxt()} {$presence = getPresencesTxt()}
{loop="$list"} {loop="$list"}
<li>
<li class="action">
<span class="icon bubble status {$presence[$value->value]}"> <span class="icon bubble status {$presence[$value->value]}">
<img src="{$value->getPhoto('s')}" /> <img src="{$value->getPhoto('s')}" />
</span> </span>
{if="$value->mucaffiliation =='owner'"} {if="$value->mucaffiliation =='owner'"}
<div class="control">
<div class="action">
<i class="md md-beenhere"></i> <i class="md md-beenhere"></i>
</div> </div>
{/if} {/if}

1
bootstrap.php

@ -212,6 +212,7 @@ class Bootstrap {
*/ */
function loadLanguage() { function loadLanguage() {
$user = new User(); $user = new User();
$user->reload();
$cd = new \Modl\ConfigDAO(); $cd = new \Modl\ConfigDAO();
$config = $cd->get(); $config = $cd->get();

1470
locales/ar.po
File diff suppressed because it is too large
View File

1351
locales/be.po
File diff suppressed because it is too large
View File

1347
locales/bn.po
File diff suppressed because it is too large
View File

1418
locales/br.po
File diff suppressed because it is too large
View File

1369
locales/da.po
File diff suppressed because it is too large
View File

1608
locales/de.po
File diff suppressed because it is too large
View File

1395
locales/el.po
File diff suppressed because it is too large
View File

1375
locales/eo.po
File diff suppressed because it is too large
View File

1559
locales/es.po
File diff suppressed because it is too large
View File

1347
locales/fa.po
File diff suppressed because it is too large
View File

1486
locales/fi.po
File diff suppressed because it is too large
View File

1669
locales/fr.po
File diff suppressed because it is too large
View File

1356
locales/gl.po
File diff suppressed because it is too large
View File

1535
locales/he.po
File diff suppressed because it is too large
View File

1347
locales/hr.po
File diff suppressed because it is too large
View File

1396
locales/id.po
File diff suppressed because it is too large
View File

1347
locales/io.po
File diff suppressed because it is too large
View File

1540
locales/it.po
File diff suppressed because it is too large
View File

1419
locales/ja.po
File diff suppressed because it is too large
View File

1347
locales/kk.po
File diff suppressed because it is too large
View File

1377
locales/lv.po
File diff suppressed because it is too large
View File

1264
locales/messages.pot
File diff suppressed because it is too large
View File

1490
locales/nl.po
File diff suppressed because it is too large
View File

1352
locales/no.po
File diff suppressed because it is too large
View File

1454
locales/oc.po
File diff suppressed because it is too large
View File

1488
locales/pt.po
File diff suppressed because it is too large
View File

1365
locales/ro.po
File diff suppressed because it is too large
View File

1590
locales/ru.po
File diff suppressed because it is too large
View File

1391
locales/uk.po
File diff suppressed because it is too large
View File

1423
locales/zh.po
File diff suppressed because it is too large
View File

3
system/RPC.php

@ -88,9 +88,6 @@ class RPC
$result = array(); $result = array();
$bc = new Bootstrap;
$bc->loadLanguage();
// Preparing the parameters and calling the function. // Preparing the parameters and calling the function.
if(isset($request->params)) { if(isset($request->params)) {
$params = (array)$request->params; $params = (array)$request->params;

1
system/Sessionx.php

@ -155,7 +155,6 @@ class Sessionx {
'host', 'host',
'domain', 'domain',
'user', 'user',
'config',
'password', 'password',
'start') 'start')
) )

26
system/User.php

@ -35,19 +35,30 @@ class User {
$session = \Sessionx::start(); $session = \Sessionx::start();
if($session->active) { if($session->active) {
$this->username = $session->user.'@'.$session->host; $this->username = $session->user.'@'.$session->host;
if($session->config)
$this->config = $session->config;
$cd = new \Modl\ConfigDAO();
$config = $cd->get();
$this->sizelimit = (int)$config->sizelimit;
//$this->reload();
//$this->sizelimit = (int)$config->sizelimit;
$this->userdir = DOCUMENT_ROOT.'/users/'.$this->username.'/'; $this->userdir = DOCUMENT_ROOT.'/users/'.$this->username.'/';
$this->useruri = BASE_URI.'users/'.$this->username.'/'; $this->useruri = BASE_URI.'users/'.$this->username.'/';
} }
} }
/**
* @brief Reload the user configuration
*/
function reload()
{
$session = \Sessionx::start();
if($session->config) {
$this->config = $session->config;
$lang = $this->getConfig('language');
if(isset($lang)) {
loadLanguage($lang);
}
}
}
/** /**
* Get the current size in bytes of the user directory * Get the current size in bytes of the user directory
@ -131,6 +142,7 @@ class User {
{ {
$session = \Sessionx::start(); $session = \Sessionx::start();
$session->config = $config; $session->config = $config;
$this->reload();
} }
function getConfig($key = false) function getConfig($key = false)

2
themes/material/css/list.css

@ -158,7 +158,7 @@ ul li div.bubble {
background-color: #E5E5E5; background-color: #E5E5E5;
border-color: #E5E5E5; border-color: #E5E5E5;
word-break: break-all;
/*word-break: break-all;*/
} }
ul li div.bubble:after { ul li div.bubble:after {

Loading…
Cancel
Save