Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix i18n issues with "(no topic)". #3639

Open
showell opened this issue Feb 10, 2017 · 4 comments
Open

Fix i18n issues with "(no topic)". #3639

showell opened this issue Feb 10, 2017 · 4 comments

Comments

@showell
Copy link
Contributor

showell commented Feb 10, 2017

We need to start storing no-topic topics as the empty string (or null) in the database, and then only use "(no topic)" or other translations of "(no topic)" in the presentation layer. Otherwise, it will be tricky going forward to allow ordinary users to edit no-topic messages to have a topic, unless we iterate through all the translations.

Also, if I have my browser set to language X, but I am on a realm where language Y is primarily spoken, then I want the "(no topic)" wording to be appropriate for the reader, not for me.

As part of fixing this, we'll need some migration strategy or a decision to only fix messages going forward (but maybe be backward compatible at least for English messages).

@showell
Copy link
Contributor Author

showell commented Feb 10, 2017

see #2273 for more implementation details

@showell
Copy link
Contributor Author

showell commented Jun 12, 2018

@rishig This is still technically a pitfall, as we have at least one place in our code like below, and this won't match for non-English sites:

 is_no_topic_msg = (message.topic_name() == "(no topic)")

@timabbott
Copy link
Sponsor Member

I think what we probably want to do for this is having the topic in the database be "" and then do the internationalized translation of that to "(no topic)" in clients. The only thing which is tricky about that approach is that it's kinda annoying from an API perspective.

@zulipbot
Copy link
Member

zulipbot commented Jun 16, 2021

Hello @zulip/server-i18n, @zulip/server-message-view, @zulip/server-misc members, this issue was labeled with the "area: internationalization", "area: message-editing", "area: topics" labels, so you may want to check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants