From 41ade85e562f65849e676d6ee54c12ddd7153e6f Mon Sep 17 00:00:00 2001 From: Wilson Mun <30316250+wmundev@users.noreply.github.com> Date: Fri, 23 Feb 2024 19:15:26 +1100 Subject: [PATCH] docs: update outdated links and use markdown format for readme --- README.md | 2 +- .../TestAsYouTypeFormatter.cs | 5 +- csharp/PhoneNumbers/PhoneNumbers.csproj | 2 +- csharp/{README.txt => README.md} | 64 +++++++++---------- 4 files changed, 36 insertions(+), 37 deletions(-) rename csharp/{README.txt => README.md} (85%) diff --git a/README.md b/README.md index 794252807..6b5fadd30 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The code was rewritten from the Java source mostly unchanged, please refer to th The original Apache License 2.0 was preserved. -See [this](https://github.com/twcclegg/libphonenumber-csharp/blob/main/csharp/README.txt "csharp/README.txt") for details about the port. +See [this](csharp/README.md) for details about the port. Phone number metadata is updated in the Google repo approximately every two weeks. This library is automatically updated by a [scheduled github action](https://github.com/twcclegg/libphonenumber-csharp/actions/workflows/create_new_release_on_new_metadata_update.yml) to include the latest metadata, usually within a day. diff --git a/csharp/PhoneNumbers.Test/TestAsYouTypeFormatter.cs b/csharp/PhoneNumbers.Test/TestAsYouTypeFormatter.cs index de3d8e6c0..16d34a4ab 100644 --- a/csharp/PhoneNumbers.Test/TestAsYouTypeFormatter.cs +++ b/csharp/PhoneNumbers.Test/TestAsYouTypeFormatter.cs @@ -82,8 +82,8 @@ public void TestInvalidPlusSign() [Fact] public void TestTooLongNumberMatchingMultipleLeadingDigits() { - // See http://code.google.com/p/libphonenumber/issues/detail?id=36 - // This occurred last time for countries which have two formatting rules with exactly the + // See https://github.com/google/libphonenumber/issues/36 + // The bug occurred last time for countries which have two formatting rules with exactly the // same leading digits pattern but differ in length. var formatter = phoneUtil.GetAsYouTypeFormatter("ZZ"); Assert.Equal("+", formatter.InputDigit('+')); @@ -104,7 +104,6 @@ public void TestTooLongNumberMatchingMultipleLeadingDigits() Assert.Equal("+819012345678901", formatter.InputDigit('1')); } - [Fact] public void TestAYTFUS() { diff --git a/csharp/PhoneNumbers/PhoneNumbers.csproj b/csharp/PhoneNumbers/PhoneNumbers.csproj index 329e5aaf1..8b7f66c19 100644 --- a/csharp/PhoneNumbers/PhoneNumbers.csproj +++ b/csharp/PhoneNumbers/PhoneNumbers.csproj @@ -1,7 +1,7 @@  - C# port of Google's common Java, C++ and Javascript library for parsing, formatting, storing and validating international phone numbers. http://code.google.com/p/libphonenumber/ + C# port of Google's common Java, C++ and Javascript library for parsing, formatting, storing and validating international phone numbers. https://github.com/google/libphonenumber libphonenumber-csharp PhoneNumbers libphonenumber-csharp diff --git a/csharp/README.txt b/csharp/README.md similarity index 85% rename from csharp/README.txt rename to csharp/README.md index 7d619cc94..929ce576b 100644 --- a/csharp/README.txt +++ b/csharp/README.md @@ -1,32 +1,32 @@ -PhoneNumbers C# Library -======================= - -This is a C# port of libphonenumber, originally from: - http://code.google.com/p/libphonenumber/. - -Original Java code is Copyright (C) 2009-2022 Google Inc. - -lib/ - update script - -PhoneNumbers/ - Port of libphonenumber Java library - -PhoneNumbers.Test/ - Port of libphonenumber Java tests in xunit format. - - -Known Issues ------------- - -- Phone numbers metadata is read from XML files and not protocol - buffers one. I could not make it work using protobuf-csharp - library. On the other hand, it makes one less dependency. - - -Todo ----- - -- Restore the Java logging calls? -- Find a suitable replace for Java CharSequence in phone numbers parsing API. -- Migrate geocoder and related files +PhoneNumbers C# Library +======================= + +This is a C# port of libphonenumber, originally from: + https://github.com/google/libphonenumber + +Original Java code is Copyright (C) 2009-2022 Google Inc. + +`lib/` + update script + +`PhoneNumbers/` + Port of libphonenumber Java library + +`PhoneNumbers.Test/` + Port of libphonenumber Java tests in xunit format. + + +Known Issues +------------ + +- Phone numbers metadata is read from XML files and not protocol + buffers one. I could not make it work using protobuf-csharp + library. On the other hand, it makes one less dependency. + + +Todo +---- + +- Restore the Java logging calls? +- Find a suitable replace for Java CharSequence in phone numbers parsing API. +- Migrate geocoder and related files