Skip to content
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

Translate to zh-tw #359

Open
s8321414 opened this issue Oct 7, 2019 · 14 comments
Open

Translate to zh-tw #359

s8321414 opened this issue Oct 7, 2019 · 14 comments

Comments

@s8321414
Copy link
Contributor

s8321414 commented Oct 7, 2019

I can translate wttr.in to zh-tw (Traditional Chinese for Taiwan), how can I do?

@chubin
Copy link
Owner

chubin commented Oct 7, 2019

Yes, thank you very much! It would great. zh-tw is one of the most needed translations at the moment, and your help would be very appreciated.

To add the translation:

  1. Fork the repo
  2. Add the new translation here: https://github.com/chubin/wttr.in/tree/master/share/translations (you can use any of the existing translation files as the basis for your translation)
  3. Add missing phrases to translation.py
  4. Add the new help.txt (zh-tw-help.txt)
  5. Do not forget to add your name to the list of the translators (translation.txt)

@s8321414
Copy link
Contributor Author

s8321414 commented Oct 9, 2019

I have opened a PR #361 😃

@chubin
Copy link
Owner

chubin commented Oct 10, 2019

Thank you for it! It is running live now. Please take a look at it:

$ curl zh-tw.wttr.in/Regensburg
$ curl zh-tw.wttr.in/:help

Do you like it? If everything is correct?

What about this?

│             早上             │             中午      └──────┬──────┘       晚間            │              晚              │

Is it correct? Or is not really zh-tw?

@s8321414
Copy link
Contributor Author

Ah, evening should be 傍晚, should I make another PR for this?
All except this are fine 😃

@chubin
Copy link
Owner

chubin commented Oct 10, 2019

You can't do a PR for it, because this part is not (yet) on GH. I will changed it.

Several other questions:

  1. Is zh-tw = simplified Chinese?
  2. If not, what code should be used for simpilfied Chinese?
  3. What should be used for traditional Chinese? (see Traditional Chinese translation #207) zh-hans?
  4. We would like to support zh-cn, zh-sg (or zh-hans?), zh-tw, zh-hk and zh-mo (zh-hant). See Chinese Translation #83. What translation (from these ones) would you add first? May we use your translation as a base for the rest? Or it makes little sense?

@chubin
Copy link
Owner

chubin commented Oct 10, 2019

I've fixed the 傍晚 thing; please check it: curl zh-tw.wttr.in/Passau

@s8321414
Copy link
Contributor Author

You can't do a PR for it, because this part is not (yet) on GH. I will changed it.

Several other questions:

1. Is `zh-tw` = `simplified Chinese`?

2. If not, what code should be used for simpilfied Chinese?

3. What should be used for traditional Chinese? (see #207) `zh-hans`?

4. We would like to support zh-cn, zh-sg (or zh-hans?), zh-tw, zh-hk and zh-mo (zh-hant). See #83. What translation (from these ones) would you add first? May we use your translation as a base for the rest? Or it makes little sense?
  1. No, it is Traditional Chinese for Taiwan (or you can call it Taiwanese Mandarin)
  2. zh-hans or zh-cn, should check what country you want to provide, but zh-hans is more general, and zh-cn is only for China (Mainland China you may call)
  3. zh-hant, it is more general and different from zh-hans (for Simplified Chinese)
  4. Well, you can use one of zh-hans locale for fallback to another zh-hans locales, it is same as zh-hant

@chubin
Copy link
Owner

chubin commented Oct 10, 2019

That means that we need the following translations:

zh-hans
zh-cn
zh-sg

zh-hant
zh-tw
zh-hk
zh-mo

Right?
May I use zh-hant as an alias for zh-tw?
Or strictly speaking, zh-hant can differ from zh-tw in some cases?

What code should have Simiplified Chinese? zh?

@Vdragon
Copy link

Vdragon commented Oct 10, 2019

As you may have noticed there are two distinguishing categories of language code, one by language(zh-hant, zh-hans, and zh) and one by region(the rest of them).

In general speaking region locales are more important as each region may have differences in many aspects of the language, as for the codes defined by language it should be an alias of the region code which has the most users of the language, and thus zh-hant should be an alias of zh-tw( which has the most users using Traditional Chinese) and zh-hans should be an alias of zh-cn (which has the most users using Simplified Chinese).

For zh locale(the Chinese language in general) it should be an alias of zh-hans since most users are using Simplified Chinese.

If the I18N framework supports language fallbacks the proper fallback priority should be region specific locale > language specific locale > Even more generic language specific locale

@s8321414
Copy link
Contributor Author

Yes, just like @Vdragon says 😃

@s8321414
Copy link
Contributor Author

By the way, how can we translate v2?

@chubin
Copy link
Owner

chubin commented Dec 28, 2019

@s8321414 @Vdragon

Hi guys! Could you please take a look at the v2 translation?
It is just a single line:

lib/translations_v2.py

@s8321414
Copy link
Contributor Author

@s8321414 @Vdragon

Hi guys! Could you please take a look at the v2 translation?
It is just a single line:

lib/translations_v2.py

I created a PR for this 😃

@chubin
Copy link
Owner

chubin commented Dec 29, 2019

@s8321414 Thank you, Jeff! Merged
The zh trasnlation is still open. I hope @Vdragon (or someone else who is reading this) will help us with it

https://github.com/chubin/wttr.in/blob/master/lib/translations_v2.py#L67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants