Browse Source

- Fix a some forgotten translations

- Move some JS sourcecode to clean JS files
pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
b55f42c291
  1. 2
      app/models/postn/Postn.php
  2. 6
      app/widgets/AdminMain/AdminMain.php
  3. 4
      app/widgets/AdminMain/locales.ini
  4. 2
      app/widgets/Api/Api.php
  5. 1
      app/widgets/Api/locales.ini
  6. 2
      app/widgets/Avatar/_avatar_form.tpl
  7. 2
      app/widgets/Blog/Blog.php
  8. 2
      app/widgets/Bookmark/_bookmark_list.tpl
  9. 10
      app/widgets/Bookmark/_bookmark_url_add.tpl
  10. 8
      app/widgets/Bookmark/bookmark.tpl
  11. 4
      app/widgets/Bookmark/locales.ini
  12. 4
      app/widgets/Chat/_chat_contact.tpl
  13. 1
      app/widgets/Chat/locales.ini
  14. 1
      app/widgets/Config/Config.php
  15. 21
      app/widgets/Config/config.js
  16. 21
      app/widgets/Config/config.tpl
  17. 10
      app/widgets/ContactAction/ContactAction.php
  18. 9
      app/widgets/ContactAction/locales.ini
  19. 32
      app/widgets/ContactCard/ContactCard.php
  20. 8
      app/widgets/Location/Location.php
  21. 7
      app/widgets/Location/locales.ini
  22. 4
      app/widgets/Location/location.tpl
  23. 2
      app/widgets/Media/Media.php
  24. 1
      app/widgets/Media/locales.ini
  25. 2
      app/widgets/NodeConfig/NodeConfig.php
  26. 1
      app/widgets/NodeConfig/locales.ini
  27. 2
      app/widgets/NodeConfig/nodeconfig.tpl
  28. 2
      app/widgets/NodeSubscriptions/NodeSubscriptions.php
  29. 1
      app/widgets/NodeSubscriptions/locales.ini
  30. 2
      app/widgets/Roster/Roster.php
  31. 2
      app/widgets/Roster/roster.tpl
  32. 2
      app/widgets/WidgetCommon/_submit_form.tpl
  33. 3
      locales/locales.ini

2
app/models/postn/Postn.php

@ -140,7 +140,7 @@ class Postn extends Model {
} else
$content = (string)$entry->entry->content;
} elseif($summary == '')
$content = t('Content not found');
$content = __('');
else
$content = '';

6
app/widgets/AdminMain/AdminMain.php

@ -67,9 +67,9 @@ class AdminMain extends WidgetBase
$this->view->assign('conf', $cd->get());
$this->view->assign('logs',
array(
0 => t('Empty'),
1 => t('Syslog'),
2 => t('Syslog and Files'))
0 => $this->__('log.empty'),
1 => $this->__('log.syslog'),
2 => $this->__('log.syslog_files'))
);
$this->view->assign('envs',
array(

4
app/widgets/AdminMain/locales.ini

@ -36,3 +36,7 @@ information.info1 = 'This message will be displayed on the login page'
information.info2 = "Leave this field blank if you don't want to show any message."
information.label = 'Information Message'
[log]
log.empty = 'Empty'
log.syslog = 'Syslog'
log.syslog_files = 'Syslog and files'

2
app/widgets/Api/Api.php

@ -69,7 +69,7 @@ class Api extends WidgetBase {
if(isset($json) && $json->status == 200) {
RPC::call('movim_reload_this');
Notification::appendNotification(t('Configuration updated'));
Notification::appendNotification($this->__('api.conf_updated'));
}
}

1
app/widgets/Api/locales.ini

@ -5,3 +5,4 @@ api.registered = 'Your pod is registered on the API'
api.wait = 'Your pod is not yet validated'
api.validated = 'Your pod is validated'
api.unregister = 'You asked to be removed from the API, this request will be processed in a couple of hours'
api.conf_updated = 'Configuration updated'

2
app/widgets/Avatar/_avatar_form.tpl

@ -37,7 +37,7 @@
onclick="
{$submit}
movim_button_save('#avatarvalidate');
this.value = '{$c->t('Submitting')}';
this.value = '{$c->__('button.submitting')}';
this.className='button color orange inactive oppose';"
class="button color green oppose"
id="avatarvalidate"

2
app/widgets/Blog/Blog.php

@ -44,7 +44,7 @@ class Blog extends WidgetCommon {
$this->view->assign('name', $messages[0]->getContact()->getTrueName());
$this->view->assign('feed', Route::urlize('feed',array($from, $node)));
} else {
$this->view->assign('title', t('Feed'));
$this->view->assign('title', $this->__('page.feed'));
}
$this->view->assign('posts', $this->preparePosts($messages, true));

2
app/widgets/Bookmark/_bookmark_list.tpl

@ -9,7 +9,7 @@
<li>
<a class="button color gray oppose"
title="{$c->t('Add a new Chat Room')}"
title="{$c->__('chatroom.add')}"
onclick="movim_toggle_display('#bookmarkmucadd')">
<i class="fa fa-plus"></i> {$c->__('button.add')}
</a>

10
app/widgets/Bookmark/_bookmark_url_add.tpl

@ -1,14 +1,14 @@
<div class="popup" id="bookmarkurladd">
<form name="bookmarkurladd">
<fieldset>
<legend>{$c->t('Add a new URL')}</legend>
<legend>{$c->__('url.add')}</legend>
<div id="bookmarkadderror"></div>
<div class="element large mini">
<input name="url" placeholder="{$c->t('URL')}"/>
<input name="url" placeholder="{$c->__('url.url')}"/>
</div>
<div class="element large mini">
<input name="name" placeholder="{$c->t('Name')}"/>
<input name="name" placeholder="{$c->t('url.name')}"/>
</div>
</fieldset>
<div class="menu">
@ -16,12 +16,12 @@
class="button icon yes black merged left"
onclick="{$submit}"
>
{$c->t('Add')}
{$c->__('button.add')}
</a><a
class="button icon no black merged right"
onclick="movim_toggle_display('#bookmarkurladd')"
>
{$c->t('Close')}
{$c->__('button.close')}
</a>
</div>
</form>

8
app/widgets/Bookmark/bookmark.tpl

@ -4,8 +4,6 @@
}
</script>
<!--<h2>{$c->t('Bookmarks')}</h2>-->
<div id="bookmarks">
{$preparebookmark}
</div>
@ -13,16 +11,16 @@
<div class="padded">
<a class="button color orange alone"
href="{$subscriptionconfig}"
title="{$c->t('Configure')}">
title="{$c->__('bookmarks.configure')}">
<i class="fa fa-gear"></i>
</a>
<!--<a class="button color icon link alone merged"
style="float: right;"
title="{$c->t('Add a new URL')}"
title="{$c->__('url.add')}"
onclick="movim_toggle_display('#bookmarkurladd')"></a>-->
<a class="button color blue alone oppose"
title="{$c->t('Refresh')}"
title="{$c->__('button.refresh')}"
onclick="{$getbookmark}">
<i class="fa fa-refresh"></i>
</a>

4
app/widgets/Bookmark/locales.ini

@ -9,3 +9,7 @@ chatroom.bad_id = 'Bad Chatroom ID'
chatroom.empty_name = 'Empty name'
bookmarks.updated = 'Bookmarks updated'
bookmarks.error = 'An error occured : '
bookmarks.configure = 'Configure'
url.add = 'Add a new URL'
url.url = 'URL'
url.name = 'Name'

4
app/widgets/Chat/_chat_contact.tpl

@ -11,8 +11,8 @@
</div>
<div class="messages" id="messages{$contact->jid}">
{$messageshtml}
<div style="display: none;" class="message composing" id="composing{$contact->jid}">{$c->t('Composing…')}</div>
<div style="display: none;" class="message composing" id="paused{$contact->jid}">{$c->t('Paused…')}</div>
<div style="display: none;" class="message composing" id="composing{$contact->jid}">{$c->__('message.composing')}</div>
<div style="display: none;" class="message composing" id="paused{$contact->jid}">{$c->__('message.paused')}</div>
</div>
<div class="text">

1
app/widgets/Chat/locales.ini

@ -1,5 +1,6 @@
message.published = 'Message Published'
message.encrypted = 'Encrypted message'
message.composing = 'Composing...'
chat.attention = '%s needs your attention'
chatroom.connected = 'Connected to the chatroom'
chatroom.disconnected = 'Disconnected from the chatroom'

1
app/widgets/Config/Config.php

@ -26,6 +26,7 @@ class Config extends WidgetBase
function load()
{
$this->addjs('color/jscolor.js');
$this->addjs('config.js');
$this->registerEvent('config', 'onConfig');
/* We load the user configuration */

21
app/widgets/Config/config.js

@ -0,0 +1,21 @@
movim_add_onload(function() {
document.querySelector('form #nav_color a[type=button]').onclick = function() {
document.querySelector('input[name=color]').value = '32434D';
}
document.querySelector('form #nav_color input[name=color]').onchange = function() {
document.querySelector('nav').style.backgroundColor = '#'+this.value;
}
document.querySelector('form #font_size a[type=button]').onclick = function() {
console.log('gna');
var slide = document.querySelector('input[name=size]');
slide.value = 14;
slide.onchange();
}
document.querySelector('form #font_size input[name=size]').onchange = function() {
document.body.style.fontSize = this.value+'px';
document.querySelector('#currentsize').innerHTML = this.value+'px';
}
});

21
app/widgets/Config/config.tpl

@ -33,13 +33,10 @@
<fieldset>
<legend>{$c->__('config.appearence')}</legend>
<div class="element">
<div class="element" id="nav_color">
<label for="color"><i class="fa fa-adjust"></i> {$c->__('config.background_color')}</label>
<a
type="button"
onclick="
document.querySelector('input[name=color]').value = '32434D';
document.body.style.backgroundColor = '#32434D';"
type="button"
style="width: 45%; float: right;"
class="button icon color purple back">
{$c->__('button.reset')}
@ -48,7 +45,6 @@
style="box-shadow: none; width: 50%; float: left;"
name="color"
class="color"
onchange="document.body.style.backgroundColor = '#'+this.value;"
value="
{if="isset($color)"}
{$color}
@ -58,14 +54,10 @@
">
</div>
<div class="element">
<div class="element" id="font_size">
<label for="size"><i class="fa fa-font"></i> {$c->__('config.font_size')}</label>
<a
type="button"
onclick="
var slide = document.querySelector('input[name=size]')
slide.value = 14;
slide.onchange();"
type="button"
style="width: 30%; float: right;"
class="button icon color purple back">
{$c->__('button.reset')}
@ -87,10 +79,7 @@
"
name="size"
style="width: 45%;"
onchange="
document.body.style.fontSize = this.value+'px';
document.querySelector('#currentsize').innerHTML = this.value+'px'";
/>
/>
16
</span>
<span id="currentsize">

10
app/widgets/ContactAction/ContactAction.php

@ -66,7 +66,7 @@ class ContactAction extends WidgetCommon
if($c->jid != $this->user->getLogin()) {
$presences = getPresences();
$html .='<h2>'.$this->__('title').'</h2>';
$html .='<h2>'.$this->__('action.title').'</h2>';
$ptoc = array(
1 => 'green',
@ -82,7 +82,7 @@ class ContactAction extends WidgetCommon
id="friendchat"
onclick="'.$this->genCallWidget("Chat","ajaxOpenTalk", "'".$c->jid."'").'"
>
<i class="fa fa-comment"></i> '.$presences[(int)$c->value].' - '.$this->__('chat').'
<i class="fa fa-comment"></i> '.$presences[(int)$c->value].' - '.$this->__('action.chat').'
</a>';
}
}
@ -99,7 +99,7 @@ class ContactAction extends WidgetCommon
this.style.display = \'none\'
"
>
<i class="fa fa-minus"></i> '.t('Remove this contact').'
<i class="fa fa-minus"></i> '.$this->__('action.remove').'
</a>
<a
@ -132,7 +132,7 @@ class ContactAction extends WidgetCommon
<i class="fa fa-times"></i> '.__('button.no').'
</a>';
} elseif($_GET['f'] != $this->user->getLogin()) {
$html .='<h2>'.$this->__('actions').'</h2>';
$html .='<h2>'.$this->__('action.actions').'</h2>';
$html .='
<a
@ -144,7 +144,7 @@ class ContactAction extends WidgetCommon
$this->genCallAjax("ajaxSubscribeContact", "'".$_GET['f']."'").
'this.className=\'button color purple icon loading merged left\'; setTimeout(function() {location.reload(false)}, 3000);"
>
<i class="fa fa-plus"></i> '.$this->__('invite').'
<i class="fa fa-plus"></i> '.$this->__('action.invite').'
</a>';
}

9
app/widgets/ContactAction/locales.ini

@ -1,4 +1,5 @@
title = 'Actions'
chat = 'Chat'
actions = 'Actions'
invite = 'Invite this user'
action.title = 'Actions'
action.chat = 'Chat'
action.actions = 'Actions'
action.invite = 'Invite this user'
action.remove = 'Remove this contact'

32
app/widgets/ContactCard/ContactCard.php

@ -24,7 +24,7 @@ class ContactCard extends WidgetCommon
function load()
{
$this->addcss('contactcard.css');
$this->registerEvent('vcard', 'onVcard');
$this->registerEven$this->__('vcard', 'onVcard');
}
function display()
@ -48,49 +48,49 @@ class ContactCard extends WidgetCommon
$html .= '
<form name="vcard" id="vcardform">
<h1>'.t('Profile').'</h1>
<h1>'.$this->__('Profile').'</h1>
<fieldset>
<legend>'.t('General Informations').'</legend>';
<legend>'.$this->__('general.legend').'</legend>';
if($this->testIsSet($contact->fn))
$html .= '<div class="element simple">
<label for="fn">'.t('Name').'</label>
<label for="fn">'.$this->__('general.name').'</label>
<span>'.$contact->fn.'</span>
</div>';
if($this->testIsSet($contact->name))
$html .= '<div class="element simple">
<label for="name">'.t('Nickname').'</label>
<label for="name">'.$this->__('general.nickname').'</label>
<span>'.$contact->name.'</span>
</div>';
if(strtotime($contact->date) != 0)
$html .= '<div class="element simple">
<label for="day">'.t('Date of Birth').'</label>
<label for="day">'.$this->__('general.date_of_birth').'</label>
<span>'.prepareDate(strtotime($contact->date), false).'</span>
</div>';
if($contact->gender != 'N' && $this->testIsSet($contact->gender))
$html .= '<div class="element simple">
<label for="gender">'.t('Gender').'</label>
<label for="gender">'.$this->__('general.gender').'</label>
<span>'.$gender[(string)$contact->gender].'</span>
</div>';
if($contact->marital != 'none' && $this->testIsSet($contact->marital))
$html .= '<div class="element simple">
<label for="marital">'.t('Marital Status').'</label>
<label for="marital">'.$this->__('general.marital').'</label>
<span>'.$marital[(string)$contact->marital].'</span>
</div>';
if($this->testIsSet($contact->email)) {
if(filter_var($contact->email, FILTER_VALIDATE_EMAIL)) {
$html .= '<div class="element simple">
<label for="url">'.t('Email').'</label>
<label for="url">'.$this->__('general.email').'</label>
<img src="'.$contact->getPhoto('email').'"/>
</div>';
} else {
$html .= '<div class="element simple">
<label for="url">'.t('Email').'</label>
<label for="url">'.$this->__('general.email').'</label>
'.$contact->email.'
</div>';
}
@ -99,12 +99,12 @@ class ContactCard extends WidgetCommon
if($this->testIsSet($contact->url)) {
if(filter_var($contact->url, FILTER_VALIDATE_URL)) {
$html .= '<div class="element simple">
<label for="url">'.t('Website').'</label>
<label for="url">'.$this->__('general.legend').'</label>
<a target="_blank" href="'.$contact->url.'">'.$contact->url.'</a>
</div>';
} else {
$html .= '<div class="element simple">
<label for="url">'.t('Website').'</label>
<label for="url">'.$this->__('general.legend').'</label>
'.$contact->url.'
</div>';
}
@ -112,7 +112,7 @@ class ContactCard extends WidgetCommon
if($this->testIsSet($contact->description) && prepareString($contact->description) != '')
$html .= '<div class="element large simple">
<label for="desc">'.t('About Me').'</label>
<label for="desc">'.$this->__('general.about').'</label>
<span style="white-space: pre-wrap;">'.prepareString($contact->description).'</span>
</div>';
@ -121,11 +121,11 @@ class ContactCard extends WidgetCommon
$html .= '</fieldset>
<br />
<fieldset>
<legend>'.t('Geographic Position').'</legend>';
<legend>'.$this->__('position.legend').'</legend>';
if($this->testIsSet($contact->adrlocality)) {
$locality = '<div class="element simple">
<label for="adrlocality">'.t('Locality').'</label>
<label for="adrlocality">'.$this->__('position.locality').'</label>
<span>'.$contact->adrlocality;
if($contact->adrpostalcode != 0)
$locality .= ' ('.$contact->adrpostalcode.')';
@ -137,7 +137,7 @@ class ContactCard extends WidgetCommon
if($this->testIsSet($contact->adrcountry))
$html .= '<div class="element simple">
<label for="adrcountry">'.t('Country').'</label>
<label for="adrcountry">'.$this->__('position.coutry').'</label>
<span>'.$contact->adrcountry.'</span>
</div>';
}

8
app/widgets/Location/Location.php

@ -53,7 +53,7 @@ class Location extends WidgetBase
->setGeo($geo)
->request();
} else {
Notification::appendNotification($this->__('wrong_postition'), 'error');
Notification::appendNotification($this->__('location.wrong_postition'), 'error');
}
}
@ -62,7 +62,7 @@ class Location extends WidgetBase
$html = $me->getPlace();
RPC::call('movim_fill', 'mapdata', $html);
Notification::appendNotification($this->__('updated'), 'success');
Notification::appendNotification($this->__('location.updated'), 'success');
RPC::commit();
}
@ -100,14 +100,14 @@ class Location extends WidgetBase
class="button color green"
style="margin-top: 1em;"
onclick="getMyPosition(); this.style.display = \'none\';">
<i class="fa fa-compass"></i> '.t('Update my position').'
<i class="fa fa-compass"></i> '.$this->__('location.update').'
</a>
<a
id="mypossubmit"
style="display: none; margin-top: 1em; float: right;"
class="button color green merged left"
onclick="'.$submit.' hidePositionChoice();">
<i class="fa fa-check"></i> '.t('Accept').'</a>
<i class="fa fa-check"></i> '.$this->__('button.accept').'</a>
</div>';
return $html;

7
app/widgets/Location/locales.ini

@ -1,3 +1,4 @@
title = 'Location'
wrong_postition = 'Wrong position'
updated = 'Location updated'
location.title = 'Location'
location.wrong_postition = 'Wrong position'
location.updated = 'Location updated'
location.update = 'Update my position'

4
app/widgets/Location/location.tpl

@ -1,8 +1,8 @@
<div class="tabelem padded" title="{$c->__('title')}" id="location" >
<div class="tabelem padded" title="{$c->__('location.title')}" id="location" >
<div class="protect orange" title="{function="getFlagTitle("orange")"}"></div>
<form>
<fieldset>
<legend{$c->__('title')}</legend>
<legend{$c->__('location.title')}</legend>
<div class="clear"></div>
{$c->prepareProfileData()}
</fieldset>

2
app/widgets/Media/Media.php

@ -92,7 +92,7 @@ class Media extends WidgetBase {
$html =
$this->listFiles().'
<span class="size"
title="'.sizeToCleanSize($this->user->dirSize()).' '.t('on').' '.sizeToCleanSize($this->user->sizelimit).'"
title="'.sizeToCleanSize($this->user->dirSize()).' '.$this->__('media.on').' '.sizeToCleanSize($this->user->sizelimit).'"
>'.
$percent.'%
</span>';

1
app/widgets/Media/locales.ini

@ -7,3 +7,4 @@ media.camera = 'Camera'
media.artist = 'Artist'
media.original = 'Original'
media.link = 'Link'
media.on = 'on'

2
app/widgets/NodeConfig/NodeConfig.php

@ -57,7 +57,7 @@ class NodeConfig extends WidgetBase
'.$this->__('group.delete_return', $server).'
</a><br /><br />';
Notification::appendNotification(t('Group deleted'), 'success');
Notification::appendNotification($this->__('group.deleted'), 'success');
RPC::call('movim_fill', 'handlingmessages', $html);
RPC::commit();
}

1
app/widgets/NodeConfig/locales.ini

@ -1,4 +1,5 @@
group.config = 'Configure your group'
group.config_saved = 'Group configuration saved'
group.delete = 'Delete this group'
group.deleted = 'Group deleted'
group.delete_return = "Return to %s's list of groups"

2
app/widgets/NodeConfig/nodeconfig.tpl

@ -10,7 +10,7 @@
</a>
<a>{$c->__('page.configuration')}</a>
</div>
<div class="tabelem" title="{$c->t('Configuration')}" id="groupconfig">
<div class="tabelem" title="{$c->__('page.configuration')}" id="groupconfig">
<h1 class="paddedtopbottom"><i class="fa fa-sliders"></i> {$c->__('page.configuration')}</h1>
<div id="groupconfiguration" class="paddedtop">

2
app/widgets/NodeSubscriptions/NodeSubscriptions.php

@ -70,7 +70,7 @@ class NodeSubscriptions extends WidgetBase
}
function onSubmit($stanza) {
Notification::appendNotification(t('Subscriptions saved'), 'success');
Notification::appendNotification($this->__('subscriptions.saved'), 'success');
RPC::commit();
}

1
app/widgets/NodeSubscriptions/locales.ini

@ -1,3 +1,4 @@
subscriptions.title = 'Manage your subscriptions'
subscriptions.info = 'Manage the subscriptions'
subscriptions.get = 'Get the subscriptions'
subscriptions.saved = 'Subscriptions saved'

2
app/widgets/Roster/Roster.php

@ -63,7 +63,7 @@ class Roster extends WidgetBase
$html = $this->prepareContact($c, $this->getCaps());
if($c[0]->groupname == null)
$group = t('Ungrouped');
$group = $this->__('roster.ungrouped');
else
$group = $c[0]->groupname;

2
app/widgets/Roster/roster.tpl

@ -67,7 +67,7 @@
<li
onclick="{$toggle_cache}"
title="{$c->t('Show/Hide')}">
title="{$c->__('roster.show_hide')}">
<a class="users" href="#"></a>
</li>

2
app/widgets/WidgetCommon/_submit_form.tpl

@ -39,7 +39,7 @@
<a
class="button color icon no"
onclick="movim_toggle_display('#galleryselect');"
>{$c->t('Close')}</a>
>{$c->__('button.close')}</a>
</div>
</div>
<table id="feedsubmitform">

3
locales/locales.ini

@ -60,6 +60,7 @@ button.close = 'Close'
button.update = 'Update'
button.updating = 'Updating'
button.submit = 'Submit'
button.submitting = 'Submitting'
button.reset = 'Reset'
button.register = 'Register'
button.unregister = 'Unregister'
@ -71,6 +72,7 @@ button.connecting = 'Connecting...'
button.yes = 'Yes'
button.no = 'No'
button.return = 'Return'
button.accept = 'Accept'
[step]
step.step = 'Step %s'
@ -261,6 +263,7 @@ post.share_everyone = 'Everyone'
post.share_your_contacts= 'Your contacts'
post.delete = 'Delete this post'
post.updated = 'Updated'
post.content_not_found = 'Content not found'
[api]
api.error = 'The API is not reachable, try again later'
Loading…
Cancel
Save