From 63b4ff36200d9de7d8f4b45607628171f534c80f Mon Sep 17 00:00:00 2001 From: hugocxl Date: Mon, 1 Jan 2024 23:01:50 +0100 Subject: [PATCH] WIP --- website/src/pages/about.mdx | 7 ++++- .../pages/docs/guides/chatgpt-translator.mdx | 1 - .../docs/guides/configuring-translator.mdx | 1 + .../pages/docs/guides/custom-translator.mdx | 1 - .../pages/docs/guides/google-translator.mdx | 1 - .../pages/docs/overview/getting-started.mdx | 16 +++++----- .../src/pages/docs/overview/quickstart.mdx | 15 ---------- website/src/pages/docs/overview/why-terai.mdx | 29 ++++--------------- website/src/pages/docs/usage/vite.mdx | 4 +-- 9 files changed, 23 insertions(+), 52 deletions(-) delete mode 100644 website/src/pages/docs/guides/chatgpt-translator.mdx create mode 100644 website/src/pages/docs/guides/configuring-translator.mdx delete mode 100644 website/src/pages/docs/guides/custom-translator.mdx delete mode 100644 website/src/pages/docs/guides/google-translator.mdx delete mode 100644 website/src/pages/docs/overview/quickstart.mdx diff --git a/website/src/pages/about.mdx b/website/src/pages/about.mdx index 8a2b3d52..cf40b704 100644 --- a/website/src/pages/about.mdx +++ b/website/src/pages/about.mdx @@ -14,7 +14,12 @@ list of contributors on Terai is powered by these incredible open source projects: - [React](https://github.com/facebook/react) -- [ECharts](https://github.com/apache/incubator-echarts) +- [Tsup](https://github.com/apache/incubator-echarts) +- [Rollup](https://rollupjs.org) +- [Node](https://rollupjs.org) +- [Typescript](https://rollupjs.org) +- [Vite](https://rollupjs.org) +- [@legendapp/state](https://rollupjs.org) ## License diff --git a/website/src/pages/docs/guides/chatgpt-translator.mdx b/website/src/pages/docs/guides/chatgpt-translator.mdx deleted file mode 100644 index 3703bf04..00000000 --- a/website/src/pages/docs/guides/chatgpt-translator.mdx +++ /dev/null @@ -1 +0,0 @@ -# Using ChatGPT Translator diff --git a/website/src/pages/docs/guides/configuring-translator.mdx b/website/src/pages/docs/guides/configuring-translator.mdx new file mode 100644 index 00000000..a2ee26a6 --- /dev/null +++ b/website/src/pages/docs/guides/configuring-translator.mdx @@ -0,0 +1 @@ +# Configuring translator diff --git a/website/src/pages/docs/guides/custom-translator.mdx b/website/src/pages/docs/guides/custom-translator.mdx deleted file mode 100644 index 5d158115..00000000 --- a/website/src/pages/docs/guides/custom-translator.mdx +++ /dev/null @@ -1 +0,0 @@ -# Using a custom translator diff --git a/website/src/pages/docs/guides/google-translator.mdx b/website/src/pages/docs/guides/google-translator.mdx deleted file mode 100644 index 0c5aa5df..00000000 --- a/website/src/pages/docs/guides/google-translator.mdx +++ /dev/null @@ -1 +0,0 @@ -# Using Google Cloud Translator diff --git a/website/src/pages/docs/overview/getting-started.mdx b/website/src/pages/docs/overview/getting-started.mdx index 17474588..b040e9f8 100644 --- a/website/src/pages/docs/overview/getting-started.mdx +++ b/website/src/pages/docs/overview/getting-started.mdx @@ -47,16 +47,16 @@ locales using the translator you've defined. Learn how to get **Terai** set up in your project using our framework-specific guides that cover our recommended approach. -- [React](/docs/installation/react) -- [Vite](/docs/installation/vite) -- [Node](/docs/installation/vite) +- [React](/docs/usage/react) +- [Vite](/docs/usage/vite) +- [Node](/docs/usage/node) ## Next Steps Discover the full range of features and capabilities that Terai offers: -- [`ts`](https://www.notion.so/ts-a2ebfcc440794b41b3732564f897e6ce?pvs=21) -- [Extraction](https://www.notion.so/Extraction-b07e6a5d2f054a9db755de1a1864d6ac?pvs=21) -- [Translation](https://www.notion.so/Translation-8562f56993004188b5ebff4cebbc79ab?pvs=21) -- [Cache](https://www.notion.so/Cache-cdea2238aaa24f6dbaa9923d07a7d53f?pvs=21) -- [Code Splitting](https://www.notion.so/Code-Splitting-7b67e1866f3e4d61ad585196f897e87b?pvs=21) +- [`ts`](/docs/conceps/ts) +- [Extraction](/docs/conceps/extraction) +- [Translation](/docs/conceps/translation) +- [Cache](/docs/conceps/cache) +- [Code Splitting](/docs/conceps/code-splitting) diff --git a/website/src/pages/docs/overview/quickstart.mdx b/website/src/pages/docs/overview/quickstart.mdx deleted file mode 100644 index a7097287..00000000 --- a/website/src/pages/docs/overview/quickstart.mdx +++ /dev/null @@ -1,15 +0,0 @@ -# Quickstart - -This guide will walk you through the steps to get started with using -`@terai/vite` in your Next.js project. - -## Prerequisites - -Before you begin, make sure you have the following installed: - -- Node.js -- Next.js - -## Installation - -To install `@terai/vite`, run the following command: diff --git a/website/src/pages/docs/overview/why-terai.mdx b/website/src/pages/docs/overview/why-terai.mdx index 766ccde9..e6a667bc 100644 --- a/website/src/pages/docs/overview/why-terai.mdx +++ b/website/src/pages/docs/overview/why-terai.mdx @@ -5,34 +5,17 @@ From the endless list of localization libraries, why should you choose ## Backstory -The world of business and technology is rapidly expanding, with global growth as -a common objective for many projects. However, language barriers can be a -significant roadblock to entering new markets. While English dominates the -internet, it caters to only a quarter of the world's internet users. - -To truly win the trust of consumers in these diverse markets, products and -services must not only "speak" their language but also provide a local look and -feel. This goes beyond mere translation; it involves a comprehensive -localization process that takes into account local expectations, currencies, -legal requirements, and more. - -For companies with genuine global aspirations, embracing professional -localization services powered by modern technology is not just an option; it's a -necessity. - -## The Stagnation of Localization - -The rapid evolution of the web over the past decade has transformed the way we -build and deliver software. However, one area that has lagged behind is -localization. Traditional localization processes often feel stuck in the past, -relying on outdated methods that don't align with the agility and innovation -seen in other aspects of software development. +The dynamic changes in the web landscape throughout the last decade have +revolutionized our approach to building and delivering software. Despite this +progress, localization has not kept pace. Conventional localization methods +often seem outdated, not in sync with the agility and innovation evident in +other facets of software development. But it doesn't have to be this way. We're here to change that. ## A New Approach to Localization -In 2023, we embarked on a journey to revolutionise localization. Our mission was +In 2023, we embarked on a journey to modernize localization. Our mission was born out of frustration with the complexities of managing translation systems for our own projects. We understood that there had to be a better way, and that's how **Terai** was born. diff --git a/website/src/pages/docs/usage/vite.mdx b/website/src/pages/docs/usage/vite.mdx index a216cc49..3389aa22 100644 --- a/website/src/pages/docs/usage/vite.mdx +++ b/website/src/pages/docs/usage/vite.mdx @@ -82,9 +82,9 @@ import React, { Suspense } from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' import './index.css' -import { setup } from '@terai/react' +import { setupClient } from '@terai/react' -setup({ +setupClient({ defaultLocale: 'en', persist: true, loader: (locale: string, id: string) =>