Repository: crsmithdev/arrow (python)

Issue:
fr_CA locale support?
I'd like to request support for Canadian French as a locale option.

If it's similar enough, perhaps we could just add `'fr_ca'` to the existing French locale? If there are differences, maybe we could follow the model of the German language mixin?

Are there any French Canadians who could offer their expertise?

Pull request:
Add French Canadian locale
## Pull Request Checklist

Thank you for taking the time to improve Arrow! Before submitting your pull request, please check all *appropriate* boxes:

<!-- Check boxes by placing an x in the brackets: [x] -->
- [x] 🧪 Added **tests** for changed code.
- [x] 🛠️ All tests **pass** when run locally (run `tox` or `make test` to find out!).
- [x] 🧹 All linting checks **pass** when run locally (run `tox -e lint` or `make lint` to find out!).
- [ ] 📚 Updated **documentation** for changed code.
- [x] ⏩ Code is **up-to-date** with the `master` branch.

If you have *any* questions about your code changes or any of the points above, please submit your questions along with the pull request and we will try our best to help!

## Description of Changes
Adds French Canadian Locale, with updated unit tests. Adds different month abbreviation for Fr_CA. 
Closes #436


Patch:
diff --git a/arrow/locales.py b/arrow/locales.py
index 7654419..ccbca8b 100644
--- a/arrow/locales.py
+++ b/arrow/locales.py
@@ -478,8 +478,8 @@ class SpanishLocale(Locale):
         return "{}º".format(n)
 
 
-class FrenchLocale(Locale):
-    names = ["fr", "fr_fr"]
+class FrenchBaseLocale(Locale):
+
     past = "il y a {0}"
     future = "dans {0}"
     and_word = "et"
@@ -517,21 +517,6 @@ class FrenchLocale(Locale):
         "novembre",
         "décembre",
     ]
-    month_abbreviations = [
-        "",
-        "janv",
-        "févr",
-        "mars",
-        "avr",
-        "mai",
-        "juin",
-        "juil",
-        "août",
-        "sept",
-        "oct",
-        "nov",
-        "déc",
-    ]
 
     day_names = [
         "",
@@ -555,6 +540,48 @@ class FrenchLocale(Locale):
         return "{}e".format(n)
 
 
+class FrenchLocale(FrenchBaseLocale, Locale):
+
+    names = ["fr", "fr_fr"]
+
+    month_abbreviations = [
+        "",
+        "janv",
+        "févr",
+        "mars",
+        "avr",
+        "mai",
+        "juin",
+        "juil",
+        "août",
+        "sept",
+        "oct",
+        "nov",
+        "déc",
+    ]
+
+
+class FrenchCanadianLocale(FrenchBaseLocale, Locale):
+
+    names = ["fr_ca"]
+
+    month_abbreviations = [
+        "",
+        "janv",
+        "févr",
+        "mars",
+        "avr",
+        "mai",
+        "juin",
+        "juill",
+        "août",
+        "sept",
+        "oct",
+        "nov",
+        "déc",
+    ]
+
+
 class GreekLocale(Locale):
 
     names = ["el", "el_gr"]


Test patch:
diff --git a/tests/test_locales.py b/tests/test_locales.py
index 96f34ed..73d77c5 100644
--- a/tests/test_locales.py
+++ b/tests/test_locales.py
@@ -205,6 +205,15 @@ class TestFrenchLocale:
         assert self.locale.ordinal_number(1) == "1er"
         assert self.locale.ordinal_number(2) == "2e"
 
+    def test_month_abbreviation(self):
+        assert "juil" in self.locale.month_abbreviations
+
+
+@pytest.mark.usefixtures("lang_locale")
+class TestFrenchCanadianLocale:
+    def test_month_abbreviation(self):
+        assert "juill" in self.locale.month_abbreviations
+
 
 @pytest.mark.usefixtures("lang_locale")
 class TestRussianLocale: