Skip to content

Commit

Permalink
[VirtualPC disk image] Translate new strings to Spanish.
Browse files Browse the repository at this point in the history
  • Loading branch information
claunia committed Jan 2, 2024
1 parent 71f86bf commit 4825d41
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 9 deletions.
45 changes: 45 additions & 0 deletions Aaru.Images/Localization/Localization.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Aaru.Images/Localization/Localization.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2934,4 +2934,19 @@
<data name="_5_6_or_7" xml:space="preserve">
<value>5, 6 ó 7</value>
</data>
<data name="Block_size_too_small_for_number_of_sectors" xml:space="preserve">
<value>Tamaño del bloque demasiado pequeño para el número de sectores, intenta uno mayor.</value>
</data>
<data name="Invalid_block_size" xml:space="preserve">
<value>Tamaño de bloque no válido.</value>
</data>
<data name="Invalid_value_for_dynamic_option" xml:space="preserve">
<value>Valor no válido para opción dinámica.</value>
</data>
<data name="Vhd_Block_size_Must_be_a_power_of_2" xml:space="preserve">
<value>Tamaño de bloque. Debe ser potencia de 2. VirtualPC sólo soporta 2MiB y 512KiB</value>
</data>
<data name="Create_a_dynamic_image" xml:space="preserve">
<value>Crear una imagen dinámica, los sectores vacíos se ignoran</value>
</data>
</root>
15 changes: 15 additions & 0 deletions Aaru.Images/Localization/Localization.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2944,4 +2944,19 @@
<data name="A2R_Name" xml:space="preserve">
<value>A2R</value>
</data>
<data name="Invalid_block_size" xml:space="preserve">
<value>Invalid block size.</value>
</data>
<data name="Invalid_value_for_dynamic_option" xml:space="preserve">
<value>Invalid value for dynamic option.</value>
</data>
<data name="Block_size_too_small_for_number_of_sectors" xml:space="preserve">
<value>Block size too small for number of sectors, try with a bigger value.</value>
</data>
<data name="Create_a_dynamic_image" xml:space="preserve">
<value>Create a dynamic image, empty sectors are ignored</value>
</data>
<data name="Vhd_Block_size_Must_be_a_power_of_2" xml:space="preserve">
<value>Block size. Must be a power of 2. Only 2MiB and 512KiB are supported by VirtualPC</value>
</data>
</root>
5 changes: 2 additions & 3 deletions Aaru.Images/VHD/Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,8 @@ public sealed partial class Vhd
/// <inheritdoc />
public IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions => new[]
{
("dynamic", typeof(bool), "Create a dynamic image, empty sectors are ignored", (object)true),
("block_size", typeof(uint),
"Block size. Must be a power of 2. Only 2MiB and 512KiB are supported by VirtualPC", 2097152)
("dynamic", typeof(bool), Localization.Create_a_dynamic_image, (object)true),
("block_size", typeof(uint), Localization.Vhd_Block_size_Must_be_a_power_of_2, 2097152)
};

/// <inheritdoc />
Expand Down
12 changes: 6 additions & 6 deletions Aaru.Images/VHD/Write.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public bool Create(string path, MediaType mediaType, Dictionary<string, string>
{
if(!uint.TryParse(tmpValue, out _blockSize))
{
ErrorMessage = "Invalid block size.";
ErrorMessage = Localization.Invalid_block_size;

return false;
}
Expand All @@ -74,7 +74,7 @@ public bool Create(string path, MediaType mediaType, Dictionary<string, string>
{
if(!bool.TryParse(tmpValue, out _dynamic))
{
ErrorMessage = "Invalid option for dynamic image.";
ErrorMessage = Localization.Invalid_value_for_dynamic_option;

return false;
}
Expand Down Expand Up @@ -155,7 +155,7 @@ public bool Create(string path, MediaType mediaType, Dictionary<string, string>

if(numberOfBlocks > uint.MaxValue)
{
ErrorMessage = "Block size too small for number of sectors, try with a bigger value.";
ErrorMessage = Localization.Block_size_too_small_for_number_of_sectors;
return false;
}

Expand Down Expand Up @@ -231,7 +231,7 @@ public bool WriteSector(byte[] data, ulong sectorAddress)
_writingStream.Seek((long)(0 + sectorAddress * 512), SeekOrigin.Begin);
_writingStream.Write(data, 0, data.Length);

ErrorMessage = "";
ErrorMessage = string.Empty;

return true;
}
Expand Down Expand Up @@ -389,7 +389,7 @@ public bool WriteSectors(byte[] data, ulong sectorAddress, uint length)
_writingStream.Seek((long)(0 + sectorAddress * 512), SeekOrigin.Begin);
_writingStream.Write(data, 0, data.Length);

ErrorMessage = "";
ErrorMessage = string.Empty;

return true;
}
Expand Down Expand Up @@ -426,7 +426,7 @@ public bool Close()
_writingStream.Close();

IsWriting = false;
ErrorMessage = "";
ErrorMessage = string.Empty;

return true;
}
Expand Down

0 comments on commit 4825d41

Please sign in to comment.