1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[pollock] small fixes & improvements

* Make sure translations that are the same as English are removed in the .po
* Automate digital signature
* Add a more distinguishable icon
* Also update French translation
This commit is contained in:
Pete Batard 2018-07-20 14:59:38 +01:00
parent 6b584d420a
commit bb00983ad8
8 changed files with 61 additions and 31 deletions

View file

@ -17,6 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Icon courtesy of Axialis Fluent Pro 2018 - Letters and Symbols.
* CC BY-ND 4.0 - https://www.axialis.com/icons.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -426,13 +431,13 @@ namespace pollock
else
{
writer.WriteLine($"msgid {en_str}");
writer.WriteLine($"msgstr {msg_str}");
writer.WriteLine($"msgstr {((msg_str == en_str) ? "\"\"" : msg_str)}");
}
}
}
nb_po_saved++;
Console.WriteLine("DONE");
}
Console.WriteLine("DONE");
return nb_po_saved;
}
@ -1124,11 +1129,6 @@ Retry:
Console.WriteLine($"{list[index][0]} was selected.");
Console.WriteLine();
po_file = $"{list[index][1]}.po";
if (File.Exists(po_file))
{
if (!PromptForQuestion($"A '{po_file}' file already exists. Do you want to overwrite it? (If unsure, answer 'y')"))
goto Error;
}
Language old_en_US = null;
if (list[index][2] == list[0][2])
@ -1170,7 +1170,12 @@ Retry:
old_en_US = old_langs[0];
}
if (CreatePoFiles(ParseLocFile(loc_file, list[index][1]), old_en_US) != 1)
if (File.Exists(po_file))
{
if (!PromptForQuestion($"A '{po_file}' file already exists. Do you want to overwrite it? (If unsure, say 'y')"))
goto Error;
}
if (CreatePoFiles(ParseLocFile(loc_file, list[index][1]), old_en_US) < 1)
{
Console.WriteLine("Failed to create PO file");
goto Error;

View file

@ -32,7 +32,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>../../rufus.ico</ApplicationIcon>
<ApplicationIcon>pollock.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -49,7 +49,27 @@
<Compile Include="Pollock.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="../../rufus.ico" />
<Content Include="pollock.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="PostBuildMacros">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="Targets" />
</GetAssemblyIdentity>
<ItemGroup>
<VersionNumber Include="@(Targets->'%(Version)')" />
</ItemGroup>
</Target>
<PropertyGroup>
<PostBuildEventDependsOn>
$(PostBuildEventDependsOn);
PostBuildMacros;
</PostBuildEventDependsOn>
<PostBuildEvent>for /f "tokens=1,2 delims=." %25%25i in ("@(VersionNumber)") do set "major=%25%25i" &amp;set "minor=%25%25j"
set version=%25major%25.%25minor%25
if $(ConfigurationName) == Release (
copy $(TargetDir)$(TargetFileName) $(SolutionDir)..\..\..\pollock-%25version%25.exe /y
$(SolutionDir)..\..\..\_sign.cmd $(SolutionDir)..\..\..\pollock-%25version%25.exe
)</PostBuildEvent>
</PropertyGroup>
</Project>

BIN
res/loc/pollock/pollock.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB