xicri / genshin-dictionary Goto Github PK
View Code? Open in Web Editor NEWAn online English-Chinese-Japanese dictionary for the terms of Genshin Impact
Home Page: https://genshin-dictionary.com
License: Apache License 2.0
An online English-Chinese-Japanese dictionary for the terms of Genshin Impact
Home Page: https://genshin-dictionary.com
License: Apache License 2.0
I hear it is slow to access from China mainland to the foreign websites.
Genshin Dictionary is hosted by Cloudflare and it provides free global CDN, but the China data center is not available unless I bought the most expensive Enterprise plan.
Therefore, the Dictionary is probably served for users in China mainland from the foreign data centers. (Maybe Hong Kong or South Korea?)
Would you add phonetic symbol for English and pinyin for Chinese to mark how to read the word ?
There are quite a lot rarely seen chinese characters in this game that people don't know how to read.
And it's the same with English.
Support Simplified Chinese UI
Genshin Dictionary uses nuxt/i18n for i18n which is based on vue-i18n.
I added PR #48.
In this PR, I added placeholders for zh-CN
translations: a910d30
Please add Simplified Chinese translations to the lines I added in the above commit.
After you added the translation, please send me a PR to this i18n-zh-CN
branch.
Most of the translations are in the .vue files.
.vue files are in:
.vue files have some HTML tags like <template>
and <script>
.
Translation data is in the <i18n>
tags in the JSON format.
See the document to learn more.
nuxt.config.js includes texts for <title>
and <meta name="description">
for each pages because you can't add them in the .vue files. (code)
siteTitle
property is the website title and it is appended after each title. (e.g. '"artifact" is "聖遺物" in Japanese | Genshin Dictionary'){vueFileName}Title
property is <title>
text before | {siteTitle}
.
wordIdTitle
property is <title>
for pages/_wordid.vue. (e.g. /artifact/){vueFileName}Description
property is the text for <meta name="description">
.
aboutDescription
property is <meta name="description">
for pages/about.vue (/about/).Strings with curly brackets {}
in the translation texts are variable.
For example, the following translation includes the createdAt
variable in the text.
"updatedOn": "Updated on {createdAt}",
(code)
See the vue-i18n document to learn more.
To debug, see the Setup section in README:
https://github.com/xicri/genshin-dictionary#setup
You might see the tag texts are empty. This is expected because genshin-dictionary refers to current production tags.json which does not have Simplified Chinese translation yet.
It is not necessary to show tag texts properly, but if you want to show tag texts properly on your local machine:
i18n-zh-CN
and run npm run build
cp .env.example .env
LANGDATA_PATH
in .envnpm install
again. This installs tag data from i18n-zh-CN
branchYou don't have to translate the site title literally.
The Japanese site title is 原神 英語・**語辞典 (Genshin English & Chinese Dictionary), but the English title is just "Genshin Dictionary".
Chinese title might be like "Genshin English Dictionary" or "Genshin English & Japanese Dictionary"? Let me know if you have better options.
A short title is better because there is not so wide space in the header (especially on mobile devices).
In Chinese and Japanese, it might be better to insert whitespace after "原神" because the search engines might misunderstand our site title and cannot recognize the word "原神" if we didn't. (In the Japanese case, Google might misunderstand our website is about "原神英" if the site title was "原神英語・**語辞典")
The tests on the CI may fail after you add the translation. Just ignore it.
Translation for /about/ and /opendata/ are not ready yet.
Set up automatic deployment to Cloudflare Pages (The main server for Genshin Dictionary & Genshin Machine Translation).
For example, The Chi of Yore does not have a Chinese translation.
On the Chinese version of the word page, the title is ""的英语和日语翻译 | 原神中英日辞典
.
https://genshin-dictionary.com/zh-CN/the-chi-of-yore/
On the English version of the word page, the title is "The Chi of Yore" is "" in Chinese | Genshin Dictionary
.
https://genshin-dictionary.com/en/the-chi-of-yore/
Support Traditional Chinese UI.
Can it be automatically converted from Simplified Chinese using OpenCC?
Show the Simplified Chinese translations contributed in xicri/genshin-langdata#2 on the UI.
For example, if you search with "Mondstadt", The word "Mondstadt" appears at the last of the search results currently.
However, "Mondstadt" should be the first result.
List the search results in following order:
en
, ja
, and zhCN
, and pronunciationJa
variants.en
, variants.ja
, and variants.zhCN
en
, ja
, and zhCN
variants.en
, variants.ja
, and variants.zhCN
pronunciationJa
notes
(on Japanese UI only) and notesZh
(on Chinese UI only)Support English UI.
Expected: 神里绫华 is shown in the search result.
Actual: "未找到匹配的词汇。" (Not found) is shown.
Migrate to Next.js / React with TypeScript.
Since Nuxt 3 release, it took two months for the first minor release, and until then, Nuxt 3 was still unstable. I guess Nuxt team does not have engineer resources enough. I gave up using Nuxt.
Some PRs were reverted by #115, but they should be applied again after migration to Nuxt 3.
The following PRs should be manually applied after migration to Nuxt 3:
Check if the following PRs should be applied manually after the migration to Nuxt 3:
Cloudflare is slow in mainland China. To provide better performance for users in mainland China, I will add CDN in or around mainland China.
Options:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.