Changeset 8996
- Timestamp:
- 05/16/08 09:56:25 (4 months ago)
- Files:
-
- plugins/sfSimpleForumPlugin/trunk/README (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/i18n (added)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_add_post_form.php (modified) (3 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_author.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_figures.php (modified) (2 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_forum.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_latestPosts.php (modified) (2 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_post_moderator_actions.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_topic.php (modified) (3 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_topic_list.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_topic_moderator_actions.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/createTopicSuccess.php (modified) (2 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/forumLatestPostsSuccess.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/forumListSuccess.php (modified) (2 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/forumSuccess.php (modified) (2 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/latestPostsSuccess.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/latestTopicsSuccess.php (modified) (2 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/topicSuccess.php (modified) (5 diffs)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/userLatestPostsSuccess.php (modified) (1 diff)
- plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/userLatestTopicsSuccess.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSimpleForumPlugin/trunk/README
r7653 r8996 219 219 }}} 220 220 221 === I18N === 222 223 You can write own translations for this plugin by providing an `sfSimpleForum.XX.xml` file, whereas xx is the locale. 224 If you are upgrading from version 0.6.5 or earlier and created a `messages.xx.xml` file for your translation, you need to rename it. 225 221 226 == TODO == 222 227 plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_add_post_form.php
r5356 r8996 8 8 9 9 <?php echo form_error('title') ?> 10 <?php echo label_for('title', __('Title' )) ?>10 <?php echo label_for('title', __('Title', null, 'sfSimpleForum')) ?> 11 11 <?php echo input_tag('title', '', 'id=topic_title') ?> 12 12 <?php if (isset($forum)): ?> 13 13 <?php echo input_hidden_tag('forum_name', $forum->getStrippedName()) ?> 14 14 <?php else: ?> 15 <?php echo label_for('forum', __('Forum' )) ?>15 <?php echo label_for('forum', __('Forum', null, 'sfSimpleForum')) ?> 16 16 <?php echo select_tag('forum_name', options_for_select(sfSimpleForumForumPeer::getAllAsArray())) ?> 17 17 <?php endif; ?> … … 20 20 21 21 <?php echo form_error('body') ?> 22 <?php echo label_for('body', __('Body' )) ?>22 <?php echo label_for('body', __('Body', null, 'sfSimpleForum')) ?> 23 23 <?php echo textarea_tag('body', '', 'id=topic_body') ?> 24 24 … … 26 26 <div class="option"> 27 27 <?php echo checkbox_tag('is_sticked', '1')?> 28 <?php echo label_for('is_sticked', __('Sticked topic' )) ?>28 <?php echo label_for('is_sticked', __('Sticked topic', null, 'sfSimpleForum')) ?> 29 29 </div> 30 30 <div class="option"> 31 31 <?php echo checkbox_tag('is_locked', '1')?> 32 <?php echo label_for('is_locked', __('Locked topic' )) ?>32 <?php echo label_for('is_locked', __('Locked topic', null, 'sfSimpleForum')) ?> 33 33 </div> 34 34 <?php endif; ?> 35 35 36 <?php echo submit_tag(__('Post' ), 'id=topic_submit') ?>36 <?php echo submit_tag(__('Post', null, 'sfSimpleForum'), 'id=topic_submit') ?> 37 37 38 38 </form> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_author.php
r6132 r8996 4 4 <?php echo link_to(get_partial('sfSimpleForum/author_name', array('author' => $author, 'sf_cache_key' => $author_name)), 'sfSimpleForum/userLatestPosts?username='.$author_name) ?><br/> 5 5 <?php if ($author->hasPermission('moderator')): ?> 6 <?php echo __('Moderator' ) ?><br/>6 <?php echo __('Moderator', null, 'sfSimpleForum') ?><br/> 7 7 <?php endif ?> 8 <?php echo format_number_choice('[1]1 message|(1,+Inf] %1% messages', array('%1%' => $nb_posts), $nb_posts ) ?><br />8 <?php echo format_number_choice('[1]1 message|(1,+Inf] %1% messages', array('%1%' => $nb_posts), $nb_posts, 'sfSimpleForum') ?><br /> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_figures.php
r5293 r8996 9 9 <?php echo link_to_if( 10 10 $display_topic_link, 11 format_number_choice('[0]No topic yet|[1]One topic|(1,+Inf]%topics% topics', array('%topics%' => $nb_topics), $nb_topics ),11 format_number_choice('[0]No topic yet|[1]One topic|(1,+Inf]%topics% topics', array('%topics%' => $nb_topics), $nb_topics, 'sfSimpleForum'), 12 12 $topic_rule 13 13 ) ?>, … … 15 15 <?php echo link_to_if( 16 16 $display_post_link, 17 format_number_choice('[0]No message|[1]One message|(1,+Inf]%posts% messages', array('%posts%' => $nb_posts), $nb_posts ),17 format_number_choice('[0]No message|[1]One message|(1,+Inf]%posts% messages', array('%posts%' => $nb_posts), $nb_posts, 'sfSimpleForum'), 18 18 $post_rule 19 19 ) ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_forum.php
r6629 r8996 14 14 '%date%' => distance_of_time_in_words($latest_post->getCreatedAt('U')), 15 15 '%author%' => link_to(get_partial('sfSimpleForum/author_name', array('author' => $latest_post->getAuthorName(), 'sf_cache_key' => $latest_post->getAuthorName())), 'sfSimpleForum/userLatestPosts?username='.$latest_post->getAuthorName()) 16 ) ) ?>16 ), 'sfSimpleForum') ?> 17 17 <?php endif ;?> 18 18 </td> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_latestPosts.php
r5070 r8996 1 1 <?php echo use_helper('I18N', 'Date') ?> 2 2 <div class="forum_sidebar_block"> 3 <h2><?php echo __('Recent posts' ) ?></h2>3 <h2><?php echo __('Recent posts', null, 'sfSimpleForum') ?></h2> 4 4 <ol> 5 5 <?php foreach ($posts as $post): ?> … … 9 9 '%date%' => distance_of_time_in_words($post->getCreatedAt('U')), 10 10 '%author%' => link_to($post->getAuthorName(), 'sfSimpleForum/latestUserPosts?username='.$post->getAuthorName()) 11 ) ) ?>11 ), 'sfSimpleForum') ?> 12 12 </li> 13 13 <?php endforeach; ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_post_moderator_actions.php
r5317 r8996 1 1 <?php echo use_helper('I18N') ?> 2 2 <ul class="post_actions"> 3 <li><?php echo link_to(__('Delete' ), 'sfSimpleForum/deletePost?id='.$post->getId(), array('confirm' =>__('Are you sure you want to delete this post?'))) ?></li>3 <li><?php echo link_to(__('Delete', null, 'sfSimpleForum'), 'sfSimpleForum/deletePost?id='.$post->getId(), array('confirm' =>__('Are you sure you want to delete this post?', null, 'sfSimpleForum'))) ?></li> 4 4 </ul> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_topic.php
r5414 r8996 6 6 <?php echo image_tag('/sfSimpleForumPlugin/images/note.png', array( 7 7 'align' => 'absbottom', 8 'alt' => __('Sticked topic' ),9 'title' => __('Sticked topic' )8 'alt' => __('Sticked topic', null, 'sfSimpleForum'), 9 'title' => __('Sticked topic', null, 'sfSimpleForum') 10 10 )) ?> 11 11 <?php endif; ?> … … 13 13 <?php echo image_tag('/sfSimpleForumPlugin/images/lock.png', array( 14 14 'align' => 'absbottom', 15 'alt' => __('Locked topic' ),16 'title' => __('Locked topic' )15 'alt' => __('Locked topic', null, 'sfSimpleForum'), 16 'title' => __('Locked topic', null, 'sfSimpleForum') 17 17 )) ?> 18 18 <?php endif; ?> … … 54 54 55 55 <td class="thread_recent"> 56 <?php $message_link = $topic->getNbReplies() ? __('Last reply' ) : __('Posted') ?>56 <?php $message_link = $topic->getNbReplies() ? __('Last reply', null, 'sfSimpleForum') : __('Posted', null, 'sfSimpleForum') ?> 57 57 <?php $latest_post = $topic->getsfSimpleForumPost() ?> 58 58 <?php echo $message_link . ' ' . __('%date% ago by %author%', array( 59 59 '%date%' => distance_of_time_in_words($latest_post->getCreatedAt('U')), 60 60 '%author%' => link_to(get_partial('sfSimpleForum/author_name', array('author' => $latest_post->getAuthorName(), 'sf_cache_key' => $latest_post->getAuthorName())), 'sfSimpleForum/userLatestPosts?username='.$latest_post->getAuthorName()) 61 ) ) ?>61 ), 'sfSimpleForum') ?> 62 62 63 63 <?php if ($topic->getNbReplies()): ?> 64 (<?php echo link_to(__('view' ), 'sfSimpleForum/post?id='.$topic->getLatestPostId()) ?>)64 (<?php echo link_to(__('view', null, 'sfSimpleForum'), 'sfSimpleForum/post?id='.$topic->getLatestPostId()) ?>) 65 65 <?php endif; ?> 66 66 plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_topic_list.php
r5356 r8996 1 1 <table id="threads"> 2 2 <tr> 3 <th class="thread_name"><?php echo __('Topic' ) ?></th>4 <th class="thread_replies"><?php echo __('Replies' ) ?></th>3 <th class="thread_name"><?php echo __('Topic', null, 'sfSimpleForum') ?></th> 4 <th class="thread_replies"><?php echo __('Replies', null, 'sfSimpleForum') ?></th> 5 5 <?php if (sfConfig::get('app_sfSimpleForumPlugin_count_views', true)): ?> 6 <th class="thread_replies"><?php echo __('Views' ) ?></th>6 <th class="thread_replies"><?php echo __('Views', null, 'sfSimpleForum') ?></th> 7 7 <?php endif; ?> 8 <th class="thread_recent"><?php echo __('Last Message' ) ?></th>8 <th class="thread_recent"><?php echo __('Last Message', null, 'sfSimpleForum') ?></th> 9 9 </tr> 10 10 <?php foreach ($topics as $topic): ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/_topic_moderator_actions.php
r5356 r8996 2 2 <?php if ($user_is_moderator): ?> 3 3 <ul class="post_actions"> 4 <li><?php echo link_to(__('Delete' ), 'sfSimpleForum/deleteTopic?id='.$topic->getId(), array('confirm' =>__('Are you sure you want to delete this topic?'))) ?></li>4 <li><?php echo link_to(__('Delete', null, 'sfSimpleForum'), 'sfSimpleForum/deleteTopic?id='.$topic->getId(), array('confirm' =>__('Are you sure you want to delete this topic?', null, 'sfSimpleForum'))) ?></li> 5 5 </ul> 6 6 <?php endif ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/createTopicSuccess.php
r5356 r8996 5 5 <?php if ($forum): ?> 6 6 <?php echo forum_breadcrumb(array( 7 array(__(sfConfig::get('app_sfSimpleForumPlugin_forum_name', 'Forums') ), 'sfSimpleForum/forumList'),7 array(__(sfConfig::get('app_sfSimpleForumPlugin_forum_name', 'Forums'), null, 'sfSimpleForum'), 'sfSimpleForum/forumList'), 8 8 array($forum->getName(), 'sfSimpleForum/forum?forum_name='.$forum->getStrippedName()), 9 __('New topic' )9 __('New topic', null, 'sfSimpleForum') 10 10 )) ?> 11 11 <?php else: ?> 12 12 <?php echo forum_breadcrumb(array( 13 13 array(__(sfConfig::get('app_sfSimpleForumPlugin_forum_name', 'Forums')), 'sfSimpleForum/forumList'), 14 __('New topic' )14 __('New topic', null, 'sfSimpleForum') 15 15 )) ?> 16 16 <?php endif; ?> … … 20 20 <div class="sfSimpleForum"> 21 21 22 <h1><?php echo __('Create a new topic' ) ?></h1>22 <h1><?php echo __('Create a new topic', null, 'sfSimpleForum') ?></h1> 23 23 24 24 <?php include_partial('sfSimpleForum/add_post_form', array('forum' => $forum)) ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/forumLatestPostsSuccess.php
r5356 r8996 1 1 <?php use_helper('I18N', 'Pagination', 'sfSimpleForum') ?> 2 <?php $title = __('Latest messages' ) ?>2 <?php $title = __('Latest messages', null, 'sfSimpleForum') ?> 3 3 4 4 <?php if (sfConfig::get('app_sfSimpleForum_include_breadcrumb', true)): ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/forumListSuccess.php
r8029 r8996 15 15 <?php if (sfConfig::get('app_sfSimpleForumPlugin_allow_new_topic_outside_forum', true)): ?> 16 16 <ul class="forum_actions"> 17 <li><?php echo link_to(__('New topic' ), 'sfSimpleForum/createTopic') ?></li>17 <li><?php echo link_to(__('New topic', null, 'sfSimpleForum'), 'sfSimpleForum/createTopic') ?></li> 18 18 </ul> 19 19 <?php endif; ?> … … 33 33 <table id="fora"> 34 34 <tr> 35 <th class="forum_name"><?php echo __('Forum' ) ?></th>36 <th class="forum_threads"><?php echo __('Topics' ) ?></th>37 <th class="forum_posts"><?php echo __('Messages' ) ?></th>38 <th class="forum_recent"><?php echo __('Last Message' ) ?></th>35 <th class="forum_name"><?php echo __('Forum', null, 'sfSimpleForum') ?></th> 36 <th class="forum_threads"><?php echo __('Topics', null, 'sfSimpleForum') ?></th> 37 <th class="forum_posts"><?php echo __('Messages', null, 'sfSimpleForum') ?></th> 38 <th class="forum_recent"><?php echo __('Last Message', null, 'sfSimpleForum') ?></th> 39 39 </tr> 40 40 <?php foreach ($forums as $forum): ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/forumSuccess.php
r7652 r8996 15 15 16 16 <ul class="forum_actions"> 17 <li><?php echo link_to(__('New topic' ), 'sfSimpleForum/createTopic?forum_name='.$forum->getStrippedName()) ?></li>17 <li><?php echo link_to(__('New topic', null, 'sfSimpleForum'), 'sfSimpleForum/createTopic?forum_name='.$forum->getStrippedName()) ?></li> 18 18 </ul> 19 19 … … 35 35 <?php echo pager_navigation($topic_pager, 'sfSimpleForum/forum?forum_name='.$forum->getStrippedName()) ?> 36 36 <?php else: ?> 37 <p><?php echo __('There is no topic in this discussion yet. Perhaps you would like to %start%?', array('%start%' => link_to(__('start a new one' ), 'sfSimpleForum/createTopic?forum_name='.$forum->getStrippedName()))) ?></p>37 <p><?php echo __('There is no topic in this discussion yet. Perhaps you would like to %start%?', array('%start%' => link_to(__('start a new one', null, 'sfSimpleForum'), 'sfSimpleForum/createTopic?forum_name='.$forum->getStrippedName())), 'sfSimpleForum') ?></p> 38 38 <?php endif; ?> 39 39 plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/latestPostsSuccess.php
r5356 r8996 1 1 <?php use_helper('I18N', 'Pagination', 'sfSimpleForum') ?> 2 <?php $title = __('Latest messages' ) ?>2 <?php $title = __('Latest messages', null, 'sfSimpleForum') ?> 3 3 4 4 <?php if (sfConfig::get('app_sfSimpleForum_include_breadcrumb', true)): ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/latestTopicsSuccess.php
r5293 r8996 1 1 <?php use_helper('I18N', 'Pagination', 'sfSimpleForum') ?> 2 <?php $title = __('Latest topics' ) ?>2 <?php $title = __('Latest topics', null, 'sfSimpleForum') ?> 3 3 4 4 <?php if (sfConfig::get('app_sfSimpleForum_include_breadcrumb', true)): ?> … … 17 17 <?php if (sfConfig::get('app_sfSimpleForumPlugin_allow_new_topic_outside_forum', true)): ?> 18 18 <ul class="forum_actions"> 19 <li><?php echo link_to(__('New topic' ), 'sfSimpleForum/createTopic') ?></li>19 <li><?php echo link_to(__('New topic', null, 'sfSimpleForum'), 'sfSimpleForum/createTopic') ?></li> 20 20 </ul> 21 21 <?php endif; ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/topicSuccess.php
r5356 r8996 24 24 <?php if ($sf_user->hasCredential('moderator')): ?> 25 25 <li><?php echo link_to( 26 $topic->getIsSticked() ? __('Unstick' ) : __('Stick'),26 $topic->getIsSticked() ? __('Unstick', null, 'sfSimpleForum') : __('Stick', null, 'sfSimpleForum'), 27 27 'sfSimpleForum/toggleStick?id='.$topic->getId() 28 28 ) ?></li> 29 29 <li><?php echo link_to( 30 $topic->getIsLocked() ? __('Unlock' ) : __('Lock'),30 $topic->getIsLocked() ? __('Unlock', null, 'sfSimpleForum') : __('Lock', null, 'sfSimpleForum'), 31 31 'sfSimpleForum/toggleLock?id='.$topic->getId() 32 32 ) ?></li> … … 35 35 36 36 <div class="forum_figures"> 37 <?php echo format_number_choice('[1]1 message, no reply|(1,+Inf]%posts% messages', array('%posts%' => $post_pager->getNbResults()), $post_pager->getNbResults() ) ?>37 <?php echo format_number_choice('[1]1 message, no reply|(1,+Inf]%posts% messages', array('%posts%' => $post_pager->getNbResults()), $post_pager->getNbResults(), 'sfSimpleForum') ?> 38 38 <?php if (sfConfig::get('app_sfSimpleForumPlugin_count_views', true)): ?> 39 - <?php echo format_number_choice('[0,1]1 view|(1,+Inf]%views% views', array('%views%' => $topic->getNbViews()), $topic->getNbViews() ) ?>39 - <?php echo format_number_choice('[0,1]1 view|(1,+Inf]%views% views', array('%views%' => $topic->getNbViews()), $topic->getNbViews(), 'sfSimpleForum') ?> 40 40 <?php endif; ?> 41 41 <?php if(sfConfig::get('app_sfSimpleForumPlugin_use_feeds', true)): ?> … … 51 51 52 52 <h2> 53 <?php echo __('Post a reply' ) ?>53 <?php echo __('Post a reply', null, 'sfSimpleForum') ?> 54 54 </h2> 55 55 <?php include_partial('sfSimpleForum/add_post_form', array('topic' => $topic)) ?> … … 59 59 <ul class="forum_actions"> 60 60 <li><?php echo link_to( 61 __('Post a reply' ),61 __('Post a reply', null, 'sfSimpleForum'), 62 62 sfConfig::get('sf_login_module').'/'.sfConfig::get('sf_login_action') 63 63 ) ?></li> … … 66 66 <?php elseif ($topic->getIsLocked() && $sf_user->isAuthenticated()): ?> 67 67 68 <?php echo __('This topic was locked by a forum moderator. No reply can be added.' ) ?>68 <?php echo __('This topic was locked by a forum moderator. No reply can be added.', null, 'sfSimpleForum') ?> 69 69 70 70 <?php endif; ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/userLatestPostsSuccess.php
r5414 r8996 1 1 <?php use_helper('I18N', 'Pagination', 'sfSimpleForum') ?> 2 <?php $title = __('Messages by %user%', array('%user%' => get_partial('sfSimpleForum/author_name', array('author' => $user, 'sf_cache_key' => $username))) ) ?>2 <?php $title = __('Messages by %user%', array('%user%' => get_partial('sfSimpleForum/author_name', array('author' => $user, 'sf_cache_key' => $username))), 'sfSimpleForum') ?> 3 3 4 4 <?php if (sfConfig::get('app_sfSimpleForum_include_breadcrumb', true)): ?> plugins/sfSimpleForumPlugin/trunk/modules/sfSimpleForum/templates/userLatestTopicsSuccess.php
r5414 r8996 1 1 <?php use_helper('I18N', 'Pagination', 'sfSimpleForum') ?> 2 <?php $title = __('Topics by %user%', array('%user%' => get_partial('sfSimpleForum/author_name', array('author' => $user, 'sf_cache_key' => $username))) ) ?>2 <?php $title = __('Topics by %user%', array('%user%' => get_partial('sfSimpleForum/author_name', array('author' => $user, 'sf_cache_key' => $username))), 'sfSimpleForum') ?> 3 3 4 4 <?php if (sfConfig::get('app_sfSimpleForum_include_breadcrumb', true)): ?> … … 17 17 <?php if (sfConfig::get('app_sfSimpleForumPlugin_allow_new_topic_outside_forum', true)): ?> 18 18 <ul class="forum_actions"> 19 <li><?php echo link_to(__('New topic' ), 'sfSimpleForum/createTopic') ?></li>19 <li><?php echo link_to(__('New topic', null, 'sfSimpleForum'), 'sfSimpleForum/createTopic') ?></li> 20 20 </ul> 21 21 <?php endif; ?>