Skip to content

Conversation

dougcunha
Copy link
Contributor

I revised several terms that sounded unusual in Portuguese. Since certain GIT commands are typically not translated by the developer community in Brazil, and some other terms have optional translations, I aimed for a more balanced approach. Additionally, I took the opportunity to translate features that hadn't been localized yet.

Please feel free to disregard this pull request if the translation approach doesn't align with your preferences.

- Refactor pt_BR localization strings for improved clarity and consistency in UI text across various components.
- Add password masking to the API key input field.
…OpenAI

- Add support for dynamic language prompts in commit message generation.
- Add property to store selected language in OpenAI model.
- Add new icon definition for language selection in the icon resource file.
- Add localization string for the tip regarding the selected language in the OpenAI Assistant feature.
- Add OpenAI assistant strings for commit message generation in Brazilian Portuguese localization.
- Add SelectedLanguage property to manage language preference.
- Add method to create context menu for selecting language.
- Refactor tooltips and adjust button layouts for better alignment and additional functionality.
- Add a method to open a context menu for language selection in the WorkingCopy view.

Signed-off-by: Douglas Cunha <[email protected]>
@love-linger love-linger self-assigned this Oct 25, 2024
@love-linger
Copy link
Collaborator

  • We should not bind UI display language with commit message. These are two completely different things. Especially in some open source software projects (there may be developers from different countries involved)
  • Since we have added the ability to customize AI prompts, it is not difficult for users to achieve this goal by configuring it themselves.

For the above reasons, I have manually picked commit 63f75dc, and the commit c6d308b will not be merged into this repository

@dougcunha
Copy link
Contributor Author

I must admit, I didn't quite understand your point. I assume SourgeGit is not exclusively for open-source projects, correct? In my case, I work on projects from various countries and need to generate commit messages in each local language. Setting up the prompt every time I generate a commit for a repository is not very practical, which is why I thought of a feature that would provide a language selection menu when generating commit messages.

In any case, I'll maintain this feature in a branch within my fork and prepare a custom version of SourceGit that includes it.

@love-linger
Copy link
Collaborator

Sorry, I have too many things to do, so I didn't carefully review the code. I regard the new language option as the ui display language configuration. You can create a new pr for another commit.

@dougcunha
Copy link
Contributor Author

No problem! It’s possible that the way I implemented this feature has made the UI a bit unclear. The goal is simply to have a quicker method to include an instruction for generating the commit message in the selected language, without needing to edit OpenAI prompts directly in the preferences window.

Ideally, this setting could be saved individually for each repository, although that would add complexity. I’m open to any suggestions you might have for improvement.

@love-linger
Copy link
Collaborator

Ideally, this setting could be saved individually for each repository, although that would add complexity.

How about changing the way to configure OpenAI prompts & response language (OpenAI profiles) similar to the way we configure commit template and then shows all profiles when user click the User OpenAI to generate commit message button?

@love-linger
Copy link
Collaborator

After the release of version 8.36, I will submit a new solution of integrating OpenAI services.

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