]> Untitled Git - lemmy-ui.git/commitdiff
Merge branch 'main' into avatar-aspect-ratio-fix
authorAlec Armbruster <35377827+alectrocute@users.noreply.github.com>
Mon, 12 Jun 2023 17:10:25 +0000 (13:10 -0400)
committerGitHub <noreply@github.com>
Mon, 12 Jun 2023 17:10:25 +0000 (13:10 -0400)
src/server/index.tsx
src/shared/components/common/html-tags.tsx
src/shared/components/post/post-listing.tsx

index 1fab13d15a23c199420d0169d04ae0a73df6f287..b7f4fb5fc33572a3d5d2607436b881156dd7290f 100644 (file)
@@ -346,7 +346,7 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) {
 
   return `
   <!DOCTYPE html>
-  <html ${helmet.htmlAttributes.toString()} lang="en">
+  <html ${helmet.htmlAttributes.toString()}>
   <head>
   <script>window.isoData = ${sanitize(JSON.stringify(isoData))}</script>
   <script>window.lemmyConfig = ${serialize(config)}</script>
index 4c673d906645db0cd3d7ad711b6b28785c1ed72a..0e6cb2d03ad381528ed3f78447e0c0bc18d2b1bf 100644 (file)
@@ -2,7 +2,7 @@ import { htmlToText } from "html-to-text";
 import { Component } from "inferno";
 import { Helmet } from "inferno-helmet";
 import { httpExternalPath } from "../../env";
-import { md } from "../../utils";
+import { getLanguages, md } from "../../utils";
 
 interface HtmlTagsProps {
   title: string;
@@ -17,9 +17,12 @@ export class HtmlTags extends Component<HtmlTagsProps, any> {
     const url = httpExternalPath(this.props.path);
     const desc = this.props.description;
     const image = this.props.image;
+    const lang = getLanguages()[0];
 
     return (
       <Helmet title={this.props.title}>
+        <html lang={lang == "browser" ? "en" : lang} />
+
         {["title", "og:title", "twitter:title"].map(t => (
           <meta key={t} property={t} content={this.props.title} />
         ))}
index 5ba531320f9880f075ce73c99a6159a4ad27f404..e5117425378ac86f8b04d1c19487eb58255d39eb 100644 (file)
@@ -1421,7 +1421,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     this.setState({ showEdit: false });
   }
 
-  // The actual editing is done in the recieve for post
+  // The actual editing is done in the receive for post
   handleEditPost() {
     this.setState({ showEdit: false });
   }