Skip to content

feat(driver): add OnedriveAPP SharePoint field i18n - #724

Open
AkashiCoin wants to merge 1 commit into
OpenListTeam:mainfrom
AkashiCoin:feat/onedrive-app-sharepoint-i18n
Open

AkashiCoin wants to merge 1 commit into
OpenListTeam:mainfrom
AkashiCoin:feat/onedrive-app-sharepoint-i18n

Conversation

@AkashiCoin

Copy link
Copy Markdown

Summary / 摘要

OnedriveAPP gained two new Addition fields in OpenListTeam/OpenList#3252: is_sharepoint and site_id. This PR adds the matching drivers.json entries so the field labels and help text render properly instead of falling back to auto-formatted keys.

User-visible behavior changes:

  • is_sharepoint now shows as Is sharepoint with an explanation that it mounts a SharePoint site's document library instead of a user's OneDrive.
  • site_id now shows as Site id with a hint listing the three accepted formats and warning that a bare host resolves to the root site, whose default library is usually empty.
  • No behavior change for any other driver. Keys are additive only.

Important implementation changes:

  • Four keys added to the OnedriveAPP block in src/lang/en/drivers.json: is_sharepoint, is_sharepoint-tips, site_id, site_id-tips.

  • Wording is kept consistent with the existing Onedrive driver, which already has these two fields.

  • Translations for other locales are left to Crowdin, per crowdin.yml (source: /src/lang/en/*.json).

  • This PR has breaking changes.
    / 此 PR 包含破坏性变更。

  • This PR changes public API, config, storage format, or migration behavior.
    / 此 PR 修改了公开 API、配置、存储格式或迁移行为。

  • This PR requires corresponding changes in related repositories.
    / 此 PR 需要关联仓库同步修改。

Related repository PRs / 关联仓库 PR:

Note: the fields themselves come from the backend PR above. Without it these keys are simply unused; nothing breaks.

Related Issues / 关联 Issue

Relates to OpenListTeam/OpenList#3252

Testing / 测试

Not run:

  • go test ./... — not applicable, this repository is a SolidJS frontend.

Commands run:

bunx prettier --check src/lang/en/drivers.json   # All matched files use Prettier code style!
bun run lint                                     # 13 pre-existing TS errors, see below

Manual verification:

  • Flattened src/lang/en/drivers.json with the same nesting the app uses and confirmed all four keys resolve: drivers.OnedriveAPP.is_sharepoint, drivers.OnedriveAPP.is_sharepoint-tips, drivers.OnedriveAPP.site_id, drivers.OnedriveAPP.site_id-tips.
  • Traced the lookup path in src/pages/manage/storages/Item.tsx: the label comes from drivers.<driver>.<name> and the help line from drivers.<driver>.<name>-tips, so both the label and the hint are covered.

Not covered:

  • The form was not rendered in a running instance against the patched backend, so the visual result was not verified end to end.

  • bun run lint reports 13 error TS in MonacoEditor.tsx, archive.tsx, text-editor.tsx, video.tsx and AddOrEdit.tsx. The same 13 errors occur on unmodified main (git stash comparison), so they are pre-existing and unrelated to this change.

  • go test ./...

  • Manual test / 手动测试:

Checklist / 检查清单

  • I have read CONTRIBUTING.
    / 我已阅读 CONTRIBUTING。
  • I confirm this contribution follows the repository license, contribution policy, and code of conduct.
    / 我确认此贡献符合仓库许可证、贡献规范和行为准则。
  • I have formatted the changed code with gofmt, go fmt, or prettier where applicable.
    / 我已按适用情况使用 gofmt、go fmt 或 prettier 格式化变更代码。
  • I have requested review from relevant maintainers or code owners where applicable.
    / 我已在适用情况下请求相关维护者或代码所有者审查。

AI Disclosure / AI 使用声明

  • This PR includes AI-assisted content.
    / 此 PR 包含 AI 辅助内容。

Tools used / 使用工具:

  • ChatGPT
  • Codex
  • GitHub Copilot
  • Claude
  • Gemini
  • Other (please specify) / 其他(请注明):

Usage scope / 使用范围:

  • Code generation / 代码生成

  • Refactoring / 重构

  • Documentation / 文档

  • Tests / 测试

  • Translation / 翻译

  • Review assistance / 审查辅助

  • I have reviewed and validated all AI-assisted content included in this PR.
    / 我已审核并验证此 PR 中的所有 AI 辅助内容。

  • I have ensured that all AI-assisted commits include Co-Authored-By attribution.
    / 我已确保所有 AI-assisted 提交都包含 Co-Authored-By 归属信息。

  • I can reproduce all AI-assisted content included in this PR without any AI tools.
    / 我可以在没有任何 AI 工具的情况下重现此 PR 中包含的所有 AI 辅助内容。

- 新增 `is_sharepoint` 与 `is_sharepoint-tips`,说明该开关用于挂载 SharePoint 站点文档库而非用户 OneDrive
- 新增 `site_id` 与 `site_id-tips`,说明支持站点 URL、`<host>:/sites/<name>` 与复合 ID 三种写法,并提示裸域名会落到默认文档库通常为空的根站点

Co-authored-by: Claude <81847+claude@users.noreply.github.com>
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.

1 participant