From 8da69c11d9886386dc0f82579670c9fab1aa05c0 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 4 Jan 2025 13:28:35 +0100 Subject: [PATCH] impr: Remove the word "Provider" from places where it doesn't fit --- .../include/hex/providers/memory_provider.hpp | 2 +- .../include/hex/providers/provider.hpp | 2 +- lib/libimhex/source/helpers/patches.cpp | 2 +- .../content/providers/base64_provider.hpp | 2 +- .../content/providers/disk_provider.hpp | 2 +- .../content/providers/file_provider.hpp | 2 +- .../content/providers/gdb_provider.hpp | 2 +- .../content/providers/intel_hex_provider.hpp | 2 +- .../providers/memory_file_provider.hpp | 2 +- .../providers/motorola_srec_provider.hpp | 2 +- .../content/providers/null_provider.hpp | 2 +- .../providers/process_memory_provider.hpp | 2 +- .../content/providers/view_provider.hpp | 2 +- plugins/builtin/romfs/lang/en_US.json | 26 +++++++++---------- .../content/providers/view_provider.cpp | 2 +- .../support/c/source/script_api/v1/mem.cpp | 2 +- 16 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/libimhex/include/hex/providers/memory_provider.hpp b/lib/libimhex/include/hex/providers/memory_provider.hpp index a0ddc1c07..b413ec555 100644 --- a/lib/libimhex/include/hex/providers/memory_provider.hpp +++ b/lib/libimhex/include/hex/providers/memory_provider.hpp @@ -38,7 +38,7 @@ namespace hex::prv { [[nodiscard]] std::string getName() const override { return m_name; } - [[nodiscard]] std::string getTypeName() const override { return "MemoryProvider"; } + [[nodiscard]] UnlocalizedString getTypeName() const override { return "MemoryProvider"; } private: void renameFile(); diff --git a/lib/libimhex/include/hex/providers/provider.hpp b/lib/libimhex/include/hex/providers/provider.hpp index 68b2677ba..b191e7e3d 100644 --- a/lib/libimhex/include/hex/providers/provider.hpp +++ b/lib/libimhex/include/hex/providers/provider.hpp @@ -152,7 +152,7 @@ namespace hex::prv { * like "hex.builtin.provider.mem_file" or "hex.builtin.provider.file" * @return The provider's type name */ - [[nodiscard]] virtual std::string getTypeName() const = 0; + [[nodiscard]] virtual UnlocalizedString getTypeName() const = 0; /** * @brief Gets a human readable representation of the current provider diff --git a/lib/libimhex/source/helpers/patches.cpp b/lib/libimhex/source/helpers/patches.cpp index 5fb2073e8..31d171317 100644 --- a/lib/libimhex/source/helpers/patches.cpp +++ b/lib/libimhex/source/helpers/patches.cpp @@ -81,7 +81,7 @@ namespace hex { return ""; } - [[nodiscard]] std::string getTypeName() const override { return ""; } + [[nodiscard]] UnlocalizedString getTypeName() const override { return ""; } const std::map& getPatches() const { return m_patches; diff --git a/plugins/builtin/include/content/providers/base64_provider.hpp b/plugins/builtin/include/content/providers/base64_provider.hpp index c58b938f4..12aaa6d95 100644 --- a/plugins/builtin/include/content/providers/base64_provider.hpp +++ b/plugins/builtin/include/content/providers/base64_provider.hpp @@ -17,7 +17,7 @@ namespace hex::plugin::builtin { void insertRaw(u64 offset, u64 size) override; void removeRaw(u64 offset, u64 size) override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.base64"; } }; diff --git a/plugins/builtin/include/content/providers/disk_provider.hpp b/plugins/builtin/include/content/providers/disk_provider.hpp index d994f9583..c2b02fd84 100644 --- a/plugins/builtin/include/content/providers/disk_provider.hpp +++ b/plugins/builtin/include/content/providers/disk_provider.hpp @@ -38,7 +38,7 @@ namespace hex::plugin::builtin { void loadSettings(const nlohmann::json &settings) override; [[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.disk"; } diff --git a/plugins/builtin/include/content/providers/file_provider.hpp b/plugins/builtin/include/content/providers/file_provider.hpp index 30734d355..b837a0555 100644 --- a/plugins/builtin/include/content/providers/file_provider.hpp +++ b/plugins/builtin/include/content/providers/file_provider.hpp @@ -47,7 +47,7 @@ namespace hex::plugin::builtin { void loadSettings(const nlohmann::json &settings) override; [[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.file"; } diff --git a/plugins/builtin/include/content/providers/gdb_provider.hpp b/plugins/builtin/include/content/providers/gdb_provider.hpp index 22f7529ad..256cb6935 100644 --- a/plugins/builtin/include/content/providers/gdb_provider.hpp +++ b/plugins/builtin/include/content/providers/gdb_provider.hpp @@ -42,7 +42,7 @@ namespace hex::plugin::builtin { void loadSettings(const nlohmann::json &settings) override; [[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.gdb"; } diff --git a/plugins/builtin/include/content/providers/intel_hex_provider.hpp b/plugins/builtin/include/content/providers/intel_hex_provider.hpp index 8e118ea9a..36bf6f9e7 100644 --- a/plugins/builtin/include/content/providers/intel_hex_provider.hpp +++ b/plugins/builtin/include/content/providers/intel_hex_provider.hpp @@ -32,7 +32,7 @@ namespace hex::plugin::builtin { void loadSettings(const nlohmann::json &settings) override; [[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.intel_hex"; } diff --git a/plugins/builtin/include/content/providers/memory_file_provider.hpp b/plugins/builtin/include/content/providers/memory_file_provider.hpp index 876194aeb..23f97a86a 100644 --- a/plugins/builtin/include/content/providers/memory_file_provider.hpp +++ b/plugins/builtin/include/content/providers/memory_file_provider.hpp @@ -32,7 +32,7 @@ namespace hex::plugin::builtin { std::vector getMenuEntries() override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.mem_file"; } diff --git a/plugins/builtin/include/content/providers/motorola_srec_provider.hpp b/plugins/builtin/include/content/providers/motorola_srec_provider.hpp index f3cb6a156..8e973c6ba 100644 --- a/plugins/builtin/include/content/providers/motorola_srec_provider.hpp +++ b/plugins/builtin/include/content/providers/motorola_srec_provider.hpp @@ -15,7 +15,7 @@ namespace hex::plugin::builtin { [[nodiscard]] std::string getName() const override; std::vector getDataDescription() const override; - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.motorola_srec"; } diff --git a/plugins/builtin/include/content/providers/null_provider.hpp b/plugins/builtin/include/content/providers/null_provider.hpp index cd5de3bc1..39c59593d 100644 --- a/plugins/builtin/include/content/providers/null_provider.hpp +++ b/plugins/builtin/include/content/providers/null_provider.hpp @@ -47,7 +47,7 @@ namespace hex::plugin::builtin { void loadSettings(const nlohmann::json &settings) override { std::ignore = settings; } [[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override { return settings; } - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.null"; } }; diff --git a/plugins/builtin/include/content/providers/process_memory_provider.hpp b/plugins/builtin/include/content/providers/process_memory_provider.hpp index 5ef52eb54..fe651f319 100644 --- a/plugins/builtin/include/content/providers/process_memory_provider.hpp +++ b/plugins/builtin/include/content/providers/process_memory_provider.hpp @@ -65,7 +65,7 @@ namespace hex::plugin::builtin { void loadSettings(const nlohmann::json &) override {} [[nodiscard]] nlohmann::json storeSettings(nlohmann::json) const override { return { }; } - [[nodiscard]] std::string getTypeName() const override { + [[nodiscard]] UnlocalizedString getTypeName() const override { return "hex.builtin.provider.process_memory"; } diff --git a/plugins/builtin/include/content/providers/view_provider.hpp b/plugins/builtin/include/content/providers/view_provider.hpp index c3b69a233..7688e27bb 100644 --- a/plugins/builtin/include/content/providers/view_provider.hpp +++ b/plugins/builtin/include/content/providers/view_provider.hpp @@ -30,7 +30,7 @@ namespace hex::plugin::builtin { [[nodiscard]] std::string getName() const override; [[nodiscard]] std::vector getDataDescription() const override; - [[nodiscard]] std::string getTypeName() const override; + [[nodiscard]] UnlocalizedString getTypeName() const override; void loadSettings(const nlohmann::json &settings) override; [[nodiscard]] nlohmann::json storeSettings(nlohmann::json settings) const override; diff --git a/plugins/builtin/romfs/lang/en_US.json b/plugins/builtin/romfs/lang/en_US.json index db34fc4fb..61ba5537c 100644 --- a/plugins/builtin/romfs/lang/en_US.json +++ b/plugins/builtin/romfs/lang/en_US.json @@ -164,7 +164,7 @@ "hex.builtin.menu.file.project.save_as": "Save Project As...", "hex.builtin.menu.file.open_recent": "Open Recent", "hex.builtin.menu.file.quit": "Quit ImHex", - "hex.builtin.menu.file.reload_provider": "Reload Provider", + "hex.builtin.menu.file.reload_provider": "Reload Current Data", "hex.builtin.menu.help": "Help", "hex.builtin.menu.help.ask_for_help": "Ask Documentation...", "hex.builtin.menu.workspace": "Workspace", @@ -380,7 +380,7 @@ "hex.builtin.popup.error.file_dialog.portal": "There was an error while opening the file browser: {}.\nThis might be caused by your system not having a xdg-desktop-portal backend installed correctly.\n\nOn KDE, it's xdg-desktop-portal-kde.\nOn Gnome, it's xdg-desktop-portal-gnome.\nOtherwise, you can try to use xdg-desktop-portal-gtk.\n\nReboot your system after installing it.\n\nIf the file browser still doesn't work after this, try adding\n\tdbus-update-activation-environment WAYLAND_DISPLAY DISPLAY XAUTHORITY\nto your window manager or compositor's startup script or configuration.\n\nIf the file browser still doesn't work, submit an issue at https://github.com/WerWolv/ImHex/issues\n\nIn the meantime files can still be opened by dragging them onto the ImHex window!", "hex.builtin.popup.error.project.load": "Failed to load project: {}", "hex.builtin.popup.error.project.save": "Failed to save project!", - "hex.builtin.popup.error.project.load.create_provider": "Failed to create provider with type {}", + "hex.builtin.popup.error.project.load.create_provider": "Failed to create provider of type {}", "hex.builtin.popup.error.project.load.no_providers": "There are no openable providers", "hex.builtin.popup.error.project.load.some_providers_failed": "Some providers failed to load: {}", "hex.builtin.popup.error.project.load.file_not_found": "Project file {} not found", @@ -402,8 +402,8 @@ "hex.builtin.provider.rename.desc": "Enter a name for this provider.", "hex.builtin.provider.tooltip.show_more": "Hold SHIFT for more information", "hex.builtin.provider.error.open": "Failed to open provider: {}", - "hex.builtin.provider.base64": "Base64 Provider", - "hex.builtin.provider.disk": "Raw Disk Provider", + "hex.builtin.provider.base64": "Base64 File", + "hex.builtin.provider.disk": "Raw Disk", "hex.builtin.provider.disk.disk_size": "Disk Size", "hex.builtin.provider.disk.elevation": "Accessing raw disks most likely requires elevated privileges", "hex.builtin.provider.disk.reload": "Reload", @@ -411,7 +411,7 @@ "hex.builtin.provider.disk.selected_disk": "Disk", "hex.builtin.provider.disk.error.read_ro": "Failed to open disk {} in read-only mode: {}", "hex.builtin.provider.disk.error.read_rw": "Failed to open disk {} in read/write mode: {}", - "hex.builtin.provider.file": "File Provider", + "hex.builtin.provider.file": "Regular File", "hex.builtin.provider.file.error.open": "Failed to open file {}: {}", "hex.builtin.provider.file.access": "Last access time", "hex.builtin.provider.file.creation": "Creation time", @@ -424,19 +424,19 @@ "hex.builtin.provider.file.menu.open_folder": "Open containing folder", "hex.builtin.provider.file.too_large": "This file is too large to be loaded into memory. Opening it anyways will result in modifications to be written directly to the file. Would you like to open it as Read-Only instead?", "hex.builtin.provider.file.reload_changes": "The file has been modified by an external source. Do you want to reload it?", - "hex.builtin.provider.gdb": "GDB Server Provider", + "hex.builtin.provider.gdb": "GDB Server Data", "hex.builtin.provider.gdb.ip": "IP Address", "hex.builtin.provider.gdb.name": "GDB Server <{0}:{1}>", "hex.builtin.provider.gdb.port": "Port", "hex.builtin.provider.gdb.server": "Server", - "hex.builtin.provider.intel_hex": "Intel Hex Provider", + "hex.builtin.provider.intel_hex": "Intel Hex File", "hex.builtin.provider.intel_hex.name": "Intel Hex {0}", - "hex.builtin.provider.mem_file": "Memory File", + "hex.builtin.provider.mem_file": "In-Memory File", "hex.builtin.provider.mem_file.unsaved": "Unsaved File", "hex.builtin.provider.mem_file.rename": "Rename File", - "hex.builtin.provider.motorola_srec": "Motorola SREC Provider", + "hex.builtin.provider.motorola_srec": "Motorola SREC File", "hex.builtin.provider.motorola_srec.name": "Motorola SREC {0}", - "hex.builtin.provider.process_memory": "Process Memory Provider", + "hex.builtin.provider.process_memory": "Process Memory", "hex.builtin.provider.process_memory.enumeration_failed": "Failed to enumerate processes", "hex.builtin.provider.process_memory.macos_limitations": "macOS doesn't properly allow reading memory from other processes, even when running as root. If System Integrity Protection (SIP) is enabled, it only works for applications that are unsigned or have the 'Get Task Allow' entitlement which generally only applies to applications compiled by yourself.", "hex.builtin.provider.process_memory.memory_regions": "Memory Regions", @@ -528,8 +528,8 @@ "hex.builtin.setting.toolbar": "Toolbar", "hex.builtin.setting.toolbar.description": "Add or remove menu options to or from the toolbar by drag-n-dropping them from the list below.", "hex.builtin.setting.toolbar.icons": "Toolbar Icons", - "hex.builtin.shortcut.next_provider": "Select Next Provider", - "hex.builtin.shortcut.prev_provider": "Select Previous Provider", + "hex.builtin.shortcut.next_provider": "Select Next Data Provider", + "hex.builtin.shortcut.prev_provider": "Select Previous Data Provider", "hex.builtin.task.query_docs": "Querying Docs...", "hex.builtin.task.sending_statistics": "Sending statistics...", "hex.builtin.task.check_updates": "Checking for updates...", @@ -1040,7 +1040,7 @@ "hex.builtin.view.pattern_editor.virtual_files": "Virtual Filesystem", "hex.builtin.view.provider_settings.load_error": "An error occurred while trying to open this provider!", "hex.builtin.view.provider_settings.load_error_details": "An error occurred while trying to open this provider!\nDetails: {0}", - "hex.builtin.view.provider_settings.load_popup": "Open Provider", + "hex.builtin.view.provider_settings.load_popup": "Open Data", "hex.builtin.view.provider_settings.name": "Provider Settings", "hex.builtin.view.settings.name": "Settings", "hex.builtin.view.settings.restart_question": "A change you made requires a restart of ImHex to take effect. Would you like to restart it now?", diff --git a/plugins/builtin/source/content/providers/view_provider.cpp b/plugins/builtin/source/content/providers/view_provider.cpp index a545518c1..4ae912ad5 100644 --- a/plugins/builtin/source/content/providers/view_provider.cpp +++ b/plugins/builtin/source/content/providers/view_provider.cpp @@ -140,7 +140,7 @@ namespace hex::plugin::builtin { return Provider::storeSettings(settings); } - [[nodiscard]] std::string ViewProvider::getTypeName() const { + [[nodiscard]] UnlocalizedString ViewProvider::getTypeName() const { return "hex.builtin.provider.view"; } diff --git a/plugins/script_loader/support/c/source/script_api/v1/mem.cpp b/plugins/script_loader/support/c/source/script_api/v1/mem.cpp index 24ba00e8a..30c36450b 100644 --- a/plugins/script_loader/support/c/source/script_api/v1/mem.cpp +++ b/plugins/script_loader/support/c/source/script_api/v1/mem.cpp @@ -87,7 +87,7 @@ public: void setTypeName(std::string typeName) { m_typeName = std::move(typeName);} void setName(std::string name) { m_name = std::move(name);} - [[nodiscard]] std::string getTypeName() const override { return m_typeName; } + [[nodiscard]] hex::UnlocalizedString getTypeName() const override { return m_typeName; } [[nodiscard]] std::string getName() const override { return m_name; } private: