Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add localization support for catalog items #10

Merged
merged 17 commits into from
Feb 20, 2024

Conversation

tr4nt0r
Copy link
Collaborator

@tr4nt0r tr4nt0r commented Feb 15, 2024

Adds translation support

  • Downloads translation dictionaries on start-up
  • Loads user list settings to determine locale setting of a list
  • completely transparent, no additional parameters for existing methods
  • Adds Tests to validate correct translation

@tr4nt0r tr4nt0r added 🚀 feature New feature or request ❓ question Further information is requested labels Feb 15, 2024
@tr4nt0r tr4nt0r self-assigned this Feb 15, 2024
@tr4nt0r tr4nt0r removed the ❓ question Further information is requested label Feb 16, 2024
@tr4nt0r tr4nt0r requested a review from miaucl February 16, 2024 04:48
@tr4nt0r tr4nt0r marked this pull request as ready for review February 16, 2024 04:49
@tr4nt0r tr4nt0r marked this pull request as draft February 19, 2024 02:31
not all list locales are in the userlistsettings, only if a
language was explicitly set by the user. The users default locale
is get from sync_current_user. If it  still fails, fall-back
to the APIs default locale.
@tr4nt0r tr4nt0r force-pushed the item_translation branch 2 times, most recently from 1f6bc9d to bf0c970 Compare February 19, 2024 06:19
@tr4nt0r
Copy link
Collaborator Author

tr4nt0r commented Feb 19, 2024

turns out the api endpoint i thought returned the language settings for all shopping lists does in fact not return all shopping lists. You have to explicitly set the language, otherwise the bring app uses the users default language setting, which is a totally different api endpoint. So I have added yet another method to communicate with the api.

@tr4nt0r tr4nt0r marked this pull request as ready for review February 19, 2024 16:08
bring_api/bring.py Outdated Show resolved Hide resolved
bring_api/bring.py Outdated Show resolved Hide resolved
bring_api/bring.py Outdated Show resolved Hide resolved
bring_api/bring.py Outdated Show resolved Hide resolved
bring_api/types.py Outdated Show resolved Hide resolved
bring_api/types.py Outdated Show resolved Hide resolved
@tr4nt0r tr4nt0r requested a review from miaucl February 20, 2024 05:24
@tr4nt0r tr4nt0r changed the title add translate method Add localization support for catalog items Feb 20, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Owner

@miaucl miaucl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust in my test scripts that everything works fine :)

@tr4nt0r tr4nt0r merged commit 08af022 into miaucl:main Feb 20, 2024
3 checks passed
@tr4nt0r tr4nt0r deleted the item_translation branch February 20, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants