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

MBS-13806: Avoid uppercasing "mi" and "mix" as Roman numerals #3406

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

derat
Copy link
Contributor

@derat derat commented Nov 4, 2024

MBS-13806

Introduce a regular expression matching common words to exclude from "Guess case" when "Uppercase Roman numerals" is checked.

Problem

"Mi" is a common word in Spanish (and likely other languages) but also an uncommon (in album and song titles) number in Roman numerals. When "Guess case" is used while the "Uppercase Roman numerals" option is checked, titles like "Mi amor" are changed to "MI amor".

Solution

Add a regular expression matching common words that are also matched by the expression for matching Roman numerals. It currently matches "mi" and "mix" (the latter of which was already excluded from uppercasing when used in ETI).

Testing

Added a unit test case and manually tested in the edit-release form.

@derat
Copy link
Contributor Author

derat commented Nov 4, 2024

@reosarevok, mind taking a look? Thanks!

Copy link
Member

@reosarevok reosarevok left a comment

Choose a reason for hiding this comment

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

Looks good, didn't test but you did, so.

Introduce a regular expression matching common words to
exclude from "Guess case" when "Uppercased Roman numerals is
checked".
@derat derat changed the title MBS-13806: Avoid uppercasing "mi" as Roman numerals MBS-13806: Avoid uppercasing "mi" and "mix" as Roman numerals Nov 5, 2024
@derat
Copy link
Contributor Author

derat commented Nov 6, 2024

@mwiencek, do you want to also take a look at this?

Copy link
Member

@mwiencek mwiencek left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, LGTM. Thanks!

@mwiencek mwiencek merged commit 2881427 into metabrainz:master Nov 11, 2024
2 checks passed
mwiencek added a commit that referenced this pull request Nov 11, 2024
* master:
  Update POT files using the production database
  MBS-13806: Avoid uppercasing "mi" and "mix" as Roman numerals (#3406)
  Fix "Art" test filter
  MBS-13787: Reenable image editing
  Use a standard head1 DESCRIPTION for tests (#3401)
  Add needed file for the funding.json system to know that it can speak for musicbrainz.org (#3397)
  MBS-13784: Clean up dj.beatport links
  Use - instead of --- as a slug fallback
  MBS-13784: Support paid streaming for beatport
@derat derat deleted the guess_case_mi branch November 11, 2024 19:41
mwiencek added a commit that referenced this pull request Nov 18, 2024
* beta:
  Translated using Weblate (Norwegian Bokmål)
  Translated using Weblate (Japanese)
  Translated using Weblate (Chinese (Simplified Han script))
  Added translation using Weblate (Arabic)
  Update translation files
  Translated using Weblate (Japanese)
  Translated using Weblate (Spanish)
  MBS-13799: Resolve "TypeError: Object.hasOwn is not a function" (#3395)
  "Email sent" page is false
  Move common send code to `_mb_mail_service_send_single`
  MBS-13719: Send contact emails via new mail service
  MBS-13719: Add configuration options for mail-service
  Update POT files using the production database
  MBS-13806: Avoid uppercasing "mi" and "mix" as Roman numerals (#3406)
  Fix "Art" test filter
  MBS-13787: Reenable image editing
  Use a standard head1 DESCRIPTION for tests (#3401)
  Add needed file for the funding.json system to know that it can speak for musicbrainz.org (#3397)
  MBS-13784: Clean up dj.beatport links
  Use - instead of --- as a slug fallback
  MBS-13784: Support paid streaming for beatport
  Update POT files using the code changes
  Update Flow to 0.250.0
  Update Flow to 0.249.0
  Update Flow types for cookie 0.7.x
  Update Flow to 0.248.1
  Update Flow to 0.247.1
  Update Flow to 0.246.0
  Update webpack to address CVE-2024-43788
  Upgrade @sentry to address GHSA-593m-55hh-j8gv
  Update cookie JS dep to address CVE-2024-47764
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.

3 participants