<commit_before><?php
/**
 * Tatoeba Project, free collaborative creation of multilingual corpuses project
 * Copyright (C) 2009 <NAME> <<EMAIL>>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * PHP version 5
 *
 * @category PHP
 * @package  Tatoeba
 * @author   <NAME> <<EMAIL>>
 * @license  Affero General Public License
 * @link     https://tatoeba.org
 */

$folderName = '';
if ($folder == 'Inbox') {
    if ($status == 'unread') {
        /* @translators: folder name in private messages (noun) */
        $folderName = __('Unread');
    } else {
        /* @translators: folder name in private messages (noun) */
        $folderName = __('Inbox');
    }
} elseif ($folder == 'Sent') {
    /* @translators: folder name in private messages (noun) */
    $folderName = __('Sent');
} elseif ($folder == 'Trash') {
    /* @translators: folder name in private messages (noun) */
    $folderName = __('Trash');
} elseif ($folder == 'Drafts') {
    /* @translators: folder name in private messages (noun) */
    $folderName = __('Drafts');
}

$this->set('title_for_layout', $this->Pages->formatTitle(
    /* @translators: this is used as a title. The folderName can be
       whatever you translated "Inbox", "Sent" or "Trash" as. */
    format(__('Private messages - {folderName}'), compact('folderName'))
));
?>
<md-toolbar class="md-hue-2">
    <div class="md-toolbar-tools">
        <h2 flex><?= __('Private messages') ?></h2>
    </div>
</md-toolbar>

<section layout="row" flex ng-cloak>
    <?= $this->element('pmmenu'); ?>

    <md-content class="md-whiteframe-1dp" flex>
        <md-toolbar class="md-hue-1">
            <div class="md-toolbar-tools">
                <h2 flex>
                    <?php
                    $n = $this->Paginator->param('count');
                    echo format(__n('{folderName} ({n}&nbsp;message)',
                                    '{folderName} ({n}&nbsp;messages)',
                                    $n, true),
                                compact('folderName', 'n'));
                    ?>
                </h2>

                <?php if ($folder == 'Trash') {
                    $url = $this->Url->build(['empty_folder', 'Trash']);
                    $msg = __('Are you sure?');
                    ?>
                    <md-button href="<?= $url ?>" onclick="return confirm('<?= $msg ?>')">
                        <md-icon>delete_forever</md-icon>
                        <?= __('Empty trash') ?>
                    </md-button>
                <?php } ?>
            </div>
        </md-toolbar>

        <?php
        $this->Pagination->display();
        ?>
        <md-list id="pm-list" ng-cloak><commit_msg>Added localization for private messages (Issue 2199)<commit_after><?php
/**
 * Tatoeba Project, free collaborative creation of multilingual corpuses project
 * Copyright (C) 2009 <NAME> <<EMAIL>>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * PHP version 5
 *
 * @category PHP
 * @package  Tatoeba
 * @author   <NAME> <<EMAIL>>
 * @license  Affero General Public License
 * @link     https://tatoeba.org
 */

$folderName = '';
if ($folder == 'Inbox') {
    if ($status == 'unread') {
        /* @translators: folder name in private messages (noun) */
        $folderName = __('Unread');
    } else {
        /* @translators: folder name in private messages (noun) */
        $folderName = __('Inbox');
    }
} elseif ($folder == 'Sent') {
    /* @translators: folder name in private messages (noun) */
    $folderName = __('Sent');
} elseif ($folder == 'Trash') {
    /* @translators: folder name in private messages (noun) */
    $folderName = __('Trash');
} elseif ($folder == 'Drafts') {
    /* @translators: folder name in private messages (noun) */
    $folderName = __('Drafts');
}

$this->set('title_for_layout', $this->Pages->formatTitle(
    /* @translators: this is used as a title. The folderName can be
       whatever you translated "Inbox", "Sent" or "Trash" as. */
    format(__('Private messages - {folderName}'), compact('folderName'))
));
?>
<md-toolbar class="md-hue-2">
    <div class="md-toolbar-tools">
        <h2 flex><?= __('Private messages') ?></h2>
    </div>
</md-toolbar>

<section layout="row" flex ng-cloak>
    <?= $this->element('pmmenu'); ?>

    <md-content class="md-whiteframe-1dp" flex>
        <md-toolbar class="md-hue-1">
            <div class="md-toolbar-tools">
                <h2 flex>
                    <?php
                    $n = $this->Paginator->param('count');
                    echo $this->Number->format($__n('{folderName} ({n}&nbsp;message)',
                                    '{folderName} ({n}&nbsp;messages)',
                                    $n, true),
                                compact('folderName', 'n'));
                    ?>
                </h2>

                <?php if ($folder == 'Trash') {
                    $url = $this->Url->build(['empty_folder', 'Trash']);
                    $msg = __('Are you sure?');
                    ?>
                    <md-button href="<?= $url ?>" onclick="return confirm('<?= $msg ?>')">
                        <md-icon>delete_forever</md-icon>
                        <?= __('Empty trash') ?>
                    </md-button>
                <?php } ?>
            </div>
        </md-toolbar>

        <?php
        $this->Pagination->display();
        ?>
        <md-list id="pm-list" ng-cloak>
{'fraction_non_alphanumeric': 0.15271306177664212, 'fraction_numerical': 0.004509243950097701, 'mean_word_length': 2.1401604530438885, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 97, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6705806', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1873, 'n_words': 581}