Changeset 2000 for trunk/eraser


Ignore:
Timestamp:
5/1/2010 10:51:58 AM (4 years ago)
Author:
lowjoel
Message:

Introduced localisations for Eraser.Util.Native. Addresses #262.

Location:
trunk/eraser/Eraser.Util.Native
Files:
5 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.Util.Native/Eraser.Util.Native.vcproj

    r1997 r2000  
    3131            <Tool 
    3232                Name="VCPreBuildEventTool" 
    33                 CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;" 
     33                CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;&#x0D;&#x0A;csgettext --merge --recursive EN,NL,IT,PL &quot;$(ProjectDir)\.&quot; Strings&#x0D;&#x0A;if ERRORLEVEL 0 exit 0" 
    3434            /> 
    3535            <Tool 
     
    5757            <Tool 
    5858                Name="VCManagedResourceCompilerTool" 
     59                ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 
    5960            /> 
    6061            <Tool 
     
    106107            <Tool 
    107108                Name="VCPreBuildEventTool" 
    108                 CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;" 
     109                CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;&#x0D;&#x0A;csgettext --merge --recursive EN,NL,IT,PL &quot;$(ProjectDir)\.&quot; Strings&#x0D;&#x0A;if ERRORLEVEL 0 exit 0" 
    109110            /> 
    110111            <Tool 
     
    133134            <Tool 
    134135                Name="VCManagedResourceCompilerTool" 
     136                ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 
    135137            /> 
    136138            <Tool 
     
    183185            <Tool 
    184186                Name="VCPreBuildEventTool" 
    185                 CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;" 
     187                CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;&#x0D;&#x0A;csgettext --merge --recursive EN,NL,IT,PL &quot;$(ProjectDir)\.&quot; Strings&#x0D;&#x0A;if ERRORLEVEL 0 exit 0" 
    186188            /> 
    187189            <Tool 
     
    208210            <Tool 
    209211                Name="VCManagedResourceCompilerTool" 
     212                ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 
    210213            /> 
    211214            <Tool 
     
    257260            <Tool 
    258261                Name="VCPreBuildEventTool" 
    259                 CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;" 
     262                CommandLine="&quot;$(SolutionDir)UpdateVersions.bat&quot; &quot;$(SolutionDir)\&quot; &quot;$(SolutionDir)Version.rc.in&quot; &quot;$(SolutionDir)Version.rc&quot;&#x0D;&#x0A;csgettext --merge --recursive EN,NL,IT,PL &quot;$(ProjectDir)\.&quot; Strings&#x0D;&#x0A;if ERRORLEVEL 0 exit 0" 
    260263            /> 
    261264            <Tool 
     
    283286            <Tool 
    284287                Name="VCManagedResourceCompilerTool" 
     288                ResourceFileName="$(IntDir)\$(ProjectName).$(InputName).resources" 
    285289            /> 
    286290            <Tool 
     
    339343        <ProjectReference 
    340344            ReferencedProjectIdentifier="{D083E1A8-3A4C-4683-9B3F-D5FEDE61B9C9}" 
     345            CopyLocal="false" 
     346            CopyLocalDependencies="false" 
    341347            RelativePathToProject=".\Eraser.Util\Eraser.Util.csproj" 
    342348        /> 
     
    460466                > 
    461467            </File> 
     468            <File 
     469                RelativePath=".\Strings.en.resx" 
     470                > 
     471            </File> 
     472            <File 
     473                RelativePath=".\Strings.it.resx" 
     474                > 
     475            </File> 
     476            <File 
     477                RelativePath=".\Strings.nl.resx" 
     478                > 
     479            </File> 
     480            <File 
     481                RelativePath=".\Strings.pl.resx" 
     482                > 
     483            </File> 
     484            <File 
     485                RelativePath=".\Strings.resx" 
     486                > 
     487            </File> 
    462488        </Filter> 
    463489    </Files> 
  • trunk/eraser/Eraser.Util.Native/Fat12Api.cpp

    r1802 r2000  
    3232        //Sanity checks: check that this volume is FAT16! 
    3333        if (!IsFat12() || info->VolumeFormat == L"FAT16") 
    34             throw gcnew ArgumentException(L"The volume provided is not a FAT12 volume."); 
     34            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 volume.")); 
    3535    } 
    3636 
     
    3939        //Sanity checks: check that this volume is FAT16! 
    4040        if (!IsFat12() || info->VolumeFormat == L"FAT16") 
    41             throw gcnew ArgumentException(L"The volume provided is not a FAT12 volume."); 
     41            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 volume.")); 
    4242    } 
    4343 
     
    6060        unsigned nextCluster = GetFatValue(cluster); 
    6161        if (nextCluster <= 0x001 || (nextCluster >= 0xFF0 && nextCluster <= 0xFF6)) 
    62             throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked free."); 
     62            throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 
    6363        else if (nextCluster == 0xFF7) 
    64             throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
     64            throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 
    6565        else if (nextCluster >= 0xFF8) 
    6666            return 0xFFFFFFFF; 
     
    7575            unsigned nextCluster = GetFatValue(cluster); 
    7676            if (nextCluster <= 0x001 || (nextCluster >= 0xFFF0 && nextCluster <= 0xFF6)) 
    77                 throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked free."); 
     77                throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 
    7878            else if (nextCluster == 0xFF7) 
    79                 throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
     79                throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 
    8080            else if (nextCluster >= 0xFF8) 
    8181                return ClusterSizeToSize(result); 
  • trunk/eraser/Eraser.Util.Native/Fat12Or16Api.cpp

    r1802 r2000  
    3232        //Sanity checks: check that this volume is FAT12 or FAT16! 
    3333        if (info->VolumeFormat != L"FAT12" && info->VolumeFormat != "FAT16") 
    34             throw gcnew ArgumentException(L"The volume provided is not a FAT12 or FAT16 volume."); 
     34            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 or FAT16 volume.")); 
    3535    } 
    3636 
     
    3939        //Sanity checks: check that this volume is FAT12 or FAT16! 
    4040        if (info->VolumeFormat != L"FAT12" && info->VolumeFormat != "FAT16") 
    41             throw gcnew ArgumentException(L"The volume provided is not a FAT12 or FAT16 volume."); 
     41            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT12 or FAT16 volume.")); 
    4242    } 
    4343 
     
    8080        { 
    8181            if (path[0] != L'\\') 
    82                 throw gcnew ArgumentException(L"The path provided is not volume relative. " + 
    83                     gcnew String(L"Volume relative paths must begin with a backslash.")); 
     82                throw gcnew ArgumentException(S::_(L"The path provided is not volume relative. " 
     83                    L"Volume relative paths must begin with a backslash.")); 
    8484            path = path->Remove(0, 1); 
    8585        } 
     
    162162    { 
    163163        if (directory.Short.Attributes == 0x0F) 
    164             throw gcnew ArgumentException(L"The provided directory is a long file name."); 
     164            throw gcnew ArgumentException(S::_(L"The provided directory is a long file name.")); 
    165165        return directory.Short.StartClusterLow; 
    166166    } 
     
    174174    { 
    175175        if (directory.Short.Attributes == 0x0F) 
    176             throw gcnew ArgumentException(L"The provided directory is a long file name."); 
     176            throw gcnew ArgumentException(S::_(L"The provided directory is a long file name.")); 
    177177        return directory.Short.StartClusterLow; 
    178178    } 
  • trunk/eraser/Eraser.Util.Native/Fat16Api.cpp

    r1802 r2000  
    3232        //Sanity checks: check that this volume is FAT16! 
    3333        if (IsFat12() || info->VolumeFormat == L"FAT12") 
    34             throw gcnew ArgumentException(L"The volume provided is not a FAT16 volume."); 
     34            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT16 volume.")); 
    3535    } 
    3636 
     
    3939        //Sanity checks: check that this volume is FAT16! 
    4040        if (IsFat12() || info->VolumeFormat == L"FAT12") 
    41             throw gcnew ArgumentException(L"The volume provided is not a FAT16 volume."); 
     41            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT16 volume.")); 
    4242    } 
    4343 
     
    5959        unsigned short* fatPtr = reinterpret_cast<unsigned short*>(Fat); 
    6060        if (fatPtr[cluster] <= 0x0001 || (fatPtr[cluster] >= 0xFFF0 && fatPtr[cluster] <= 0xFFF6)) 
    61             throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked free."); 
     61            throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 
    6262        else if (fatPtr[cluster] == 0xFFF7) 
    63             throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
     63            throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 
    6464        else if (fatPtr[cluster] >= 0xFFF8) 
    6565            return 0xFFFFFFFF; 
     
    7474        { 
    7575            if (fatPtr[cluster] <= 0x0001 || (fatPtr[cluster] >= 0xFFF0 && fatPtr[cluster] <= 0xFFF6)) 
    76                 throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked free."); 
     76                throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 
    7777            else if (fatPtr[cluster] == 0xFFF7) 
    78                 throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
     78                throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 
    7979            else if (fatPtr[cluster] >= 0xFFF8) 
    8080                return ClusterSizeToSize(result); 
  • trunk/eraser/Eraser.Util.Native/Fat32Api.cpp

    r1802 r2000  
    3232        //Sanity checks: check that this volume is FAT32! 
    3333        if (info->VolumeFormat != L"FAT32") 
    34             throw gcnew ArgumentException(L"The volume provided is not a FAT32 volume."); 
     34            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT32 volume.")); 
    3535    } 
    3636 
     
    3939        //Sanity checks: check that this volume is FAT32! 
    4040        if (info->VolumeFormat != L"FAT32") 
    41             throw gcnew ArgumentException(L"The volume provided is not a FAT32 volume."); 
     41            throw gcnew ArgumentException(S::_(L"The volume provided is not a FAT32 volume.")); 
    4242    } 
    4343 
     
    8686        unsigned* fatPtr = reinterpret_cast<unsigned*>(Fat); 
    8787        if (fatPtr[cluster] <= 0x00000001 || (fatPtr[cluster] >= 0x0FFFFFF0 && fatPtr[cluster] <= 0x0FFFFFF6)) 
    88             throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked free."); 
     88            throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 
    8989        else if (fatPtr[cluster] == 0x0FFFFFF7) 
    90             throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
     90            throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 
    9191        else if (fatPtr[cluster] >= 0x0FFFFFF8) 
    9292            return 0xFFFFFFFF; 
     
    101101        { 
    102102            if (fatPtr[cluster] <= 0x00000001 || (fatPtr[cluster] >= 0x0FFFFFF0 && fatPtr[cluster] <= 0x0FFFFFF6)) 
    103                 throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked free."); 
     103                throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked free.")); 
    104104            else if (fatPtr[cluster] == 0x0FFFFFF7) 
    105                 throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
     105                throw gcnew ArgumentException(S::_(L"Invalid FAT cluster: cluster is marked bad.")); 
    106106            else if (fatPtr[cluster] >= 0x0FFFFFF8) 
    107107                return ClusterSizeToSize(result); 
     
    117117        { 
    118118            if (path[0] != L'\\') 
    119                 throw gcnew ArgumentException(L"The path provided is not volume relative. " + 
    120                     gcnew String(L"Volume relative paths must begin with a backslash.")); 
     119                throw gcnew ArgumentException(S::_(L"The path provided is not volume relative. " + 
     120                    L"Volume relative paths must begin with a backslash.")); 
    121121            path = path->Remove(0, 1); 
    122122        } 
  • trunk/eraser/Eraser.Util.Native/FatApi.cpp

    r1802 r2000  
    100100    { 
    101101        if (!IsClusterAllocated(cluster)) 
    102             throw gcnew ArgumentException(L"The specified cluster is not used."); 
     102            throw gcnew ArgumentException(S::_(L"The specified cluster is not used.")); 
    103103 
    104104        array<Byte>^ result = gcnew array<Byte>(FileSize(cluster)); 
     
    120120    { 
    121121        if (!IsClusterAllocated(cluster)) 
    122             throw gcnew ArgumentException(L"The specified cluster is not used."); 
     122            throw gcnew ArgumentException(S::_(L"The specified cluster is not used.")); 
    123123        if (static_cast<unsigned>(buffer->Length) != FileSize(cluster)) 
    124             throw gcnew ArgumentException(L"The provided file contents will not fit in the " + 
    125                 gcnew String(L"allocated file.")); 
     124            throw gcnew ArgumentException(S::_(L"The provided file contents will not fit in the " 
     125                L"allocated file.")); 
    126126 
    127127        int clusterSize = static_cast<int>(ClusterSizeToSize(1)); 
     
    196196                        //Check that the sequence is one less than the previous one. 
    197197                        if (sequence != i->LongFileName.Sequence + 1) 
    198                             throw gcnew ArgumentException(L"Invalid directory entry."); 
     198                            throw gcnew ArgumentException(S::_(L"Invalid directory entry.")); 
    199199                    } 
    200200                     
     
    269269                        //Check that the sequence is one less than the previous one. 
    270270                        if (sequence != i->LongFileName.Sequence + 1) 
    271                             throw gcnew ArgumentException(L"Invalid directory entry."); 
     271                            throw gcnew ArgumentException(S::_(L"Invalid directory entry.")); 
    272272                    } 
    273273                    else 
  • trunk/eraser/Eraser.Util.Native/OpenHandle.cpp

    r1812 r2000  
    4242 
    4343            if (bufferSize == 0) 
    44                 throw gcnew InvalidOperationException("The list of open system handles could not be retrieved."); 
     44                throw gcnew InvalidOperationException(S::_(L"The list of open system handles could not be retrieved.")); 
    4545        } 
    4646 
Note: See TracChangeset for help on using the changeset viewer.