Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Localization problems in Flagging plugin #1407

wants to merge 5 commits into from

2 participants


I've made some changes to handle a string in a localization friendlier way. That text can now be translated into any language properly, in my case Turkish.

Onur Güzel and others added some commits

Cherry picked these into develop branch, thanks!

@linc linc closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 2, 2012
  1. Make reported by description localization friendly

    Onur Güzel authored
  2. Remove unnecessary text

    Onur Güzel authored
    Before: Onur Güzel and 3 others person
    Now: Onur Güzel and 3 others
  3. Make localization friendly

    Onur Güzel authored
  4. @onurguzel

    Revert "Make localization friendly"

    onurguzel authored
    This reverts commit a0451e8.
  5. @onurguzel

    Make localization friendly

    onurguzel authored
This page is out of date. Refresh to see the latest.
4 plugins/Flagging/views/flagging.php
@@ -47,12 +47,12 @@
<div class="FlaggedItemInfo">
if ($NumComplaintsInThread > 1)
- $OtherString = T(' and').' '.($NumComplaintsInThread-1).' '.T(Plural($NumComplaintsInThread-1, 'other', 'others')).' '.T('person');
+ $OtherString = T(' and').' '.($NumComplaintsInThread-1).' '.T(Plural($NumComplaintsInThread-1, 'other', 'others'));
$OtherString = '';
<span><?php echo T('FlaggedBy', "Reported by:"); ?> </span>
- <span><?php echo "<strong>".Anchor($Flag['InsertName'],"profile/{$Flag['InsertUserID']}/{$Flag['InsertName']}")."</strong>{$OtherString} ".T('on').' '.$Flag['DateInserted']; ?></span>
+ <span><?php printf(T('<strong>%s</strong>%s on %s'), Anchor($Flag['InsertName'],"profile/{$Flag['InsertUserID']}/{$Flag['InsertName']}"), $OtherString, $Flag['DateInserted']); ?></span>
<div class="FlaggedItemComment">"<?php echo Gdn_Format::Text($Flag['Comment']); ?>"</div>
<div class="FlaggedActions">
6 plugins/Flagging/views/report.php
@@ -4,11 +4,9 @@
$Report = $this->Data['Plugin.Flagging.Report'];
$Reason = $this->Data['Plugin.Flagging.Reason'];
-echo Anchor($Flag['UserName'], '/profile/'.$Flag['UserID'].'/'.$Flag['UserName']) . ' '. T('reported');
+printf(T('%s reported%s <strong>%s</strong>'), Anchor($Flag['UserName'], '/profile/'.$Flag['UserID'].'/'.$Flag['UserName']), ($Flag['Context'] == 'comment') ? T(' a comment in') : null, Anchor($Report['DiscussionName'], $Flag['URL']));
-if ($Flag['Context'] == 'comment')
- echo ' ' . T('a comment in');
-?> <strong><?php echo Anchor($Report['DiscussionName'], $Flag['URL']); ?></strong>
<?php echo T('Reason'); ?>:
<blockquote rel="<?php echo $Flag['UserName']; ?>"><?php echo $Reason; ?></blockquote>
Something went wrong with that request. Please try again.