プロジェクト

全般

プロフィール

Bug(バグ) #2896

Yuya Watanabe約12年前に更新

h3. Overview (現象)

携帯版トピックリストページでトピックが存在しない場合、英語で表示される

h3. Environment (再現バージョン)

OpenPNE3.6.2
opCommunityTopicPlugin1.0.3.1

h3. Way to repro (再現手順)

1. コミュニティを作成する
2. 手順1 で作成したコミュニティにトピック作成する
3. トピックリストページ(/communityTopic/listCommunity/コミュニティID)にアクセスする
4. 別ブラウザで手順2 で作成したコミュニティトピックを削除する
5. トピックリストページ(/communityTopic/listCommunity/コミュニティID)でページ更新する
6. 「There are no topics」と英語で表示される

!2896.jpeg!

h3. Way to fix (修正内容)

「トピックがありません。」等のエラーメッセージを表示させる。

<pre>
diff --git a/apps/mobile_frontend/i18n/messages.ja.xml b/apps/mobile_frontend/i18n/messages.ja.xml
index 5f83d66..4b484ec 100644
--- a/apps/mobile_frontend/i18n/messages.ja.xml
+++ b/apps/mobile_frontend/i18n/messages.ja.xml
@@ -254,6 +254,10 @@
<source>More</source>
<target>もっと見る</target>
</trans-unit>
+ <trans-unit id="">
+ <source>There are no topics.</source>
+ <target>トピックはありません。</target>
+ </trans-unit>
</body>
</file>
</xliff>
diff --git a/apps/mobile_frontend/modules/communityTopic/templates/listCommunitySuccess.php b/apps/mobile_frontend/modules/communityTopic/templates/listCommunitySuccess.php
index 1eb1a46..0da146a 100644
--- a/apps/mobile_frontend/modules/communityTopic/templates/listCommunitySuccess.php
+++ b/apps/mobile_frontend/modules/communityTopic/templates/listCommunitySuccess.php
@@ -36,14 +36,14 @@ op_include_list('communityTopicList', $list, $options);
<?php op_include_pager_navigation($pager, 'communityTopic/listCommunity?id='.$community->getId().'&page=%d', array('is_total' => false)) ?>
<?php endif; ?>

-<hr color="<?php echo $op_color['core_color_11'] ?>">
-
<?php else: ?>

-<?php echo __('There are no topics') ?>
+<?php echo __('There are no topics.') ?>

<?php endif; ?>

+<hr color="<?php echo $op_color['core_color_11'] ?>">
+
<?php if ($acl->isAllowed($sf_user->getMemberId(), null, 'add')): ?>
<?php echo link_to(__('Create a new topic'), '@communityTopic_new?id='.$community->getId()) ?><br>
<?php endif; ?>
</pre>

「トピックはありません。」の直後にリンクがあるのが変に感じたので下記ように線を追加しました.

!https://redmine.openpne.jp/attachments/416/スクリーンショット.png!

戻る