refactor(git-changelog): migrate i18n to ui config - #213
Conversation
✅ Successfully deployed to Netlify
|
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
northword
left a comment
There was a problem hiding this comment.
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
h2could be discoverable by VitePress and include as parts of outline in @project-trans/rle-wiki.localesin the original Vite pluginGitChangelogMarkdownSectionno longer need to be configured and have been migrated to the UI configuration underlocales:changelog.titlecontributors.title;noLogsi18n configuration changed tochangelog.noData;noContributorsi18n configuration was changed tocontributors.noData.lastEditedi18n Configuration changed tolastEdited.lastEditedDateFnsLocaleNameconfiguration changed tochangelog.lastEditedDateFnsLocaleNameviewFullHistoryi18n Configuration changed tochangelog.viewFullHistorycommittedOni18n configuration changed tochangelog.committedOn