Str-context-split: "Post"

Splitting the context between "Markdown post" (noun) vs. "Post something" (verb)
This commit is contained in:
infiinte-persistence 2020-10-09 14:58:46 +08:00 committed by Sean Yesmunt
parent 6dd40df93b
commit d7a178d259
4 changed files with 11 additions and 5 deletions

View file

@ -192,7 +192,8 @@
"Comments": "Comments", "Comments": "Comments",
"Comment": "Comment", "Comment": "Comment",
"Your comment": "Your comment", "Your comment": "Your comment",
"Post": "Post", "Post --[button to submit something]--": "Post",
"Post --[noun, markdown post tab button]--": "Post",
"Posting...": "Posting...", "Posting...": "Posting...",
"Incompatible daemon": "Incompatible daemon", "Incompatible daemon": "Incompatible daemon",
"Incompatible daemon running": "Incompatible daemon running", "Incompatible daemon running": "Incompatible daemon running",

View file

@ -120,7 +120,7 @@ export function CommentCreate(props: Props) {
label={isFetchingChannels ? __('Comment') : undefined} label={isFetchingChannels ? __('Comment') : undefined}
/> />
<div className="section__actions"> <div className="section__actions">
<Button disabled button="primary" label={__('Post')} requiresAuth={IS_WEB} /> <Button disabled button="primary" label={__('Post --[button to submit something]--')} requiresAuth={IS_WEB} />
</div> </div>
</div> </div>
); );
@ -170,7 +170,7 @@ export function CommentCreate(props: Props) {
: __('Reply') : __('Reply')
: isPostingComment : isPostingComment
? __('Posting...') ? __('Posting...')
: __('Post') : __('Post --[button to submit something]--')
} }
requiresAuth={IS_WEB} requiresAuth={IS_WEB}
/> />

View file

@ -371,7 +371,7 @@ function PublishFile(props: Props) {
)} )}
{isPublishPost && ( {isPublishPost && (
<PostEditor <PostEditor
label={__('Post')} label={__('Post --[noun, markdown post tab button]--')}
uri={uri} uri={uri}
disabled={disabled} disabled={disabled}
fileMimeType={fileMimeType} fileMimeType={fileMimeType}

View file

@ -34,6 +34,11 @@ import tempy from 'tempy';
const MODES = Object.values(PUBLISH_MODES); const MODES = Object.values(PUBLISH_MODES);
const MODE_TO_I18N_STR = {
[PUBLISH_MODES.FILE]: 'File',
[PUBLISH_MODES.POST]: 'Post --[noun, markdown post tab button]--',
};
type Props = { type Props = {
disabled: boolean, disabled: boolean,
tags: Array<Tag>, tags: Array<Tag>,
@ -339,7 +344,7 @@ function PublishForm(props: Props) {
<Button <Button
key={index} key={index}
icon={modeName} icon={modeName}
label={__(String(modeName))} label={__(MODE_TO_I18N_STR[String(modeName)] || '---')}
button="alt" button="alt"
onClick={() => { onClick={() => {
setMode(modeName); setMode(modeName);