-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(git-changelog): migrate i18n to ui config #213
Conversation
✅ Successfully deployed to Netlify
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. The `locales` in the original Vite plugin `GitChangelogMarkdownSection` no longer need to be configured and have been migrated to the UI configuration under `locales`: 1. `changelog.title` 2. `contributors.title`; 2. In order to better structure the organization of the i18n fields, the original 1. `noLogs` i18n configuration changed to `changelog.noData`; 2. `noContributors` i18n configuration was changed to `contributors.noData`. 3. `lastEdited` i18n Configuration changed to `lastEdited`. 4. `lastEditedDateFnsLocaleName` configuration changed to `changelog.lastEditedDateFnsLocaleName` 5. `viewFullHistory` i18n Configuration changed to `changelog.viewFullHistory` 6. `committedOn` i18n configuration changed to `changelog.committedOn` Signed-off-by: Neko Ayaka <neko@ayaka.moe> Co-authored-by: BeiyanYunyi <14120445+BeiyanYunyi@users.noreply.github.com>
Signed-off-by: Neko Ayaka <neko@ayaka.moe>
5a94b9d
to
a28979c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
话说是不是可以把 markdownSection 插件整合进 Git 插件,两个插件共用一个 include(include 里的文件执行 git 并插入 md);需要自定义组件的用户可以用 sections.disableChangelog
等 来禁用。
(不过这样似乎和其他插件不是很统一了,我看 PageProperties 也是分成了俩
(现在这样也挺好,配置起来也方便,而且超出这个 pr 的范围了
我想过,事实上我过去的几天一直在想这个事情,但是我考虑到可能会出现有的用户只是想要 git changelog 的 data loader 能力,有的用户可能会想要自己搞自己的 Markdown manipulation。 不确定什么样的设计会比较好... |
Co-authored-by: Northword <44738481+northword@users.noreply.github.com>
Co-authored-by: Northword <44738481+northword@users.noreply.github.com>
好像把之前的 comment 给 force push 掉了 😂 |
需要自定义组件的用户可以用 sections.disableChangelog 等 来禁用(或是有一个选项形如 不过当新方案对比现有方案没有比较明确的优势的时候,我们不妨先保持原状。 |
Close #198
Thanks @BeiyanYunyi's work and the discovery of id attribute of
h2
could be discoverable by VitePress and include as parts of outline in @project-trans/rle-wiki.locales
in the original Vite pluginGitChangelogMarkdownSection
no longer need to be configured and have been migrated to the UI configuration underlocales
:changelog.title
contributors.title
;noLogs
i18n configuration changed tochangelog.noData
;noContributors
i18n configuration was changed tocontributors.noData
.lastEdited
i18n Configuration changed tolastEdited
.lastEditedDateFnsLocaleName
configuration changed tochangelog.lastEditedDateFnsLocaleName
viewFullHistory
i18n Configuration changed tochangelog.viewFullHistory
committedOn
i18n configuration changed tochangelog.committedOn