From 3cbbfb178238ed8b654888a0d369964c4204f3e6 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 22 Feb 2021 13:07:25 +0100 Subject: [PATCH] lang: Localize provider data information strings --- plugins/builtin/source/lang/en_US.cpp | 8 +++++++- source/providers/file_provider.cpp | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/builtin/source/lang/en_US.cpp b/plugins/builtin/source/lang/en_US.cpp index e280acc7d..16bfa5b41 100644 --- a/plugins/builtin/source/lang/en_US.cpp +++ b/plugins/builtin/source/lang/en_US.cpp @@ -445,7 +445,13 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.interface.color.dark", "Dark" }, { "hex.builtin.setting.interface.color.light", "Light" }, { "hex.builtin.setting.interface.color.classic", "Classic" }, - { "hex.builtin.setting.interface.language", "Language" } + { "hex.builtin.setting.interface.language", "Language" }, + + { "hex.builtin.provider.file.path", "File path" }, + { "hex.builtin.provider.file.size", "Size" }, + { "hex.builtin.provider.file.creation", "Creation time" }, + { "hex.builtin.provider.file.access", "Last access time" }, + { "hex.builtin.provider.file.modification", "Last modification time" }, }); } diff --git a/source/providers/file_provider.cpp b/source/providers/file_provider.cpp index 95449d48a..5e367852b 100644 --- a/source/providers/file_provider.cpp +++ b/source/providers/file_provider.cpp @@ -165,13 +165,13 @@ namespace hex::prv { std::vector> FileProvider::getDataInformation() { std::vector> result; - result.emplace_back("File path", this->m_path); - result.emplace_back("Size", hex::toByteString(this->getActualSize())); + result.emplace_back("hex.builtin.provider.file.path"_lang, this->m_path); + result.emplace_back("hex.builtin.provider.file.size"_lang, hex::toByteString(this->getActualSize())); if (this->m_fileStatsValid) { - result.emplace_back("Creation time", ctime(&this->m_fileStats.st_ctime)); - result.emplace_back("Last access time", ctime(&this->m_fileStats.st_atime)); - result.emplace_back("Last modification time", ctime(&this->m_fileStats.st_mtime)); + result.emplace_back("hex.builtin.provider.file.creation"_lang, ctime(&this->m_fileStats.st_ctime)); + result.emplace_back("hex.builtin.provider.file.access"_lang, ctime(&this->m_fileStats.st_atime)); + result.emplace_back("hex.builtin.provider.file.modification"_lang, ctime(&this->m_fileStats.st_mtime)); } return result;