Skip to content

Commit

Permalink
Remove diacritics from method names in Bogus; fixes #497 (#522)
Browse files Browse the repository at this point in the history
Fix up unit tests
Add release HISTORY.md changelog.
  • Loading branch information
bchavez authored Dec 26, 2023
1 parent e6c38bf commit 6d25006
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v35.2.0
Release Date: 2023-12-26
* Issue 497: PR 522 - Better Xamarin AOT compatibility. Renames/removes diacritics from API method names Finland: Henkilötunnus -> Henkilotunnus; Norway: Fødselsnummer -> Fodselsnummer.

## v35.0.1
Release Date: 2023-12-11
* PR 513: Update Swedish `sv` locale; first/last names. Thanks @EBD232!
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,12 @@ In the examples above, all three alternative styles of using **Bogus** produce t
* **`using Bogus.Extensions.Denmark;`**
* `Bogus.Person.Cpr()` - Danish Personal Identification number
* **`using Bogus.Extensions.Finland;`**
* `Bogus.Person.Henkilötunnus()` - Finnish Henkilötunnus
* `Bogus.Person.Henkilotunnus()` - Finnish Henkilötunnus
* **`using Bogus.Extensions.Italy;`**
* `Bogus.Person.CodiceFiscale()` - Codice Fiscale
* `Bogus.DataSets.Finance.CodiceFiscale()` - Codice Fiscale
* **`using Bogus.Extensions.Norway;`**
* `Bogus.Person.Fødselsnummer()` - Norwegian national identity number
* `Bogus.Person.Fodselsnummer()` - Norwegian national identity number
* **`using Bogus.Extensions.Portugal;`**
* `Bogus.Person.Nif()` - Número de Identificação Fiscal (NIF)
* `Bogus.DataSets.Company.Nipc()` - Número de Identificação de Pessoa Colectiva (NIPC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void can_create_norwegian_fødselsnummer()
var f = new Faker("nb_NO");
var person = f.Person;

string fødselsnummer = person.Fødselsnummer();
string fødselsnummer = person.Fodselsnummer();

IsLegalFødselsnummer(fødselsnummer, person);
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Bogus.Tests/PersonTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void can_generate_cpr_number_for_denmark()
public void can_generate_henkilötunnus_for_finland()
{
var p = new Person();
var obtained = p.Henkilötunnus();
var obtained = p.Henkilotunnus();

var a = obtained.Split('-')[0];
var b = obtained.Split('-')[1];
Expand Down
2 changes: 1 addition & 1 deletion Source/Bogus/Extensions/ExtensionsForString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static string RemoveDiacritics(this string @this)
}

/// <summary>
/// Transliterates Unicode characters to US-ASCII. For example, Russian cryllic "Анна Фомина" becomes "Anna Fomina".
/// Transliterates Unicode characters to US-ASCII. For example, Russian cyrillic "Анна Фомина" becomes "Anna Fomina".
/// </summary>
/// <param name="this">The @this string to act on.</param>
/// <param name="lang">The language character set to use.</param>
Expand Down
2 changes: 1 addition & 1 deletion Source/Bogus/Extensions/Finland/ExtensionsForFinland.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class ExtensionsForFinland
/// <summary>
/// Finnish Henkilötunnus
/// </summary>
public static string Henkilötunnus(this Person p)
public static string Henkilotunnus(this Person p)
{
const string Key = nameof(ExtensionsForFinland) + "Henkilötunnus";
if( p.context.ContainsKey(Key) )
Expand Down
4 changes: 2 additions & 2 deletions Source/Bogus/Extensions/Norway/ExtensionsForNorway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace Bogus.Extensions.Norway;
public static class ExtensionsForNorway
{
/// <summary>
/// Norwegian national identity number
/// Fødselsnummer - Norwegian national identity number
/// </summary>
public static string Fødselsnummer(this Person p)
public static string Fodselsnummer(this Person p)
{
const string Key = nameof(ExtensionsForNorway) + "Fødselsnummer";
if (p.context.ContainsKey(Key))
Expand Down

0 comments on commit 6d25006

Please sign in to comment.