diff options
author | Dessalines <tyhou13@gmx.com> | 2020-02-02 14:37:19 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-02-02 14:37:19 -0500 |
commit | caba049da12017f22a8ffa8d6b8e7f0a2cc20e6a (patch) | |
tree | 5c53177858098e4d4414896bba53f90f0ceddd78 | |
parent | 96a7e99e57f8c79eead599e6de5d94016f7021e6 (diff) | |
parent | 6124133e8517165a97aa87af5485857a000951a2 (diff) |
Merge branch 'dev' into websocket_scopes
29 files changed, 388 insertions, 539 deletions
@@ -167,18 +167,18 @@ If you'd like to add translations, take a look at the [English translation file] lang | done | missing ---- | ---- | ------- -ca | 100% | old -de | 87% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,old,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -fa | 73% | cross_post,subscribed_to_communities,trending_communities,create_private_message,send_secure_message,send_message,message,mod,mods,moderates,remove_as_mod,appoint_as_mod,modlog,stickied,ban,ban_from_site,unban,unban_from_site,banned,number_of_subscribers,subscribers,both,saved,unsubscribe,subscribe,subscribed,old,api,docs,inbox,inbox_for,message_sent,notifications_error,messages,no_email_setup,matrix_user_id,private_message_disclaimer,url,body,copy_suggested_title,community,expand_here,subscribe_to_communities,theme,sponsor_message,general_sponsors,joined,by,to,from,landing_0,logged_in,community_moderator_already_exists,community_follower_already_exists,community_user_already_banned,no_slurs,admin_already_created,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -eo | 75% | number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -es | 100% | old -fi | 100% | old -fr | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -it | 84% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -nl | 100% | -ru | 72% | cross_posts,cross_post,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -sv | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message -zh | 70% | cross_posts,cross_post,users,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,nsfw,show_nsfw,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message +ca | 99% | old,time,action +de | 87% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,old,docs,message_sent,messages,old_password,matrix_user_id,private_message_disclaimer,send_notifications_to_email,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +fa | 72% | cross_post,subscribed_to_communities,trending_communities,create_private_message,send_secure_message,send_message,message,mod,mods,moderates,remove_as_mod,appoint_as_mod,modlog,stickied,ban,ban_from_site,unban,unban_from_site,banned,number_of_subscribers,subscribers,both,saved,unsubscribe,subscribe,subscribed,old,api,docs,inbox,inbox_for,message_sent,notifications_error,messages,no_email_setup,matrix_user_id,private_message_disclaimer,url,body,copy_suggested_title,community,expand_here,subscribe_to_communities,theme,sponsor_message,general_sponsors,joined,by,to,from,landing_0,logged_in,community_moderator_already_exists,community_follower_already_exists,community_user_already_banned,no_slurs,admin_already_created,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +eo | 75% | number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,theme,donate_to_lemmy,donate,from,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +es | 99% | old,time,action +fi | 99% | old,time,action +fr | 82% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +it | 83% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +nl | 99% | time,action +ru | 71% | cross_posts,cross_post,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +sv | 82% | create_private_message,send_secure_message,send_message,message,avatar,upload_avatar,show_avatars,archive_link,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,donate_to_lemmy,donate,from,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action +zh | 69% | cross_posts,cross_post,users,number_of_communities,create_private_message,send_secure_message,send_message,message,preview,upload_image,avatar,upload_avatar,show_avatars,formatting_help,view_source,sticky,unsticky,archive_link,settings,stickied,delete_account,delete_account_confirm,banned,creator,number_online,old,docs,replies,mentions,message_sent,messages,old_password,forgot_password,reset_password_mail_sent,password_change,new_password,no_email_setup,matrix_user_id,private_message_disclaimer,send_notifications_to_email,language,browser_default,downvotes_disabled,enable_downvotes,open_registration,registration_closed,enable_nsfw,recent_comments,nsfw,show_nsfw,theme,donate_to_lemmy,donate,monero,by,to,from,transfer_community,transfer_site,are_you_sure,yes,no,logged_in,email_already_exists,couldnt_create_private_message,no_private_message_edit_allowed,couldnt_update_private_message,time,action <!-- translationsstop --> If you'd like to update this report, run: diff --git a/ansible/templates/docker-compose.yml b/ansible/templates/docker-compose.yml index 96489c70..9829f709 100644 --- a/ansible/templates/docker-compose.yml +++ b/ansible/templates/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.3' services: lemmy: - image: dessalines/lemmy:v0.6.5 + image: dessalines/lemmy:v0.6.8 ports: - "127.0.0.1:8536:8536" restart: always diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index 7eb30f50..eaa054d8 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -15,7 +15,6 @@ import { WebSocketService, UserService } from '../services'; import autosize from 'autosize'; import Tribute from 'tributejs/src/Tribute.js'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; interface CommentFormProps { postId?: number; @@ -127,7 +126,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> { .previewMode && 'active'}`} onClick={linkEvent(this, this.handlePreviewToggle)} > - <T i18nKey="preview">#</T> + {i18n.t('preview')} </button> )} {this.props.node && ( @@ -136,7 +135,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> { class="btn btn-sm btn-secondary mr-2" onClick={linkEvent(this, this.handleReplyCancel)} > - <T i18nKey="cancel">#</T> + {i18n.t('cancel')} </button> )} <a @@ -144,14 +143,14 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> { target="_blank" class="d-inline-block float-right text-muted small font-weight-bold" > - <T i18nKey="formatting_help">#</T> + {i18n.t('formatting_help')} </a> <form class="d-inline-block mr-2 float-right text-muted small font-weight-bold"> <label htmlFor={`file-upload-${this.id}`} className={`${UserService.Instance.user && 'pointer'}`} > - <T i18nKey="upload_image">#</T> + {i18n.t('upload_image')} </label> <input id={`file-upload-${this.id}`} diff --git a/ui/src/components/comment-node.tsx b/ui/src/components/comment-node.tsx index 76a4c30e..3296a5c8 100644 --- a/ui/src/components/comment-node.tsx +++ b/ui/src/components/comment-node.tsx @@ -30,7 +30,6 @@ import { MomentTime } from './moment-time'; import { CommentForm } from './comment-form'; import { CommentNodes } from './comment-nodes'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; interface CommentNodeState { showReply: boolean; @@ -180,22 +179,22 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { </li> {this.isMod && ( <li className="list-inline-item badge badge-light"> - <T i18nKey="mod">#</T> + {i18n.t('mod')} </li> )} {this.isAdmin && ( <li className="list-inline-item badge badge-light"> - <T i18nKey="admin">#</T> + {i18n.t('admin')} </li> )} {this.isPostCreator && ( <li className="list-inline-item badge badge-light"> - <T i18nKey="creator">#</T> + {i18n.t('creator')} </li> )} {(node.comment.banned_from_community || node.comment.banned) && ( <li className="list-inline-item badge badge-danger"> - <T i18nKey="banned">#</T> + {i18n.t('banned')} </li> )} <li className="list-inline-item"> @@ -258,7 +257,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { class="pointer" onClick={linkEvent(this, this.handleReplyClick)} > - <T i18nKey="reply">#</T> + {i18n.t('reply')} </span> </li> <li className="list-inline-item mr-2"> @@ -276,7 +275,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { class="pointer" onClick={linkEvent(this, this.handleEditClick)} > - <T i18nKey="edit">#</T> + {i18n.t('edit')} </span> </li> <li className="list-inline-item"> @@ -307,7 +306,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { className="pointer" onClick={linkEvent(this, this.handleViewSource)} > - <T i18nKey="view_source">#</T> + {i18n.t('view_source')} </span> </li> <li className="list-inline-item"> @@ -315,7 +314,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { className="text-muted" to={`/post/${node.comment.post_id}/comment/${node.comment.id}`} > - <T i18nKey="link">#</T> + {i18n.t('link')} </Link> </li> {/* Admins and mods can remove comments */} @@ -331,7 +330,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModRemoveShow )} > - <T i18nKey="remove">#</T> + {i18n.t('remove')} </span> ) : ( <span @@ -341,7 +340,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModRemoveSubmit )} > - <T i18nKey="restore">#</T> + {i18n.t('restore')} </span> )} </li> @@ -360,7 +359,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModBanFromCommunityShow )} > - <T i18nKey="ban">#</T> + {i18n.t('ban')} </span> ) : ( <span @@ -370,7 +369,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModBanFromCommunitySubmit )} > - <T i18nKey="unban">#</T> + {i18n.t('unban')} </span> )} </li> @@ -392,7 +391,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" @@ -401,7 +400,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleAddModToCommunity )} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -410,7 +409,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelConfirmAppointAsMod )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -429,12 +428,12 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleShowConfirmTransferCommunity )} > - <T i18nKey="transfer_community">#</T> + {i18n.t('transfer_community')} </span> ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" @@ -443,7 +442,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleTransferCommunity )} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -452,7 +451,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelShowConfirmTransferCommunity )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -468,7 +467,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { class="pointer" onClick={linkEvent(this, this.handleModBanShow)} > - <T i18nKey="ban_from_site">#</T> + {i18n.t('ban_from_site')} </span> ) : ( <span @@ -478,7 +477,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleModBanSubmit )} > - <T i18nKey="unban_from_site">#</T> + {i18n.t('unban_from_site')} </span> )} </li> @@ -500,13 +499,13 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" onClick={linkEvent(this, this.handleAddAdmin)} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -515,7 +514,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelConfirmAppointAsAdmin )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -534,18 +533,18 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleShowConfirmTransferSite )} > - <T i18nKey="transfer_site">#</T> + {i18n.t('transfer_site')} </span> ) : ( <> <span class="d-inline-block mr-1"> - <T i18nKey="are_you_sure">#</T> + {i18n.t('are_you_sure')} </span> <span class="pointer d-inline-block mr-1" onClick={linkEvent(this, this.handleTransferSite)} > - <T i18nKey="yes">#</T> + {i18n.t('yes')} </span> <span class="pointer d-inline-block" @@ -554,7 +553,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { this.handleCancelShowConfirmTransferSite )} > - <T i18nKey="no">#</T> + {i18n.t('no')} </span> </> )} @@ -579,16 +578,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { onInput={linkEvent(this, this.handleModRemoveReasonChange)} /> <button type="submit" class="btn btn-secondary"> - <T i18nKey="remove_comment">#</T> + {i18n.t('remove_comment')} </button> </form> )} {this.state.showBanDialog && ( <form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}> <div class="form-group row"> - <label class="col-form-label"> - <T i18nKey="reason">#</T> - </label> + <label class="col-form-label">{i18n.t('reason')}</label> <input type="text" class="form-control mr-2" diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx index b1da9882..8d130ae7 100644 --- a/ui/src/components/communities.tsx +++ b/ui/src/components/communities.tsx @@ -15,7 +15,6 @@ import { import { WebSocketService } from '../services'; import { wsJsonToRes, toast } from '../utils'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; declare const Sortable: any; @@ -83,30 +82,20 @@ export class Communities extends Component<any, CommunitiesState> { </h5> ) : ( <div> - <h5> - <T i18nKey="list_of_communities">#</T> - </h5> + <h5>{i18n.t('list_of_communities')}</h5> <div class="table-responsive"> <table id="community_table" class="table table-sm table-hover"> <thead class="pointer"> <tr> - <th> - <T i18nKey="name">#</T> - </th> - <th class="d-none d-lg-table-cell"> - <T i18nKey="title">#</T> - </th> - <th> - <T i18nKey="category">#</T> - </th> - <th class="text-right"> - <T i18nKey="subscribers">#</T> - </th> + <th>{i18n.t('name')}</th> + <th class="d-none d-lg-table-cell">{i18n.t('title')}</th> + <th>{i18n.t('category')}</th> + <th class="text-right">{i18n.t('subscribers')}</th> <th class="text-right d-none d-lg-table-cell"> - <T i18nKey="posts">#</T> + {i18n.t('posts')} </th> <th class="text-right d-none d-lg-table-cell"> - <T i18nKey="comments">#</T> + {i18n.t('comments')} </th> <th></th> </tr> @@ -139,7 +128,7 @@ export class Communities extends Component<any, CommunitiesState> { this.handleUnsubscribe )} > - <T i18nKey="unsubscribe">#</T> + {i18n.t('unsubscribe')} </span> ) : ( <span @@ -149,7 +138,7 @@ export class Communities extends Component<any, CommunitiesState> { this.handleSubscribe )} > - <T i18nKey="subscribe">#</T> + {i18n.t('subscribe')} </span> )} </td> @@ -173,15 +162,16 @@ export class Communities extends Component<any, CommunitiesState> { class="btn btn-sm btn-secondary mr-1" onClick={linkEvent(this, this.prevPage)} > - <T i18nKey="prev">#</T> + {i18n.t('prev')} </button> )} + {this.state.communities.length == communityLimit && ( <button class="btn btn-sm btn-secondary" onClick={linkEvent(this, this.nextPage)} > - <T i18nKey="next">#</T> + {i18n.t('next')} </button> )} </div> diff --git a/ui/src/components/community-form.tsx b/ui/src/components/community-form.tsx index c8d888be..aaa3e6c4 100644 --- a/ui/src/components/community-form.tsx +++ b/ui/src/components/community-form.tsx @@ -21,7 +21,6 @@ import { import Tribute from 'tributejs/src/Tribute.js'; import autosize from 'autosize'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; import { Community } from '../interfaces'; @@ -108,12 +107,13 @@ export class CommunityForm extends Component< return ( <form onSubmit={linkEvent(this, this.handleCreateCommunitySubmit)}> <div class="form-group row"> - <label class="col-12 col-form-label"> - <T i18nKey="name">#</T> + <label class="col-12 col-form-label" htmlFor="community-name"> + {i18n.t('name')} </label> <div class="col-12"> <input type="text" + id="community-name" class="form-control" value={this.state.communityForm.name} onInput={linkEvent(this, this.handleCommunityNameChange)} @@ -125,13 +125,15 @@ export class CommunityForm extends Component< /> </div> </div> + <div class="form-group row"> - <label class="col-12 col-form-label"> - <T i18nKey="title">#</T> + <label class="col-12 col-form-label" htmlFor="community-title"> + {i18n.t('title')} </label> <div class="col-12"> <input type="text" + id="community-title" value={this.state.communityForm.title} onInput={linkEvent(this, this.handleCommunityTitleChange)} class="form-control" @@ -142,8 +144,8 @@ export class CommunityForm extends Component< </div> </div> <div class="form-group row"> - <label class="col-12 col-form-label"> - <T i18nKey="sidebar">#</T> + <label class="col-12 col-form-label" htmlFor={this.id}> + {i18n.t('sidebar')} </label> <div class="col-12"> <textarea @@ -157,12 +159,13 @@ export class CommunityForm extends Component< </div> </div> <div class="form-group row"> - <label class="col-12 col-form-label"> - <T i18nKey="category">#</T> + <label class="col-12 col-form-label" htmlFor="community-category"> + {i18n.t('category')} </label> <div class="col-12"> <select class="form-control" + id="community-category" < |