feditext / feditext

A free, open-source iOS client for Mastodon, Glitch, GotoSocial, Iceshrimp, Akkoma, and other Mastodon-API-compatible Fediverse instance servers.
https://mastodon.social/@Feditext
GNU General Public License v3.0
154 stars 6 forks source link

Push notifications do not respect naming settings #335

Open LuNeder opened 6 months ago

LuNeder commented 6 months ago

Describe the bug

This isn’t a super big problem, just a small annoyance. This has been happening since Metatext too. I’ve been wanting to report this for a while but was never able to take a well-timed enough screenshot.

When you get a push notification, it doesn’t respect your wording choice between “toot” and “post”. The in-app notification pages respects it as expected.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Preferences'
  2. Click on 'Status word' and select 'Toot'
  3. Wait for someone to boost a toot of yours
  4. See error

Expected behavior

The push notification should ideally respect your wording choice. Alternatively, it could default always to “toot”.

Screenshots

IMG_4170

(please complete the following information):

Additional context Add any other context about the problem here.

toot

bdube commented 6 months ago

Thank you for the report.

Additional context: toot 😂

I'm looking into this and I see that not all languages have strings that take into account the status word preference. But your screenshot shows English, and English does have both notifications.reblogged-your-status-%@.post and notifications.reblogged-your-status-%@.toot so I'm confused.

I'll have to dig deeper and see what's different about generating the text for the push notification versus the text displayed in the notification view of the app. I'll tag this as a localization issue for now. Thank you.

LuNeder commented 6 months ago

But your screenshot shows English

Not sure if this is relevant: My phone is in Portuguese, but Feditext is set to English in iOS settings because the translation is kinda bad (since Metatext) and also now lacking some strings. Tho when set to Portuguese the notification seems to continue in English?

IMG_4491

bdube commented 6 months ago

Thank you for the extra information.

Portuguese is one of the languages that is not finished separating the .toot and .post version of strings. So I think that explains why you are seeing notifications.*.toot in the app, where localized strings are expected.

But I haven't figured out the code path that generates the text for push notifications. I'm still working on that part.