Skip to content

Convert between Simplified and Traditional Chinese.

License

Notifications You must be signed in to change notification settings

LibreService/my_opencc

Repository files navigation

My OpenCC

Convert between Simplified and Traditional Chinese.

https://my-opencc.vercel.app/

This is a STATIC website so you DON'T need to own a server to host it.

All computation is performed in browser, thanks to Web Assembly.

It's also a PWA, so you can install it like a native App and use it OFFLINE.

Transform matrix

源\目标 s t tw hk jp
s - s2t s2tw(p) s2hk -
t t2s - t2tw t2hk t2jp
tw tw2s(p) tw2t - - -
hk hk2s hk2t - - -
jp - jp2t - - -

Self host

Download latest artifact built by GitHub Actions.

Development workflow

My OpenCC can be built on Linux and macOS.

For Windows, you may use WSL.

Install node

You may use nvm to install node.

Install pnpm and dev dependencies

npm i -g pnpm
pnpm i

Install emsdk

https://emscripten.org/docs/getting_started/downloads.html

Get submodule

git submodule init
git submodule update

Build wasm

pnpm run native
pnpm run lib
pnpm run wasm

Run develop server

pnpm run dev

Lint

pnpm run lint:fix

Check type

pnpm run check

Build

pnpm run build

Test

pnpm run test

Preview

pnpm run preview

Deploy

export LIBRESERVICE_CDN=https://cdn.jsdelivr.net/npm/@libreservice/my-opencc@VERSION/dist/ # optional
vercel build --prod
vercel deploy --prebuilt --prod

License

AGPLv3+