Skip to content

Commit

Permalink
Re-organize for version 1.1 and Nuget library
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzCK committed Apr 4, 2018
1 parent ae8d503 commit d2ee14b
Show file tree
Hide file tree
Showing 18 changed files with 109 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bin/*
src/obj/*
src/bin/*
src/**/obj/*
src/**/bin/*
*.csproj.user
**/.vs/*
**/packages/*
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/App.config → src/Pseudo-i18n-Processor/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
</startup>
</configuration>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,27 @@
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PseudoInternationalization</RootNamespace>
<AssemblyName>Pseudo-i18n</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AssemblyName>Pseudo-i18n-Processor</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.1.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -23,23 +39,25 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Release\</OutputPath>
<OutputPath>..\..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup>
<StartupObject>PseudoInternationalization.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="FluentCommandLineParser, Version=1.4.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\FluentCommandLineParser.1.4.3\lib\net35\FluentCommandLineParser.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\FluentCommandLineParser.1.4.3\lib\net35\FluentCommandLineParser.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -62,12 +80,31 @@
<Compile Include="ResxProcessor.cs" />
<Compile Include="Source.cs" />
<Compile Include="StringsProcessor.cs" />
<Compile Include="Translator.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Pseudo-i18n\Pseudo-i18n.csproj">
<Project>{690a391a-e4cc-428a-bdef-03967b535815}</Project>
<Name>Pseudo-i18n</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FluentCommandLineParser" version="1.4.3" targetFramework="net461" />
<package id="FluentCommandLineParser" version="1.4.3" targetFramework="net47" />
</packages>
15 changes: 12 additions & 3 deletions Pseudo-i18n.sln → src/Pseudo-i18n.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2015
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pseudo-i18n", "src/Pseudo-i18n.csproj", "{B7D62DE4-E2A2-4F6A-8C8C-752F653BD6A9}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pseudo-i18n-Processor", "Pseudo-i18n-Processor\Pseudo-i18n-Processor.csproj", "{B7D62DE4-E2A2-4F6A-8C8C-752F653BD6A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pseudo-i18n", "Pseudo-i18n\Pseudo-i18n.csproj", "{690A391A-E4CC-428A-BDEF-03967B535815}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -15,8 +17,15 @@ Global
{B7D62DE4-E2A2-4F6A-8C8C-752F653BD6A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7D62DE4-E2A2-4F6A-8C8C-752F653BD6A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7D62DE4-E2A2-4F6A-8C8C-752F653BD6A9}.Release|Any CPU.Build.0 = Release|Any CPU
{690A391A-E4CC-428A-BDEF-03967B535815}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{690A391A-E4CC-428A-BDEF-03967B535815}.Debug|Any CPU.Build.0 = Debug|Any CPU
{690A391A-E4CC-428A-BDEF-03967B535815}.Release|Any CPU.ActiveCfg = Release|Any CPU
{690A391A-E4CC-428A-BDEF-03967B535815}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CF715192-7AE5-4A49-A796-F2BD393211B3}
EndGlobalSection
EndGlobal
18 changes: 18 additions & 0 deletions src/Pseudo-i18n/Pseudo-i18n.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<RootNamespace>PseudoInternationalization</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/LorenzCK/Pseudo-i18n</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/LorenzCK/Pseudo-i18n/blob/master/LICENSE</PackageLicenseUrl>
<Authors>LorenzCK</Authors>
<Description>Simple pseudo-internationalization utility library: allows you to convert any latin alphabet string to a pseudo-language in order to test whether your application is localization-ready. The pseudo-strings respect links, tags, and other markup.
A command-line utility that converts resource files is available from the library’s Github page.
Based on John Robbin’s Pseudoizer and Scott Hanselman’s implementation.</Description>
<PackageTags>i18n, internationalization, pseudo-language, pseudo-internationalization, strings</PackageTags>
<PackageReleaseNotes>First release.</PackageReleaseNotes>
<Company />
</PropertyGroup>

</Project>
10 changes: 5 additions & 5 deletions src/Translator.cs → src/Pseudo-i18n/Translator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

namespace PseudoInternationalization {

static class Translator {
public static class Translator {

/// <summary>
/// Converts a string to a pseudo-internationized string.
/// Converts a string to a pseudo-internationalized string.
/// </summary>
/// <remarks>
/// Primarily for latin based languages. This will need updating to
/// work with Eastern languages.
/// Primarily for latin based languages.
/// This will need updating to work with Eastern languages.
/// Taken from: https://github.com/shanselman/Psuedoizer
/// </remarks>
/// <param name="inputString">The string to use as a base.</param>
Expand All @@ -27,7 +27,7 @@ static class Translator {

// Calculate the extra space necessary for pseudo
// internationalization. The rules, according to "Developing
// International Software" is that < 10 characters you should grow
// International Software" is that < 10 characters you should grow
// by 400% while >= 10 characters should grow by 30%.
int origLen = inputString.Length;
int pseudoLen = 0;
Expand Down
23 changes: 23 additions & 0 deletions src/Pseudo-i18n/TranslatorExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace PseudoInternationalization {

public static class TranslatorExtensions {

/// <summary>
/// Converts a string to a pseudo-internationalized string.
/// </summary>
/// <remarks>
/// Primarily for latin based languages.
/// This will need updating to work with Eastern languages.
/// Taken from: https://github.com/shanselman/Psuedoizer
/// </remarks>
/// <param name="s">The string to use as a base.</param>
/// <returns>A longer and twiddled string.</returns>
public static string ToPseudo(this string s) {
return Translator.ConvertToFakeInternationalized(s);
}

}

}

0 comments on commit d2ee14b

Please sign in to comment.