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 27, 2014
1 parent 391b46e commit 4270e1b
Show file tree
Hide file tree
Showing 39 changed files with 112 additions and 87 deletions.
4 changes: 1 addition & 3 deletions src/Humanizer/Configuration/Configurator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Humanizer.DateTimeHumanizeStrategy;
using Humanizer.Localisation.Formatters;
using Humanizer.Localisation.NumberToWords;
using Humanizer.Localisation.Ordinalizers;
using Humanizer.Localisation;

namespace Humanizer.Configuration
{
Expand Down
8 changes: 7 additions & 1 deletion src/Humanizer/Configuration/FormatterRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
using Humanizer.Localisation.Formatters;
using Humanizer.Localisation;
using Humanizer.Localisation.Arabic;
using Humanizer.Localisation.Hebrew;
using Humanizer.Localisation.Romanian;
using Humanizer.Localisation.Russian;
using Humanizer.Localisation.Serbian;
using Humanizer.Localisation.Slovenian;

namespace Humanizer.Configuration
{
Expand Down
14 changes: 13 additions & 1 deletion src/Humanizer/Configuration/NumberToWordsConverterRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
using Humanizer.Localisation.NumberToWords;
using Humanizer.Localisation;
using Humanizer.Localisation.Arabic;
using Humanizer.Localisation.BrazilianPortuguese;
using Humanizer.Localisation.Dutch;
using Humanizer.Localisation.English;
using Humanizer.Localisation.Farsi;
using Humanizer.Localisation.French;
using Humanizer.Localisation.German;
using Humanizer.Localisation.Hebrew;
using Humanizer.Localisation.Polish;
using Humanizer.Localisation.Russian;
using Humanizer.Localisation.Slovenian;
using Humanizer.Localisation.Spanish;

namespace Humanizer.Configuration
{
Expand Down
6 changes: 5 additions & 1 deletion src/Humanizer/Configuration/OrdinalizerRegistry.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using Humanizer.Localisation.Ordinalizers;
using Humanizer.Localisation;
using Humanizer.Localisation.BrazilianPortuguese;
using Humanizer.Localisation.English;
using Humanizer.Localisation.Russian;
using Humanizer.Localisation.Spanish;

namespace Humanizer.Configuration
{
Expand Down
62 changes: 31 additions & 31 deletions src/Humanizer/Humanizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,47 +49,47 @@
<AssemblyOriginatorKeyFile>Humanizer.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="Localisation\Formatters\SerbianFormatter.cs" />
<Compile Include="Localisation\Formatters\SlovenianFormatter.cs" />
<Compile Include="Localisation\Serbian\SerbianFormatter.cs" />
<Compile Include="Localisation\Slovenian\SlovenianFormatter.cs" />
<Compile Include="Configuration\LocaliserRegistry.cs" />
<Compile Include="Configuration\FormatterRegistry.cs" />
<Compile Include="Configuration\NumberToWordsConverterRegistry.cs" />
<Compile Include="Configuration\OrdinalizerRegistry.cs" />
<Compile Include="Localisation\NumberToWords\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\SlovenianNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\DutchNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\DefaultNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\GermanNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\FarsiNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\ArabicNumberToWordsConverter.cs" />
<Compile Include="Localisation\Slovenian\SlovenianNumberToWordsConverter.cs" />
<Compile Include="Localisation\German\GermanNumberToWordsConverter.cs" />
<Compile Include="Localisation\BrazilianPortuguese\BrazilianPortugueseNumberToWordsConverter.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\CzechSlovakPolishFormatter.cs" />
<Compile Include="DateTimeHumanizeStrategy\DefaultDateTimeHumanizeStrategy.cs" />
<Compile Include="DateTimeHumanizeStrategy\IDateTimeHumanizeStrategy.cs" />
<Compile Include="DateTimeHumanizeStrategy\PrecisionDateTimeHumanizeStrategy.cs" />
<Compile Include="Localisation\NumberToWords\INumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\PolishNumberToWordsConverter.cs" />
<Compile Include="Localisation\NumberToWords\RussianNumberToWordsConverter.cs" />
<Compile Include="Localisation\Formatters\HebrewFormatter.cs" />
<Compile Include="Localisation\Ordinalizers\IOrdinalizer.cs" />
<Compile Include="Localisation\Ordinalizers\RussianOrdinalizer.cs" />
<Compile Include="Localisation\Ordinalizers\SpanishOrdinalizer.cs" />
<Compile Include="Localisation\Ordinalizers\DefaultOrdinalizer.cs" />
<Compile Include="Localisation\Ordinalizers\EnglishOrdinalizer.cs" />
<Compile Include="Localisation\Ordinalizers\BrazilianPortugueseOrdinalizer.cs" />
<Compile Include="Localisation\INumberToWordsConverter.cs" />
<Compile Include="Localisation\IOrdinalizer.cs" />
<Compile Include="Localisation\Russian\RussianOrdinalizer.cs" />
<Compile Include="Localisation\Spanish\SpanishOrdinalizer.cs" />
<Compile Include="Localisation\DefaultOrdinalizer.cs" />
<Compile Include="Localisation\English\EnglishOrdinalizer.cs" />
<Compile Include="Localisation\BrazilianPortuguese\BrazilianPortugueseOrdinalizer.cs" />
<Compile Include="Localisation\Polish\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
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
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;

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,7 +1,7 @@
using System;
using System.Collections.Generic;

namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation.BrazilianPortuguese
{
internal class BrazilianPortugueseNumberToWordsConverter : DefaultNumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Ordinalizers
namespace Humanizer.Localisation.BrazilianPortuguese
{
internal class BrazilianPortugueseOrdinalizer : DefaultOrdinalizer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation
{
internal class CzechSlovakPolishFormatter : DefaultFormatter
{
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 : INumberToWordsConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Ordinalizers
namespace Humanizer.Localisation
{
internal class DefaultOrdinalizer : IOrdinalizer
{
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,4 +1,4 @@
namespace Humanizer.Localisation.Ordinalizers
namespace Humanizer.Localisation.English
{
internal class EnglishOrdinalizer : DefaultOrdinalizer
{
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
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.German
{
internal class GermanNumberToWordsConverter : 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,4 +1,4 @@
namespace Humanizer.Localisation.NumberToWords
namespace Humanizer.Localisation
{
/// <summary>
/// An interface you should implement to localise ToWords and ToOrdinalWords methods
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Ordinalizers
namespace Humanizer.Localisation
{
/// <summary>
/// The interface used to localise the Ordinalize method
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.Polish
{
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.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,8 +1,7 @@
using System;
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,4 +1,4 @@
namespace Humanizer.Localisation.Ordinalizers
namespace Humanizer.Localisation.Russian
{
internal class RussianOrdinalizer : DefaultOrdinalizer
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.Serbian
{
internal class SerbianFormatter : DefaultFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Formatters
namespace Humanizer.Localisation.Slovenian
{
internal class SlovenianFormatter : 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.Slovenian
{
internal class SlovenianNumberToWordsConverter : 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Humanizer.Localisation.Ordinalizers
namespace Humanizer.Localisation.Spanish
{
internal class SpanishOrdinalizer : DefaultOrdinalizer
{
Expand Down
Loading

0 comments on commit 4270e1b

Please sign in to comment.