mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move all localizable strings from Aaru.Images project to resources.
This commit is contained in:
@@ -53,21 +53,21 @@ public sealed partial class Blu
|
||||
{
|
||||
if(sectorSize != 512)
|
||||
{
|
||||
ErrorMessage = "Unsupported sector size";
|
||||
ErrorMessage = Localization.Unsupported_sector_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(sectors > 0xFFFFFF)
|
||||
{
|
||||
ErrorMessage = "Too many sectors";
|
||||
ErrorMessage = Localization.Too_many_sectors;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!SupportedMediaTypes.Contains(mediaType))
|
||||
{
|
||||
ErrorMessage = $"Unsupported media format {mediaType}";
|
||||
ErrorMessage = string.Format(Localization.Unsupported_media_format_0, mediaType);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public sealed partial class Blu
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
ErrorMessage = $"Could not create new image file, exception {e.Message}";
|
||||
ErrorMessage = string.Format(Localization.Could_not_create_new_image_file_exception_0, e.Message);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public sealed partial class Blu
|
||||
/// <inheritdoc />
|
||||
public bool WriteMediaTag(byte[] data, MediaTagType tag)
|
||||
{
|
||||
ErrorMessage = "Writing media tags is not supported.";
|
||||
ErrorMessage = Localization.Writing_media_tags_is_not_supported;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -111,21 +111,21 @@ public sealed partial class Blu
|
||||
|
||||
if(!IsWriting)
|
||||
{
|
||||
ErrorMessage = "Tried to write on a non-writable image";
|
||||
ErrorMessage = Localization.Tried_to_write_on_a_non_writable_image;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(data.Length != 512)
|
||||
{
|
||||
ErrorMessage = "Incorrect data size";
|
||||
ErrorMessage = Localization.Incorrect_data_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(sectorAddress >= _imageInfo.Sectors)
|
||||
{
|
||||
ErrorMessage = "Tried to write past image size";
|
||||
ErrorMessage = Localization.Tried_to_write_past_image_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -145,21 +145,21 @@ public sealed partial class Blu
|
||||
|
||||
if(!IsWriting)
|
||||
{
|
||||
ErrorMessage = "Tried to write on a non-writable image";
|
||||
ErrorMessage = Localization.Tried_to_write_on_a_non_writable_image;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(data.Length % 512 != 0)
|
||||
{
|
||||
ErrorMessage = "Incorrect data size";
|
||||
ErrorMessage = Localization.Incorrect_data_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(sectorAddress + length > _imageInfo.Sectors)
|
||||
{
|
||||
ErrorMessage = "Tried to write past image size";
|
||||
ErrorMessage = Localization.Tried_to_write_past_image_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -177,14 +177,14 @@ public sealed partial class Blu
|
||||
{
|
||||
if(!IsWriting)
|
||||
{
|
||||
ErrorMessage = "Tried to write on a non-writable image";
|
||||
ErrorMessage = Localization.Tried_to_write_on_a_non_writable_image;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(sectorAddress >= _imageInfo.Sectors)
|
||||
{
|
||||
ErrorMessage = "Tried to write past image size";
|
||||
ErrorMessage = Localization.Tried_to_write_past_image_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ public sealed partial class Blu
|
||||
|
||||
break;
|
||||
default:
|
||||
ErrorMessage = "Incorrect data size";
|
||||
ErrorMessage = Localization.Incorrect_data_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -267,14 +267,14 @@ public sealed partial class Blu
|
||||
{
|
||||
if(!IsWriting)
|
||||
{
|
||||
ErrorMessage = "Tried to write on a non-writable image";
|
||||
ErrorMessage = Localization.Tried_to_write_on_a_non_writable_image;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(sectorAddress + length > _imageInfo.Sectors)
|
||||
{
|
||||
ErrorMessage = "Tried to write past image size";
|
||||
ErrorMessage = Localization.Tried_to_write_past_image_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public sealed partial class Blu
|
||||
case 524:
|
||||
case 512: break;
|
||||
default:
|
||||
ErrorMessage = "Incorrect data size";
|
||||
ErrorMessage = Localization.Incorrect_data_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ public sealed partial class Blu
|
||||
|
||||
break;
|
||||
default:
|
||||
ErrorMessage = "Incorrect data size";
|
||||
ErrorMessage = Localization.Incorrect_data_size;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -373,7 +373,7 @@ public sealed partial class Blu
|
||||
{
|
||||
if(!IsWriting)
|
||||
{
|
||||
ErrorMessage = "Image is not opened for writing";
|
||||
ErrorMessage = Localization.Image_is_not_opened_for_writing;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -438,7 +438,7 @@ public sealed partial class Blu
|
||||
/// <inheritdoc />
|
||||
public bool WriteSectorTag(byte[] data, ulong sectorAddress, SectorTagType tag)
|
||||
{
|
||||
ErrorMessage = "Unsupported feature";
|
||||
ErrorMessage = Localization.Unsupported_feature;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -446,7 +446,7 @@ public sealed partial class Blu
|
||||
/// <inheritdoc />
|
||||
public bool WriteSectorsTag(byte[] data, ulong sectorAddress, uint length, SectorTagType tag)
|
||||
{
|
||||
ErrorMessage = "Unsupported feature";
|
||||
ErrorMessage = Localization.Unsupported_feature;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user