|
|
121cca |
From f5ff9f26bff19f8fd487f75410c6f62c8035d33d Mon Sep 17 00:00:00 2001
|
|
|
121cca |
From: Alex Henrie <alexhenrie24@gmail.com>
|
|
|
121cca |
Date: Tue, 29 Jun 2021 20:46:45 -0600
|
|
|
121cca |
Subject: [PATCH 51/65] Translate all words of a phrase together
|
|
|
121cca |
|
|
|
121cca |
The translation of the word "Battery" or "volume" can be in the
|
|
|
121cca |
beginning, middle, or end of the fully translated phrase, depending on
|
|
|
121cca |
the language.
|
|
|
121cca |
---
|
|
|
121cca |
src/core/dmi.cc | 20 ++++++++--------
|
|
|
121cca |
src/core/volumes.cc | 58 ++++++++++++++++++++++-----------------------
|
|
|
121cca |
2 files changed, 39 insertions(+), 39 deletions(-)
|
|
|
121cca |
|
|
|
121cca |
diff --git a/src/core/dmi.cc b/src/core/dmi.cc
|
|
|
121cca |
index df5db6b..b18de1f 100644
|
|
|
121cca |
--- a/src/core/dmi.cc
|
|
|
121cca |
+++ b/src/core/dmi.cc
|
|
|
121cca |
@@ -152,19 +152,19 @@ static const char *dmi_battery_chemistry(u8 code)
|
|
|
121cca |
{
|
|
|
121cca |
static const char *chemistry[]=
|
|
|
121cca |
{
|
|
|
121cca |
- N_("Other"), /* 0x01 */
|
|
|
121cca |
- N_("Unknown"),
|
|
|
121cca |
- N_("Lead Acid"),
|
|
|
121cca |
- N_("Nickel Cadmium"),
|
|
|
121cca |
- N_("Nickel Metal Hydride"),
|
|
|
121cca |
- N_("Lithium Ion"),
|
|
|
121cca |
- N_("Zinc Air"),
|
|
|
121cca |
- N_("Lithium Polymer") /* 0x08 */
|
|
|
121cca |
+ N_("Other Battery"), /* 0x01 */
|
|
|
121cca |
+ N_("Unknown Battery"),
|
|
|
121cca |
+ N_("Lead Acid Battery"),
|
|
|
121cca |
+ N_("Nickel Cadmium Battery"),
|
|
|
121cca |
+ N_("Nickel Metal Hydride Battery"),
|
|
|
121cca |
+ N_("Lithium Ion Battery"),
|
|
|
121cca |
+ N_("Zinc Air Battery"),
|
|
|
121cca |
+ N_("Lithium Polymer Battery") /* 0x08 */
|
|
|
121cca |
};
|
|
|
121cca |
|
|
|
121cca |
if(code>=0x01 && code<=0x08)
|
|
|
121cca |
return _(chemistry[code-0x01]);
|
|
|
121cca |
- return "";
|
|
|
121cca |
+ return _("Battery");
|
|
|
121cca |
}
|
|
|
121cca |
|
|
|
121cca |
|
|
|
121cca |
@@ -1735,7 +1735,7 @@ int dmiversionrev)
|
|
|
121cca |
else
|
|
|
121cca |
batt.setCapacity(dmi_battery_capacity(data[0x0A] + 256*data[0x0B], data[0x15]));
|
|
|
121cca |
if(data[0x09]!=0x02 || dm->length<0x1A)
|
|
|
121cca |
- batt.setDescription(hw::strip(string(dmi_battery_chemistry(data[0x09])) + " Battery"));
|
|
|
121cca |
+ batt.setDescription(dmi_battery_chemistry(data[0x09]));
|
|
|
121cca |
|
|
|
121cca |
node.addChild(batt);
|
|
|
121cca |
}
|
|
|
121cca |
diff --git a/src/core/volumes.cc b/src/core/volumes.cc
|
|
|
121cca |
index 6fce2ee..03b90b0 100644
|
|
|
121cca |
--- a/src/core/volumes.cc
|
|
|
121cca |
+++ b/src/core/volumes.cc
|
|
|
121cca |
@@ -45,34 +45,34 @@ static bool detect_swap(hwNode & n, source & s);
|
|
|
121cca |
|
|
|
121cca |
static struct fstypes fs_types[] =
|
|
|
121cca |
{
|
|
|
121cca |
- {"blank", "Blank", "", NULL},
|
|
|
121cca |
- {"fat", "Windows FAT", "", detect_fat},
|
|
|
121cca |
- {"ntfs", "Windows NTFS", "secure", detect_ntfs},
|
|
|
121cca |
- {"hpfs", "OS/2 HPFS", "secure", NULL},
|
|
|
121cca |
- {"ext2", "EXT2/EXT3", "secure", detect_ext2},
|
|
|
121cca |
- {"reiserfs", "Linux ReiserFS", "secure,journaled", detect_reiserfs},
|
|
|
121cca |
- {"romfs", "Linux ROMFS", "ro", NULL},
|
|
|
121cca |
- {"squashfs", "Linux SquashFS", "ro", NULL},
|
|
|
121cca |
- {"cramfs", "Linux CramFS", "ro", NULL},
|
|
|
121cca |
- {"minixfs", "MinixFS", "secure", NULL},
|
|
|
121cca |
- {"sysvfs", "System V FS", "secure", NULL},
|
|
|
121cca |
- {"jfs", "Linux JFS", "secure,journaled", NULL},
|
|
|
121cca |
- {"xfs", "Linux XFS", "secure,journaled", NULL},
|
|
|
121cca |
- {"iso9660", "ISO-9660", "secure,ro", NULL},
|
|
|
121cca |
- {"xboxdvd", "X-Box DVD", "ro", NULL},
|
|
|
121cca |
- {"udf", "UDF", "secure,ro", NULL},
|
|
|
121cca |
- {"ufs", "UFS", "secure", NULL},
|
|
|
121cca |
- {"hphfs", "HP-UX HFS", "secure", NULL},
|
|
|
121cca |
- {"vxfs", "VxFS", "secure,journaled", NULL},
|
|
|
121cca |
- {"ffs", "FFS", "secure", NULL},
|
|
|
121cca |
- {"befs", "BeOS BFS", "journaled", NULL},
|
|
|
121cca |
- {"qnxfs", "QNX FS", "", NULL},
|
|
|
121cca |
- {"mfs", "MacOS MFS", "", NULL},
|
|
|
121cca |
- {"hfsplus", "MacOS HFS+", "secure,journaled", detect_hfsx},
|
|
|
121cca |
- {"hfs", "MacOS HFS", "", detect_hfs},
|
|
|
121cca |
- {"apfs", "MacOS APFS", "", detect_apfs},
|
|
|
121cca |
- {"luks", "Linux Unified Key Setup", "encrypted", detect_luks},
|
|
|
121cca |
- {"swap", "Linux swap", "", detect_swap},
|
|
|
121cca |
+ {"blank", N_("Blank volume"), "", NULL},
|
|
|
121cca |
+ {"fat", N_("Windows FAT volume"), "", detect_fat},
|
|
|
121cca |
+ {"ntfs", N_("Windows NTFS volume"), "secure", detect_ntfs},
|
|
|
121cca |
+ {"hpfs", N_("OS/2 HPFS volume"), "secure", NULL},
|
|
|
121cca |
+ {"ext2", N_("EXT2/EXT3 volume"), "secure", detect_ext2},
|
|
|
121cca |
+ {"reiserfs", N_("Linux ReiserFS volume"), "secure,journaled", detect_reiserfs},
|
|
|
121cca |
+ {"romfs", N_("Linux ROMFS volume"), "ro", NULL},
|
|
|
121cca |
+ {"squashfs", N_("Linux SquashFS volume"), "ro", NULL},
|
|
|
121cca |
+ {"cramfs", N_("Linux CramFS volume"), "ro", NULL},
|
|
|
121cca |
+ {"minixfs", N_("MinixFS volume"), "secure", NULL},
|
|
|
121cca |
+ {"sysvfs", N_("System V FS volume"), "secure", NULL},
|
|
|
121cca |
+ {"jfs", N_("Linux JFS volume"), "secure,journaled", NULL},
|
|
|
121cca |
+ {"xfs", N_("Linux XFS volume"), "secure,journaled", NULL},
|
|
|
121cca |
+ {"iso9660", N_("ISO-9660 volume"), "secure,ro", NULL},
|
|
|
121cca |
+ {"xboxdvd", N_("X-Box DVD volume"), "ro", NULL},
|
|
|
121cca |
+ {"udf", N_("UDF volume"), "secure,ro", NULL},
|
|
|
121cca |
+ {"ufs", N_("UFS volume"), "secure", NULL},
|
|
|
121cca |
+ {"hphfs", N_("HP-UX HFS volume"), "secure", NULL},
|
|
|
121cca |
+ {"vxfs", N_("VxFS volume"), "secure,journaled", NULL},
|
|
|
121cca |
+ {"ffs", N_("FFS volume"), "secure", NULL},
|
|
|
121cca |
+ {"befs", N_("BeOS BFS volume"), "journaled", NULL},
|
|
|
121cca |
+ {"qnxfs", N_("QNX FS volume"), "", NULL},
|
|
|
121cca |
+ {"mfs", N_("MacOS MFS volume"), "", NULL},
|
|
|
121cca |
+ {"hfsplus", N_("MacOS HFS+ volume"), "secure,journaled", detect_hfsx},
|
|
|
121cca |
+ {"hfs", N_("MacOS HFS volume"), "", detect_hfs},
|
|
|
121cca |
+ {"apfs", N_("MacOS APFS volume"), "", detect_apfs},
|
|
|
121cca |
+ {"luks", N_("Linux Unified Key Setup volume"), "encrypted", detect_luks},
|
|
|
121cca |
+ {"swap", N_("Linux swap volume"), "", detect_swap},
|
|
|
121cca |
{ NULL, NULL, NULL, NULL }
|
|
|
121cca |
};
|
|
|
121cca |
|
|
|
121cca |
@@ -1154,7 +1154,7 @@ bool scan_volume(hwNode & n, source & s)
|
|
|
121cca |
n.setConfig("filesystem", fs_types[i].id);
|
|
|
121cca |
n.addCapability("initialized", _("initialized volume"));
|
|
|
121cca |
if(n.getDescription()=="")
|
|
|
121cca |
- n.setDescription(string(fs_types[i].description) + " "+string(_("volume")));
|
|
|
121cca |
+ n.setDescription(_(fs_types[i].description));
|
|
|
121cca |
return true;
|
|
|
121cca |
}
|
|
|
121cca |
i++;
|
|
|
121cca |
--
|
|
|
121cca |
2.33.1
|
|
|
121cca |
|