From daa4cc3a5eeb3e4f357e3e6302d700af780d11d9 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 5 Apr 2023 17:45:59 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02889=20-=20Add=20tooltip=20on=20download?= =?UTF-8?q?=20counter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/ormdocument.class.inc.php | 4 ++- .../en.dictionary.itop.orm-document.php | 27 +++++++++++++++++++ .../fr.dictionary.itop.orm-document.php | 27 +++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 dictionaries/core/orm-value/orm-document/en.dictionary.itop.orm-document.php create mode 100644 dictionaries/core/orm-value/orm-document/fr.dictionary.itop.orm-document.php diff --git a/core/ormdocument.class.inc.php b/core/ormdocument.class.inc.php index 337b686e0b..24b0c2d15b 100644 --- a/core/ormdocument.class.inc.php +++ b/core/ormdocument.class.inc.php @@ -167,7 +167,9 @@ class ormDocument $data = $this->GetData(); $sSize = utils::BytesToFriendlyFormat(strlen($data)); $iDownloadsCount = $this->GetDownloadsCount(); - $sResult = utils::EscapeHtml($this->GetFileName()).' ('.$sSize.' / '.$iDownloadsCount.' )
'; + $sDownloadsCountForHtml = utils::HtmlEntities(Dict::Format('Core:ormValue:ormDocument:DownloadsCount', $iDownloadsCount)); + $sDownloadsCountTooltipForHtml = utils::HtmlEntities(Dict::Format('Core:ormValue:ormDocument:DownloadsCount+', $iDownloadsCount)); + $sResult = utils::EscapeHtml($this->GetFileName()).' ('.$sSize.' / '.$sDownloadsCountForHtml.' )
'; } return $sResult; } diff --git a/dictionaries/core/orm-value/orm-document/en.dictionary.itop.orm-document.php b/dictionaries/core/orm-value/orm-document/en.dictionary.itop.orm-document.php new file mode 100644 index 0000000000..b4de0f8c19 --- /dev/null +++ b/dictionaries/core/orm-value/orm-document/en.dictionary.itop.orm-document.php @@ -0,0 +1,27 @@ + + */ + +Dict::Add('EN US', 'English', 'English', [ + 'Core:ormValue:ormDocument:DownloadsCount' => '%1s', + 'Core:ormValue:ormDocument:DownloadsCount+' => 'Downloaded %1$s time(s)', +]); diff --git a/dictionaries/core/orm-value/orm-document/fr.dictionary.itop.orm-document.php b/dictionaries/core/orm-value/orm-document/fr.dictionary.itop.orm-document.php new file mode 100644 index 0000000000..7a805192bf --- /dev/null +++ b/dictionaries/core/orm-value/orm-document/fr.dictionary.itop.orm-document.php @@ -0,0 +1,27 @@ + + */ + +Dict::Add('FR FR', 'French', 'Français', [ + 'Core:ormValue:ormDocument:DownloadsCount' => '%1s', + 'Core:ormValue:ormDocument:DownloadsCount+' => 'Téléchargé %1$s fois', +]);