Remove docs translations (#194)

https://github.com/LemmyNet/lemmy-docs/pull/223
This commit is contained in:
Nutomic 2023-06-21 13:13:54 +02:00 committed by GitHub
parent 7e038349c8
commit 7aef53b900
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 14 additions and 48 deletions

View file

@ -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

@ -1 +1 @@
Subproject commit df26dfce6f71539be86635495aad8d4c95a746a6
Subproject commit de1a5da23ed30bb0ad8932e116938eaeac106341

@ -1 +1 @@
Subproject commit 4249465e9960cad97245aa03b3ad4c758ff945c7
Subproject commit 0dc13b4ea11daaa07d964c17f7a622e3a222367a

@ -1 +1 @@
Subproject commit 7192481fa1182810065fdf6aa6671700ee225859
Subproject commit ed6a393329b79fd23964231e26cfa00347b8fc83

@ -1 +1 @@
Subproject commit 9cda50f867e5379d3f1cf4c6a667e2b44e3cc19c
Subproject commit a241fe1255a6363c7ae1ec5a09520c066745e6ce

View file

@ -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<any, any> {
@ -14,9 +13,7 @@ export class LinkLine extends Component<any, any> {
<Link to="/news">{i18n.t("news")}</Link>
<Link to="/apps">{i18n.t("apps")}</Link>
<Link to="/donate">{i18n.t("donate")}</Link>
<a href={`/docs/${getDocsLanguage(i18n.language)}/index.html`}>
{i18n.t("docs")}
</a>
<a href={`/docs/index.html`}>{i18n.t("docs")}</a>
<Link to="/contact">{i18n.t("contact")}</Link>
</>
);

View file

@ -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<any, any> {
constructor(props: any, context: any) {
@ -28,9 +28,7 @@ export class Main extends Component<any, any> {
return (
<a
class="button primary"
href={`/docs/${getDocsLanguage(
i18n.language
)}/administration/administration.html`}
href={`/docs/administration/administration.html`}
>
{i18n.t("run_a_server")}
</a>
@ -146,14 +144,7 @@ export class Main extends Component<any, any> {
<h2>{i18n.t("create_discussion_platform")}</h2>
<p>
<T i18nKey="create_discussion_platform_desc">
#
<a
href={`/docs/${getDocsLanguage(
i18n.language
)}/administration/administration.html`}
>
#
</a>
#<a href={`/docs/administration/administration.html`}>#</a>
<i>#</i>
<a href="https://en.wikipedia.org/wiki/Fediverse">#</a>
</T>
@ -193,21 +184,8 @@ export class Main extends Component<any, any> {
<ul class="is-marginless">
<li>
<T i18nKey="self_hostable">
#
<a
href={`/docs/${getDocsLanguage(
i18n.language
)}/administration/install_docker.html`}
>
#
</a>
<a
href={`/docs/${getDocsLanguage(
i18n.language
)}/administration/install_ansible.html`}
>
#
</a>
#<a href={`/docs/administration/install_docker.html`}>#</a>
<a href={`/docs/administration/install_ansible.html`}>#</a>
</T>
</li>
<li>{i18n.t("clean_interface")}</li>

View file

@ -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