*/ public static function labelsEn(): array { return [ 'project_name' => 'Project Name', 'player_name' => 'Applicant Name', 'contact_email' => 'Email Address', 'contact_mobile' => 'Phone Number', 'school' => 'University / College', 'degree' => 'Highest Degree', 'track' => 'Competition Track', 'company_name' => 'Company Name', 'location_country' => 'Project Location', 'location_province' => 'Province', 'location_city' => 'City', 'oversea_country' => 'Country', 'event_location' => 'Preferred Competition Venue', 'team_members' => 'Team Members', 'recommend' => 'Referrer', 'intro' => 'Project Overview', 'plan' => 'Upload Business Plan', 'supporting' => 'Supporting Documents', 'commitment_accepted' => 'Competition Declaration', 'name' => 'Full Name', 'phone' => 'Phone Number', 'company' => 'Organization', 'job' => 'Job Title', 'purpose' => 'Purpose of Attendance', ]; } /** * @return array */ public static function placeholdersEn(): array { return [ 'oversea_country' => 'e.g. Singapore, Japan, the United States', 'team_members' => 'Separate multiple names with commas', 'recommend' => 'Organization or referrer name', 'intro' => 'About 200 words', 'name' => 'Enter your full name', 'phone' => 'Enter an 11-digit mobile number', 'company' => 'Enter your organization', 'job' => 'Enter your job title', 'purpose' => 'Please select a purpose', ]; } /** * @return array */ public static function helpEn(): array { return [ 'location_province' => 'Required when “China” is selected', 'location_city' => 'City not required outside China', 'oversea_country' => 'Select “Outside China,” then enter the country', 'plan' => 'Include the company profile and positioning, core products/services, market size and competition situation, innovation barriers and differentiation, core team, and development strategy. PDF format; no more than 20 pages recommended.', 'supporting' => 'You may upload multiple files, including scanned copy of Business License; supporting documents for intellectual property rights (including patent certificates, trademark registration certificates, software copyright certificates, etc.); other supporting documents (including product or service introductions, award certificates, investment-financing certificates, etc.); qualification certificates such as academic credentials and degrees of founders or key principals. Maximum 20 MB per file. Supported: PDF, PPT, PPTX, DOC, DOCX, WPS, RAR, ZIP', 'commitment_accepted' => 'Open and read the full declaration, sign by hand at the end, and select “Confirm Signature.”', ]; } /** * @return array */ public static function trackTitlesEn(): array { return [ '芯片与组件' => 'Chips & Components', '制造与封装' => 'Manufacturing & Packaging', '材料与设备' => 'Materials & Equipment', '材料与芯片' => 'Materials & Chips', '器件与模块' => 'Devices & Modules', '场景与应用' => 'Scenarios & Applications', '设备与服务' => 'Equipment & Services', '其他' => 'Other', ]; } /** * @return array */ public static function trackDescriptionsEn(): array { return [ '材料与芯片' => 'Original breakthroughs in optoelectronic new materials, optical chips and core components, covering indium phosphide, silicon photonics, lithium niobate processes, plus innovations in lasers, modulators, detector chips, supporting electronic chips and optical components.', '器件与模块' => 'Breakthroughs in active/passive optical devices and high-speed modules, covering packaging-coupling, mass-production and device-level innovations for 400G/800G/1.6T, silicon-photonic and coherent modules.', '场景与应用' => 'Scenarios such as computing-power networks, AI data centers, 5G/6G and industrial sensing, covering system integration, innovative applications and solutions for deep tech-industry alignment.', '设备与服务' => 'Optical-communication manufacturing and testing, covering epitaxy, lithography, packaging-coupling equipment, testing instruments, packaging-test services and EDA-tool innovations.', ]; } /** * 与原型细分赛道对齐(保留既有 track_code),并包含「其他」。 * * @return list */ public static function prototypeTracks(): array { return [ [ 'track_code' => 'guang_xinpian', 'title' => '材料与芯片', 'description' => '聚焦光电新材料、光芯片及核心组件的原创技术突破,涵盖磷化铟、硅光、铌酸锂等材料工艺,以及激光器、调制器、探测器芯片和配套电芯片、光学元件的创新成果。', 'sort' => 1, ], [ 'track_code' => 'zhizao_fengzhuang', 'title' => '器件与模块', 'description' => '围绕有源 / 无源光器件及高速光模块的技术攻关,涵盖 400G/800G/1.6T 光模块、硅光模块、相干模块的封装耦合、量产工艺及器件级创新方案。', 'sort' => 2, ], [ 'track_code' => 'guangtongxin_yingyong', 'title' => '场景与应用', 'description' => '面向算力网络、AI 数据中心、5G/6G、工业传感等场景,涵盖光通信系统集成、创新应用及解决方案,推动技术与产业需求深度对接。', 'sort' => 3, ], [ 'track_code' => 'guangdian_cailiao', 'title' => '设备与服务', 'description' => '聚焦光通信制造与测试环节,涵盖外延、光刻、封装耦合等专用设备,以及检测仪器、封装测试服务、EDA 工具等产业配套创新成果。', 'sort' => 4, ], [ 'track_code' => 'other', 'title' => '其他', 'description' => '', 'sort' => 5, ], ]; } /** * @return array> */ public static function outdatedLabelEn(): array { return [ 'event_location' => ['Competition City', 'Competition Venue'], 'track' => ['Track', 'Sub-track', 'Sub Track'], ]; } /** * 为报名/观众 schema 补齐英文标签、占位、帮助与选项,与原型 registration-i18n.js 对齐。 * * @param list $rows * @return list */ public static function enrichSchemaRows(array $rows): array { $labels = self::labelsEn(); $placeholders = self::placeholdersEn(); $help = self::helpEn(); $outdated = self::outdatedLabelEn(); $optionCatalogs = [ 'degree' => SignupOptionCatalog::degrees(), 'location_country' => SignupOptionCatalog::locationCountries(), 'event_location' => SignupOptionCatalog::eventLocations(), 'purpose' => SignupOptionCatalog::audiencePurposes(), ]; $out = []; foreach ($rows as $row) { if (! is_array($row)) { $out[] = $row; continue; } $key = (string) ($row['key'] ?? ''); if ($key === '') { $out[] = $row; continue; } if (isset($labels[$key])) { $en = self::existingEn($row['label_i18n'] ?? null); if ($en === '' || (isset($outdated[$key]) && in_array($en, $outdated[$key], true))) { $row['label_i18n'] = ['en' => $labels[$key]]; } } if (isset($placeholders[$key]) && self::existingEn($row['placeholder_i18n'] ?? null) === '') { $row['placeholder_i18n'] = ['en' => $placeholders[$key]]; } if (isset($help[$key]) && self::existingEn($row['help_i18n'] ?? null) === '') { $row['help_i18n'] = ['en' => $help[$key]]; } if (isset($optionCatalogs[$key]) && isset($row['options']) && is_array($row['options'])) { $catalog = $optionCatalogs[$key]; $kind = $key === 'purpose' ? 'purpose' : $key; $options = []; foreach ($row['options'] as $opt) { if (is_string($opt)) { $opt = ['label' => $opt, 'value' => $opt]; } if (! is_array($opt)) { $options[] = $opt; continue; } if (self::existingEn($opt['label_i18n'] ?? null) === '') { $code = SignupOptionCatalog::normalize($kind, (string) ($opt['value'] ?? '')) ?? (string) ($opt['value'] ?? ''); if (isset($catalog[$code])) { $opt['label_i18n'] = ['en' => $catalog[$code]['en']]; } } $options[] = $opt; } $row['options'] = $options; } $out[] = $row; } return array_values($out); } private static function existingEn(mixed $i18n): string { if (! is_array($i18n)) { return ''; } return trim((string) ($i18n['en'] ?? '')); } }