lang: Added some unlocalized values

This commit is contained in:
WerWolv 2022-08-09 08:38:41 +02:00
parent b1e93fda4b
commit f1ec2ef0c4
9 changed files with 15 additions and 8 deletions

View File

@ -715,32 +715,32 @@ namespace hex::plugin::builtin {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::TextFormatted("Type: ");
ImGui::TextFormatted("{}: ", "hex.builtin.common.type"_lang);
ImGui::TableNextColumn();
ImGui::TextFormatted("{}", pattern->getTypeName());
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::TextFormatted("Address: ");
ImGui::TextFormatted("{}: ", "hex.builtin.common.address"_lang);
ImGui::TableNextColumn();
ImGui::TextFormatted("0x{:08X}", pattern->getOffset());
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::TextFormatted("Size: ");
ImGui::TextFormatted("{}: ", "hex.builtin.common.size"_lang);
ImGui::TableNextColumn();
ImGui::TextFormatted("{} {}", pattern->getSize(), pattern->getSize() > 1 ? "Bytes" : "Byte");
ImGui::TextFormatted("{}", hex::toByteString(pattern->getSize()));
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::TextFormatted("Endian: ");
ImGui::TextFormatted("{}: ", "hex.builtin.common.endian"_lang);
ImGui::TableNextColumn();
ImGui::TextFormatted("{}", pattern->getEndian() == std::endian::little ? "Little" : "Big");
ImGui::TextFormatted("{}", pattern->getEndian() == std::endian::little ? "hex.builtin.common.little"_lang : "hex.builtin.common.big"_lang);
if (const auto &comment = pattern->getComment(); comment.has_value()) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::TextFormatted("Comment: ");
ImGui::TextFormatted("{}: ", "hex.builtin.common.comment"_lang);
ImGui::TableNextColumn();
ImGui::TextWrapped("\"%s\"", pattern->getComment()->c_str());
}

View File

@ -87,6 +87,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.range", "Bereich" },
{ "hex.builtin.common.range.entire_data", "Gesammte Daten" },
{ "hex.builtin.common.range.selection", "Selektion" },
{ "hex.builtin.common.comment", "Kommentar" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -89,6 +89,7 @@ namespace hex::plugin::builtin {
{ "hex.builtin.common.range", "Range" },
{ "hex.builtin.common.range.entire_data", "Entire Data" },
{ "hex.builtin.common.range.selection", "Selection" },
{ "hex.builtin.common.comment", "Comment" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -87,6 +87,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.common.range", "Range" },
//{ "hex.builtin.common.range.entire_data", "Entire Data" },
//{ "hex.builtin.common.range.selection", "Selection" },
//{ "hex.builtin.common.comment", "Comment" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -87,6 +87,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.common.range", "Range" },
//{ "hex.builtin.common.range.entire_data", "Entire Data" },
//{ "hex.builtin.common.range.selection", "Selection" },
//{ "hex.builtin.common.comment", "Comment" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -87,6 +87,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.common.range", "Range" },
//{ "hex.builtin.common.range.entire_data", "Entire Data" },
//{ "hex.builtin.common.range.selection", "Selection" },
//{ "hex.builtin.common.comment", "Comment" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -87,6 +87,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.common.range", "Range" },
//{ "hex.builtin.common.range.entire_data", "Entire Data" },
//{ "hex.builtin.common.range.selection", "Selection" },
//{ "hex.builtin.common.comment", "Comment" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -87,6 +87,7 @@ namespace hex::plugin::builtin {
//{ "hex.builtin.common.range", "Range" },
//{ "hex.builtin.common.range.entire_data", "Entire Data" },
//{ "hex.builtin.common.range.selection", "Selection" },
//{ "hex.builtin.common.comment", "Comment" },
{ "hex.builtin.common.encoding.ascii", "ASCII" },
{ "hex.builtin.common.encoding.utf16le", "UTF-16LE" },

View File

@ -55,7 +55,7 @@ namespace hex {
auto byteAddr = pattern.getOffset() + pattern.getBitOffset() / 8;
auto firstBitIdx = pattern.getBitOffset() % 8;
auto lastBitIdx = firstBitIdx + (pattern.getBitSize() - 1) % 8;
auto lastBitIdx = firstBitIdx + (pattern.getBitSize() - 1);
if (firstBitIdx == lastBitIdx)
ImGui::TextFormatted("0x{0:08X} bit {1}", byteAddr, firstBitIdx);
else