-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n ― Simplified Chinese #6
Comments
@Bill-Haku I have released English UI today, but I need a bit more preparation for Simplified Chinese translation. |
@Bill-Haku I have written the translation instruction for genshin-dictionary. |
@xicri Thanks for your instructions. I will start my work from now on. |
@xicri for the site title, I have 3 suggestions. The first one is "原神辞典“, which is the shortest one, and it simply means "Genshin Dictionary". But the only problem is that it is not so imposing to read. The second one is "原神中英日辞典", it means "Genshin Dictionary of Chinese, English and Japanese". It's a little longer, but it is precise. Don't worry about the abbreviation of "中英日", it's common in the name of a dictionary, and it will be strange if use a full name in Chinese. The third one is “原神大辞典". Comparing to the first choice, it is imposing to read, and it shows our confidence and pride in the site, as it does include a lot of words. But if you want to be modest, you'd better not to choose this one. BTW, I don't think that there's a big difference about the characters' meaning of my suggestions in Chinese and Japanese (辞典=辞書, others completely same). You can also decide it by your understandings of the characters. What's your opinion about it? |
@Bill-Haku Thanks.
Yes, your suggestions make sense to me.
"原神中英日辞典" looks the best to me since it simply explains this website is a Chinese-English-Japanese dictionary for terms in Genshin Impact. |
Why there's such a rumor (LOL)? Although Google is blocked in China, we use Baidu, Bing, and other search engines. Sometimes we use Weibo for break news, but it just seems like Twitter trend. In most cases, search engines are always the best solutions. Anyway, I will use "原神中英日辞典" as the site title. |
Oh, then the rumor is probably wrong.
OK, thanks! |
Support Simplified Chinese UI
Translation library
Genshin Dictionary uses nuxt/i18n for i18n which is based on vue-i18n.
Translation Process
I added PR #48.
In this PR, I added placeholders for
zh-CN
translations: a910d30Please 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.Where to translate
Vue components
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
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/).Variables in translation texts
Strings with curly brackets
{}
in the translation texts are variable.For example, the following translation includes the
createdAt
variable in the text.(code)
See the vue-i18n document to learn more.
Debug
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 runnpm run build
cp .env.example .env
LANGDATA_PATH
in .envnpm install
again. This installs tag data fromi18n-zh-CN
branchAbout site title
You 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 "原神英語・中国語辞典")
About tests
The tests on the CI may fail after you add the translation. Just ignore it.
Untranslated texts
Translation for /about/ and /opendata/ are not ready yet.
The text was updated successfully, but these errors were encountered: