Skip to content

Commit

Permalink
Reorganize Localisation namespaces closes Humanizr#206
Browse files Browse the repository at this point in the history
  • Loading branch information
hazzik committed Apr 13, 2014
1 parent ab37331 commit 9bd638e
Show file tree
Hide file tree
Showing 24 changed files with 67 additions and 60 deletions.
7 changes: 6 additions & 1 deletion src/Humanizer/Configuration/Configurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
using System.Collections.Generic;
using System.Globalization;
using Humanizer.DateTimeHumanizeStrategy;
using Humanizer.Localisation.Formatters;
using Humanizer.Localisation;
using Humanizer.Localisation.Arabic;
using Humanizer.Localisation.CzechSlovakPolish;
using Humanizer.Localisation.Hebrew;
using Humanizer.Localisation.Romanian;
using Humanizer.Localisation.Russian;

namespace Humanizer.Configuration
{
Expand Down
42 changes: 21 additions & 21 deletions src/Humanizer/Humanizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,32 @@
<AssemblyOriginatorKeyFile>Humanizer.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="Localisation\NumberToWords\BrazilianPortugueseNumberToWordsConverter.cs" />
<Compile Include="Localisation\Portuguese\BrazilianPortugueseNumberToWordsConverter.cs" />
<Compile Include="GrammaticalCase.cs" />
<Compile Include="GrammaticalGender.cs" />
<Compile Include="Localisation\GrammaticalNumber\RussianGrammaticalNumber.cs" />
<Compile Include="Localisation\GrammaticalNumber\RussianGrammaticalNumberDetector.cs" />
<Compile Include="Localisation\NumberToWords\DutchNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\DefaultNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\FarsiNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\ArabicNumberToWordsConverter.cs" />
<Compile Include="Localisation\Russian\RussianGrammaticalNumber.cs" />
<Compile Include="Localisation\Russian\RussianGrammaticalNumberDetector.cs" />
<Compile Include="Localisation\Dutch\DutchNumberToWordsConverter.cs" />
<Compile Include="Localisation\DefaultNumberToWordsConverter.cs" />
<Compile Include="Localisation\Farsi\FarsiNumberToWordsConverter.cs" />
<Compile Include="Localisation\Arabic\ArabicNumberToWordsConverter.cs" />
<Compile Include="Bytes\ByteSize.cs" />
<Compile Include="Bytes\ByteSizeExtensions.cs" />
<Compile Include="CasingExtensions.cs" />
<Compile Include="Configuration\Configurator.cs" />
<Compile Include="DateHumanizeExtensions.cs" />
<Compile Include="Localisation\NumberToWords\EnglishNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\FrenchNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\HebrewNumberToWordsConverter.cs" />
<Compile Include="Localisation\Formatters\CzechSlovakPolishFormatter.cs" />
<Compile Include="Localisation\English\EnglishNumberToWordsConverter.cs" />
<Compile Include="Localisation\French\FrenchNumberToWordsConverter.cs" />
<Compile Include="Localisation\Hebrew\HebrewNumberToWordsConverter.cs" />
<Compile Include="Localisation\CzechSlovakPolish\CzechSlovakPolishFormatter.cs" />
<Compile Include="DateTimeHumanizeStrategy\DefaultDateTimeHumanizeStrategy.cs" />
<Compile Include="DateTimeHumanizeStrategy\IDateTimeHumanizeStrategy.cs" />
<Compile Include="DateTimeHumanizeStrategy\PrecisionDateTimeHumanizeStrategy.cs" />
<Compile Include="Localisation\NumberToWords\PolishNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\RussianNumberToWordsConverter.cs" />
<Compile Include="Localisation\Formatters\HebrewFormatter.cs" />
<Compile Include="Localisation\CzechSlovakPolish\PolishNumberToWordsConverter.cs" />
<Compile Include="Localisation\Russian\RussianNumberToWordsConverter.cs" />
<Compile Include="Localisation\Hebrew\HebrewFormatter.cs" />
<Compile Include="Localisation\Tense.cs" />
<Compile Include="Localisation\NumberToWords\SpanishNumberToWordsConverter.cs" />
<Compile Include="Localisation\Spanish\SpanishNumberToWordsConverter.cs" />
<Compile Include="TimeSpanHumanizeExtensions.cs" />
<Compile Include="FluentDate\In.SomeTimeFrom.cs">
<AutoGen>True</AutoGen>
Expand All @@ -101,9 +101,9 @@
<DesignTime>True</DesignTime>
<DependentUpon>On.Days.tt</DependentUpon>
</Compile>
<Compile Include="Localisation\Formatters\ArabicFormatter.cs" />
<Compile Include="Localisation\Formatters\DefaultFormatter.cs" />
<Compile Include="Localisation\Formatters\IFormatter.cs" />
<Compile Include="Localisation\Arabic\ArabicFormatter.cs" />
<Compile Include="Localisation\DefaultFormatter.cs" />
<Compile Include="Localisation\IFormatter.cs" />
<Compile Include="Localisation\ResourceKeys.Common.cs" />
<Compile Include="Localisation\ResourceKeys.DateHumanize.cs" />
<Compile Include="Localisation\ResourceKeys.TimeSpanHumanize.cs" />
Expand All @@ -125,8 +125,8 @@
<DependentUpon>In.Months.tt</DependentUpon>
</Compile>
<Compile Include="Localisation\Resources.cs" />
<Compile Include="Localisation\Formatters\RomanianFormatter.cs" />
<Compile Include="Localisation\Formatters\RussianFormatter.cs" />
<Compile Include="Localisation\Romanian\RomanianFormatter.cs" />
<Compile Include="Localisation\Russian\RussianFormatter.cs" />
<Compile Include="NumberToTimeSpanExtensions.cs" />
<Compile Include="InflectorExtensions.cs" />
<Compile Include="LetterCasing.cs" />
Expand Down Expand Up @@ -190,7 +190,7 @@
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup />

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.Arabic
{
internal class ArabicFormatter : DefaultFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Arabic
{
internal class ArabicNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.CzechSlovakPolish
{
internal class CzechSlovakPolishFormatter : DefaultFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.CzechSlovakPolish
{
internal class PolishNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation
{
/// <summary>
/// Default implementation of IFormatter interface.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation
{
internal class DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Dutch
{
/// <summary>
/// Dutch spelling of numbers is not really officially regulated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.English
{
internal class EnglishNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Farsi
{
internal class FarsiNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.French
{
internal class FrenchNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.Hebrew
{
internal class HebrewFormatter : DefaultFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Hebrew
{
internal class HebrewNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation
{
/// <summary>
/// Implement this interface if your language has complex rules around dealing with numbers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Portuguese
{
internal class BrazilianPortugueseNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.Romanian
{
internal class RomanianFormatter : DefaultFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Humanizer.Localisation.GrammaticalNumber;

namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.Russian
{
internal class RussianFormatter : DefaultFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Humanizer.Localisation.Russian
{
internal enum RussianGrammaticalNumber
{
Singular,
Paucal,
Plural
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.GrammaticalNumber
namespace Humanizer.Localisation.Russian
{
internal static class RussianGrammaticalNumberDetector
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using Humanizer.Localisation.GrammaticalNumber;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Russian
{
internal class RussianNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.Spanish
{
internal class SpanishNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
14 changes: 12 additions & 2 deletions src/Humanizer/NumberToWordsExtension.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using Humanizer.Localisation.NumberToWords;
using Humanizer.Localisation;
using Humanizer.Localisation.Arabic;
using Humanizer.Localisation.CzechSlovakPolish;
using Humanizer.Localisation.Dutch;
using Humanizer.Localisation.English;
using Humanizer.Localisation.Farsi;
using Humanizer.Localisation.French;
using Humanizer.Localisation.Hebrew;
using Humanizer.Localisation.Portuguese;
using Humanizer.Localisation.Russian;
using Humanizer.Localisation.Spanish;

namespace Humanizer
{
Expand Down

0 comments on commit 9bd638e

Please sign in to comment.