Add publish_button_text site setting
This commit is contained in:
parent
a1738f8991
commit
aeed3a9a1b
7 changed files with 13 additions and 2 deletions
|
@ -21,6 +21,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
|||
import { length } from 'stringz';
|
||||
import { countableText } from '../util/counter';
|
||||
import Icon from 'mastodon/components/icon';
|
||||
import { publish_button_text } from 'mastodon/initial_state';
|
||||
|
||||
const allowedAroundShortCode = '><\u0085\u0020\u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\u0009\u000a\u000b\u000c\u000d';
|
||||
|
||||
|
@ -211,13 +212,14 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
const disabled = this.props.isSubmitting;
|
||||
|
||||
let publishText = '';
|
||||
let publishButtonText = publish_button_text || intl.formatMessage(messages.publish);
|
||||
|
||||
if (this.props.isEditing) {
|
||||
publishText = intl.formatMessage(messages.saveChanges);
|
||||
} else if (this.props.privacy === 'private' || this.props.privacy === 'direct') {
|
||||
publishText = <span className='compose-form__publish-private'><Icon id='lock' /> {intl.formatMessage(messages.publish)}</span>;
|
||||
publishText = <span className='compose-form__publish-private'><Icon id='lock' /> {publishButtonText}</span>;
|
||||
} else {
|
||||
publishText = this.props.privacy !== 'unlisted' ? intl.formatMessage(messages.publishLoud, { publish: intl.formatMessage(messages.publish) }) : intl.formatMessage(messages.publish);
|
||||
publishText = this.props.privacy !== 'unlisted' ? intl.formatMessage(messages.publishLoud, { publish: publishButtonText }) : publishButtonText;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
* @property {boolean=} use_pending_items
|
||||
* @property {string} version
|
||||
* @property {boolean} translation_enabled
|
||||
* @property {string} publish_button_text
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -132,5 +133,6 @@ export const usePendingItems = getMeta('use_pending_items');
|
|||
export const version = getMeta('version');
|
||||
export const translationEnabled = getMeta('translation_enabled');
|
||||
export const languages = initialState?.languages;
|
||||
export const publish_button_text = getMeta('publish_button_text');
|
||||
|
||||
export default initialState;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue