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

feat(language): Add support for Turkish language #491

Merged
merged 8 commits into from
Jan 19, 2025

Conversation

omerfaruk-aran
Copy link

Summary

This PR includes the following changes:

  1. Fix for Cover State Logic:

    • Adjusted the _current_state method for better accuracy in determining the cover's state.
    • Improved handling of the cover's position to properly stop when reaching target positions.
  2. Turkish Language Support:

    • Added tr.json for Turkish language support, improving localization for users in Turkey.

Changes

  • File Updated:
    • custom_components/localtuya/cover.py
      • Enhanced state and position logic for covers.
    • custom_components/localtuya/translations/tr.json
      • Added Turkish translations.

Why is this needed?

  • The cover control logic previously had issues where directional buttons (up and down) did not properly reflect state changes. This fix ensures accurate state updates.
  • Turkish language support was missing, which limited the accessibility for Turkish-speaking users.

Additional Notes

  • The code has been tested with both directional buttons and position sliders to ensure functionality.
  • Translations have been added for all relevant strings to ensure a seamless user experience.

@omerfaruk-aran omerfaruk-aran changed the title Fix: Cover Control Buttons for Up and Down Fix: Cover State Logic and Add Turkish Language Support Jan 18, 2025
@xZetsubou
Copy link
Owner

Reformat the json file it contains extra spaces. default spaces is 2

- Reverted `curr_pos` usage in `cover.py` back to `_current_cover_position` as per feedback for boolean cover testing.
@xZetsubou xZetsubou changed the title Fix: Cover State Logic and Add Turkish Language Support feat(language): Add support for Turkish language Jan 19, 2025
@xZetsubou xZetsubou merged commit 430f62d into xZetsubou:master Jan 19, 2025
2 checks passed
@omerfaruk-aran omerfaruk-aran deleted the fix-cover-control branch January 19, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants