Skip to content

Commit

Permalink
更新英文版
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdommen committed Jan 21, 2024
1 parent 0e4bae3 commit 91d91bf
Show file tree
Hide file tree
Showing 17 changed files with 1,976 additions and 20 deletions.
143 changes: 140 additions & 3 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,84 @@ export default withPwa(
root: {
label: '简体中文',
lang: 'zh-CN'
},
en: {
label: 'English',
lang: 'en-US',
link: '/en/',
themeConfig: {
nav: [
{
text: 'Documents',
activeMatch: `^/guide/`,
link: '/en/guide/introduction',
},
{
text: 'API Reference',
activeMatch: `^/api/`,
link: '/en/api/version-wrapper'
},
{
text: 'User Doc',
link: 'https://doc.ultikits.com'
}
],
search: {
provider: 'algolia',
options: {
indexName: 'ultikits',
appId: '8D12CWPS3U',
apiKey: '8dfc6d2cbe56024cb3906cf802f2cce7',
placeholder: "You can type anything to get started~",
translations: {
button: {
buttonText: 'Search',
buttonAriaLabel: 'Search Documents'
},
modal: {
searchBox: {
resetButtonTitle: 'Clear query',
resetButtonAriaLabel: 'Clear query',
cancelButtonText: 'Cancel',
cancelButtonAriaLabel: 'Cancel'
},
startScreen: {
recentSearchesTitle: 'Recent Searches',
noRecentSearchesText: 'No recent searches',
saveRecentSearchButtonTitle: 'Save to recent searches',
removeRecentSearchButtonTitle: 'Remove from recent searches',
favoriteSearchesTitle: 'Favorites',
removeFavoriteSearchButtonTitle: 'Remove from favorites'
},
errorScreen: {
titleText: 'Unable to fetch results',
helpText: 'You may need to check your network connection'
},
footer: {
selectText: 'This is it!',
navigateText: 'Navigation',
closeText: 'Close',
searchByText: 'Search by'
},
noResultsScreen: {
noResultsText: 'No results found',
suggestedQueryText: 'You may give it a try',
reportMissingResultsText: 'Do you think this query should have results?',
reportMissingResultsLinkText: 'Report missing results'
}
}
}
}
},
socialLinks: [
{icon: 'github', link: 'https://github.com/UltiKits'},
{icon: 'discord', link: 'https://discord.gg/P3fpQSRPGu'},
],
}
}
},
sitemap: {
hostname: 'https://doc.dev.ultikits.com'
hostname: 'https://dev.ultikits.com'
},
vite: {
ssr: {
Expand Down Expand Up @@ -158,14 +232,13 @@ export default withPwa(
},
socialLinks: [
{icon: 'github', link: 'https://github.com/UltiKits'},
{icon: 'discord', link: 'https://discord.gg/P3fpQSRPGu'},
{icon: {svg: '<svg enable-background="new 0 0 2094.5 2477.7" viewBox="0 0 2094.5 2477.7" xmlns="http://www.w3.org/2000/svg"><path d="m1831.6 1032.9c2.3-31.5 4.5-65.3 4.5-96.8 0-517.6-353.3-936.1-789.8-936.1s-789.8 418.5-789.8 936.1c0 33.8 2.3 67.5 4.5 101.3-132.8 265.5-330.8 825.8-236.3 994.6 11.3 20.3 126-90 218.3-265.5 2.3 195.8 101.3 373.5 261 497.3-130.5 22.5-249.8 105.8-240.8 148.5 15.8 72 335.3 87.8 726.8 31.5 2.3 0 4.5 0 9-2.3 15.8 0 31.5 2.3 47.3 2.3s31.5 0 47.3-2.3c2.3 0 4.5 0 9 2.3 393.8 56.3 711.1 40.5 726.8-31.5 9-42.8-110.3-126-240.8-148.5 159.8-123.8 258.8-303.8 261-501.8 90 180 209.3 292.5 220.5 270 94.6-168.8-108-735.9-238.5-999.1z"/></svg>'}, link: 'https://qm.qq.com/q/ELTl8iUoGk'}
],
nav: [
{
text: '深度指南',
activeMatch: `^/guide/`,
link: '/guide/introduction'
link: '/guide/introduction',
},
{
text: 'API 接口',
Expand Down Expand Up @@ -243,6 +316,70 @@ export default withPwa(
},
],
},
'/en/guide/': {
base: '/en/guide/',
items: [
{
text: 'Get Started',
items: [
{
text: 'Introduction',
link: 'introduction'
},
{
text: 'Quick Start',
link: 'quick-start'
}
]
},
{
text: 'Basics',
items: [
{
text: 'Command Executor',
link: 'essentials/cmd-executor'
},
{
text: 'Event Listener',
link: 'essentials/event-listener'
},
{
text: 'Config File',
link: 'essentials/config-file'
},
{
text: 'Data Storage',
link: 'essentials/data-storage'
},
{
text: 'Internationalization',
link: 'essentials/i18n'
},
]
},
{
text: 'Advanced',
items: [
{
text: 'Auto Register',
link: 'advanced/auto-register'
},
{
text: 'IOC Container',
link: 'advanced/ioc-container'
},
{
text: 'GUI Interface',
link: 'advanced/gui'
},
{
text: 'UltiTools Maven Plugin',
link: 'advanced/maven-plugin'
}
]
},
],
},
'/api/': {
base: '/api/',
items: [
Expand Down
30 changes: 15 additions & 15 deletions .vitepress/theme/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ export default {

// Obtain configuration from: https://giscus.app/
giscusTalk({
repo: 'UltiKits/UltiTools-Dev-Doc',
repoId: 'R_kgDOKHynCA',
category: 'General',
categoryId: 'DIC_kwDOKHynCM4Cb4Le',
mapping: 'pathname',
inputPosition: 'top',
lang: 'zh-CN',
lightTheme: 'light',
darkTheme: 'transparent_dark',
// ...
}, {
frontmatter, route
},
true
repo: 'UltiKits/UltiTools-Dev-Doc',
repoId: 'R_kgDOKHynCA',
category: 'General',
categoryId: 'DIC_kwDOKHynCM4Cb4Le',
mapping: 'pathname',
inputPosition: 'top',
lang: 'en',
lightTheme: 'light',
darkTheme: 'transparent_dark',
// ...
}, {
frontmatter, route
},
true
);
}
}
}
114 changes: 114 additions & 0 deletions docs/en/api/ulti-tools-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
::: warning 🚧 This page is under construction
The content of this page may not be the latest. You can go to [Javadoc](https://doc.dev.ultikits.com/javadoc) to see the latest content.
:::

::: tip 🐌 This page update slowly
The content of this page may not be the latest. You can go to [Javadoc](https://doc.dev.ultikits.com/javadoc) to see the latest content.
:::

# `UltiToolsPlugin`

`com.ultikits.ultitools.abstracts`

- java.lang.Object
- com.ultikits.ultitools.abstracts.UltiToolsPlugin

代表一个 UltiTools 模块及其主类. 其包含了模块正常加载并工作所需的基础方法和字段. 这是一个 IPlugin 的间接实现.

> 作者: wisdomme, qianmo
>
> 自 6.0.0 可用
>
> 版本: 1.0.0
已实现的接口: `IPlugin`, `Localized`

public abstract class **UltiToolsPlugin** extends java.lang.Object implements IPlugin, Localized

## 构造器概要
:::tabs
== 构造器
`UltiToolsPlugin()`
:::

## 方法概要
:::tabs
== 所有方法

| 限定符和类型 | 方法和说明 |
|-------------------------------------------------|-----------------------------------------------------------------------------|
| `static CommandManager ` | static CommandManager |
| `<T extends AbstractConfigEntity> T` | getConfig\(java.lang.String path, java.lang.Class\<T> configType) |
| `static ConfigManager ` | getConfigManager\() |
| `<T extends AbstractDataEntity>DataOperator<T>` | getDataOperator\(java.lang.Class\<T> dataClazz) |
| `Language` | getLanguage\() |
| `java.lang.String` | getLanguageCode() |
| `static ListenerManager` | getListenerManager\() |
| `static PluginManager` | getPluginManager\() |
| `static VersionWrapper` | getVersionWrapper\() |
| `static ViewManager` | getViewManager\() |
| `java.lang.String` | i18n\(java.lang.String str) |
| `java.lang.String` | i18n\(java.lang.String code, java.lang.String str)<br>通过指定的语言代码返回一个本地化的字符串。 |
| `<T extends AbstractConfigEntity> void` | saveConfig\(java.lang.String path, java.lang.Class\<T> configType) |

== 静态方法

| 限定符和类型 | 方法和说明 |
|-------------------------------------------------|-----------------------------------------------------------------------------|
| `static CommandManager ` | static CommandManager |
| `static ConfigManager ` | getConfigManager\() |
| `static ListenerManager` | getListenerManager\() |
| `static PluginManager` | getPluginManager\() |
| `static VersionWrapper` | getVersionWrapper\() |
| `static ViewManager` | getViewManager\() |

== 实例方法

| 限定符和类型 | 方法和说明 |
|-------------------------------------------------|-----------------------------------------------------------------------------|
| `<T extends AbstractConfigEntity> T` | getConfig\(java.lang.String path, java.lang.Class\<T> configType) |
| `<T extends AbstractDataEntity>DataOperator<T>` | getDataOperator\(java.lang.Class\<T> dataClazz) |
| `Language` | getLanguage\() |
| `java.lang.String` | getLanguageCode() |
| `java.lang.String` | i18n\(java.lang.String str) |
| `java.lang.String` | i18n\(java.lang.String code, java.lang.String str)<br>通过指定的语言代码返回一个本地化的字符串。 |
| `<T extends AbstractConfigEntity> void` | saveConfig\(java.lang.String path, java.lang.Class\<T> configType) |

== 具体方法

| 限定符和类型 | 方法和说明 |
|-------------------------------------------------|-----------------------------------------------------------------------------|
| `static CommandManager ` | static CommandManager |
| `<T extends AbstractConfigEntity> T` | getConfig\(java.lang.String path, java.lang.Class\<T> configType) |
| `static ConfigManager ` | getConfigManager\() |
| `<T extends AbstractDataEntity>DataOperator<T>` | getDataOperator\(java.lang.Class\<T> dataClazz) |
| `Language` | getLanguage\() |
| `java.lang.String` | getLanguageCode() |
| `static ListenerManager` | getListenerManager\() |
| `static PluginManager` | getPluginManager\() |
| `static VersionWrapper` | getVersionWrapper\() |
| `static ViewManager` | getViewManager\() |
| `java.lang.String` | i18n\(java.lang.String str) |
| `java.lang.String` | i18n\(java.lang.String code, java.lang.String str)<br>通过指定的语言代码返回一个本地化的字符串。 |
| `<T extends AbstractConfigEntity> void` | saveConfig\(java.lang.String path, java.lang.Class\<T> configType) |

:::

### 从类继承的方法
::: info java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
:::

### 从接口继承的方法
::: info com.ultikits.ultitools.interfaces.IPlugin
minUltiToolsVersion, pluginName, registerSelf, reloadSelf, unregisterSelf
:::

::: info com.ultikits.ultitools.interfaces.Localized
supported
:::

## 构造器详细资料
::: info UltiToolsPlugin
UltiToolsPlugin()
:::
Loading

0 comments on commit 91d91bf

Please sign in to comment.