Skip to content

Commit

Permalink
nicer error message for mismatched locales
Browse files Browse the repository at this point in the history
  • Loading branch information
purarue committed Oct 26, 2023
1 parent 30f7fd6 commit 2572ce0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Options:
-h, --help Show this message and exit.
```

If you use a language this doesn't support, you can [create an issue](https://github.com/seanbreckenridge/google_takeout_parser/issues/new?title=support+new+locale) with the file structure (run `find Takeout` and/or `tree Takeout`)
If you use a language this doesn't support, see [contributing](#contributing).

To clear the `cachew` cache: `google_takeout_parser cache_dir clear`

Expand Down
6 changes: 4 additions & 2 deletions tests/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ def test_locale_names() -> None:
from google_takeout_parser.locales.main import LOCALES
from google_takeout_parser.locales.all import LOCALES as ALL_LOCALES

assert len(LOCALES) == len(ALL_LOCALES)
assert set(LOCALES.keys()) == set(ALL_LOCALES)
errmsg = "LOCALES in all.py/main.py must be the same length and have the same keys, you probably added a locale to one of these and not the other"

assert len(LOCALES) == len(ALL_LOCALES), errmsg
assert set(LOCALES.keys()) == set(ALL_LOCALES), errmsg

0 comments on commit 2572ce0

Please sign in to comment.