feat(app): i18n (#48)
This commit is contained in:
committed by
GitHub
Unverified
parent
505a64438e
commit
6e09a69f4f
@@ -115,75 +115,75 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
id: 'telegram',
|
||||
name: 'Telegram',
|
||||
icon: '✈️',
|
||||
description: 'Connect Telegram using a bot token from @BotFather',
|
||||
description: 'channels:meta.telegram.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/telegram',
|
||||
docsUrl: 'channels:meta.telegram.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'botToken',
|
||||
label: 'Bot Token',
|
||||
label: 'channels:meta.telegram.fields.botToken.label',
|
||||
type: 'password',
|
||||
placeholder: '123456:ABC-DEF...',
|
||||
placeholder: 'channels:meta.telegram.fields.botToken.placeholder',
|
||||
required: true,
|
||||
envVar: 'TELEGRAM_BOT_TOKEN',
|
||||
},
|
||||
{
|
||||
key: 'allowedUsers',
|
||||
label: 'Allowed User IDs',
|
||||
label: 'channels:meta.telegram.fields.allowedUsers.label',
|
||||
type: 'text',
|
||||
placeholder: 'e.g. 123456789, 987654321',
|
||||
description: 'Comma separated list of User IDs allowed to use the bot. Required for security.',
|
||||
placeholder: 'channels:meta.telegram.fields.allowedUsers.placeholder',
|
||||
description: 'channels:meta.telegram.fields.allowedUsers.description',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Open Telegram and search for @BotFather',
|
||||
'Send /newbot and follow the instructions',
|
||||
'Copy the bot token provided',
|
||||
'Paste the token below',
|
||||
'Get your User ID from @userinfobot and paste it below',
|
||||
'channels:meta.telegram.instructions.0',
|
||||
'channels:meta.telegram.instructions.1',
|
||||
'channels:meta.telegram.instructions.2',
|
||||
'channels:meta.telegram.instructions.3',
|
||||
'channels:meta.telegram.instructions.4',
|
||||
],
|
||||
},
|
||||
discord: {
|
||||
id: 'discord',
|
||||
name: 'Discord',
|
||||
icon: '🎮',
|
||||
description: 'Connect Discord using a bot token from Developer Portal',
|
||||
description: 'channels:meta.discord.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/discord#how-to-create-your-own-bot',
|
||||
docsUrl: 'channels:meta.discord.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'token',
|
||||
label: 'Bot Token',
|
||||
label: 'channels:meta.discord.fields.token.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your Discord bot token',
|
||||
placeholder: 'channels:meta.discord.fields.token.placeholder',
|
||||
required: true,
|
||||
envVar: 'DISCORD_BOT_TOKEN',
|
||||
},
|
||||
{
|
||||
key: 'guildId',
|
||||
label: 'Guild/Server ID',
|
||||
label: 'channels:meta.discord.fields.guildId.label',
|
||||
type: 'text',
|
||||
placeholder: 'e.g., 123456789012345678',
|
||||
placeholder: 'channels:meta.discord.fields.guildId.placeholder',
|
||||
required: true,
|
||||
description: 'Limit bot to a specific server. Right-click server → Copy Server ID.',
|
||||
description: 'channels:meta.discord.fields.guildId.description',
|
||||
},
|
||||
{
|
||||
key: 'channelId',
|
||||
label: 'Channel ID (optional)',
|
||||
label: 'channels:meta.discord.fields.channelId.label',
|
||||
type: 'text',
|
||||
placeholder: 'e.g., 123456789012345678',
|
||||
placeholder: 'channels:meta.discord.fields.channelId.placeholder',
|
||||
required: false,
|
||||
description: 'Limit bot to a specific channel. Right-click channel → Copy Channel ID.',
|
||||
description: 'channels:meta.discord.fields.channelId.description',
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Go to Discord Developer Portal → Applications → New Application',
|
||||
'In Bot section: Add Bot, then copy the Bot Token',
|
||||
'Enable Message Content Intent + Server Members Intent in Bot → Privileged Gateway Intents',
|
||||
'In OAuth2 → URL Generator: select "bot" + "applications.commands", add message permissions',
|
||||
'Invite the bot to your server using the generated URL',
|
||||
'Paste the bot token below',
|
||||
'channels:meta.discord.instructions.0',
|
||||
'channels:meta.discord.instructions.1',
|
||||
'channels:meta.discord.instructions.2',
|
||||
'channels:meta.discord.instructions.3',
|
||||
'channels:meta.discord.instructions.4',
|
||||
'channels:meta.discord.instructions.5',
|
||||
],
|
||||
},
|
||||
|
||||
@@ -191,69 +191,69 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
id: 'whatsapp',
|
||||
name: 'WhatsApp',
|
||||
icon: '📱',
|
||||
description: 'Connect WhatsApp by scanning a QR code (no phone number required)',
|
||||
description: 'channels:meta.whatsapp.description',
|
||||
connectionType: 'qr',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/whatsapp',
|
||||
docsUrl: 'channels:meta.whatsapp.docsUrl',
|
||||
configFields: [],
|
||||
instructions: [
|
||||
'Open WhatsApp on your phone',
|
||||
'Go to Settings > Linked Devices > Link a Device',
|
||||
'Scan the QR code shown below',
|
||||
'The system will automatically identify your phone number',
|
||||
'channels:meta.whatsapp.instructions.0',
|
||||
'channels:meta.whatsapp.instructions.1',
|
||||
'channels:meta.whatsapp.instructions.2',
|
||||
'channels:meta.whatsapp.instructions.3',
|
||||
],
|
||||
},
|
||||
signal: {
|
||||
id: 'signal',
|
||||
name: 'Signal',
|
||||
icon: '🔒',
|
||||
description: 'Connect Signal using signal-cli',
|
||||
description: 'channels:meta.signal.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/signal',
|
||||
docsUrl: 'channels:meta.signal.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'phoneNumber',
|
||||
label: 'Phone Number',
|
||||
label: 'channels:meta.signal.fields.phoneNumber.label',
|
||||
type: 'text',
|
||||
placeholder: '+1234567890',
|
||||
placeholder: 'channels:meta.signal.fields.phoneNumber.placeholder',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Install signal-cli on your system',
|
||||
'Register or link your phone number',
|
||||
'Enter your phone number below',
|
||||
'channels:meta.signal.instructions.0',
|
||||
'channels:meta.signal.instructions.1',
|
||||
'channels:meta.signal.instructions.2',
|
||||
],
|
||||
},
|
||||
feishu: {
|
||||
id: 'feishu',
|
||||
name: 'Feishu / Lark',
|
||||
icon: '🐦',
|
||||
description: 'Connect Feishu/Lark bot via WebSocket',
|
||||
description: 'channels:meta.feishu.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/feishu#step-1-create-a-feishu-app',
|
||||
docsUrl: 'channels:meta.feishu.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'appId',
|
||||
label: 'App ID',
|
||||
label: 'channels:meta.feishu.fields.appId.label',
|
||||
type: 'text',
|
||||
placeholder: 'cli_xxxxxx',
|
||||
placeholder: 'channels:meta.feishu.fields.appId.placeholder',
|
||||
required: true,
|
||||
envVar: 'FEISHU_APP_ID',
|
||||
},
|
||||
{
|
||||
key: 'appSecret',
|
||||
label: 'App Secret',
|
||||
label: 'channels:meta.feishu.fields.appSecret.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your app secret',
|
||||
placeholder: 'channels:meta.feishu.fields.appSecret.placeholder',
|
||||
required: true,
|
||||
envVar: 'FEISHU_APP_SECRET',
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Go to Feishu Open Platform',
|
||||
'Create a new application',
|
||||
'Get App ID and App Secret',
|
||||
'Configure event subscription',
|
||||
'channels:meta.feishu.instructions.0',
|
||||
'channels:meta.feishu.instructions.1',
|
||||
'channels:meta.feishu.instructions.2',
|
||||
'channels:meta.feishu.instructions.3',
|
||||
],
|
||||
isPlugin: true,
|
||||
},
|
||||
@@ -261,58 +261,58 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
id: 'imessage',
|
||||
name: 'iMessage',
|
||||
icon: '💬',
|
||||
description: 'Connect iMessage via BlueBubbles (macOS)',
|
||||
description: 'channels:meta.imessage.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/bluebubbles',
|
||||
docsUrl: 'channels:meta.imessage.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'serverUrl',
|
||||
label: 'BlueBubbles Server URL',
|
||||
label: 'channels:meta.imessage.fields.serverUrl.label',
|
||||
type: 'text',
|
||||
placeholder: 'http://localhost:1234',
|
||||
placeholder: 'channels:meta.imessage.fields.serverUrl.placeholder',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
key: 'password',
|
||||
label: 'Server Password',
|
||||
label: 'channels:meta.imessage.fields.password.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your server password',
|
||||
placeholder: 'channels:meta.imessage.fields.password.placeholder',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Install BlueBubbles server on your Mac',
|
||||
'Note the server URL and password',
|
||||
'Enter the connection details below',
|
||||
'channels:meta.imessage.instructions.0',
|
||||
'channels:meta.imessage.instructions.1',
|
||||
'channels:meta.imessage.instructions.2',
|
||||
],
|
||||
},
|
||||
matrix: {
|
||||
id: 'matrix',
|
||||
name: 'Matrix',
|
||||
icon: '🔗',
|
||||
description: 'Connect to Matrix protocol',
|
||||
description: 'channels:meta.matrix.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/matrix',
|
||||
docsUrl: 'channels:meta.matrix.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'homeserver',
|
||||
label: 'Homeserver URL',
|
||||
label: 'channels:meta.matrix.fields.homeserver.label',
|
||||
type: 'text',
|
||||
placeholder: 'https://matrix.org',
|
||||
placeholder: 'channels:meta.matrix.fields.homeserver.placeholder',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
key: 'accessToken',
|
||||
label: 'Access Token',
|
||||
label: 'channels:meta.matrix.fields.accessToken.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your access token',
|
||||
placeholder: 'channels:meta.matrix.fields.accessToken.placeholder',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Create a Matrix account or use existing',
|
||||
'Get an access token from your client',
|
||||
'Enter the homeserver and token below',
|
||||
'channels:meta.matrix.instructions.0',
|
||||
'channels:meta.matrix.instructions.1',
|
||||
'channels:meta.matrix.instructions.2',
|
||||
],
|
||||
isPlugin: true,
|
||||
},
|
||||
@@ -320,31 +320,31 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
id: 'line',
|
||||
name: 'LINE',
|
||||
icon: '🟢',
|
||||
description: 'Connect LINE Messaging API',
|
||||
description: 'channels:meta.line.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/line',
|
||||
docsUrl: 'channels:meta.line.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'channelAccessToken',
|
||||
label: 'Channel Access Token',
|
||||
label: 'channels:meta.line.fields.channelAccessToken.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your LINE channel access token',
|
||||
placeholder: 'channels:meta.line.fields.channelAccessToken.placeholder',
|
||||
required: true,
|
||||
envVar: 'LINE_CHANNEL_ACCESS_TOKEN',
|
||||
},
|
||||
{
|
||||
key: 'channelSecret',
|
||||
label: 'Channel Secret',
|
||||
label: 'channels:meta.line.fields.channelSecret.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your LINE channel secret',
|
||||
placeholder: 'channels:meta.line.fields.channelSecret.placeholder',
|
||||
required: true,
|
||||
envVar: 'LINE_CHANNEL_SECRET',
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Go to LINE Developers Console',
|
||||
'Create a Messaging API channel',
|
||||
'Get Channel Access Token and Secret',
|
||||
'channels:meta.line.instructions.0',
|
||||
'channels:meta.line.instructions.1',
|
||||
'channels:meta.line.instructions.2',
|
||||
],
|
||||
isPlugin: true,
|
||||
},
|
||||
@@ -352,32 +352,32 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
id: 'msteams',
|
||||
name: 'Microsoft Teams',
|
||||
icon: '👔',
|
||||
description: 'Connect Microsoft Teams via Bot Framework',
|
||||
description: 'channels:meta.msteams.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/msteams',
|
||||
docsUrl: 'channels:meta.msteams.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'appId',
|
||||
label: 'App ID',
|
||||
label: 'channels:meta.msteams.fields.appId.label',
|
||||
type: 'text',
|
||||
placeholder: 'Your Microsoft App ID',
|
||||
placeholder: 'channels:meta.msteams.fields.appId.placeholder',
|
||||
required: true,
|
||||
envVar: 'MSTEAMS_APP_ID',
|
||||
},
|
||||
{
|
||||
key: 'appPassword',
|
||||
label: 'App Password',
|
||||
label: 'channels:meta.msteams.fields.appPassword.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your Microsoft App Password',
|
||||
placeholder: 'channels:meta.msteams.fields.appPassword.placeholder',
|
||||
required: true,
|
||||
envVar: 'MSTEAMS_APP_PASSWORD',
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Go to Azure Portal',
|
||||
'Register a new Bot application',
|
||||
'Get App ID and create a password',
|
||||
'Configure Teams channel',
|
||||
'channels:meta.msteams.instructions.0',
|
||||
'channels:meta.msteams.instructions.1',
|
||||
'channels:meta.msteams.instructions.2',
|
||||
'channels:meta.msteams.instructions.3',
|
||||
],
|
||||
isPlugin: true,
|
||||
},
|
||||
@@ -385,52 +385,52 @@ export const CHANNEL_META: Record<ChannelType, ChannelMeta> = {
|
||||
id: 'googlechat',
|
||||
name: 'Google Chat',
|
||||
icon: '💭',
|
||||
description: 'Connect Google Chat via webhook',
|
||||
description: 'channels:meta.googlechat.description',
|
||||
connectionType: 'webhook',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/googlechat',
|
||||
docsUrl: 'channels:meta.googlechat.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'serviceAccountKey',
|
||||
label: 'Service Account JSON Path',
|
||||
label: 'channels:meta.googlechat.fields.serviceAccountKey.label',
|
||||
type: 'text',
|
||||
placeholder: '/path/to/service-account.json',
|
||||
placeholder: 'channels:meta.googlechat.fields.serviceAccountKey.placeholder',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Create a Google Cloud project',
|
||||
'Enable Google Chat API',
|
||||
'Create a service account',
|
||||
'Download the JSON key file',
|
||||
'channels:meta.googlechat.instructions.0',
|
||||
'channels:meta.googlechat.instructions.1',
|
||||
'channels:meta.googlechat.instructions.2',
|
||||
'channels:meta.googlechat.instructions.3',
|
||||
],
|
||||
},
|
||||
mattermost: {
|
||||
id: 'mattermost',
|
||||
name: 'Mattermost',
|
||||
icon: '💠',
|
||||
description: 'Connect Mattermost via Bot API',
|
||||
description: 'channels:meta.mattermost.description',
|
||||
connectionType: 'token',
|
||||
docsUrl: 'https://docs.openclaw.ai/channels/mattermost',
|
||||
docsUrl: 'channels:meta.mattermost.docsUrl',
|
||||
configFields: [
|
||||
{
|
||||
key: 'serverUrl',
|
||||
label: 'Server URL',
|
||||
label: 'channels:meta.mattermost.fields.serverUrl.label',
|
||||
type: 'text',
|
||||
placeholder: 'https://your-mattermost.com',
|
||||
placeholder: 'channels:meta.mattermost.fields.serverUrl.placeholder',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
key: 'botToken',
|
||||
label: 'Bot Access Token',
|
||||
label: 'channels:meta.mattermost.fields.botToken.label',
|
||||
type: 'password',
|
||||
placeholder: 'Your bot access token',
|
||||
placeholder: 'channels:meta.mattermost.fields.botToken.placeholder',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
instructions: [
|
||||
'Go to Mattermost Integrations',
|
||||
'Create a new Bot Account',
|
||||
'Copy the access token',
|
||||
'channels:meta.mattermost.instructions.0',
|
||||
'channels:meta.mattermost.instructions.1',
|
||||
'channels:meta.mattermost.instructions.2',
|
||||
],
|
||||
isPlugin: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user