Skip to content

Commit

Permalink
Move translator command for channels into a separate command group ca…
Browse files Browse the repository at this point in the history
…lled channel
  • Loading branch information
SeoulSKY committed Jun 14, 2024
1 parent 3a07eac commit 076e933
Show file tree
Hide file tree
Showing 27 changed files with 452 additions and 404 deletions.
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@
- [About](#about)
- [Arcaea](#arcaea)
- [/arcaea linkplay](#arcaea-linkplay)
- [Channel](#channel)
- [/channel language](#channel-language)
- [/channel translator](#channel-translator)
- [Chat](#chat)
- [/chat set\_language](#chat-set_language)
- [/chat clear](#chat-clear)
- [Dashboard](#dashboard)
- [Dice](#dice)
- [Help](#help)
- [Ping](#ping)
- [Translator](#translator)
- [/translator set\_languages](#translator-set_languages)
- [/translator set\_channel\_languages](#translator-set_channel_languages)
- [/translator set\_channel\_main\_language](#translator-set_channel_main_language)
- [How to Set up and Run](#how-to-set-up-and-run)
- [Setting Environment Variables](#setting-environment-variables)
- [Description of each environment variable](#description-of-each-environment-variable)
Expand Down Expand Up @@ -81,13 +80,27 @@ Show the information about SoruSora

Create an embed to invite people to your Link Play.

### Chat
### Channel

To chat with SoruSora, either mention her or reply to her.
#### /channel language

Set or remove the main language of the channels.

The translator will use the main language as the source language for all messages in the channels.

#### /channel translator

Set or remove a translator for channels.

For every message sent in the selected channels, SoruSora will translate the message into the selected languages and reply with the translations.

If the main language of the channels is not selected using `/channel language`, the language used in the message will be detected automatically.

It supports 43 languages, namely `Albanian`, `Arabic`, `Azerbaijani`, `Bengali`, `Bulgarian`, `Catalan`, `Chinese (Simplified)`, `Chinese (Traditional)`, `Czech`, `Danish`, `Dutch`, `English`, `Esperanto`, `Estonian`, `Filipino`, `Finnish`, `French`, `German`, `Greek`, `Hebrew`, `Hindi`, `Hungarian`, `Indonesian`, `Irish`, `Italian`, `Japanese`, `Korean`, `Latvian`, `Lithuanian`, `Malay`, `Norwegian (Bokmal)`, `Persian`, `Polish`, `Portuguese`, `Romanian`, `Russian`, `Slovak`, `Slovenian`, `Spanish`, `Swedish`, `Thai`, `Turkish` and `Ukrainian`.

#### /chat set_language
### Chat

Update the chat language to the current discord language.
To chat with SoruSora, either mention her or reply to her.

#### /chat clear

Expand All @@ -111,19 +124,10 @@ Check the response time of SoruSora.

### Translator

It supports 43 languages, namely `Albanian`, `Arabic`, `Azerbaijani`, `Bengali`, `Bulgarian`, `Catalan`, `Chinese (Simplified)`, `Chinese (Traditional)`, `Czech`, `Danish`, `Dutch`, `English`, `Esperanto`, `Estonian`, `Filipino`, `Finnish`, `French`, `German`, `Greek`, `Hebrew`, `Hindi`, `Hungarian`, `Indonesian`, `Irish`, `Italian`, `Japanese`, `Korean`, `Latvian`, `Lithuanian`, `Malay`, `Norwegian (Bokmal)`, `Persian`, `Polish`, `Portuguese`, `Romanian`, `Russian`, `Slovak`, `Slovenian`, `Spanish`, `Swedish`, `Thai`, `Turkish` and `Ukrainian`.

#### /translator set_languages
Set or remove a translator that translate all of your messages to other languages.

Set or remove the languages to be translated for your messages.

#### /translator set_channel_languages

Set or remove the languages to be translated for the channels. Only available for server admins.

#### /translator set_channel_main_language
It supports 43 languages, namely `Albanian`, `Arabic`, `Azerbaijani`, `Bengali`, `Bulgarian`, `Catalan`, `Chinese (Simplified)`, `Chinese (Traditional)`, `Czech`, `Danish`, `Dutch`, `English`, `Esperanto`, `Estonian`, `Filipino`, `Finnish`, `French`, `German`, `Greek`, `Hebrew`, `Hindi`, `Hungarian`, `Indonesian`, `Irish`, `Italian`, `Japanese`, `Korean`, `Latvian`, `Lithuanian`, `Malay`, `Norwegian (Bokmal)`, `Persian`, `Polish`, `Portuguese`, `Romanian`, `Russian`, `Slovak`, `Slovenian`, `Spanish`, `Swedish`, `Thai`, `Turkish` and `Ukrainian`.

Set or remove the main language for the channel. The translator will set the selected language as the source language for all messages in the channels. Only available for server admins.

## How to Set up and Run

Expand Down
18 changes: 18 additions & 0 deletions sorusora/docs/help/channel/language/en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# /channel language

Set or remove the main language of the channels.

The translator will use the main language as the source language for all messages in the channels.

## Usage

* Use the dropdown menu to select the main language for the channels.
* Select no languages to remove the main language from the channels.
* Set `this` to `False` to apply the same settings to multiple channels.
* Press the `Submit` button to save the settings.

## Parameters

* `this` (Optional): If set to `False`, it will send a dropdown menu to select multiple channels. Default value is `True`.

This command is only available to the users who have the permission to manage the channels.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# /번역기 채널메인언어설정
# /채널 언어

선택한 채널의 메인 언어를 설정합니다. 번역기는 선택한 언어를 해당 채널의 모든 메세지의 소스 언어로 설정합니다.
선택한 채널의 메인 언어를 설정합니다.

채널의 메인 언어가 설정되지 않은 경우 번역기는 각 메세지의 언어를 감지하여 소스 언어로 사용합니다.

Expand All @@ -15,4 +15,4 @@

* `현재채널` (옵션): `False`로 설정하면 여러 채널을 선택할 수 있는 드롭다운 메뉴가 전송됩니다. 기본값은 `True`입니다.

이 명령어는 서버 관리자만 사용할 수 있습니다.
이 명령어는 채널 관리 권한을 가진 유저만 사용할 수 있습니다.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# /翻譯訊息 頻道主語言設置
# /頻道 語言

設置頻道的主語言。 翻譯器將選中的語言設置爲通道中所有消息的源語言
設置所選通道的主語言

如果未建立通道的主語言,翻譯器檢測每條消息的語言並將其用作源語言
如果未建立通道主語言,翻譯器檢測每條信息中的語言並將其用作源語言

## 如何使用

* 從下拉菜單中選擇通道的主語言
* 從下拉菜單中選擇要翻譯消息的語言
* 如果不選擇語言,頻道的主語言將被刪除。
* 您可以通過將 `當前頻道` 設置爲 `False`, 對多個頻道應用相同的設置。
* 點擊`結晶`按鈕保存設置。
Expand All @@ -15,4 +15,4 @@

* `當前頻道` (可選): 設置成`False`會發送下拉菜單,可以選擇多個頻道。 默認值爲 `True`

這個指令只有服務器管理員才能使用。
此指令僅限具有頻道管理權限的用戶使用
20 changes: 20 additions & 0 deletions sorusora/docs/help/channel/translator/en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /channel translator

Set or remove a translator for channels.

For every message sent in the selected channels, SoruSora will translate the message into the selected languages and reply with the translations.

If the main language of the channels is not selected using `/channel language`, the language used in the message will be detected automatically.

## Usage

* Use the dropdown menu to select the languages you want to translate messages into.
* Select no languages to remove the translator.
* Set `this` to `False` to set the translator to multiple channels.
* Press the `Submit` button to save the settings.

## Parameters

* `this` (Optional): If set to `False`, it will send a dropdown menu to select multiple channels. Default value is `True`.

This command is only available to the users who have the permission to manage the channels.
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# /번역기 채널언어설정
# /채널 번역기

채널 메세지를 번역할 언어들을 설정합니다.
채널의 번역기를 설정합니다.

선택한 채널에 메세지가 전송되면 SoruSora는 선택된 언어들로 해당 메세지를 번역하고 번역 결과를 해당 메세지에 답장합니다.

만약 `/채널 언어`를 사용하여 채널의 메인 언어를 선택하지 않았다면, 메세지에 사용된 언어가 자동으로 감지됩니다.

## 사용법

* 드롭다운 메뉴에서 메세지를 번역할 언어들을 선택합니다.
* 선택한 채널에 대한 번역을 비활성화하려면 아무 언어도 선택하지 마십시오.
* `현재채널``False`로 설정하여 여러 채널에 동일한 설정을 적용할 수 있습니다.
* 번역기를 제거하려면 아무 언어도 선택하지 마십시오.
* `현재채널``False`로 설정하여 여러 채널에 동일한 번역기를 설정할 수 있습니다.
* 설정을 저장하려면 `결정` 버튼을 누르십시오.

## 변수

* `현재채널` (옵션): `False`로 설정하면 여러 채널을 선택할 수 있는 드롭다운 메뉴가 전송됩니다. 기본값은 `True`입니다.

이 명령어는 서버 관리자만 사용할 수 있습니다.
이 명령어는 채널 관리 권한을 가진 유저만 사용할 수 있습니다.
20 changes: 20 additions & 0 deletions sorusora/docs/help/channel/translator/zh-TW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# /頻道 翻譯機

配置頻道的翻譯器。

對於在選定頻道中發送的每一條消息,SoruSora都將將該消息翻譯成選定語言並回復翻譯。

如果未使用 `/頻道 語言` 選擇通道的主要語言,則會自動檢測消息中使用的語言。

## 如何使用

* 從下拉菜單中選擇要翻譯消息的語言。
* 刪除翻譯器不要選擇任何語言。
* 您可以將當前頻道設置爲"False",爲多個頻道設置相同的翻譯器。
* 點擊`結晶`按鈕保存設置。

## 參數

* `當前頻道` (可選): 設置成`False`會發送下拉菜單,可以選擇多個頻道。 默認值爲 `True`

此指令僅限具有頻道管理權限的用戶使用
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# /translator set_languages
# /translator

Set or remove the languages to be translated for your messages.
Set or remove a translator that translate all of your messages to other languages.

When this command is used, it will send dropdown menus to this channel. You can select the languages you want to translate your messages into. You can select multiple languages.

For every message you send, SoruSora will translate the message into the selected languages and reply with the translations.

## Usages
* Use the dropdown menu to select the languages you want to translate messages into.
* Select no languages to disable translation
* If you want to translate your messages in specific channels, Set `all_channels` to `False` to. Then, there will be an additional dropdown menu to select the channels you want to translate your messages in.
* Select no languages to remove the translator
* If you want to translate your messages in specific channels, Set `all_channels` to `False`. Then, there will be an additional dropdown menu to select the channels you want to translate your messages in.
* Press the `Submit` button to save the settings.

## Parameters

* `all_channels` (Optional): Translate your messages in all channels. Defaults to `True`.
* `all_channels` (Optional): Set or remove a translator in all channels. Defaults to `True`.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# /번역기 언어설정
# /번역기

당신의 메세지를 번역할 언어들을 설정합니다.
당신의 모든 메시지를 다른 언어로 번역하는 번역기를 설정합니다.

이 명령어를 사용하면 이 채널에 드롭다운 메뉴가 전송됩니다. 그 메뉴에서 번역할 언어들을 선택하면 됩니다. 여러 언어를 선택할 수 있습니다.

Expand All @@ -9,10 +9,10 @@
## 사용법

* 드롭다운 메뉴에서 메세지를 번역할 언어들을 선택합니다.
* 번역 기능을 끄려면 아무 언어도 선택하지 마십시오.
* 번역기를 제거하려면 아무 언어도 선택하지 마십시오.
* 특정 채널에서만 번역 기능을 사용하려면, `모든채널``False`로 설정하세요. 그러면, 채널을 선택할 수 있는 드롭다운 메뉴가 추가로 나타납니다.
* 설정을 저장하려면 `결정` 버튼을 누르십시오.

## 변수

* `모든채널` (옵션): 모든 채널에서 당신의 메세지를 번역합니다. 기본값은 `True`입니다.
* `모든채널` (옵션): 당신이 있는 모든 채널에 번역기를 설정합니다. 기본값은 `True`입니다.
18 changes: 0 additions & 18 deletions sorusora/docs/help/translator/set_channel_languages/en.md

This file was deleted.

18 changes: 0 additions & 18 deletions sorusora/docs/help/translator/set_channel_main_language/en.md

This file was deleted.

18 changes: 0 additions & 18 deletions sorusora/docs/help/translator/set_channel_main_language/zh-TW.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# /翻譯訊息 設定語言
# /翻譯機

使用此命令將下拉菜單發送到該通道。 從那個菜單中選擇要翻譯的語言就可以了。 你可以選擇多種語言。
設置翻譯器,將您的全部信息翻譯成其他語言。

使用此命令將下拉菜單發送到該通道。從那個菜單中選擇要翻譯的語言就可以了。你可以選擇多種語言。

將您的所有信息翻譯成SoruSora選擇的語言,並將翻譯結果回覆給相應信息。

## 如何使用

* 從下拉菜單中選擇要翻譯消息的語言。
* 如果想要關閉翻譯功能,不要選擇任何語言
* 刪除翻譯器不要選擇任何語言
* 如果要只在特定頻道使用翻譯功能,請將`所有頻道`設置爲`False`。 那麼,還會出現可以選擇頻道的下拉菜單。
* 點擊`結晶`按鈕保存設置。

## 參數

* `所有頻道` (可選): 在所有頻道翻譯您的訊息。預設為 `True`
* `所有頻道` (可選): 在你所在的所有頻道上設置翻譯器。 默認值爲 `True`
20 changes: 20 additions & 0 deletions sorusora/locales/en/commands/channel.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Commands
channel-name = channel
channel-description = Commands related to channels
translator-name = translator
translator-description = Set or remove a translator for channels
translator-this-name = this
translator-this-description = If True, set or remove the translator only in this channel. Default is { $translator-this-description-default }
language-name = language
language-description = Set or remove the main language of the channels
language-this-name = this
language-this-description = If True, set or remove the main language of this channel only. Default is { $language-this-description-default }
# Success
translator-set = Translator has been set to the channels
language-set = The language of the channels has been set
# Errors
no-channels-selected = Select at least one channel
27 changes: 5 additions & 22 deletions sorusora/locales/en/commands/translator.ftl
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
# Commands
translator-name = translator
translator-description = Commands related to translation
set-languages-name = set_languages
set-languages-description = Set or remove the languages to be translated for your messages
set-languages-all-channels-name = all_channels
set-languages-all-channels-description = Set or remove the languages to be translated for your messages in all channels. Default is { $set-languages-all-channels-description-default }
set-channel-languages-name = set_channel_languages
set-channel-languages-description = [Admins only] Set or remove the languages to be translated for channels
set-channel-languages-this-channel-name = this_channel
set-channel-languages-this-channel-description = Set or remove the languages to be translated for messages in this channel. Default is { $set-channel-languages-this-channel-description-default }
set-channel-main-language-name = set_channel_main_language
set-channel-main-language-description = [Admins only] Set or remove the main language of the channels
set-channel-main-language-this-channel-name = this_channel
set-channel-main-language-this-channel-description = Set or remove the main language of this channel. Default is { $set-channel-main-language-this-channel-description-default }
translator-description = Set or remove a translator that translate all of your messages to other languages
translator-all-channels-name = all_channels
translator-all-channels-description = Set or remove a translator for all channels you are in. Default is { $translator-all-channels-description-default }
# Select UI
select-languages = Select the languages you want to translate
select-channels = Select the channels you want to translate messages
select-channels = Select the channels to set or remove the translator
# Successes
languages-updated = Your languages to be translated have been updated
channel-languages-updated = The languages of the channels to be translated have been updated
channel-main-language-updated = The main language of the channels has been updated
translator-set = Translator has been set
# Errors
invalid-user-settings = Your languages settings are invalid. Please set them again
invalid-channel-settings = This channel's languages settings are invalid. Please set them again
no-channels-selected = Select at least one channel
Loading

0 comments on commit 076e933

Please sign in to comment.