Added a localized description for barcode types.

This commit is contained in:
2025-12-14 18:39:19 +00:00
parent 2ae1a36c56
commit 7f49998683
5 changed files with 368 additions and 2 deletions

View File

@@ -42,6 +42,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;
using Aaru.Localization;
namespace Aaru.CommonTypes.AaruMetadata;
@@ -49,33 +50,61 @@ namespace Aaru.CommonTypes.AaruMetadata;
[SuppressMessage("ReSharper", "InconsistentNaming")]
public enum BarcodeType
{
[LocalizedDescription(nameof(UI.BarcodeType_Aztec))]
Aztec,
[LocalizedDescription(nameof(UI.BarcodeType_Codabar))]
Codabar,
[LocalizedDescription(nameof(UI.BarcodeType_Code11))]
Code11,
[LocalizedDescription(nameof(UI.BarcodeType_Code128))]
Code128,
[LocalizedDescription(nameof(UI.BarcodeType_Code39))]
Code39,
[LocalizedDescription(nameof(UI.BarcodeType_Code93))]
Code93,
[LocalizedDescription(nameof(UI.BarcodeType_CPC_Binary))]
CPC_Binary,
[LocalizedDescription(nameof(UI.BarcodeType_EZcode))]
EZcode,
[LocalizedDescription(nameof(UI.BarcodeType_FIM))]
FIM,
[LocalizedDescription(nameof(UI.BarcodeType_ITF))]
ITF,
[LocalizedDescription(nameof(UI.BarcodeType_ITF14))]
ITF14,
[LocalizedDescription(nameof(UI.BarcodeType_EAN13))]
EAN13,
[LocalizedDescription(nameof(UI.BarcodeType_EAN8))]
EAN8,
[LocalizedDescription(nameof(UI.BarcodeType_MaxiCode))]
MaxiCode,
[LocalizedDescription(nameof(UI.BarcodeType_ISBN))]
ISBN,
[LocalizedDescription(nameof(UI.BarcodeType_ISRC))]
ISRC,
[LocalizedDescription(nameof(UI.BarcodeType_MSI))]
MSI,
[LocalizedDescription(nameof(UI.BarcodeType_ShotCode))]
ShotCode,
[LocalizedDescription(nameof(UI.BarcodeType_RM4SCC))]
RM4SCC,
[LocalizedDescription(nameof(UI.BarcodeType_QR))]
QR,
[LocalizedDescription(nameof(UI.BarcodeType_EAN5))]
EAN5,
[LocalizedDescription(nameof(UI.BarcodeType_EAN2))]
EAN2,
[LocalizedDescription(nameof(UI.BarcodeType_POSTNET))]
POSTNET,
[LocalizedDescription(nameof(UI.BarcodeType_PostBar))]
PostBar,
[LocalizedDescription(nameof(UI.BarcodeType_Plessey))]
Plessey,
[LocalizedDescription(nameof(UI.BarcodeType_Pharmacode))]
Pharmacode,
[LocalizedDescription(nameof(UI.BarcodeType_PDF417))]
PDF417,
[LocalizedDescription(nameof(UI.BarcodeType_PatchCode))]
PatchCode
}
@@ -92,4 +121,4 @@ public class Barcode
Type = (BarcodeType)cicm.type,
Value = cicm.Value
};
}
}

View File

@@ -169,7 +169,8 @@ public sealed partial class MetadataEditorViewModel : ViewModelBase
public IEnumerable<LocalizedEnumValue<Architecture>> AvailableArchitectures =>
LocalizedEnumHelper.GetLocalizedValues<Architecture>().OrderBy(static x => x.Description);
[NotNull]
public IEnumerable<BarcodeType> AvailableBarcodeTypes => Enum.GetValues<BarcodeType>();
public IEnumerable<LocalizedEnumValue<BarcodeType>> AvailableBarcodeTypes =>
LocalizedEnumHelper.GetLocalizedValues<BarcodeType>().OrderBy(static x => x.Description);
void LoadMetadata([NotNull] string path)
{

View File

@@ -10311,5 +10311,173 @@ namespace Aaru.Localization {
return ResourceManager.GetString("Architecture_8085", resourceCulture);
}
}
public static string BarcodeType_Aztec {
get {
return ResourceManager.GetString("BarcodeType_Aztec", resourceCulture);
}
}
public static string BarcodeType_CPC_Binary {
get {
return ResourceManager.GetString("BarcodeType_CPC_Binary", resourceCulture);
}
}
public static string BarcodeType_Codabar {
get {
return ResourceManager.GetString("BarcodeType_Codabar", resourceCulture);
}
}
public static string BarcodeType_Code11 {
get {
return ResourceManager.GetString("BarcodeType_Code11", resourceCulture);
}
}
public static string BarcodeType_Code128 {
get {
return ResourceManager.GetString("BarcodeType_Code128", resourceCulture);
}
}
public static string BarcodeType_Code39 {
get {
return ResourceManager.GetString("BarcodeType_Code39", resourceCulture);
}
}
public static string BarcodeType_Code93 {
get {
return ResourceManager.GetString("BarcodeType_Code93", resourceCulture);
}
}
public static string BarcodeType_EAN13 {
get {
return ResourceManager.GetString("BarcodeType_EAN13", resourceCulture);
}
}
public static string BarcodeType_EAN2 {
get {
return ResourceManager.GetString("BarcodeType_EAN2", resourceCulture);
}
}
public static string BarcodeType_EAN5 {
get {
return ResourceManager.GetString("BarcodeType_EAN5", resourceCulture);
}
}
public static string BarcodeType_EAN8 {
get {
return ResourceManager.GetString("BarcodeType_EAN8", resourceCulture);
}
}
public static string BarcodeType_EZcode {
get {
return ResourceManager.GetString("BarcodeType_EZcode", resourceCulture);
}
}
public static string BarcodeType_FIM {
get {
return ResourceManager.GetString("BarcodeType_FIM", resourceCulture);
}
}
public static string BarcodeType_ISBN {
get {
return ResourceManager.GetString("BarcodeType_ISBN", resourceCulture);
}
}
public static string BarcodeType_ISRC {
get {
return ResourceManager.GetString("BarcodeType_ISRC", resourceCulture);
}
}
public static string BarcodeType_ITF {
get {
return ResourceManager.GetString("BarcodeType_ITF", resourceCulture);
}
}
public static string BarcodeType_ITF14 {
get {
return ResourceManager.GetString("BarcodeType_ITF14", resourceCulture);
}
}
public static string BarcodeType_MSI {
get {
return ResourceManager.GetString("BarcodeType_MSI", resourceCulture);
}
}
public static string BarcodeType_MaxiCode {
get {
return ResourceManager.GetString("BarcodeType_MaxiCode", resourceCulture);
}
}
public static string BarcodeType_PDF417 {
get {
return ResourceManager.GetString("BarcodeType_PDF417", resourceCulture);
}
}
public static string BarcodeType_POSTNET {
get {
return ResourceManager.GetString("BarcodeType_POSTNET", resourceCulture);
}
}
public static string BarcodeType_PatchCode {
get {
return ResourceManager.GetString("BarcodeType_PatchCode", resourceCulture);
}
}
public static string BarcodeType_Pharmacode {
get {
return ResourceManager.GetString("BarcodeType_Pharmacode", resourceCulture);
}
}
public static string BarcodeType_Plessey {
get {
return ResourceManager.GetString("BarcodeType_Plessey", resourceCulture);
}
}
public static string BarcodeType_PostBar {
get {
return ResourceManager.GetString("BarcodeType_PostBar", resourceCulture);
}
}
public static string BarcodeType_QR {
get {
return ResourceManager.GetString("BarcodeType_QR", resourceCulture);
}
}
public static string BarcodeType_RM4SCC {
get {
return ResourceManager.GetString("BarcodeType_RM4SCC", resourceCulture);
}
}
public static string BarcodeType_ShotCode {
get {
return ResourceManager.GetString("BarcodeType_ShotCode", resourceCulture);
}
}
}
}

View File

@@ -5156,4 +5156,88 @@ Probadores:
<data name="Architecture_8085" xml:space="preserve">
<value>Intel 8085</value>
</data>
<data name="BarcodeType_Aztec" xml:space="preserve">
<value>Código Azteca</value>
</data>
<data name="BarcodeType_CPC_Binary" xml:space="preserve">
<value>CPC Binario</value>
</data>
<data name="BarcodeType_Codabar" xml:space="preserve">
<value>Codabar</value>
</data>
<data name="BarcodeType_Code11" xml:space="preserve">
<value>Código 11</value>
</data>
<data name="BarcodeType_Code128" xml:space="preserve">
<value>Código 128</value>
</data>
<data name="BarcodeType_Code39" xml:space="preserve">
<value>Código 39</value>
</data>
<data name="BarcodeType_Code93" xml:space="preserve">
<value>Código 93</value>
</data>
<data name="BarcodeType_EAN13" xml:space="preserve">
<value>EAN-13</value>
</data>
<data name="BarcodeType_EAN2" xml:space="preserve">
<value>EAN-2</value>
</data>
<data name="BarcodeType_EAN5" xml:space="preserve">
<value>EAN-5</value>
</data>
<data name="BarcodeType_EAN8" xml:space="preserve">
<value>EAN-8</value>
</data>
<data name="BarcodeType_EZcode" xml:space="preserve">
<value>EZcode</value>
</data>
<data name="BarcodeType_FIM" xml:space="preserve">
<value>FIM (Marca de Identificación de Orientación)</value>
</data>
<data name="BarcodeType_ISBN" xml:space="preserve">
<value>ISBN</value>
</data>
<data name="BarcodeType_ISRC" xml:space="preserve">
<value>ISRC (Código Internacional Normalizado para Grabaciones)</value>
</data>
<data name="BarcodeType_ITF" xml:space="preserve">
<value>ITF (Intercalado 2 de 5)</value>
</data>
<data name="BarcodeType_ITF14" xml:space="preserve">
<value>ITF-14</value>
</data>
<data name="BarcodeType_MSI" xml:space="preserve">
<value>MSI (Plessey Modificado)</value>
</data>
<data name="BarcodeType_MaxiCode" xml:space="preserve">
<value>MaxiCode</value>
</data>
<data name="BarcodeType_PDF417" xml:space="preserve">
<value>PDF417</value>
</data>
<data name="BarcodeType_POSTNET" xml:space="preserve">
<value>POSTNET</value>
</data>
<data name="BarcodeType_PatchCode" xml:space="preserve">
<value>Código de Parche</value>
</data>
<data name="BarcodeType_Pharmacode" xml:space="preserve">
<value>Pharmacode</value>
</data>
<data name="BarcodeType_Plessey" xml:space="preserve">
<value>Plessey</value>
</data>
<data name="BarcodeType_PostBar" xml:space="preserve">
<value>PostBar</value>
</data>
<data name="BarcodeType_QR" xml:space="preserve">
<value>Código QR</value>
</data>
<data name="BarcodeType_RM4SCC" xml:space="preserve">
<value>RM4SCC (Código de Cliente de 4 Estados de Royal Mail)</value>
</data>
<data name="BarcodeType_ShotCode" xml:space="preserve">
<value>ShotCode</value>
</data>
</root>

View File

@@ -5234,4 +5234,88 @@ Do you want to continue?</value>
<data name="Architecture_8085" xml:space="preserve">
<value>Intel 8085</value>
</data>
<data name="BarcodeType_Aztec" xml:space="preserve">
<value>Aztec Code</value>
</data>
<data name="BarcodeType_CPC_Binary" xml:space="preserve">
<value>CPC Binary</value>
</data>
<data name="BarcodeType_Codabar" xml:space="preserve">
<value>Codabar</value>
</data>
<data name="BarcodeType_Code11" xml:space="preserve">
<value>Code 11</value>
</data>
<data name="BarcodeType_Code128" xml:space="preserve">
<value>Code 128</value>
</data>
<data name="BarcodeType_Code39" xml:space="preserve">
<value>Code 39</value>
</data>
<data name="BarcodeType_Code93" xml:space="preserve">
<value>Code 93</value>
</data>
<data name="BarcodeType_EAN13" xml:space="preserve">
<value>EAN-13</value>
</data>
<data name="BarcodeType_EAN2" xml:space="preserve">
<value>EAN-2</value>
</data>
<data name="BarcodeType_EAN5" xml:space="preserve">
<value>EAN-5</value>
</data>
<data name="BarcodeType_EAN8" xml:space="preserve">
<value>EAN-8</value>
</data>
<data name="BarcodeType_EZcode" xml:space="preserve">
<value>EZcode</value>
</data>
<data name="BarcodeType_FIM" xml:space="preserve">
<value>FIM (Facing Identification Mark)</value>
</data>
<data name="BarcodeType_ISBN" xml:space="preserve">
<value>ISBN</value>
</data>
<data name="BarcodeType_ISRC" xml:space="preserve">
<value>ISRC (International Standard Recording Code)</value>
</data>
<data name="BarcodeType_ITF" xml:space="preserve">
<value>ITF (Interleaved 2 of 5)</value>
</data>
<data name="BarcodeType_ITF14" xml:space="preserve">
<value>ITF-14</value>
</data>
<data name="BarcodeType_MSI" xml:space="preserve">
<value>MSI (Modified Plessey)</value>
</data>
<data name="BarcodeType_MaxiCode" xml:space="preserve">
<value>MaxiCode</value>
</data>
<data name="BarcodeType_PDF417" xml:space="preserve">
<value>PDF417</value>
</data>
<data name="BarcodeType_POSTNET" xml:space="preserve">
<value>POSTNET</value>
</data>
<data name="BarcodeType_PatchCode" xml:space="preserve">
<value>Patch Code</value>
</data>
<data name="BarcodeType_Pharmacode" xml:space="preserve">
<value>Pharmacode</value>
</data>
<data name="BarcodeType_Plessey" xml:space="preserve">
<value>Plessey</value>
</data>
<data name="BarcodeType_PostBar" xml:space="preserve">
<value>PostBar</value>
</data>
<data name="BarcodeType_QR" xml:space="preserve">
<value>QR Code</value>
</data>
<data name="BarcodeType_RM4SCC" xml:space="preserve">
<value>RM4SCC (Royal Mail 4-State Customer Code)</value>
</data>
<data name="BarcodeType_ShotCode" xml:space="preserve">
<value>ShotCode</value>
</data>
</root>