Skip to content

AO3-6125 Make admin-post sorting by language case-insensitive - #5724

Open
brianjaustin wants to merge 7 commits into
otwcode:masterfrom
brianjaustin:AO3-6125
Open

AO3-6125 Make admin-post sorting by language case-insensitive#5724
brianjaustin wants to merge 7 commits into
otwcode:masterfrom
brianjaustin:AO3-6125

Conversation

@brianjaustin

Copy link
Copy Markdown
Member

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-6125

Purpose

  1. Adds a before task (new concept, things to be run before a deploy) to backfill languages with a blank sortable name
  2. Changes the sortable name for languages to be required
  3. Updates the way translations for admin posts are fetched to be sorted by their language's sortable_name

Credit

Brian Austin (they/he)

Comment thread factories/language.rb
name { "Dutch" }

after(:build) do |language|
language.sortable_name = language.short if language.sortable_name.blank?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we fall back to name instead of short?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Maybe, although this could require a fair amount more in terms of test changes (using short was how the behaviour used to work, so at least a few tests rely on that)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, a TODO should be fine for now.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants