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

Add subject prefixes to be removed #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ikedas
Copy link

@ikedas ikedas commented May 16, 2023

Description

In this PR, I add variants in several languages of the prefixes like RE: / Fwd: that should be scraped off the subject. That is, those listed in [1][2][3] that I could actually find on the Internet, or some I have discovered independently.

In addition, several other improvements have been made: In some languages, a space is also placed before a colon [4]; a fullwidth colon is sometimes used after the prefix in Chinese ideographs; the space is not always placed after a colon.

Question

I think this PR could be applied to Znuny and OTOBO. Should I submit separate PRs for each?

References

[1] Wikipedia: "List of email subject abbreviations#Abbreviations in other languages".
[2] GNU Mailman 2.1: Mailman/Handleres/CookHeaders.py.
[3] Sympa 6.2: Sympa/Regexps.pm.
[4] Bug #893290.

@odyniec
Copy link
Member

odyniec commented May 23, 2023

In this PR, I add variants in several languages of the prefixes like RE: / Fwd: that should be scraped off the subject. That is, those listed in [1][2][3] that I could actually find on the Internet, or some I have discovered independently.

Thanks for this, this will surely be useful. However, there's an existing mechanism in place that assumes the different prefixes are stored in system configuration parameters rather that being hardcoded in Kernel::System::Ticket, and I think it would be better to extend these parameters to include the prefixes that you have collected. We'll try to do that for the next release -- let's keep this PR open until that happens.

In addition, several other improvements have been made: In some languages, a space is also placed before a colon [4]; a fullwidth colon is sometimes used after the prefix in Chinese ideographs; the space is not always placed after a colon.

We'll make sure to take this into account (probably best to add a few tests for these cases).

Question

I think this PR could be applied to Znuny and OTOBO. Should I submit separate PRs for each?

Yes, those projects are independent from us, so probably that's the best course of action.

@ikedas
Copy link
Author

ikedas commented May 26, 2023

In this PR, I add variants in several languages of the prefixes like RE: / Fwd: that should be scraped off the subject. That is, those listed in [1][2][3] that I could actually find on the Internet, or some I have discovered independently.

Thanks for this, this will surely be useful. However, there's an existing mechanism in place that assumes the different prefixes are stored in system configuration parameters rather that being hardcoded in Kernel::System::Ticket, and I think it would be better to extend these parameters to include the prefixes that you have collected. We'll try to do that for the next release -- let's keep this PR open until that happens.

Thank you for being interested in this. I look forward for the next replease!

In addition, several other improvements have been made: In some languages, a space is also placed before a colon [4]; a fullwidth colon is sometimes used after the prefix in Chinese ideographs; the space is not always placed after a colon.

We'll make sure to take this into account (probably best to add a few tests for these cases).

I updated and added test cases.

Question

I think this PR could be applied to Znuny and OTOBO. Should I submit separate PRs for each?

Yes, those projects are independent from us, so probably that's the best course of action.

All right, I'll see how this PR ends up first and then decide what to do.

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