From 7aef53b90061d6b0b0aa81d5ca25a4f65ac7f5e4 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Wed, 21 Jun 2023 13:13:54 +0200 Subject: [PATCH] Remove docs translations (#194) https://github.com/LemmyNet/lemmy-docs/pull/223 --- Dockerfile | 11 ++++------ joinlemmy-translations | 2 +- lemmy-docs | 2 +- lemmy-stats-crawler | 2 +- lemmy-translations | 2 +- src/shared/components/link-line.tsx | 5 +---- src/shared/components/main.tsx | 32 +++++------------------------ src/shared/utils.ts | 6 ------ 8 files changed, 14 insertions(+), 48 deletions(-) diff --git a/Dockerfile b/Dockerfile index f40f668..e7d5c34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,15 +7,12 @@ WORKDIR /app/lemmy-docs RUN ./update-includes.sh # Build the docs -FROM rust:1.63-slim as docs +FROM alpine:3 as docs WORKDIR /app -RUN cargo install mdbook \ - --git https://github.com/Ruin0x11/mdBook.git \ - --branch localization \ - --rev 9d8147c +RUN wget -O mdbook.tar.gz https://github.com/rust-lang/mdBook/releases/download/v0.4.30/mdbook-v0.4.30-x86_64-unknown-linux-musl.tar.gz +RUN tar -xzf mdbook.tar.gz COPY lemmy-docs ./lemmy-docs -COPY --from=docs_include /app/lemmy-docs/include /app/lemmy-docs/include -RUN mdbook build lemmy-docs -d ../docs +RUN ./mdbook build lemmy-docs -d ../docs # Build the typedoc API docs FROM node:14-alpine as api diff --git a/joinlemmy-translations b/joinlemmy-translations index df26dfc..de1a5da 160000 --- a/joinlemmy-translations +++ b/joinlemmy-translations @@ -1 +1 @@ -Subproject commit df26dfce6f71539be86635495aad8d4c95a746a6 +Subproject commit de1a5da23ed30bb0ad8932e116938eaeac106341 diff --git a/lemmy-docs b/lemmy-docs index 4249465..0dc13b4 160000 --- a/lemmy-docs +++ b/lemmy-docs @@ -1 +1 @@ -Subproject commit 4249465e9960cad97245aa03b3ad4c758ff945c7 +Subproject commit 0dc13b4ea11daaa07d964c17f7a622e3a222367a diff --git a/lemmy-stats-crawler b/lemmy-stats-crawler index 7192481..ed6a393 160000 --- a/lemmy-stats-crawler +++ b/lemmy-stats-crawler @@ -1 +1 @@ -Subproject commit 7192481fa1182810065fdf6aa6671700ee225859 +Subproject commit ed6a393329b79fd23964231e26cfa00347b8fc83 diff --git a/lemmy-translations b/lemmy-translations index 9cda50f..a241fe1 160000 --- a/lemmy-translations +++ b/lemmy-translations @@ -1 +1 @@ -Subproject commit 9cda50f867e5379d3f1cf4c6a667e2b44e3cc19c +Subproject commit a241fe1255a6363c7ae1ec5a09520c066745e6ce diff --git a/src/shared/components/link-line.tsx b/src/shared/components/link-line.tsx index adde622..f07a052 100644 --- a/src/shared/components/link-line.tsx +++ b/src/shared/components/link-line.tsx @@ -1,6 +1,5 @@ import { Component } from "inferno"; import { Link } from "inferno-router"; -import { getDocsLanguage } from "../utils"; import { i18n } from "../i18next"; export class LinkLine extends Component { @@ -14,9 +13,7 @@ export class LinkLine extends Component { {i18n.t("news")} {i18n.t("apps")} {i18n.t("donate")} - - {i18n.t("docs")} - + {i18n.t("docs")} {i18n.t("contact")} ); diff --git a/src/shared/components/main.tsx b/src/shared/components/main.tsx index 74c6266..8d57e6e 100644 --- a/src/shared/components/main.tsx +++ b/src/shared/components/main.tsx @@ -4,7 +4,7 @@ import { Helmet } from "inferno-helmet"; import { DonateLines } from "./donate-lines"; import { i18n } from "../i18next"; import { T } from "inferno-i18next"; -import { getDocsLanguage, isBrowser } from "../utils"; +import { isBrowser } from "../utils"; export class Main extends Component { constructor(props: any, context: any) { @@ -28,9 +28,7 @@ export class Main extends Component { return ( {i18n.t("run_a_server")} @@ -146,14 +144,7 @@ export class Main extends Component {

{i18n.t("create_discussion_platform")}

- # - - # - + ## # # @@ -193,21 +184,8 @@ export class Main extends Component {

  • - # - - # - - - # - + ## + #
  • {i18n.t("clean_interface")}
  • diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 2d7e76e..14df28f 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1,11 +1,5 @@ import markdown_it from "markdown-it"; -let DOCS_LANGUAGES = ["en", "es", "fr"]; - -export function getDocsLanguage(lang: string): string { - return DOCS_LANGUAGES.includes(lang) ? lang : "en"; -} - let SHORTNUM_SI_FORMAT = new Intl.NumberFormat("en-US", { maximumFractionDigits: 1, //@ts-ignore