Files
nextcloud-mail/lib/HordeTranslationHandler.php
Christoph Wurst ed9c2cc92c refactor: add override attribute
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2025-06-04 07:33:09 +02:00

41 lines
1.1 KiB
PHP

<?php
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\Mail;
use Horde_Translation_Handler;
class HordeTranslationHandler implements Horde_Translation_Handler {
/**
* Returns the translation of a message.
*
* @param string $message The string to translate.
*
* @return string The string translation, or the original string if no
* translation exists.
*/
#[\Override]
public function t($message) {
return $message;
}
/**
* Returns the plural translation of a message.
*
* @param string $singular The singular version to translate.
* @param string $plural The plural version to translate.
* @param integer $number The number that determines singular vs. plural.
*
* @return string The string translation, or the original string if no
* translation exists.
*/
#[\Override]
public function ngettext($singular, $plural, $number) {
return ($number > 1 ? $plural : $singular);
}
}