mwittrien / BetterDiscordAddons

A series of plugins and themes for BetterDiscord.
GNU General Public License v2.0
2.05k stars 3.88k forks source link

Enhance Translator Plugin to Differentiate Private Messages from Public Channels #2698

Closed Rick-Sanchez-C closed 4 weeks ago

Rick-Sanchez-C commented 1 month ago

Overview This pull request enhances the Translator plugin by adding functionality to differentiate between private messages (DMs) and public channels when configuring translation settings.

Changes Made

  1. Added Differentiation Logic:

    • Updated the getLanguageChoice function to check if the channel is a private message and retrieve the language choice accordingly.
    • Modified the saveLanguageChoice function to save settings separately for private messages and guild channels.
  2. Updated UI Components:

    • Ensured the translation button and settings panel reflect changes based on the type of channel.

Testing

Motivation These changes aim to improve user experience by allowing distinct translation settings for private and public conversations, thereby providing more granular control over the plugin's functionality.

Response to the Question

What exactly does this change? You can already change the language choices on a server and channel level, why add a DM check?

By default, the plugin's translation settings work at the server and channel level, and globally for all DMs. However, this update introduces the capability to identify each individual or group DM and save the configuration individually. This means that users can now set and retain different translation preferences for each private conversation, whether it’s a one-on-one DM or a group DM, rather than applying the same setting across all DMs. This provides a more personalized and flexible user experience.

Note: The previous pull request (https://github.com/mwittrien/BetterDiscordAddons/pull/2689) was closed due to a lack of response as I did not receive the notification.

mwittrien commented 1 month ago

By default, the plugin's translation settings work at the server and channel level, and globally for all DMs. However, this update introduces the capability to identify each individual or group DM and save the configuration individually. This means that users can now set and retain different translation preferences for each private conversation, whether it’s a one-on-one DM or a group DM, rather than applying the same setting across all DMs. This provides a more personalized and flexible user experience.

But that's not true? You can easily tell the plugin to only change the language settings on a channel level by clicking the "Lock" icon

Rick-Sanchez-C commented 1 month ago

I was trying to do it I went to a private channel for friend1 and put locked in language english , then jumped to pm for friend2 and put locked in language russian, and when I come back to the friend1 it keeps as russian. I only experimented this issue between pms not in discord server channels

mwittrien commented 4 weeks ago

You need to click it twice so its red

Yellow means guild specific

Red means channel specific

Since all DMs together are handled like a guild and each indiviual DM like a channel

Rick-Sanchez-C commented 4 weeks ago

Will do a test today to see if it works for me and send some ss

Rick-Sanchez-C commented 4 weeks ago

Looks like now it is working, not sure what happened the day that I was testing it and didnt work properly then it is not needed.