bilde2910 / FreeField

An open-source mapping and notification tool for Pokémon GO field research quest tracking.
Apache License 2.0
20 stars 3 forks source link

About transtale FreeField #16

Closed jay816314 closed 5 years ago

jay816314 commented 5 years ago

FreeField is a nice project. I want to translate it into Chinese. If possible, i can use traditional Chinese. So that both China-mainland/ China-Taiwan/ China-Hongkong player can read it. Thanks.

bilde2910 commented 5 years ago

Thank you a lot for offering to translate it! I've created the Chinese Traditional (zh-TW) locale in Crowdin so it's ready to work on. Please check out the translator documentation if you haven't already. Note that there is a lot of text to translate; you do not have to translate all of it, partial translations are also welcome. If you have any questions about translating, or you're stuck on something, feel free to let me know and I can explain how you can solve it.

jay816314 commented 5 years ago

OK, i'll read translator documentation carefully!

bilde2910 commented 5 years ago

Hi again! Thank you a lot for all of your translations so far. I've reviewed and approved your contributions. I will make sure to push this forward and get it included in the stable v1.1 branch so you don't have to wait for v1.2 to get this included. If you feel like you are done, I will merge the changes right away.

There are a few things I'd like to ask about before the changes are committed. First of all, what kind of maps are mostly used for directions by users in China? I have Google Maps, Yandex and some other maps but of course, not all of these work or are popular in China. I can add e.g. Baidu maps - are there any others I should include?

The other thing is login/authentication. What kind of social media or login platforms are common in China? I can try to add support for using these to log in to FreeField in addition to the current ones (Discord, Telegram etc).

jay816314 commented 5 years ago

Thanks for your reply! Most of translation work are done. I will check if there are some syntax errors or typos in maybe 2 days. When i finish it, i will let you know and you can put this in your merge plan.

In China-mainland, we can not access Google Maps directly. We need vpn just like when we played Pokemon GO :( . Other maps well known internationally may not have good access experience for us. So if you can add Baidu maps, i will appreciate it. For China-HongKong and China-Taiwan players, as i know, most of them use Google Maps.

For China-HongKong, China-Taiwan players, the authentication method now can be satisfied. Both Discord, Telegram and Facebook are blocked in China-mainland (Where i'm in, so sad QwQ). But it's not a big deal. Because those who played Pokemon Go all have vpn/proxy so that they can also use it for authentication. Most popular social media/login platforms in China are Wechat/ Tencent QQ/ Weibo, the sequence also stands for popularity, form high to low. I don't know whether their authentication API documentation are good enough for English developer. And maybe it hard to compatible with mobile and pc. Although it will improve the experience of authentication, considered of numbers of Pokemon Go player in China, the priority of this work is not high.

bilde2910 commented 5 years ago

Shame to hear about the access problems :( WeChat actually has English documentation for OAuth2, which helps a lot with implementing login with WeChat... except that their sign-up pages for international developers is null-routed and inaccessible. So I can't actually make an account to test the integration. Until they open that back up so I can actually make an account, there's little I can do as I don't qualify for a local-market developer account with them.

QQ doesn't offer English documentation, but I can use machine translators, and there are examples available that I can use. I would not have any idea how to test it, though. And for either of these, I would not be able to make documentation both due to the language barrier, and the fact that there are multiple account systems and I don't qualify for some of these accounts.

If you feel like being a guinea pig and want to help me figure it out, then I guess I could solve it, but other than that, I doubt I could implement these. Either way, if you set the session length in FreeField to a long value (it's 10 years by default), users would only have to be on VPN to sign in once, then they'd stay signed in and not have to use the VPN to access it again in the future (unless the session expires).

I did manage to get Baidu navigation links working, so they're an option in both user and site settings starting from v1.1.7.

Also note that there are a handful extra strings to translate relating to a new feature in the sidebar for choosing a language manually. These are in the "Map UI; sidebar" file on Crowdin. Just giving you a heads up in case you want to translate these as well before the files are merged.

jay816314 commented 5 years ago

I also read the documentation about WeChat and QQ's OAuth2 and asked a few question to someone familiar with this yesterday. What i know is Wechat OAuth2 API on mobile browser not support personal user. It can only use in the browser in Wechat. And in PC web browser, it can only login through QRcode. So maybe it's not in our consideration.

Apply for a QQ connect developer account, which use for getting the appid and appkey, will be asked for verifying Chinese ID card. And the site using QQ authentication need to filing in the government. So it seems not in our consideration too...

I suggest we can just skip it. Using VPN to sign in once is acceptable. When we played Pokemon Go, we need keep connecting VPN. User can sign in to FreeField at this time. It won't cause any bad experience. The default setting of session expire time is enough for user convenience.

Thanks for adding Baidu Maps! Most problems of China user are about language and access(speed and usable). Adding it can perfectly solve the problems.

I've translated the extra strings. The inspection work of main file is completed too. Found a few mistakes and i'd submitted comments on Crowdin. You can put it into your merge plan now~ 👍

bilde2910 commented 5 years ago

It does look like WeChat and QQ are out of the question then. But yeah, hopefully a VPN sign in once shouldn't be too much hassle, considering you are already using a VPN just to play the game.

I've merged the translation into the stable v1.1 branch, but I'm having issues merging it into unstable (v1.2). I'll see if I can push an update to v1.2 at some later time to get this included there as well. Though if you use the stable version, you can update to v1.1.8 and see your translations right away.

I'll update this issue once the translation is merged into the alpha release as well.

bilde2910 commented 5 years ago

An error in the Crowdin configuration might have resulted in you getting an email notification from Crowdin that there were several thousand new strings and over 20,000 words yet to translate in the project. Apparently Crowdin decided to treat the translations to Chinese, Norwegian and Spanish all as new "English" source strings when I merged the translations. That was an error, of course. It has been fixed now, and all the translations you made are of course still there. Sorry if this caused any inconvenience!

jay816314 commented 5 years ago

No one here complained to me about the authentication method now. Seems it's not a big problem.

I have update to v1.1.8 just now. Everything works fine and i have seen the translations. Only one doubt that i can't find site default language setting option. Is the default value is "auto-detect"?

I saw the email just now. Thanks for your reminding.

bilde2910 commented 5 years ago

The default value is auto-detecting based on the device language. That means users who have their phone language set to Chinese will see FreeField in Chinese by default. The setting to change language manually is at the bottom of the sidebar/menu on the map screen. Do you think a site-wide default language for new users would be useful, instead of auto-detecting for each user? I haven't added such a setting yet, but I can certainly add it if you think it could be useful.

jay816314 commented 5 years ago

At first i thought it maybe exist some problem about recognize Chinese(Simplified )/Chinese(Traditional). Just like Pokemon go did. It doesn't have Chinese(Simplified) character set. When your device use Simplified Chinese, it will use English instead of Traditional Chinese. Yesterday later i test a few device with different device language. It works well. Although most player here is Chinese, there are still a few foreigner player. Auto-detecting based on device language is better.

bilde2910 commented 5 years ago

I'll keep it as it is then. The auto-detection looks at the language requested by the browser and matches it against the ones available in FreeField. If the browser wants "zh-CN" for example (Chinese, mainland) and "zh-TW" (Chinese, Taiwan, the code used for Traditional by Crowdin) is available, it will use that instead of English because the language code itself (zh, Chinese) matches. If a more specific "zh-CN" locale is available then it would use that insead. So it will fall back to any available version of Chinese if the device asks for it. Thus users with Simplified Chinese should get Traditional Chinese by default in FreeField.

jay816314 commented 5 years ago

Get it. Just keep it as it is. Everything else is fine.