AO3-6726 Separate languages table into work languages and locale languages#5923
Open
pmonfort wants to merge 5 commits into
Open
AO3-6726 Separate languages table into work languages and locale languages#5923pmonfort wants to merge 5 commits into
pmonfort wants to merge 5 commits into
Conversation
7f7588f to
b692618
Compare
Contributor
Author
|
The failing tests appear to be unrelated to this update, they could be pre-existing flaky tests. Could someone trigger a re-run to make sure? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
AO3-1234 Fix thing)Issue
https://otwarchive.atlassian.net/browse/AO3-6726
Purpose
Separates the
languagestable, currently used for both works and admin/i18n features, into two independent tables:languagesused exclusively for workslocale_languagesused for admin/i18n: locales, admin posts, FAQs, abuse reports, and support/feedback formsWhat this PR does:
locale_languagestable duplicating the existinglanguagesdata, including indexes.Locale,AdminPost, andArchiveFaqtobelongs_to :locale_language, foreign_key: :language_id, reusing the existing FK column to avoid data migrations on those tables (per redsummernight's suggestion on related PR).LocaleLanguageinstead ofLanguage.supportandsuperadminroles only (was previously also available totranslation).rake After:populate_locale_languages) to populate the new table, following the project's after_tasks pattern.Changes to
LanguagePolicy:index?now allowstranslation,support,superadmin, andpolicy_and_abuse(read-only access)create?andupdate?restricted tosupportandsuperadminname,short,sortable_name(no more support/abuse fields)LocaleLanguagePolicyroles:index?andedit?:translation,support,superadmin,policy_and_abusecreate?:translation,superadminupdate?:translation,superadmin,support,policy_and_abuse(with role-specific permitted attributes)Testing Instructions
Testing instructions are in the Jira issue.
References
Credit
Pablo Monfort (he/him)