Question Change phrase

hollosch

Member
Hi,
i want to change a phrase of a single post and want to use the group-title. How is this possible ?

lie2gg7s.png
 
You might change in some places.
First change the phrase with key: Teams_post_published_by_x and you should bind your group title to phrase at the template: Team_newsfeed_item_post
 
First change the phrase with key: Teams_post_published_by_x
Nobita
Ok, using {group_title} instead of {user} ?

you should bind your group title to phrase at the template: Team_newsfeed_item_post

How to do this ?

Code:
<xen:if is="!{$doNotRenderPageTitle}">
    <xen:title>{xen:phrase Teams_post_published_by_x, 'user={$post.username}'}</xen:title>
</xen:if>

<xen:if is="{$useOwnMetaProperty}">
    <xen:container var="$head.canonical">
        <xen:container var="$head.canonical">
        <link rel="canonical" href="{xen:helper groupRoute, 'canonical:posts', $post}" /></xen:container>
    <xen:container var="$head.description">
        <meta name="description" content="{xen:helper snippet, $post.message, 155}" /></xen:container>
    <xen:container var="$head.openGraph">
        <xen:include template="open_graph_meta">
            <xen:set var="$url">{xen:helper groupRoute, 'canonical:posts', $post}</xen:set>
            <xen:set var="$title">{xen:phrase Teams_x_shared_an_post_in_team_y, 'name={$post.username}', 'title={$team.title}'}</xen:set>
            <xen:set var="$description">{xen:helper snippet, $post.message, 155}</xen:set>
            <xen:set var="$ogExtraHtml">
                <xen:if is="{$images}">
                    <xen:foreach loop="{$images}" value="{$image}">
                        <meta property="og:image" content="{xen:link 'canonical:attachments', $image}" />
                    </xen:foreach>
                </xen:if>
                <meta property="og:image" content="{xen:helper avatar, $post, 1, 'default', 1}" />
                <meta property="og:image" content="{xen:helper groupLogo, $team, 1}" />
            </xen:set>
        </xen:include></xen:container>
    </xen:container>
</xen:if>

<xen:require css="Team_newsfeed_item_post.css" />
<xen:require css="Team_newsfeed_card.css" />
<xen:require js="js/Nobita/Teams/message.js" />

<xen:if hascontent="true">
<ul class="mdl-menu mdl-js-menu mdl-menu--bottom-{xen:if '{$visitorLanguage.text_direction}=="LTR"', 'right', 'left'}" for="{$cardId}_Menu">
    <xen:contentcheck>
        <xen:if is="{$post.canEdit}">
            <li><a href="{xen:helper groupRoute, 'posts/edit', $post}" class="mdl-menu__item">{xen:phrase Teams_edit_post}</a></li>
        </xen:if>
        <xen:if is="{$post.canDelete}">
            <li><a href="{xen:helper groupRoute, 'posts/delete', $post}" class="mdl-menu__item OverlayTrigger">{xen:phrase Teams_delete_post}</a></li>
        </xen:if>
        <xen:if is="{$post.canReport}">
            <li><a href="{xen:helper groupRoute, 'posts/report', $post}" class="mdl-menu__item OverlayTrigger item control report" data-cacheOverlay="false">{xen:phrase Teams_post_report}</a></li>
        </xen:if>
        <xen:if is="{$post.canApprove} AND {$post.isModerated}">
            <li><a href="{xen:helper groupRoute, 'posts/approve', $post,'t={$visitor.csrf_token_page}'}" class="mdl-menu__item">{xen:phrase Teams_post_approve}</a></li>
        </xen:if>

        <xen:if is="{$post.canStickUnstick}">
            <li><a href="{xen:helper groupRoute, 'posts/pin', $post,'t={$visitor.csrf_token_page}'}" class="mdl-menu__item OverlayTrigger item control">
                {xen:if '{$post.sticky}', '{xen:phrase Teams_unpin_post}', '{xen:phrase Teams_pin_post}'}
            </a></li>   
        </xen:if>
       
        <xen:if is="{$post.canBanUser}">
            <li><a href="{xen:helper groupRoute, 'banning/add', {$post.banningInfo}}" class="mdl-menu__item OverlayTrigger item control">{xen:phrase Teams_ban_user}</a></li>
        </xen:if>
    </xen:contentcheck>
</ul>
</xen:if>

<div class="Team_SupportTextHtml">
    <blockquote>
        {xen:raw $post.messageHtml}
    </blockquote>
   
    <xen:if is="{$post.attachments}">
        <xen:include template="attached_files" />
    </xen:if>
</div>

<div class="Team_PublicControls mdl-card--border-top">
    <div class="Team_PublicControlsInner">
        <xen:if is="{$post.canLike}">
            <a href="{xen:helper groupRoute, 'posts/like', $post}" class="LikeLink {xen:if '{$post.like_date}', 'unlike', 'like'}"
                data-container="#likes-wp-post-{$post.post_id}">
                <i class="material-icons"></i><span class="LikeLabel">{xen:if '{$post.like_date}', '{xen:phrase unlike}', '{xen:phrase like}'}</span>
            </a>
        </xen:if>

        <xen:if is="{$post.canComment}">
            <a rel="button" class="Team_CommentLink" data-target="#post-comment-form-{$post.post_id}"><i class="material-icons">question_answer</i>{xen:phrase comment_verb}</a>
        </xen:if>
       
        <xen:if is="{$visitor.user_id}">
            <a href="{xen:helper groupRoute, 'posts/watch', $post}" class="Team_WatchUnwatchContent {xen:if '{$post.watch_user_id}', 'unwatch', 'watch'}">
                <i class="material-icons"></i><span>{xen:if '{$post.watch_user_id}', '{xen:phrase Teams_stop_notifications}', '{xen:phrase Teams_get_notifications}'}</span>
            </a>
        </xen:if>
    </div>
   
    <div id="likes-wp-post-{$post.post_id}">
        <xen:if is="{$post.likes}">
            <xen:include template="likes_summary">
                <xen:map from="$post" to="$message" />
                <xen:set var="$likesUrl">{xen:helper groupRoute, 'posts/likes', $post}</xen:set>
            </xen:include>
        </xen:if>
    </div>
</div>

<div class="clearfix"></div>

<xen:include template="Team_comments">
        <xen:map from="$post.comments" to="$comments" />
        <xen:map from="$post.loadPreviousParams" to="$loadPreviousParams" />
        <xen:map from="$post.loadOldParams" to="$loadOldParams" />
        <xen:set var="$containerSelector">#{$cardId} .Team_CommentList</xen:set>
        <xen:set var="$contentId">{$post.post_id}</xen:set>
        <xen:set var="$contentType">post</xen:set>
        <xen:set var="$enableCommentForm">{$post.canComment}</xen:set>
        <xen:set var="$visibleCommentForm">{$visibleCommentForm}</xen:set>
</xen:include>
 
Code:
<xen:title>{xen:phrase Teams_post_published_by_x, 'user={$post.username}'}</xen:title>
To
Code:
<xen:title>{xen:phrase Teams_post_published_by_x, 'user={$team.title}'}</xen:title>
 
Back
Top