mirror of https://github.com/vector-im/riot-web
fix MessageComposer not marking translatable strings. run gen-i18n
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
c3aef6e3a0
commit
95909de446
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t, _td } from '../../../languageHandler';
|
||||||
import CallHandler from '../../../CallHandler';
|
import CallHandler from '../../../CallHandler';
|
||||||
import MatrixClientPeg from '../../../MatrixClientPeg';
|
import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||||
import Modal from '../../../Modal';
|
import Modal from '../../../Modal';
|
||||||
|
@ -26,6 +26,17 @@ import RoomViewStore from '../../../stores/RoomViewStore';
|
||||||
import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore";
|
import SettingsStore, {SettingLevel} from "../../../settings/SettingsStore";
|
||||||
import Stickerpicker from './Stickerpicker';
|
import Stickerpicker from './Stickerpicker';
|
||||||
|
|
||||||
|
const formatButtonList = [
|
||||||
|
_td("bold"),
|
||||||
|
_td("italic"),
|
||||||
|
_td("deleted"),
|
||||||
|
_td("underlined"),
|
||||||
|
_td("inline-code"),
|
||||||
|
_td("block-quote"),
|
||||||
|
_td("bulleted-list"),
|
||||||
|
_td("numbered-list"),
|
||||||
|
];
|
||||||
|
|
||||||
export default class MessageComposer extends React.Component {
|
export default class MessageComposer extends React.Component {
|
||||||
constructor(props, context) {
|
constructor(props, context) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
|
@ -322,18 +333,17 @@ export default class MessageComposer extends React.Component {
|
||||||
let formatBar;
|
let formatBar;
|
||||||
if (this.state.showFormatting && this.state.inputState.isRichTextEnabled) {
|
if (this.state.showFormatting && this.state.inputState.isRichTextEnabled) {
|
||||||
const {marks, blockType} = this.state.inputState;
|
const {marks, blockType} = this.state.inputState;
|
||||||
const formatButtons = ["bold", "italic", "deleted", "underlined", "inline-code", "block-quote", "bulleted-list", "numbered-list"].map(
|
const formatButtons = formatButtonList.map((name) => {
|
||||||
(name) => {
|
const active = marks.some(mark => mark.type === name) || blockType === name;
|
||||||
const active = marks.some(mark => mark.type === name) || blockType === name;
|
const suffix = active ? '-on' : '';
|
||||||
const suffix = active ? '-on' : '';
|
const onFormatButtonClicked = this.onFormatButtonClicked.bind(this, name);
|
||||||
const onFormatButtonClicked = this.onFormatButtonClicked.bind(this, name);
|
const className = 'mx_MessageComposer_format_button mx_filterFlipColor';
|
||||||
const className = 'mx_MessageComposer_format_button mx_filterFlipColor';
|
return <img className={className}
|
||||||
return <img className={className}
|
title={_t(name)}
|
||||||
title={_t(name)}
|
onMouseDown={onFormatButtonClicked}
|
||||||
onMouseDown={onFormatButtonClicked}
|
key={name}
|
||||||
key={name}
|
src={`img/button-text-${name}${suffix}.svg`}
|
||||||
src={`img/button-text-${name}${suffix}.svg`}
|
height="17" />;
|
||||||
height="17" />;
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -406,6 +406,14 @@
|
||||||
"Invited": "Invited",
|
"Invited": "Invited",
|
||||||
"Filter room members": "Filter room members",
|
"Filter room members": "Filter room members",
|
||||||
"%(userName)s (power %(powerLevelNumber)s)": "%(userName)s (power %(powerLevelNumber)s)",
|
"%(userName)s (power %(powerLevelNumber)s)": "%(userName)s (power %(powerLevelNumber)s)",
|
||||||
|
"bold": "bold",
|
||||||
|
"italic": "italic",
|
||||||
|
"deleted": "deleted",
|
||||||
|
"underlined": "underlined",
|
||||||
|
"inline-code": "inline-code",
|
||||||
|
"block-quote": "block-quote",
|
||||||
|
"bulleted-list": "bulleted-list",
|
||||||
|
"numbered-list": "numbered-list",
|
||||||
"Attachment": "Attachment",
|
"Attachment": "Attachment",
|
||||||
"At this time it is not possible to reply with a file so this will be sent without being a reply.": "At this time it is not possible to reply with a file so this will be sent without being a reply.",
|
"At this time it is not possible to reply with a file so this will be sent without being a reply.": "At this time it is not possible to reply with a file so this will be sent without being a reply.",
|
||||||
"Upload Files": "Upload Files",
|
"Upload Files": "Upload Files",
|
||||||
|
@ -430,14 +438,6 @@
|
||||||
"Command error": "Command error",
|
"Command error": "Command error",
|
||||||
"Unable to reply": "Unable to reply",
|
"Unable to reply": "Unable to reply",
|
||||||
"At this time it is not possible to reply with an emote.": "At this time it is not possible to reply with an emote.",
|
"At this time it is not possible to reply with an emote.": "At this time it is not possible to reply with an emote.",
|
||||||
"bold": "bold",
|
|
||||||
"italic": "italic",
|
|
||||||
"strike": "strike",
|
|
||||||
"underline": "underline",
|
|
||||||
"code": "code",
|
|
||||||
"quote": "quote",
|
|
||||||
"bullet": "bullet",
|
|
||||||
"numbullet": "numbullet",
|
|
||||||
"Markdown is disabled": "Markdown is disabled",
|
"Markdown is disabled": "Markdown is disabled",
|
||||||
"Markdown is enabled": "Markdown is enabled",
|
"Markdown is enabled": "Markdown is enabled",
|
||||||
"No pinned messages.": "No pinned messages.",
|
"No pinned messages.": "No pinned messages.",
|
||||||
|
@ -772,7 +772,6 @@
|
||||||
"Room directory": "Room directory",
|
"Room directory": "Room directory",
|
||||||
"Start chat": "Start chat",
|
"Start chat": "Start chat",
|
||||||
"And %(count)s more...|other": "And %(count)s more...",
|
"And %(count)s more...|other": "And %(count)s more...",
|
||||||
"Share Link to User": "Share Link to User",
|
|
||||||
"ex. @bob:example.com": "ex. @bob:example.com",
|
"ex. @bob:example.com": "ex. @bob:example.com",
|
||||||
"Add User": "Add User",
|
"Add User": "Add User",
|
||||||
"Matrix ID": "Matrix ID",
|
"Matrix ID": "Matrix ID",
|
||||||
|
|
Loading…
Reference in New Issue