Skip to content

Commit

Permalink
add menu icon and update language support (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: Mattermost Build <[email protected]>
  • Loading branch information
saturninoabril and mattermost-build authored Feb 3, 2023
1 parent 87fedf9 commit 460417d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
4 changes: 2 additions & 2 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 7 additions & 2 deletions server/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions server/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
13 changes: 12 additions & 1 deletion webapp/src/components/menu_item/menu_item.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import React from 'react';
import PropTypes from 'prop-types';

const MenuItem = ({activated}) => {
if (!activated) {
return null;
}

return 'Translate';
return (
<button
className='style--none'
role='presentation'
>
<span className='MenuItem__icon'>
<i className='icon fa fa-language'/>
</span>
<span>{'Translate'}</span>
</button>
);
};

MenuItem.propTypes = {
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit 460417d

Please sign in to comment.