Skip to content

Translate Notifications#438

Merged
zjs81 merged 11 commits into
zjs81:devfrom
ericszimmermann:ez_translate_notification
May 24, 2026
Merged

Translate Notifications#438
zjs81 merged 11 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

@zjs81 zjs81 left a comment

Copy link
Copy Markdown
Owner

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

ericszimmermann commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

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

zjs81 commented May 12, 2026

Copy link
Copy Markdown
Owner

@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

zjs81 commented May 12, 2026

Copy link
Copy Markdown
Owner

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

zjs81 commented May 13, 2026

Copy link
Copy Markdown
Owner

How well does it work so far?

@zjs81

zjs81 commented May 13, 2026

Copy link
Copy Markdown
Owner

@codex review

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

Copy link
Copy Markdown

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

ericszimmermann commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

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
@zjs81

zjs81 commented May 15, 2026

Copy link
Copy Markdown
Owner

@codex review

1 similar comment
@zjs81

zjs81 commented May 15, 2026

Copy link
Copy Markdown
Owner

@codex review

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

Copy link
Copy Markdown

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: 1fbe1823cb

ℹ️ 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
Comment thread lib/connector/meshcore_connector.dart
@ericszimmermann ericszimmermann marked this pull request as draft May 20, 2026 21:32
@ericszimmermann

Copy link
Copy Markdown
Contributor Author

There were changes on the dev Branch, which conflicted with my pull Request.
So I updated to the new state, but got a problem on merge, so to solve it the history has unfortunately grown. So I would recommend to make a squashed commit.
Best Regards Eric

@ericszimmermann ericszimmermann marked this pull request as ready for review May 20, 2026 22:21
@zjs81 zjs81 merged commit 0287de1 into zjs81:dev May 24, 2026
6 checks passed
@zjs81

zjs81 commented May 24, 2026

Copy link
Copy Markdown
Owner

Thanks

HDDen added a commit to HDDen/meshcore-open that referenced this pull request May 25, 2026
commit 0287de1
Merge: a50c0d0 bac82dc
Author: zjs81 <30362347+zjs81@users.noreply.github.com>
Date:   Sun May 24 15:47:47 2026 -0700

    Merge pull request zjs81#438 from ericszimmermann/ez_translate_notification

    Translate Notifications

commit bac82dc
Author: ericz <erics.zimmermann@gmail.com>
Date:   Thu May 21 00:11:54 2026 +0200

    Fix Flutter SDK update

commit 8682e6e
Author: ericz <erics.zimmermann@gmail.com>
Date:   Thu May 21 00:02:21 2026 +0200

    fix missing _handleQueuedMessageReceived after merge of dev

commit 30a1a36
Merge: 3fe5cdf a50c0d0
Author: ericszimmermann <ericszimmermann@users.noreply.github.com>
Date:   Wed May 20 23:26:05 2026 +0200

    Merge branch 'dev' into ez_translate_notification

commit 3fe5cdf
Author: ericz <erics.zimmermann@gmail.com>
Date:   Wed May 20 23:20:16 2026 +0200

    update to current dev a50c0d0

commit 9ada4ea
Author: ericz <erics.zimmermann@gmail.com>
Date:   Wed May 20 21:24:54 2026 +0200

    add toggle for autmatically translated messages for notification and chat or manual translation on message action. Due to heavy battery usage.

commit bc5f299
Author: ericz <erics.zimmermann@gmail.com>
Date:   Sun May 17 10:47:50 2026 +0200

    try fix codex sync problem

commit 1fbe182
Author: ericz <erics.zimmermann@gmail.com>
Date:   Wed May 13 18:06:26 2026 +0200

    only take translated result if status==completed

commit f941f0d
Author: ZIER <ezimmermann@kuhner.com>
Date:   Wed May 13 12:08:41 2026 +0200

    avoid double translation and strip replyInfo from translated text.

commit 75ae903
Author: ZIER <ezimmermann@kuhner.com>
Date:   Tue May 12 10:24:01 2026 +0200

    implement flutter_langdetect

commit 1f6b2da
Author: ericz <erics.zimmermann@gmail.com>
Date:   Mon May 11 07:15:39 2026 +0200

    changed translation prompt back to specific input.

commit d2a6fbe
Author: ericz <erics.zimmermann@gmail.com>
Date:   Sun May 10 11:09:25 2026 +0200

    translate notifications.
HDDen added a commit to HDDen/meshcore-open that referenced this pull request May 26, 2026
commit 313cb58
Merge: d551ac4 264d2bc
Author: HDDen <62592944+HDDen@users.noreply.github.com>
Date:   Tue May 26 21:18:48 2026 +0300

    Merge branch 'dev' into rename-mco-advanced-alfa-build

commit 264d2bc
Merge: 0287de1 8dd385b
Author: zjs81 <30362347+zjs81@users.noreply.github.com>
Date:   Tue May 26 10:15:00 2026 -0700

    Merge pull request zjs81#462 from HDDen/sync-progressbar

    Onstart syncronization progressbar

commit d551ac4
Author: HDDen <62592944+HDDen@users.noreply.github.com>
Date:   Tue May 26 00:53:18 2026 +0300

    Update channel_chat_screen.dart

commit 3559409
Merge: 214bd96 8dd385b
Author: HDDen <62592944+HDDen@users.noreply.github.com>
Date:   Tue May 26 00:52:12 2026 +0300

    Merge branch 'sync-progressbar' into rename-mco-advanced-alfa-build

commit 8dd385b
Merge: 2328848 0287de1
Author: HDDen <62592944+HDDen@users.noreply.github.com>
Date:   Tue May 26 00:44:08 2026 +0300

    Merge branch 'dev' into sync-progressbar

commit 2328848
Author: HDDen <62592944+HDDen@users.noreply.github.com>
Date:   Tue May 26 00:37:42 2026 +0300

    Onstart sync progressbar: fix potential bug with spinner on interrupt synchronization

commit 0287de1
Merge: a50c0d0 bac82dc
Author: zjs81 <30362347+zjs81@users.noreply.github.com>
Date:   Sun May 24 15:47:47 2026 -0700

    Merge pull request zjs81#438 from ericszimmermann/ez_translate_notification

    Translate Notifications

commit bac82dc
Author: ericz <erics.zimmermann@gmail.com>
Date:   Thu May 21 00:11:54 2026 +0200

    Fix Flutter SDK update

commit 8682e6e
Author: ericz <erics.zimmermann@gmail.com>
Date:   Thu May 21 00:02:21 2026 +0200

    fix missing _handleQueuedMessageReceived after merge of dev

commit 30a1a36
Merge: 3fe5cdf a50c0d0
Author: ericszimmermann <ericszimmermann@users.noreply.github.com>
Date:   Wed May 20 23:26:05 2026 +0200

    Merge branch 'dev' into ez_translate_notification

commit 3fe5cdf
Author: ericz <erics.zimmermann@gmail.com>
Date:   Wed May 20 23:20:16 2026 +0200

    update to current dev a50c0d0

commit 9ada4ea
Author: ericz <erics.zimmermann@gmail.com>
Date:   Wed May 20 21:24:54 2026 +0200

    add toggle for autmatically translated messages for notification and chat or manual translation on message action. Due to heavy battery usage.

commit bc5f299
Author: ericz <erics.zimmermann@gmail.com>
Date:   Sun May 17 10:47:50 2026 +0200

    try fix codex sync problem

commit 1fbe182
Author: ericz <erics.zimmermann@gmail.com>
Date:   Wed May 13 18:06:26 2026 +0200

    only take translated result if status==completed

commit f941f0d
Author: ZIER <ezimmermann@kuhner.com>
Date:   Wed May 13 12:08:41 2026 +0200

    avoid double translation and strip replyInfo from translated text.

commit 75ae903
Author: ZIER <ezimmermann@kuhner.com>
Date:   Tue May 12 10:24:01 2026 +0200

    implement flutter_langdetect

commit 1f6b2da
Author: ericz <erics.zimmermann@gmail.com>
Date:   Mon May 11 07:15:39 2026 +0200

    changed translation prompt back to specific input.

commit d2a6fbe
Author: ericz <erics.zimmermann@gmail.com>
Date:   Sun May 10 11:09:25 2026 +0200

    translate notifications.
@ericszimmermann ericszimmermann deleted the ez_translate_notification branch June 23, 2026 05:09
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