1
0
mirror of synced 2025-01-29 19:17:28 +01:00

lang: Added German translation, improved language handling

This commit is contained in:
WerWolv 2021-03-03 22:26:17 +01:00
parent 188723e888
commit 4a908a314f
23 changed files with 539 additions and 54 deletions

View File

@ -16,6 +16,7 @@ add_library(${PROJECT_NAME} SHARED
source/math_evaluator.cpp
source/lang/en_US.cpp
source/lang/de_DE.cpp
)
# Add additional include directories here #

View File

@ -0,0 +1,475 @@
#include <hex/plugin.hpp>
namespace hex::plugin::builtin {
void registerLanguageDeDE() {
ContentRegistry::Language::registerLanguage("German", "de-DE");
ContentRegistry::Language::addLocalizations("de-DE", {
/* ImHex default functionality */
{ "hex.menu.file", "Datei" },
{ "hex.menu.edit", "Bearbeiten" },
{ "hex.menu.view", "Ansicht" },
{ "hex.menu.view.fps", "FPS anzeigen" },
{ "hex.menu.view.demo", "ImGui Demo anzeigen" },
{ "hex.menu.help", "Hilfe" },
{ "hex.welcome.header.main", "Wilkommen zu ImHex" },
{ "hex.welcome.header.start", "Start" },
{ "hex.welcome.start.open_file", "Datei Öffnen" },
{ "hex.welcome.start.open_project", "Projekt Öffnen" },
{ "hex.welcome.start.recent", "Kürzlich geöffnet" },
{ "hex.welcome.header.help", "Hilfe" },
{ "hex.welcome.help.repo", "GitHub Repository" },
{ "hex.welcome.help.repo.link", "https://github.com/WerWolv/ImHex" },
{ "hex.welcome.help.gethelp", "Hilfe erhalten" },
{ "hex.welcome.help.gethelp.link", "https://github.com/WerWolv/ImHex/discussions/categories/get-help" },
{ "hex.welcome.header.plugins", "Geladene Plugins" },
{ "hex.welcome.plugins.plugin", "Plugin" },
{ "hex.welcome.plugins.author", "Autor" },
{ "hex.welcome.plugins.desc", "Beschreibung" },
{ "hex.welcome.header.customize", "Anpassen" },
{ "hex.welcome.customize.settings.title", "Einstellungen" },
{ "hex.welcome.customize.settings.desc", "Ändere ImHex' Einstellungen" },
{ "hex.welcome.header.learn", "Lernen" },
{ "hex.welcome.learn.latest.title", "Neuster Release" },
{ "hex.welcome.learn.latest.desc", "Lade die neuste Version von ImHex herunter oder lies den Changelog" },
{ "hex.welcome.learn.latest.link", "https://github.com/WerWolv/ImHex/releases/latest" },
{ "hex.welcome.learn.pattern.title", "Pattern Language Dokumentation" },
{ "hex.welcome.learn.pattern.desc", "Lern ImHex Patterns zu schreiben mit unserer umfangreichen Dokumentation" },
{ "hex.welcome.learn.pattern.link", "https://github.com/WerWolv/ImHex/wiki/Pattern-Language-Guide" },
{ "hex.welcome.learn.plugins.title", "Plugins API" },
{ "hex.welcome.learn.plugins.desc", "Erweitere ImHex mit neuen Funktionen mit Plugins" },
{ "hex.welcome.learn.plugins.link", "https://github.com/WerWolv/ImHex/wiki/Plugins-Development-Guide" },
{ "hex.welcome.header.various", "Verschiedenes" },
{ "hex.common.little_endian", "Little Endian" },
{ "hex.common.big_endian", "Big Endian" },
{ "hex.common.decimal", "Dezimal" },
{ "hex.common.hexadecimal", "Hexadezimal" },
{ "hex.common.octal", "Oktal" },
{ "hex.common.error", "Fehler" },
{ "hex.common.address", "Adresse" },
{ "hex.common.size", "Länge" },
{ "hex.common.region", "Region" },
{ "hex.common.match_selection", "Benutz selektion" },
{ "hex.common.yes", "Ja" },
{ "hex.common.no", "Nein" },
{ "hex.common.okay", "Okay" },
{ "hex.common.error", "Fehler" },
{ "hex.common.load", "Laden" },
{ "hex.common.cancel", "Abbrechen" },
{ "hex.common.set", "Setzen" },
{ "hex.view.bookmarks.name", "Lesezeichen" },
{ "hex.view.bookmarks.default_title", "Lesezeichen [0x{0:X} - 0x{1:X}]" },
{ "hex.view.bookmarks.no_bookmarks", "Noch kein Lesezeichen erstellt. Füge eines hinzu mit Bearbeiten -> Lesezeichen hinzufügen" },
{ "hex.view.bookmarks.title.info", "Informationen" },
{ "hex.view.bookmarks.address", "0x{0:X} : 0x{1:X} ({2} bytes)" },
{ "hex.view.bookmarks.button.jump", "Springen" },
{ "hex.view.bookmarks.button.remove", "Entfernen" },
{ "hex.view.bookmarks.header.name", "Name" },
{ "hex.view.bookmarks.header.color", "Farbe" },
{ "hex.view.bookmarks.header.comment", "Kommentar" },
{ "hex.view.command_palette.name", "Befehlspalette" },
{ "hex.view.data_inspector.name", "Dateninspektor" },
{ "hex.view.data_inspector.table.name", "Name" },
{ "hex.view.data_inspector.table.value", "Wert" },
{ "hex.view.data_processor.name", "Datenprozessor" },
{ "hex.view.data_processor.menu.remove_selection", "Auswahl entfernen" },
{ "hex.view.data_processor.menu.remove_node", "Knoten entfernen" },
{ "hex.view.data_processor.menu.remove_link", "Link entfernen" },
{ "hex.view.disassembler.name", "Disassembler" },
{ "hex.view.disassembler.position", "Position" },
{ "hex.view.disassembler.base", "Basisadresse" },
{ "hex.view.disassembler.region", "Code Region" },
{ "hex.view.disassembler.settings.header", "Einstellungen" },
{ "hex.view.disassembler.arch", "Architektur" },
{ "hex.view.disassembler.arm.arm", "ARM Modus" },
{ "hex.view.disassembler.arm.thumb", "Thumb Modus" },
{ "hex.view.disassembler.arm.default", "Standard Modus" },
{ "hex.view.disassembler.arm.cortex_m", "Cortex-M Modus" },
{ "hex.view.disassembler.arm.armv8", "ARMv8 Modus" },
{ "hex.view.disassembler.mips.mips32", "MIPS32 Modus" },
{ "hex.view.disassembler.mips.mips64", "MIPS64 Modus" },
{ "hex.view.disassembler.mips.mips32R6", "MIPS32R6 Modus" },
{ "hex.view.disassembler.mips.micro", "Micro Modus" },
{ "hex.view.disassembler.x86.16bit", "16-bit Modus" },
{ "hex.view.disassembler.x86.32bit", "32-bit Modus" },
{ "hex.view.disassembler.x86.64bit", "64-bit Modus" },
{ "hex.view.disassembler.ppc.32bit", "32-bit Modus" },
{ "hex.view.disassembler.ppc.64bit", "64-bit Modus" },
{ "hex.view.disassembler.sparc.v9", "Sparc V9 Modus" },
{ "hex.view.disassembler.disassemble", "Disassemble" },
{ "hex.view.disassembler.disassembling", "Disassemblen..." },
{ "hex.view.disassembler.disassembly.title", "Disassembly" },
{ "hex.view.disassembler.disassembly.address", "Adresse" },
{ "hex.view.disassembler.disassembly.offset", "Offset" },
{ "hex.view.disassembler.disassembly.bytes", "Byte" },
{ "hex.view.hashes.name", "Hashes" },
{ "hex.view.hashes.settings", "Einstellungen" },
{ "hex.view.hashes.function", "Hash Funktion" },
{ "hex.view.hashes.iv", "Startwert" },
{ "hex.view.hashes.poly", "Polynomial" },
{ "hex.view.hashes.result", "Resultat" },
{ "hex.view.help.name", "Hilfe" },
{ "hex.view.help.about.name", "Über ImHex" },
{ "hex.view.help.about.translator", "Von WerWolv übersetzt" },
{ "hex.view.help.about.source", "Source code auf GitHub verfügbar:" },
{ "hex.view.help.about.donations", "Spenden" },
{ "hex.view.help.about.thanks", "Wenn dir meine Arbeit gefällt, bitte ziehe eine Spende in betracht um das Projekt am laufen zu erhalten. Vielen Dank <3" },
{ "hex.view.help.about.libs", "Benutzte Libraries" },
{ "hex.view.help.pattern_cheat_sheet", "Pattern Language Cheat Sheet"},
{ "hex.view.help.calc_cheat_sheet", "Rechner Cheat Sheet" },
{ "hex.view.hexeditor.name", "Hex editor" },
{ "hex.view.hexeditor.save_changes", "Änderungen sichern" },
{ "hex.view.hexeditor.open_file", "Datei öffnen" },
{ "hex.view.hexeditor.open_project", "Projekt öffnen" },
{ "hex.view.hexeditor.save_project", "Projekt speichern" },
{ "hex.view.hexeditor.save_data", "Daten speichern" },
{ "hex.view.hexeditor.open_base64", "Base64 Datei öffnen" },
{ "hex.view.hexeditor.load_enconding_file", "Custom encoding Datei laden" },
{ "hex.view.hexeditor.page", "Seite {0} / {1}" },
{ "hex.view.hexeditor.save_as", "Speichern unter" },
{ "hex.view.hexeditor.save_changes.title", "Änderung sichern" },
{ "hex.view.hexeditor.save_changes.desc", "Es wurden ungespeicherte Änderungen an diesem Projekt vorgenommen\nBist du sicher, dass du ImHex schliessen willst?" },
{ "hex.view.hexeditor.script.title", "Datei mit Loader Script laden" },
{ "hex.view.hexeditor.script.desc", "Lade eine Datei mit Hilfe eines Python Skriptes" },
{ "hex.view.hexeditor.script.script", "Skript" },
{ "hex.view.hexeditor.script.script.title", "Loader Script: Skript öffnen" },
{ "hex.view.hexeditor.script.file", "Datei" },
{ "hex.view.hexeditor.script.file.title", "Loader Script: Datei öffnen" },
{ "hex.view.hexeditor.menu.file.open_file", "Datei öffnen..." },
{ "hex.view.hexeditor.menu.file.save", "Speichern" },
{ "hex.view.hexeditor.menu.file.save_as", "Speichern unter..." },
{ "hex.view.hexeditor.menu.file.open_project", "Projekt öffnen..." },
{ "hex.view.hexeditor.menu.file.save_project", "Projekt speichern..." },
{ "hex.view.hexeditor.menu.file.load_encoding_file", "Custom encoding laden..." },
{ "hex.view.hexeditor.menu.file.import", "Importieren..." },
{ "hex.view.hexeditor.menu.file.import.base64", "Base64 Datei" },
{ "hex.view.hexeditor.base64.import_error", "Datei ist nicht in einem korrekten Base64 format!" },
{ "hex.view.hexeditor.file_open_error", "Öffnen der Datei fehlgeschlagen!" },
{ "hex.view.hexeditor.menu.file.import.ips", "IPS Patch" },
{ "hex.view.hexeditor.menu.file.import.ips32", "IPS32 Patch" },
{ "hex.view.hexeditor.menu.file.import.script", "Datei mit Loader Script" },
{ "hex.view.hexeditor.menu.file.export", "Exportieren..." },
{ "hex.view.hexeditor.menu.file.export.title", "Datei Exportieren" },
{ "hex.view.hexeditor.menu.file.export.ips", "IPS Patch" },
{ "hex.view.hexeditor.menu.file.export.ips32", "IPS32 Patch" },
{ "hex.view.hexeditor.menu.file.search", "Suchen" },
{ "hex.view.hexeditor.search.string", "String" },
{ "hex.view.hexeditor.search.hex", "Hex" },
{ "hex.view.hexeditor.search.find", "Suchen" },
{ "hex.view.hexeditor.search.find_next", "Nächstes" },
{ "hex.view.hexeditor.search.find_prev", "Vorheriges" },
{ "hex.view.hexeditor.menu.file.goto", "Sprung" },
{ "hex.view.hexeditor.goto.offset.current", "Momentan" },
{ "hex.view.hexeditor.goto.offset.begin", "Beginn" },
{ "hex.view.hexeditor.goto.offset.end", "Ende" },
{ "hex.view.hexeditor.error.read_only", "Schreibzugriff konnte nicht erlangt werden. Datei wurde im Lesemodus geöffnet." },
{ "hex.view.hexeditor.error.open", "Öffnen der Datei fehlgeschlagen!" },
{ "hex.view.hexeditor.menu.edit.copy", "Kopieren als..." },
{ "hex.view.hexeditor.copy.bytes", "Bytes" },
{ "hex.view.hexeditor.copy.hex", "Hex String" },
{ "hex.view.hexeditor.copy.c", "C Array" },
{ "hex.view.hexeditor.copy.cpp", "C++ Array" },
{ "hex.view.hexeditor.copy.csharp", "C# Array" },
{ "hex.view.hexeditor.copy.rust", "Rust Array" },
{ "hex.view.hexeditor.copy.python", "Python Array" },
{ "hex.view.hexeditor.copy.java", "Java Array" },
{ "hex.view.hexeditor.copy.js", "JavaScript Array" },
{ "hex.view.hexeditor.copy.ascii", "ASCII Art" },
{ "hex.view.hexeditor.copy.html", "HTML" },
{ "hex.view.hexeditor.menu.edit.bookmark", "Lesezeichen erstellen" },
{ "hex.view.hexeditor.menu.edit.set_base", "Basisadresse setzen" },
{ "hex.view.information.name", "Dateninformationen" },
{ "hex.view.information.control", "Einstellungen" },
{ "hex.view.information.analyze", "Seite analysieren" },
{ "hex.view.information.analyzing", "Analysieren..." },
{ "hex.view.information.region", "Analysierte Region" },
{ "hex.view.information.magic", "Magic Informationen" },
{ "hex.view.information.description", "Beschreibung:" },
{ "hex.view.information.mime", "MIME Typ:" },
{ "hex.view.information.info_analysis", "Informationsanalysis" },
{ "hex.view.information.distribution", "Byte Verteilung" },
{ "hex.view.information.entropy", "Entropie" },
{ "hex.view.information.block_size", "Blockgrösse" },
{ "hex.view.information.block_size.desc", "{0} Blöcke min {1} bytes" },
{ "hex.view.information.file_entropy", "Dateientropie" },
{ "hex.view.information.highest_entropy", "Höchste Blockentropie" },
{ "hex.view.information.encrypted", "Diese Daten sind vermutlich verschlüsselt oder komprimiert!" },
{ "hex.view.patches.name", "Patches" },
{ "hex.view.patches.offset", "Offset" },
{ "hex.view.patches.orig", "Originalwert" },
{ "hex.view.patches.patch", "Patchwert"},
{ "hex.view.patches.remove", "Patch entfernen" },
{ "hex.view.pattern.name", "Pattern Editor" },
{ "hex.view.pattern.accept_pattern", "Pattern akzeptieren" },
{ "hex.view.pattern.accept_pattern.desc", "Ein oder mehrere kompatible Pattern wurden für diesen Dateityp gefunden" },
{ "hex.view.pattern.accept_pattern.patterns", "Pattern" },
{ "hex.view.pattern.accept_pattern.question", "Ausgewähltes Pattern anwenden?" },
{ "hex.view.pattern.menu.file.load_pattern", "Pattern laden..." },
{ "hex.view.pattern.open_pattern", "Pattern öffnen" },
{ "hex.view.pattern.evaluating", "Evaluieren..." },
{ "hex.view.pattern.auto", "Auto evaluieren" },
{ "hex.view.pattern_data.name", "Pattern Daten" },
{ "hex.view.pattern_data.name", "Name" },
{ "hex.view.pattern_data.color", "Farbe" },
{ "hex.view.pattern_data.offset", "Offset" },
{ "hex.view.pattern_data.size", "Grösse" },
{ "hex.view.pattern_data.type", "Typ" },
{ "hex.view.pattern_data.value", "Wert" },
{ "hex.view.settings.name", "Einstellungen" },
{ "hex.view.strings.name", "Strings" },
{ "hex.view.strings.copy", "String kopieren" },
{ "hex.view.strings.demangle", "Demangle" },
{ "hex.view.strings.min_length", "Minimallänge" },
{ "hex.view.strings.filter", "Filter" },
{ "hex.view.strings.extract", "Extrahieren" },
{ "hex.view.strings.searching", "Suchen..." },
{ "hex.view.strings.offset", "Offset" },
{ "hex.view.strings.size", "Grösse" },
{ "hex.view.strings.string", "String" },
{ "hex.view.strings.demangle.title", "Demangled Namen" },
{ "hex.view.strings.demangle.copy", "Kopieren" },
{ "hex.view.tools.name", "Werkzeuge" },
{ "hex.view.yara.name", "Yara Regeln" },
{ "hex.view.yara.header.rules", "Regeln" },
{ "hex.view.yara.reload", "Neu laden" },
{ "hex.view.yara.match", "Regeln anwenden" },
{ "hex.view.yara.matching", "Anwenden..." },
{ "hex.view.yara.error", "Yara Kompilerfehler: " },
{ "hex.view.yara.header.matches", "Funde" },
{ "hex.view.yara.matches.identifier", "Kennung" },
{ "hex.view.yara.whole_data", "Gesammte Daten Übereinstimmung!" },
{ "hex.view.yara.no_rules", "Keine Yara Regeln gefunden. Platzier sie in ImHex' 'yara' Ordner" },
/* Builtin plugin features */
{ "hex.builtin.command.calc.desc", "Rechner" },
{ "hex.builtin.command.web.desc", "Webseite nachschlagen" },
{ "hex.builtin.command.web.result", "'{0}' nachschlagen"},
{ "hex.builtin.inspector.binary", "Binär (8 bit)" },
{ "hex.builtin.inspector.u8", "uint8_t" },
{ "hex.builtin.inspector.s8", "int8_t" },
{ "hex.builtin.inspector.u16", "uint16_t" },
{ "hex.builtin.inspector.s16", "int16_t" },
{ "hex.builtin.inspector.u32", "uint32_t" },
{ "hex.builtin.inspector.s32", "int32_t" },
{ "hex.builtin.inspector.u64", "uint64_t" },
{ "hex.builtin.inspector.s64", "int64_t" },
{ "hex.builtin.inspector.float", "float (32 bit)" },
{ "hex.builtin.inspector.double", "double (64 bit)" },
{ "hex.builtin.inspector.ascii", "ASCII Zeichen" },
{ "hex.builtin.inspector.wide", "Wide Zeichen" },
{ "hex.builtin.inspector.utf8", "UTF-8 code point" },
{ "hex.builtin.inspector.time32", "__time32_t" },
{ "hex.builtin.inspector.time64", "__time64_t" },
{ "hex.builtin.inspector.time", "time_t" },
{ "hex.builtin.inspector.guid", "GUID" },
{ "hex.builtin.inspector.rgba8", "RGBA8 Farbe" },
{ "hex.builtin.nodes.constants", "Konstanten" },
{ "hex.builtin.nodes.constants.int", "Integral" },
{ "hex.builtin.nodes.constants.int.header", "Integral" },
{ "hex.builtin.nodes.constants.int.output", "" },
{ "hex.builtin.nodes.constants.float", "Kommazahl" },
{ "hex.builtin.nodes.constants.float.header", "Kommazahl" },
{ "hex.builtin.nodes.constants.float.output", "" },
{ "hex.builtin.nodes.constants.nullptr", "Nullptr" },
{ "hex.builtin.nodes.constants.nullptr.header", "Nullptr" },
{ "hex.builtin.nodes.constants.nullptr.output", "" },
{ "hex.builtin.nodes.constants.buffer", "Buffer" },
{ "hex.builtin.nodes.constants.buffer.header", "Buffer" },
{ "hex.builtin.nodes.constants.buffer.size", "Size" },
{ "hex.builtin.nodes.constants.buffer.output", "" },
{ "hex.builtin.nodes.constants.string", "String" },
{ "hex.builtin.nodes.constants.string.header", "String" },
{ "hex.builtin.nodes.constants.string.output", "" },
{ "hex.builtin.nodes.constants.rgba8", "RGBA8 Farbe" },
{ "hex.builtin.nodes.constants.rgba8.header", "RGBA8 Farbe" },
{ "hex.builtin.nodes.constants.rgba8.output.r", "Rot" },
{ "hex.builtin.nodes.constants.rgba8.output.g", "Grün" },
{ "hex.builtin.nodes.constants.rgba8.output.b", "Blau" },
{ "hex.builtin.nodes.constants.rgba8.output.a", "Alpha" },
{ "hex.builtin.nodes.constants.comment", "Kommentar" },
{ "hex.builtin.nodes.constants.comment.header", "Kommentar" },
{ "hex.builtin.nodes.display", "Anzeigen" },
{ "hex.builtin.nodes.display.int", "Integral" },
{ "hex.builtin.nodes.display.int.header", "Integral Anzeige" },
{ "hex.builtin.nodes.display.int.input", "Wert" },
{ "hex.builtin.nodes.display.float", "Kommazahl" },
{ "hex.builtin.nodes.display.float.header", "Kommazahl Anzeige" },
{ "hex.builtin.nodes.display.float.input", "Wert" },
{ "hex.builtin.nodes.data_access", "Datenzugriff" },
{ "hex.builtin.nodes.data_access.read", "Lesen" },
{ "hex.builtin.nodes.data_access.read.header", "Lesen" },
{ "hex.builtin.nodes.data_access.read.address", "Adresse" },
{ "hex.builtin.nodes.data_access.read.size", "Grösse" },
{ "hex.builtin.nodes.data_access.read.data", "Daten" },
{ "hex.builtin.nodes.data_access.write", "Schreiben" },
{ "hex.builtin.nodes.data_access.write.header", "Schreiben" },
{ "hex.builtin.nodes.data_access.write.address", "Adresse" },
{ "hex.builtin.nodes.data_access.write.data", "Daten" },
{ "hex.builtin.nodes.casting", "Datenumwandlung" },
{ "hex.builtin.nodes.casting.int_to_buffer", "Integral zu Buffer" },
{ "hex.builtin.nodes.casting.int_to_buffer.header", "Integral zu Buffer" },
{ "hex.builtin.nodes.casting.int_to_buffer.input", "In" },
{ "hex.builtin.nodes.casting.int_to_buffer.output", "Out" },
{ "hex.builtin.nodes.casting.buffer_to_int", "Buffer zu Integral" },
{ "hex.builtin.nodes.casting.buffer_to_int.header", "Buffer zu Integral" },
{ "hex.builtin.nodes.casting.buffer_to_int.input", "In" },
{ "hex.builtin.nodes.casting.buffer_to_int.output", "Out" },
{ "hex.builtin.nodes.control_flow", "Kontrollfluss" },
{ "hex.builtin.nodes.control_flow.if", "If" },
{ "hex.builtin.nodes.control_flow.if.header", "If" },
{ "hex.builtin.nodes.control_flow.if.condition", "Bedingung" },
{ "hex.builtin.nodes.control_flow.if.true", "Wahr" },
{ "hex.builtin.nodes.control_flow.if.false", "Falsch" },
{ "hex.builtin.nodes.control_flow.if.output", "Output" },
{ "hex.builtin.nodes.control_flow.equals", "Gleich" },
{ "hex.builtin.nodes.control_flow.equals.header", "Gleich" },
{ "hex.builtin.nodes.control_flow.equals.input.a", "Input A" },
{ "hex.builtin.nodes.control_flow.equals.input.b", "Input B" },
{ "hex.builtin.nodes.control_flow.equals.output", "Output" },
{ "hex.builtin.nodes.control_flow.not", "Nicht" },
{ "hex.builtin.nodes.control_flow.not.header", "Nicht" },
{ "hex.builtin.nodes.control_flow.not.input", "Input" },
{ "hex.builtin.nodes.control_flow.not.output", "Output" },
{ "hex.builtin.nodes.control_flow.gt", "Grösser als" },
{ "hex.builtin.nodes.control_flow.gt.header", "Grösser als" },
{ "hex.builtin.nodes.control_flow.gt.input.a", "Input A" },
{ "hex.builtin.nodes.control_flow.gt.input.b", "Input B" },
{ "hex.builtin.nodes.control_flow.gt.output", "Output" },
{ "hex.builtin.nodes.control_flow.lt", "Kleiner als" },
{ "hex.builtin.nodes.control_flow.lt.header", "Kleiner als" },
{ "hex.builtin.nodes.control_flow.lt.input.a", "Input A" },
{ "hex.builtin.nodes.control_flow.lt.input.b", "Input B" },
{ "hex.builtin.nodes.control_flow.lt.output", "Output" },
{ "hex.builtin.nodes.control_flow.and", "UND" },
{ "hex.builtin.nodes.control_flow.and.header", "Bool'sches UND" },
{ "hex.builtin.nodes.control_flow.and.input.a", "Input A" },
{ "hex.builtin.nodes.control_flow.and.input.b", "Input B" },
{ "hex.builtin.nodes.control_flow.and.output", "Output" },
{ "hex.builtin.nodes.control_flow.or", "ODER" },
{ "hex.builtin.nodes.control_flow.or.header", "Bool'sches ODER" },
{ "hex.builtin.nodes.control_flow.or.input.a", "Input A" },
{ "hex.builtin.nodes.control_flow.or.input.b", "Input B" },
{ "hex.builtin.nodes.control_flow.or.output", "Output" },
{ "hex.builtin.nodes.bitwise", "Bitweise Operationen" },
{ "hex.builtin.nodes.bitwise.and", "UND" },
{ "hex.builtin.nodes.bitwise.and.header", "Bitweise UND" },
{ "hex.builtin.nodes.bitwise.and.input.a", "Input A" },
{ "hex.builtin.nodes.bitwise.and.input.b", "Input B" },
{ "hex.builtin.nodes.bitwise.and.output", "Output" },
{ "hex.builtin.nodes.bitwise.or", "ODER" },
{ "hex.builtin.nodes.bitwise.or.header", "Bitweise ODER" },
{ "hex.builtin.nodes.bitwise.or.input.a", "Input A" },
{ "hex.builtin.nodes.bitwise.or.input.b", "Input B" },
{ "hex.builtin.nodes.bitwise.or.output", "Output" },
{ "hex.builtin.nodes.bitwise.xor", "Exklusiv ODER" },
{ "hex.builtin.nodes.bitwise.xor.header", "Bitweise Exklusiv ODER" },
{ "hex.builtin.nodes.bitwise.xor.input.a", "Input A" },
{ "hex.builtin.nodes.bitwise.xor.input.b", "Input B" },
{ "hex.builtin.nodes.bitwise.xor.output", "Output" },
{ "hex.builtin.nodes.bitwise.not", "Nicht" },
{ "hex.builtin.nodes.bitwise.not.header", "Bitweise Nicht" },
{ "hex.builtin.nodes.bitwise.not.input", "Input" },
{ "hex.builtin.nodes.bitwise.not.output", "Output" },
{ "hex.builtin.nodes.decoding", "Dekodieren" },
{ "hex.builtin.nodes.decoding.base64", "Base64" },
{ "hex.builtin.nodes.decoding.base64.header", "Base64 Dekodierer" },
{ "hex.builtin.nodes.decoding.base64.input", "In" },
{ "hex.builtin.nodes.decoding.base64.output", "Out" },
{ "hex.builtin.nodes.decoding.hex", "Hexadezimal" },
{ "hex.builtin.nodes.decoding.hex.header", "Hexadezimal Dekodierer" },
{ "hex.builtin.nodes.decoding.hex.input", "In" },
{ "hex.builtin.nodes.decoding.hex.output", "Out" },
{ "hex.builtin.nodes.crypto", "Kryptographie" },
{ "hex.builtin.nodes.crypto.aes", "AES Dekryptor" },
{ "hex.builtin.nodes.crypto.aes.header", "AES Dekryptor" },
{ "hex.builtin.nodes.crypto.aes.key", "Schlüssel" },
{ "hex.builtin.nodes.crypto.aes.iv", "IV" },
{ "hex.builtin.nodes.crypto.aes.nonce", "Nonce" },
{ "hex.builtin.nodes.crypto.aes.input", "Input" },
{ "hex.builtin.nodes.crypto.aes.output", "Output" },
{ "hex.builtin.nodes.crypto.aes.mode", "Modus" },
{ "hex.builtin.nodes.crypto.aes.key_length", "Schlüssellänge" },
{ "hex.builtin.tools.demangler", "Itanium/MSVC demangler" },
{ "hex.builtin.tools.demangler.mangled", "Mangled Namen" },
{ "hex.builtin.tools.demangler.demangled", "Demangled Namen" },
{ "hex.builtin.tools.ascii_table", "ASCII Tabelle" },
{ "hex.builtin.tools.ascii_table.octal", "Oktal anzeigen" },
{ "hex.builtin.tools.regex_replacer", "Regex Ersetzer" },
{ "hex.builtin.tools.regex_replacer.pattern", "Regex pattern" },
{ "hex.builtin.tools.regex_replacer.replace", "Ersatz pattern" },
{ "hex.builtin.tools.regex_replacer.input", "Input" },
{ "hex.builtin.tools.regex_replacer.output", "Output" },
{ "hex.builtin.tools.color", "Farbwähler" },
{ "hex.builtin.tools.calc", "Rechner" },
{ "hex.builtin.tools.input", "Input" },
{ "hex.builtin.tools.format.standard", "Standard" },
{ "hex.builtin.tools.format.scientific", "Wissenschaftlich" },
{ "hex.builtin.tools.format.engineering", "Ingenieur" },
{ "hex.builtin.tools.format.programmer", "Programmierer" },
{ "hex.builtin.tools.error", "Letzter Fehler: '{0}'" },
{ "hex.builtin.tools.history", "Geschichte" },
{ "hex.builtin.tools.name", "Name" },
{ "hex.builtin.tools.value", "Wert" },
{ "hex.builtin.tools.base_converter", "Basiskonverter" },
{ "hex.builtin.tools.base_converter.dec", "DEC" },
{ "hex.builtin.tools.base_converter.hex", "HEX" },
{ "hex.builtin.tools.base_converter.oct", "OCT" },
{ "hex.builtin.tools.base_converter.bin", "BIN" },
{ "hex.builtin.setting.imhex", "ImHex" },
{ "hex.builtin.setting.imhex.recent_files", "Kürzlich geöffnete Dateien" },
{ "hex.builtin.setting.interface", "Aussehen" },
{ "hex.builtin.setting.interface.color", "Farbthema" },
{ "hex.builtin.setting.interface.color.dark", "Dunkel" },
{ "hex.builtin.setting.interface.color.light", "Hell" },
{ "hex.builtin.setting.interface.color.classic", "Klassisch" },
{ "hex.builtin.setting.interface.language", "Sprache" },
{ "hex.builtin.provider.file.path", "Dateipfad" },
{ "hex.builtin.provider.file.size", "Grösse" },
{ "hex.builtin.provider.file.creation", "Erstellungszeit" },
{ "hex.builtin.provider.file.access", "Letzte Zugriffszeit" },
{ "hex.builtin.provider.file.modification", "Letzte Modifikationszeit" },
});
}
}

View File

@ -55,6 +55,8 @@ namespace hex::plugin::builtin {
{ "hex.common.match_selection", "Match Selection" },
{ "hex.common.yes", "Yes" },
{ "hex.common.no", "No" },
{ "hex.common.okay", "Okay" },
{ "hex.common.error", "Error" },
{ "hex.common.load", "Load" },
{ "hex.common.cancel", "Cancel" },
{ "hex.common.set", "Set" },
@ -262,6 +264,7 @@ namespace hex::plugin::builtin {
{ "hex.view.yara.header.matches", "Matches" },
{ "hex.view.yara.matches.identifier", "Identifier" },
{ "hex.view.yara.whole_data", "Whole file matches!" },
{ "hex.view.yara.no_rules", "No YARA rules found. Put them in ImHex' 'yara' folder" },
/* Builtin plugin features */

View File

@ -10,6 +10,7 @@ namespace hex::plugin::builtin {
void registerDataProcessorNodes();
void registerLanguageEnUS();
void registerLanguageDeDE();
}
@ -25,6 +26,7 @@ IMHEX_PLUGIN_SETUP("Built-in", "WerWolv", "Default ImHex functionality") {
registerDataProcessorNodes();
registerLanguageEnUS();
registerLanguageDeDE();
}

View File

@ -20,7 +20,7 @@ namespace hex {
class View {
public:
explicit View(std::string viewName);
explicit View(std::string unlocalizedViewName);
virtual ~View() = default;
virtual void drawContent() = 0;
@ -52,7 +52,7 @@ namespace hex {
bool& getWindowOpenState();
std::string_view getName() const;
std::string_view getUnlocalizedName() const;
protected:
void subscribeEvent(Events eventType, const std::function<std::any(const std::any&)> &callback);
@ -61,11 +61,15 @@ namespace hex {
void unsubscribeEvent(Events eventType);
void discardNavigationRequests();
protected:
void confirmButtons(const char *textLeft, const char *textRight, const std::function<void()> &leftButtonFn, const std::function<void()> &rightButtonFn);
static inline std::string toWindowName(std::string_view unlocalizedName) {
return LangEntry(unlocalizedName) + "##" + std::string(unlocalizedName);
}
private:
std::string m_viewName;
std::string m_unlocalizedViewName;
bool m_windowOpen = this->hasViewMenuItemEntry();
};

View File

@ -11,7 +11,7 @@
namespace hex {
View::View(std::string viewName) : m_viewName(viewName) { }
View::View(std::string unlocalizedName) : m_unlocalizedViewName(unlocalizedName) { }
void View::drawMenu() { }
bool View::handleShortcut(int key, int mods) { return false; }
@ -55,11 +55,11 @@ namespace hex {
}
void View::drawCommonInterfaces() {
if (ImGui::BeginPopupModal("Error", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
if (ImGui::BeginPopupModal("hex.common.error"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::Text("%s", SharedData::errorPopupMessage.c_str());
ImGui::NewLine();
ImGui::Separator();
if (ImGui::Button("Okay") || ImGui::IsKeyDown(ImGuiKey_Escape))
if (ImGui::Button("hex.common.okay"_lang) || ImGui::IsKeyDown(ImGuiKey_Escape))
ImGui::CloseCurrentPopup();
ImGui::EndPopup();
@ -69,7 +69,7 @@ namespace hex {
void View::showErrorPopup(std::string_view errorMessage) {
SharedData::errorPopupMessage = errorMessage;
View::doLater([] { ImGui::OpenPopup("Error"); });
View::doLater([] { ImGui::OpenPopup("hex.common.error"_lang); });
}
bool View::hasViewMenuItemEntry() {
@ -89,8 +89,8 @@ namespace hex {
return this->m_windowOpen;
}
std::string_view View::getName() const {
return this->m_viewName;
std::string_view View::getUnlocalizedName() const {
return this->m_unlocalizedViewName;
}
void View::subscribeEvent(Events eventType, const std::function<std::any(const std::any&)> &callback) {

View File

@ -7,7 +7,7 @@
namespace hex {
ViewBookmarks::ViewBookmarks() : View("hex.view.bookmarks.name"_lang) {
ViewBookmarks::ViewBookmarks() : View("hex.view.bookmarks.name") {
View::subscribeEvent(Events::AddBookmark, [](auto userData) {
auto bookmark = std::any_cast<ImHexApi::Bookmarks::Entry>(userData);
bookmark.comment.resize(0xF'FFFF);
@ -44,7 +44,7 @@ namespace hex {
}
void ViewBookmarks::drawContent() {
if (ImGui::Begin("hex.view.bookmarks.name"_lang, &this->getWindowOpenState())) {
if (ImGui::Begin(View::toWindowName("hex.view.bookmarks.name").c_str(), &this->getWindowOpenState())) {
if (ImGui::BeginChild("##scrolling")) {
auto &bookmarks = ImHexApi::Bookmarks::getEntries();

View File

@ -4,7 +4,7 @@
namespace hex {
ViewCommandPalette::ViewCommandPalette() : View("hex.view.command_palette.name"_lang) {
ViewCommandPalette::ViewCommandPalette() : View("hex.view.command_palette.name") {
this->m_commandBuffer.resize(1024, 0x00);
}

View File

@ -10,7 +10,7 @@ namespace hex {
using NumberDisplayStyle = ContentRegistry::DataInspector::NumberDisplayStyle;
ViewDataInspector::ViewDataInspector() : View("hex.view.data_inspector.name"_lang) {
ViewDataInspector::ViewDataInspector() : View("hex.view.data_inspector.name") {
View::subscribeEvent(Events::RegionSelected, [this](auto userData) {
auto region = std::any_cast<Region>(userData);
@ -55,7 +55,7 @@ namespace hex {
}
if (ImGui::Begin("hex.view.data_inspector.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.data_inspector.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
auto provider = SharedData::currentProvider;
if (provider != nullptr && provider->isReadable()) {

View File

@ -6,7 +6,7 @@
namespace hex {
ViewDataProcessor::ViewDataProcessor() : View("hex.view.data_processor.name"_lang) {
ViewDataProcessor::ViewDataProcessor() : View("hex.view.data_processor.name") {
imnodes::Initialize();
imnodes::PushAttributeFlag(imnodes::AttributeFlags_EnableLinkDetachWithDragClick);
imnodes::PushAttributeFlag(imnodes::AttributeFlags_EnableLinkCreationOnSnap);
@ -128,7 +128,7 @@ namespace hex {
}
void ViewDataProcessor::drawContent() {
if (ImGui::Begin("hex.view.data_processor.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.data_processor.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
imnodes::ClearNodeSelection();

View File

@ -12,7 +12,7 @@ using namespace std::literals::string_literals;
namespace hex {
ViewDisassembler::ViewDisassembler() : View("hex.view.disassembler.name"_lang) {
ViewDisassembler::ViewDisassembler() : View("hex.view.disassembler.name") {
View::subscribeEvent(Events::DataChanged, [this](auto){
this->disassemble();
});
@ -100,7 +100,7 @@ namespace hex {
void ViewDisassembler::drawContent() {
if (ImGui::Begin("hex.view.disassembler.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.disassembler.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
auto provider = SharedData::currentProvider;
if (provider != nullptr && provider->isReadable()) {

View File

@ -9,7 +9,7 @@
namespace hex {
ViewHashes::ViewHashes() : View("hex.view.hashes.name"_lang) {
ViewHashes::ViewHashes() : View("hex.view.hashes.name") {
View::subscribeEvent(Events::DataChanged, [this](auto) {
this->m_shouldInvalidate = true;
});
@ -38,7 +38,7 @@ namespace hex {
}
void ViewHashes::drawContent() {
if (ImGui::Begin("hex.view.hashes.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.hashes.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
ImGui::BeginChild("##scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav);
auto provider = SharedData::currentProvider;

View File

@ -4,7 +4,7 @@
namespace hex {
ViewHelp::ViewHelp() : View("hex.view.help.about.name"_lang) {
ViewHelp::ViewHelp() : View("hex.view.help.about.name") {
}
ViewHelp::~ViewHelp() {
@ -29,7 +29,7 @@ namespace hex {
void ViewHelp::drawAboutPopup() {
if (ImGui::BeginPopupModal("hex.view.help.about.name"_lang, &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) {
if (ImGui::BeginPopupModal(View::toWindowName("hex.view.about.name").c_str(), &this->m_aboutWindowOpen, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::Text("ImHex Hex Editor v%s by WerWolv -", IMHEX_VERSION);
#if defined(GIT_BRANCH) && defined(GIT_COMMIT_HASH)
ImGui::SameLine();
@ -97,7 +97,7 @@ namespace hex {
if (!this->m_patternHelpWindowOpen) return;
ImGui::SetNextWindowSizeConstraints(ImVec2(450, 300), ImVec2(2000, 1000));
if (ImGui::Begin("Pattern Language Cheat Sheet", &this->m_patternHelpWindowOpen)) {
if (ImGui::Begin(View::toWindowName("hex.view.help.pattern_cheat_sheet").c_str(), &this->m_patternHelpWindowOpen)) {
ImGui::Text("ImHex Pattern Language Cheat Sheet");
ImGui::Separator();
ImGui::NewLine();
@ -239,7 +239,7 @@ namespace hex {
if (!this->m_mathHelpWindowOpen) return;
ImGui::SetNextWindowSizeConstraints(ImVec2(450, 300), ImVec2(2000, 1000));
if (ImGui::Begin("Calculator Cheat Sheet", &this->m_mathHelpWindowOpen)) {
if (ImGui::Begin(View::toWindowName("hex.view.help.calc_cheat_sheet").c_str(), &this->m_mathHelpWindowOpen)) {
ImGui::Text("ImHex Math Evaluator Cheat Sheet");
ImGui::Separator();
ImGui::NewLine();
@ -322,7 +322,7 @@ namespace hex {
void ViewHelp::drawMenu() {
if (ImGui::BeginMenu("hex.menu.help"_lang)) {
if (ImGui::MenuItem("hex.view.help.about.name"_lang, "")) {
View::doLater([] { ImGui::OpenPopup("hex.view.help.about.name"_lang); });
View::doLater([] { ImGui::OpenPopup(View::toWindowName("hex.view.about.name").c_str()); });
this->m_aboutWindowOpen = true;
this->getWindowOpenState() = true;
}

View File

@ -159,7 +159,7 @@ namespace hex {
if (ProjectFile::hasUnsavedChanges()) {
glfwSetWindowShouldClose(window, GLFW_FALSE);
View::doLater([] { ImGui::OpenPopup("hex.view.hexeditor.save_changes"_lang); });
View::doLater([] { ImGui::OpenPopup("hex.view.hexeditor.save_changes.title"_lang); });
}
});
@ -195,10 +195,10 @@ namespace hex {
size_t dataSize = (provider == nullptr || !provider->isReadable()) ? 0x00 : provider->getSize();
this->m_memoryEditor.DrawWindow("hex.view.hexeditor.name"_lang, &this->getWindowOpenState(), this, dataSize, dataSize == 0 ? 0x00 : provider->getBaseAddress());
this->m_memoryEditor.DrawWindow(View::toWindowName("hex.view.hexeditor.name").c_str(), &this->getWindowOpenState(), this, dataSize, dataSize == 0 ? 0x00 : provider->getBaseAddress());
if (dataSize != 0x00) {
if (ImGui::Begin("hex.view.hexeditor.name"_lang)) {
if (ImGui::Begin(View::toWindowName("hex.view.hexeditor.name").c_str())) {
if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows))
ImGui::OpenPopup("hex.menu.edit"_lang);
@ -275,7 +275,7 @@ namespace hex {
ImGui::TextUnformatted("hex.view.hexeditor.save_changes.desc"_lang);
ImGui::NewLine();
confirmButtons("Yes", "No", [] { View::postEvent(Events::CloseImHex); }, [] { ImGui::CloseCurrentPopup(); });
confirmButtons("hex.common.yes"_lang, "hex.common.no"_lang, [] { View::postEvent(Events::CloseImHex); }, [] { ImGui::CloseCurrentPopup(); });
if (ImGui::IsKeyDown(ImGui::GetKeyIndex(ImGuiKey_Escape)))
ImGui::CloseCurrentPopup();

View File

@ -18,7 +18,7 @@
namespace hex {
ViewInformation::ViewInformation() : View("hex.view.information.name"_lang) {
ViewInformation::ViewInformation() : View("hex.view.information.name") {
View::subscribeEvent(Events::DataChanged, [this](auto) {
this->m_dataValid = false;
this->m_highestBlockEntropy = 0;
@ -133,7 +133,7 @@ namespace hex {
}
void ViewInformation::drawContent() {
if (ImGui::Begin("hex.view.information.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.information.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
ImGui::BeginChild("##scrolling", ImVec2(0, 0), false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav);
auto provider = SharedData::currentProvider;

View File

@ -11,7 +11,7 @@ using namespace std::literals::string_literals;
namespace hex {
ViewPatches::ViewPatches() : View("hex.view.patches.name"_lang) {
ViewPatches::ViewPatches() : View("hex.view.patches.name") {
View::subscribeEvent(Events::ProjectFileStore, [](auto) {
auto provider = SharedData::currentProvider;
if (provider != nullptr)
@ -31,7 +31,7 @@ namespace hex {
}
void ViewPatches::drawContent() {
if (ImGui::Begin("hex.view.patches.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.patches.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
auto provider = SharedData::currentProvider;
if (provider != nullptr && provider->isReadable()) {

View File

@ -76,7 +76,7 @@ namespace hex {
}
ViewPattern::ViewPattern(std::vector<lang::PatternData*> &patternData) : View("hex.view.pattern.name"_lang), m_patternData(patternData) {
ViewPattern::ViewPattern(std::vector<lang::PatternData*> &patternData) : View("hex.view.pattern.name"), m_patternData(patternData) {
this->m_patternLanguageRuntime = new lang::PatternLanguage();
this->m_textEditor.SetLanguageDefinition(PatternLanguage());
@ -220,7 +220,7 @@ namespace hex {
}
void ViewPattern::drawContent() {
if (ImGui::Begin("hex.view.pattern.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_None | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse)) {
if (ImGui::Begin(View::toWindowName("hex.view.pattern.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_None | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse)) {
auto provider = SharedData::currentProvider;
if (provider != nullptr && provider->isAvailable()) {

View File

@ -6,7 +6,7 @@
namespace hex {
ViewPatternData::ViewPatternData(std::vector<lang::PatternData*> &patternData)
: View("hex.view.pattern_data.name"_lang), m_patternData(patternData) {
: View("hex.view.pattern_data.name"), m_patternData(patternData) {
this->subscribeEvent(Events::PatternChanged, [this](auto data) {
this->m_sortedPatternData.clear();
@ -49,7 +49,7 @@ namespace hex {
}
void ViewPatternData::drawContent() {
if (ImGui::Begin("hex.view.pattern_data.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.pattern_data.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
auto provider = SharedData::currentProvider;
if (provider != nullptr && provider->isReadable()) {

View File

@ -4,7 +4,7 @@
namespace hex {
ViewSettings::ViewSettings() : View("hex.view.settings.name"_lang) {
ViewSettings::ViewSettings() : View("hex.view.settings.name") {
View::subscribeEvent(Events::OpenWindow, [this](auto name) {
if (std::any_cast<const char*>(name) == std::string("hex.view.settings.name")) {
View::doLater([]{ ImGui::OpenPopup("hex.view.settings.name"_lang); });
@ -21,7 +21,7 @@ namespace hex {
ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX));
if (ImGui::BeginPopupModal("hex.view.settings.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_AlwaysAutoResize)) {
if (ImGui::BeginPopupModal(View::toWindowName("hex.view.settings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_AlwaysAutoResize)) {
for (auto &[category, entries] : ContentRegistry::Settings::getEntries()) {
ImGui::TextUnformatted(LangEntry(category));
ImGui::Separator();
@ -40,7 +40,7 @@ namespace hex {
void ViewSettings::drawMenu() {
if (ImGui::BeginMenu("hex.menu.help"_lang)) {
if (ImGui::MenuItem("hex.view.settings.name"_lang)) {
View::doLater([]{ ImGui::OpenPopup("hex.view.settings.name"_lang); });
View::doLater([]{ ImGui::OpenPopup(View::toWindowName("hex.view.settings.name").c_str()); });
this->getWindowOpenState() = true;
}
ImGui::EndMenu();

View File

@ -13,7 +13,7 @@ using namespace std::literals::string_literals;
namespace hex {
ViewStrings::ViewStrings() : View("hex.view.strings.name"_lang) {
ViewStrings::ViewStrings() : View("hex.view.strings.name") {
View::subscribeEvent(Events::DataChanged, [this](auto){
this->m_foundStrings.clear();
});
@ -89,7 +89,7 @@ namespace hex {
auto provider = SharedData::currentProvider;
if (ImGui::Begin("hex.view.strings.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.strings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (provider != nullptr && provider->isReadable()) {
ImGui::Disabled([this]{
if (ImGui::InputInt("hex.view.strings.min_length"_lang, &this->m_minimumLength, 1, 0))

View File

@ -4,12 +4,12 @@
namespace hex {
ViewTools::ViewTools() : View("hex.view.tools.name"_lang) { }
ViewTools::ViewTools() : View("hex.view.tools.name") { }
ViewTools::~ViewTools() { }
void ViewTools::drawContent() {
if (ImGui::Begin("hex.view.tools.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.tools.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
for (const auto& [name, function] : ContentRegistry::Tools::getEntries()) {
if (ImGui::CollapsingHeader(LangEntry(name))) {
function();

View File

@ -10,7 +10,7 @@
namespace hex {
ViewYara::ViewYara() : View("hex.view.yara.name"_lang) {
ViewYara::ViewYara() : View("hex.view.yara.name") {
yr_initialize();
this->reloadRules();
@ -21,7 +21,7 @@ namespace hex {
}
void ViewYara::drawContent() {
if (ImGui::Begin("hex.view.yara.name"_lang, &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (ImGui::Begin(View::toWindowName("hex.view.yara.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
if (!this->m_matching && !this->m_errorMessage.empty()) {
View::showErrorPopup("hex.view.yara.error"_lang + this->m_errorMessage.data());
@ -32,7 +32,7 @@ namespace hex {
ImGui::Separator();
if (this->m_rules.empty()) {
ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "No YARA rules found. Put them in the 'yara' folder next to the ImHex executable");
ImGui::TextColored(ImVec4(0.92F, 0.25F, 0.2F, 1.0F), "%s", static_cast<const char*>("hex.view.yara.no_rules"_lang));
if (ImGui::Button("hex.view.yara.reload"_lang)) this->reloadRules();
} else {

View File

@ -32,7 +32,7 @@ namespace hex {
void ImHexSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler *handler, void *, const char* line) {
for (auto &view : ContentRegistry::Views::getEntries()) {
std::string format = std::string(view->getName()) + "=%d";
std::string format = std::string(view->getUnlocalizedName()) + "=%d";
sscanf(line, format.c_str(), &view->getWindowOpenState());
}
}
@ -293,7 +293,7 @@ namespace hex {
if (ImGui::BeginMenu("hex.menu.view"_lang)) {
for (auto &view : ContentRegistry::Views::getEntries()) {
if (view->hasViewMenuItemEntry())
ImGui::MenuItem((std::string(view->getName()) + " " + "hex.menu.view"_lang).c_str(), "", &view->getWindowOpenState());
ImGui::MenuItem((LangEntry(view->getUnlocalizedName()) + " " + "hex.menu.view"_lang).c_str(), "", &view->getWindowOpenState());
}
ImGui::EndMenu();
}
@ -512,11 +512,11 @@ namespace hex {
ImGui::DockBuilderSplitNode(splitWindowId, ImGuiDir_Right, 0.3, &inspectorId, &hexEditorId);
for (auto &view : ContentRegistry::Views::getEntries())
ImGui::DockBuilderDockWindow(view->getUnlocalizedName().data(), utilitiesId);
ImGui::DockBuilderDockWindow(view->getName().data(), utilitiesId);
ImGui::DockBuilderDockWindow("hex.view.hexeditor.name"_lang, hexEditorId);
ImGui::DockBuilderDockWindow("hex.view.data_inspector.name"_lang, inspectorId);
ImGui::DockBuilderDockWindow("hex.view.pattern_data.name"_lang, patternDataId);
ImGui::DockBuilderDockWindow("hex.view.hexeditor.name", hexEditorId);
ImGui::DockBuilderDockWindow("hex.view.data_inspector.name", inspectorId);
ImGui::DockBuilderDockWindow("hex.view.pattern_data.name", patternDataId);
ImGui::DockBuilderFinish(dockId);
}