From 460417dde1c9434391e70e4d6cab6b1bc5dbc14a Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Sat, 4 Feb 2023 05:14:16 +0800 Subject: [PATCH] add menu icon and update language support (#56) Co-authored-by: Mattermost Build --- plugin.json | 4 ++-- server/command.go | 9 +++++++-- server/manifest.go | 4 ++-- webapp/package.json | 2 +- webapp/src/components/menu_item/menu_item.jsx | 13 ++++++++++++- webapp/src/manifest.js | 4 ++-- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/plugin.json b/plugin.json index e480d85..5495e26 100644 --- a/plugin.json +++ b/plugin.json @@ -4,8 +4,8 @@ "description": "Autotranslate plugin for Mattermost 5.22 and later.", "homepage_url": "https://github.com/mattermost/mattermost-plugin-autotranslate", "support_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/issues", - "release_notes_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/releases/tag/v0.3.0", - "version": "0.3.0", + "release_notes_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/releases/tag/v0.4.0", + "version": "0.4.0", "min_server_version": "5.22.0", "server": { "executables": { diff --git a/server/command.go b/server/command.go index 5f62721..2aaaaf9 100644 --- a/server/command.go +++ b/server/command.go @@ -70,20 +70,25 @@ var languageCodes = map[string]string{ "hu": "Hungarian", "is": "Icelandic", "id": "Indonesian", + "ga": "Irish", "it": "Italian", "ja": "Japanese", "kn": "Kannada", "kk": "Kazakh", "ko": "Korean", "lv": "Latvian", + "lt": "Lithuanian", + "mk": "Macedonian", "ms": "Malay", "ml": "Malayalam", "mt": "Maltese", "mn": "Mongolian", - "no": "Norwegian", + "no": "Norwegian (Bokmål)", "ps": "Pashto", "pl": "Polish", - "pt": "Portuguese", + "pt": "Portuguese (Brazil)", + "pt-PT": "Portuguese (Portugal)", + "pa": "Punjabi", "ro": "Romanian", "ru": "Russian", "sr": "Serbian", diff --git a/server/manifest.go b/server/manifest.go index 634a8b0..33d1972 100644 --- a/server/manifest.go +++ b/server/manifest.go @@ -17,8 +17,8 @@ const manifestStr = ` "description": "Autotranslate plugin for Mattermost 5.22 and later.", "homepage_url": "https://github.com/mattermost/mattermost-plugin-autotranslate", "support_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/issues", - "release_notes_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/releases/tag/v0.3.0", - "version": "0.3.0", + "release_notes_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/releases/tag/v0.4.0", + "version": "0.4.0", "min_server_version": "5.22.0", "server": { "executables": { diff --git a/webapp/package.json b/webapp/package.json index bd92395..0587c12 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -1,6 +1,6 @@ { "name": "autotranslate", - "version": "0.3.0", + "version": "0.4.0", "description": "This is autotranslation plugin for Mattermost.", "main": "src/index.js", "scripts": { diff --git a/webapp/src/components/menu_item/menu_item.jsx b/webapp/src/components/menu_item/menu_item.jsx index a3ca98b..df695f3 100644 --- a/webapp/src/components/menu_item/menu_item.jsx +++ b/webapp/src/components/menu_item/menu_item.jsx @@ -1,3 +1,4 @@ +import React from 'react'; import PropTypes from 'prop-types'; const MenuItem = ({activated}) => { @@ -5,7 +6,17 @@ const MenuItem = ({activated}) => { return null; } - return 'Translate'; + return ( + + ); }; MenuItem.propTypes = { diff --git a/webapp/src/manifest.js b/webapp/src/manifest.js index cb5d807..73867ae 100644 --- a/webapp/src/manifest.js +++ b/webapp/src/manifest.js @@ -7,8 +7,8 @@ const manifest = JSON.parse(` "description": "Autotranslate plugin for Mattermost 5.22 and later.", "homepage_url": "https://github.com/mattermost/mattermost-plugin-autotranslate", "support_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/issues", - "release_notes_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/releases/tag/v0.3.0", - "version": "0.3.0", + "release_notes_url": "https://github.com/mattermost/mattermost-plugin-autotranslate/releases/tag/v0.4.0", + "version": "0.4.0", "min_server_version": "5.22.0", "server": { "executables": {