How do I put topic views and translate some words?

1 - My layout doesn’t have the topic view, I really want to put it to show how many views each topic has

2 - have words that were not translated, such as “replies” “Last Post” “Author” how do I translate them?

I tried some solutions I found here on the forum, but they didn’t work.


What layout do you have on your community? The /latest page shows how many views a topic has

There is a theme component but this is for posts so I’m not sure how useful that would be

I’m not sure about this but perhaps admin > customize > text might work?

Even better is to contribute a translation to Discourse :smiley:

So my theme is default, I haven’t installed any theme, so I saw it has a code that leaves avatars on the left side (Instead of on the right side as it naturally is) I noticed that if I take that code off, the words go back to the Portuguese language and the views of each topic also come back! Do I have to modify something in this code? The problem is that I don’t understand anything about formatting this code, I don’t know what I can modify in it to remove the words in Portuguese and return with the preview column of each topic, I’ll post the code below!



<script type='text/x-handlebars' data-template-name='list/topic-list-item.raw'>

<!-- Author Avatar script -->
<td class="first-post">
    <a href="/users/{{topic.creator.username}}" data-auto-route="true" data-user-card="{{topic.creator.username}}">{{avatar topic.creator imageSize="large"}}</a>

<td class='main-link clearfix'>
  {{raw "topic-status" topic=topic}}
  {{topic-link topic}}
  {{#if controller.showTopicPostBadges}}
    {{raw "topic-post-badges" unread=topic.unread newPosts=topic.displayNewPosts unseen=topic.unseen url=topic.lastUnreadUrl}}
  {{discourse-tags topic mode="list"}}
  {{raw "list/topic-excerpt" topic=model}}
  <div class='creator'>
  {{#if showCategory}}
     {{category-link topic.category}}
  {{~#if topic.creator ~}}
  <a href="/users/{{topic.creator.username}}" data-auto-route="true" data-user-card="{{topic.creator.username}}">{{topic.creator.username}}</a> <a href={{topic.url}}>{{format-date topic.createdAt format="tiny"}}</a>
  {{~/if ~}}
   {{raw "list/action-list" topic=topic postNumbers=topic.liked_post_numbers className="likes" icon="heart"}}

{{#if controller.showLikes}}
<td class="num likes">
  {{number topic.like_count}} <i class='fa fa-heart'></i>
{{#if controller.showOpLikes}}
<td class="num likes">
  {{number topic.op_like_count}} <i class='fa fa-heart'></i>

{{raw "list/posts-count-column" topic=topic}}

<td class="last-post">
<div class='poster-avatar'>
<a href="{{topic.lastPostUr}}" data-user-card="{{topic.last_poster_username}}">{{avatar topic.lastPoster usernamePath="username" imageSize="medium"}}</a>
<div class='poster-info'>
<a href="{{topic.lastPostUrl}}">
{{format-date topic.bumpedAt format="tiny"}}
<span class='editor'><a href="/users/{{topic.last_poster_username}}" data-auto-route="true" data-user-card="{{topic.last_poster_username}}">{{topic.last_poster_username}}</a></span>

<script type='text/x-handlebars' data-template-name='topic-list-header.raw'>
  <!-- Author Avatar script -->
  {{raw "topic-list-header-column" order='authorcenter' forceName='Author'}}
  <!-- Author Avatar script needs to remove bulk select button -->
  {{raw "topic-list-header-column" order='default' name='topic.title'}}
  {{#if showLikes}}
     {{raw "topic-list-header-column" sortable='true' order='likes' number='true' forceName='Likes'}}
  {{#if showOpLikes}}
     {{raw "topic-list-header-column" sortable='true' order='op_likes' number='true' forceName='Likes'}}
  {{raw "topic-list-header-column" sortable='true' number='true' order='posts' forceName='Replies'}}
  {{raw "topic-list-header-column" sortable='true' order='activity' forceName='Last Post'}}



var TopicListItemView = require('discourse/components/topic-list-item').default;

    showCategory: function(){
        return !this.get('controller.hideCategory') &&
                this.get('topic.creator') &&
                this.get('') !== 'uncategorized';

sorry for my english