Migrate forms to L10n and add support for `DatabaseObjectBuilder`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- php
- Lĩnh vực
- backend, internationalization
Hướng nghiên cứu
Start by reading AbstractDatabaseObjectBuilderForm, TL10nFormField, and the listed ACP form groups under lib/acp/form/ to understand the migration patterns. The issue marks several forms complete and identifies many remaining candidates, but the category migration has cross-project compatibility, data migration, importer, install-script, and deletion blockers. Done means migrating the agreed forms while preserving those behaviors and validating the affected forms and category integrations.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Migrate remaining ACP forms from I18nHandler to AbstractDatabaseObjectBuilderForm
These ACP forms in lib/acp/form/ still handle multilingual text through the legacy I18nHandler and have not been moved to AbstractDatabaseObjectBuilderForm with TL10nFormField. A form reaches I18nHandler in one of three ways: it calls it directly, it registers fields through AbstractAcpForm::registerI18nValue(), or it uses form builder ->i18n() fields, which go through TI18nFormField.
Plain AbstractForm with direct I18nHandler usage
-
BBCodeAddForm/BBCodeEditForm -
NoticeAddForm/NoticeEditForm -
PageAddForm/PageEditForm -
PaidSubscriptionAddForm/PaidSubscriptionEditForm(titleanddescription, saved through its ownsaveI18nValue()) -
StyleAddForm/StyleEditForm -
UserGroupAddForm/UserGroupEditForm(throughAbstractOptionListForm) -
AbstractCategoryAddForm/AbstractCategoryEditForm(abstract, risky transition)
AbstractAcpForm with registerI18nValue()
-
TrophyAddForm/TrophyEditForm(title,description) -
UserTrophyAddForm/UserTrophyEditForm(description) -
AbstractCustomOptionForm(optionTitle,optionDescription; abstract, no subclass in Core)
AbstractFormBuilderForm with ->i18n() fields
-
ContactOptionAddForm/ContactOptionEditForm(throughAbstractFormOptionAddForm) -
ContactRecipientAddForm/ContactRecipientEditForm -
CronjobAddForm/CronjobEditForm(also callsI18nHandler::save()andremove()directly) -
DevtoolsProjectAddForm/DevtoolsProjectEditForm -
LabelGroupAddForm/LabelGroupEditForm(also callsI18nHandler::save()andremove()directly) -
MenuAddForm/MenuEditForm -
MenuItemAddForm/MenuItemEditForm -
ReactionTypeAddForm/ReactionTypeEditForm -
UserOptionCategoryAddForm/UserOptionCategoryEditForm(also callsI18nHandler::save()directly) -
UserRankAddForm/UserRankEditForm
Notes
- Check first whether
LanguageItemAddFormandDevtoolsProjectAddFormreally need multilingual text fields.
Postponed
LanguageItemAddForm- The i18n implementation is merely used for transport.
SmileyAddForm/SmileyEditForm- Smileys are a legacy feature, the form is abandoned in place
LabelAddForm/LabelEditForm- Integrations have deep knowledge of the internal label API, interpreting the title as phrase, serializing it in the modification log and possibly other shenanigans
Blockers: Migrating CategoryAddFormBuilderForm to l10n
Affecting:
CategoryAddFormBuilderForm(also callsI18nHandler::save()andremove()directly), along with its subclasses:ArticleCategoryAddForm/ArticleCategoryEditFormMediaCategoryAddForm/MediaCategoryEditFormSmileyCategoryAddForm/SmileyCategoryEditFormTrophyCategoryAddForm/TrophyCategoryEditForm- … and about 10 more forms in our products alone, let alone any third party implementations.
This possibly warrants a different base implementation to begin with which also allows us to fix some long-standing issues with the implementation. However, I don’t see this landing in 6.3 by any means since we need to get back to the drawing board first.
Categorycannot use collections: it extendsProcessibleDatabaseObject, so it must be rebased ontoCollectionDatabaseObjectwithgetProcessor()reimplemented.CategoryCachemust preload the l10n values.- Base class switch causes fatal errors:
AbstractDatabaseObjectBuilderFormhas typed$formAction/$objectEditLinkControllerand: voidreturns. Every subclass redeclaring them breaks (Core Article/Media/Smiley/Trophy, Blog, Calendar, Filebase, Gallery, Database, and third-party subclasses). additionalDatais silently lost: the builder save path ignoresCustomFormDataProcessor.- Article:
sortField/sortOrder - Calendar:
eventColor - Database:
icon/canContainRecords - Listeners: Forum, Event Threads, Support Threads
- Needs a
CategoryBuilderadditionalDataAPI?
- Article:
- Deletion: the new command must keep
ICategoryType::beforeDeletion()/afterDeletion()and the ACL cleanup. Remove the phrase cleanup inCategoryAction::delete(). getTitle()overrides reading$this->title:BlogCategory,FilebaseCategory,WsdbCategory.- SQL on
category.title:TDecoratedCategoryLookupPageHandler. - "Import" fallback category (select by title + raw INSERT): Core
ArticleImporter/TrophyImporter, BlogEntryImporter, CalendarEventImporter, FilebaseFileImporter, GalleryImageImporter. - Install scripts calling
CategoryEditor::create(['title' => …]): Blog, Calendar, Filebase, Gallery. Fresh installs fail. AbstractCategoryImporter: keep thetitle/description+additionalData['i18n']contract and map it to l10n.- Database:
WsdbCategoryAddForm/WsdbOptionGroupAddFormread$this->objectAction->getReturnValues(). Use$this->object. - Legacy
AbstractCategoryAddForm/EditForm: read and writetitle/description. - Data migration: phrase names vary per type prefix. Resolve any existing phrase, delete phrases for all prefixes, use a
TEXTcolumn for the description.
- Ngôn ngữ chính
- PHP
- Star
- 248
- Fork
- 147
- Merge trung bình
- 17 phút
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của WoltLab/WCF
-
Problems with button inputSuffixĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Breadcrumb colors are confusingĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
WoltLab/WCF#6771 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
HE-Arc/le-panier-du-coin#49 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
15.0
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug: juros do parcelamento travados em 1x no gateway Rede Débito e Crédito 3DS (woo-rede 5.6.0)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
LinkNacional/woo-rede#367 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Lazyload SVG placeholder runs uncached attachment lookups with JSON-escaped URLs on REST responsesĐang mởcustomer report
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Codeinwp/optimole-wp#1253 ·
Maintainer thường phản hồi trong vòng 1 ngày