Skip to content

Commit

Permalink
Reload locales after setting list language (#61)
Browse files Browse the repository at this point in the history
Reload translations after setting list language
  • Loading branch information
tr4nt0r authored Jul 26, 2024
1 parent 5f9baea commit 297fb85
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

# 0.8.1

* Reload locales after setting list language to ensure all required article translations are available

# 0.8.0

* **New API method:** `set_list_article_language` sets the article language for a specified shopping list.
Expand Down
1 change: 1 addition & 0 deletions bring_api/bring.py
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,7 @@ async def set_list_article_language(
)
r.raise_for_status()
self.user_list_settings = await self.__load_user_list_settings()
self.__translations = await self.__load_article_translations()
return r
except asyncio.TimeoutError as e:
_LOGGER.debug(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = bring-api
version = 0.8.0
version = 0.8.1
author = Cyrill Raccaud
author_email = cyrill.raccaud+pypi@gmail.com
description = Unofficial package to access Bring! shopping lists API.
Expand Down
2 changes: 2 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ async def main():

await test_batch_list_operations(bring, lst)

await bring.set_list_article_language(lst["listUuid"], "es-ES")
await bring.get_list(lst["listUuid"])
await bring.set_list_article_language(lst["listUuid"], "de-DE")


Expand Down

0 comments on commit 297fb85

Please sign in to comment.