Skip to content

Translate Notifications#438

Open
ericszimmermann wants to merge 5 commits into
zjs81:devfrom
ericszimmermann:ez_translate_notification
Open

Translate Notifications#438
ericszimmermann wants to merge 5 commits into
zjs81:devfrom
ericszimmermann:ez_translate_notification

Conversation

@ericszimmermann
Copy link
Copy Markdown
Contributor

A change to translate Notification, if translation is enabled.

Implementation of Issue #366

Best Regards Eric

Copy link
Copy Markdown
Owner

@zjs81 zjs81 left a comment

Choose a reason for hiding this comment

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

Look good except requires some minor changes

Comment thread lib/services/translation_service.dart Outdated
@ericszimmermann
Copy link
Copy Markdown
Contributor Author

ericszimmermann commented May 11, 2026

Sorry didn't know that they need specific prompt. I tried and tested it, and it worked. It could be that it took a little longer to translate and that would explain it, but otherwise I got less german to german translations.

I also did the simple translation heuristics PR. But it is really simple and gives sometimes the wrong language. I tried other methods like n-gramms with weigthened scores, but the results were not better, which is why I published the simplest method. I think the best solution would be to use the model to recognize and return the language, but I can not find a prompt for that. Or someone has an other Idea that is working better, as the keyword approach.

Sincerely Eric

@zjs81
Copy link
Copy Markdown
Owner

zjs81 commented May 12, 2026

@ericszimmermann
Copy link
Copy Markdown
Contributor Author

It is also a n-gramm approach, but with a lot more statistics behind it, than i could provide.
I will implement and try this. But should I make a separate Pull request or add a commit to this Pull-Request?

@zjs81
Copy link
Copy Markdown
Owner

zjs81 commented May 12, 2026

I would say go ahead and do it in this PR. If we are going to use this lib we should just put it in our helper that way it can also be used else where. Thank you!

@ericszimmermann ericszimmermann force-pushed the ez_translate_notification branch from 1d0b141 to 75ae903 Compare May 12, 2026 21:25
@ericszimmermann
Copy link
Copy Markdown
Contributor Author

Sorry pushed a test, I didn't want to.
So I had to force push the branch back to the commit "implement flutter_langdetect"

@zjs81
Copy link
Copy Markdown
Owner

zjs81 commented May 13, 2026

How well does it work so far?

@zjs81
Copy link
Copy Markdown
Owner

zjs81 commented May 13, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75ae903b99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/connector/meshcore_connector.dart Outdated
@ericszimmermann ericszimmermann marked this pull request as draft May 13, 2026 04:16
@ericszimmermann
Copy link
Copy Markdown
Contributor Author

ericszimmermann commented May 13, 2026

The Language detection Library works a lot better, than the previous implementation. But through the small Texts like "Hallo", which could be FI as also DE, you still get false Positives. I don't think we can get rid of that completely.
I will have to look into codex‘es comment about executing twice and have found a problem with the replyInfo: the "@[...]" will be stripped in addMessage, but translated will be the whole string. This is good for the notification (for following the thread) but also makes a discrepancy between originalText and displayText in the MessageBubble.
I plan to modify the translated text, but sending the notification still with the replyInfo kept.

@ericszimmermann ericszimmermann marked this pull request as ready for review May 13, 2026 11:33
@ericszimmermann ericszimmermann marked this pull request as draft May 13, 2026 12:48
@ericszimmermann ericszimmermann marked this pull request as ready for review May 13, 2026 17:16
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