PrivateMessageView,
} from "lemmy-js-client";
import { relTags } from "../../config";
-import { i18n } from "../../i18next";
+import { I18NextService } from "../../services";
import { setupTippy } from "../../tippy";
import { Icon, Spinner } from "../common/icon";
import { MarkdownTextArea } from "../common/markdown-textarea";
// TODO
// <Prompt
// when={!this.state.loading && this.state.content}
- // message={i18n.t("block_leaving")}
+ // message={I18NextService.i18n.t("block_leaving")}
// />
render() {
{!this.props.privateMessageView && (
<div className="mb-3 row">
<label className="col-sm-2 col-form-label">
- {capitalizeFirstLetter(i18n.t("to"))}
+ {capitalizeFirstLetter(I18NextService.i18n.t("to"))}
</label>
<div className="col-sm-10 form-control-plaintext">
)}
<div className="mb-3 row">
<label className="col-sm-2 col-form-label">
- {i18n.t("message")}
+ {I18NextService.i18n.t("message")}
<button
className="btn btn-link text-warning d-inline-block"
onClick={linkEvent(this, this.handleShowDisclaimer)}
- data-tippy-content={i18n.t("private_message_disclaimer")}
- aria-label={i18n.t("private_message_disclaimer")}
+ data-tippy-content={I18NextService.i18n.t(
+ "private_message_disclaimer"
+ )}
+ aria-label={I18NextService.i18n.t("private_message_disclaimer")}
>
<Icon icon="alert-triangle" classes="icon-inline" />
</button>
{this.state.loading ? (
<Spinner />
) : this.props.privateMessageView ? (
- capitalizeFirstLetter(i18n.t("save"))
+ capitalizeFirstLetter(I18NextService.i18n.t("save"))
) : (
- capitalizeFirstLetter(i18n.t("send_message"))
+ capitalizeFirstLetter(I18NextService.i18n.t("send_message"))
)}
</button>
{this.props.privateMessageView && (
className="btn btn-secondary"
onClick={linkEvent(this, this.handleCancel)}
>
- {i18n.t("cancel")}
+ {I18NextService.i18n.t("cancel")}
</button>
)}
<ul className="d-inline-block float-right list-inline mb-1 text-muted font-weight-bold">