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

Localization #13

Closed
HarpyWar opened this issue May 4, 2014 · 43 comments
Closed

Localization #13

HarpyWar opened this issue May 4, 2014 · 43 comments

Comments

@HarpyWar
Copy link
Member

HarpyWar commented May 4, 2014

I'm wondering to localize hardcoded text messages in PvPGN. But different game clients have a different encoding.

  • Warcraft 3 client uses UTF8, and there is no problem with other languages.
  • I know that Starcraft uses conversion CP1252 -> UTF8 to display Russian text (I suppose, it covers Warcraft 2 and Diablo 1). I need an information about Korean, Polish and others.
  • Whats encoding for Diablo 2?
  • Can WWOL clients display different language text or not? (Tiberian Sun, RA2, etc).

UPDATE
Diablo 2 - UTF8
Starcraft (except Russian) - UTF8
WWOL - IRC encoding, it should not be localized

@RElesgoe
Copy link
Member

RElesgoe commented May 4, 2014

For StarCraft, as long as you enter the text in whatever language you want it to be, anyone with a computer that is set to that language will be able to read it properly.

@HarpyWar
Copy link
Member Author

HarpyWar commented May 4, 2014

Yes, it applies on text messages between users.
But static text in PvPGN code (or in files like motd or helpfile) is saved with an encoding (ASCII, UTF8, etc...). This text must be converted to a user friendly encoding before send, otherwise user will receive "??????" or hieroglyphs instead of a normal text.

@HarpyWar
Copy link
Member Author

How to check Russian encoding in Starcraft, Diablo 1, Warcraft 2.

  1. Create a new file in notepad++
  2. Make sure the file encoding is ANSI or Windows-1251 (it is russian cyrillic encoding)
  3. Write text привет
  4. Change the file encoding to Windows-1252. It will display ïðèâåò.
  5. Paste that string in your motd.txt. Make sure the file has UTF-8 encoding.
  6. Join to the server or send command /motd

hello

The same conversion can be made in code. It is needed to write two functions cp1251_to_cp1252 and cp1252_to_utf8.

@RElesgoe
Copy link
Member

I prefer to do convert it by using code to keep the original text, could you write those functions? I could get translators

@HarpyWar
Copy link
Member Author

Sure, it is preferred to convert text by using code. I will write it when I start work on this part of PvPGN.

Do you know people who can do translation of the texts? We need these languages:

        case GAMELANG_ENGLISH_UINT: /* enUS */
        case GAMELANG_GERMAN_UINT:  /* deDE */
        case GAMELANG_CZECH_UINT:   /* csCZ */
        case GAMELANG_SPANISH_UINT: /* esES */
        case GAMELANG_FRENCH_UINT:  /* frFR */
        case GAMELANG_ITALIAN_UINT: /* itIT */
        case GAMELANG_JAPANESE_UINT:    /* jaJA */
        case GAMELANG_KOREAN_UINT:  /* koKR */
        case GAMELANG_POLISH_UINT:  /* plPL */
        case GAMELANG_RUSSIAN_UINT: /* ruRU */
        case GAMELANG_CHINESE_S_UINT:   /* zhCN */
        case GAMELANG_CHINESE_T_UINT:   /* zhTW */

@RElesgoe
Copy link
Member

I can get English, German, Spanish, French, Italian, (maybe Korean, not reliable), Polish, Russian translations out of all of those languages from that list. Czech translators shouldn't be difficult to find(I think). I wonder why we support languages like Czech and Japanese, I don't think that their player population on PvPGN servers are big enough to warrant translations

@HarpyWar
Copy link
Member Author

Very well. I'll let you know when the files for translation will be ready.

@RElesgoe
Copy link
Member

I found a Japanese translator

@RElesgoe
Copy link
Member

RElesgoe commented Jun 1, 2014

I have a Czech translator now

@RElesgoe
Copy link
Member

We should only support languages that the games support. So PvPGN's supported languages should become German, English, French, Italian, Korean, Polish, Russian, and Chinese. It should be understandable to include a few other languages such as Spanish

@HarpyWar
Copy link
Member Author

I think all the languages, for which MOTD translated, have their games.

I see Spanish, Czech and Japanese in Warcraft 3 patch list http://ftp.blizzard.com/pub/war3x/patches/pc/

And there is Portuguese for Starcraft

@RElesgoe
Copy link
Member

Odd, I didn't see them when I looked at the language list
image

HarpyWar added a commit that referenced this issue Jun 23, 2014
@Danteoriginal
Copy link

error in compilation
error in compilation

You could solve the error please

Thanks for contributing your wonderful work
Regards

@HarpyWar
Copy link
Member Author

@Danteoriginal, It looks like your Visual Studio detects languages array as a function definition without argument list http://msdn.microsoft.com/en-us/library/4k954cff.aspx
I don't know why you receive this error, but now you can ignore two yesterday commits. Actually, it doesn't add a new functionality, because not completed yet.

BTW, are you Dante from the above screenshot? If yes, what is the language of your Starcraft? I assume it is Spanish, but why motd is Portuguese?

HarpyWar added a commit that referenced this issue Jun 28, 2014
HarpyWar added a commit that referenced this issue Jun 28, 2014
@HarpyWar
Copy link
Member Author

@xboi209, localization is still incomplete, but files are prepared for a translation. I just add notes about it https://github.com/HarpyWar/pvpgn/wiki/Localization-Tutorial

Will your translaters localize it directly on github or through your commits?

@RElesgoe
Copy link
Member

Some of my translators will use Github, others will just copy and paste it to me.
Are the LUA functions required for the localization?

@HarpyWar
Copy link
Member Author

Ok. We need only translations from the directory https://github.com/HarpyWar/pvpgn/tree/master/conf/i18n (including strings from Lua that are in common.xml)
No needed translate it in code. But if you found an error in english, you have to fix this string in code and in all common.xml files.

@RElesgoe
Copy link
Member

Can you write in comments next to the original text about the full usage of it? My translators need context and one or two word phrases are too short to understand its usage.

@HarpyWar
Copy link
Member Author

common.xml generates automatically with a program https://github.com/HarpyWar/pvpgn/tree/master/scripts/localize. Otherwise it will be too hard do not forgot add all strings and next changes synchronization, because of a lot of strings.

There are file and function saved for each string. If the usage is not clear translator should open source file and look in the function.

@RElesgoe
Copy link
Member

#37

@RElesgoe
Copy link
Member

There needs to be 2 separate files for Chinese Simplified and Chinese Traditional

HarpyWar added a commit that referenced this issue Jun 29, 2014
@HarpyWar
Copy link
Member Author

Yes, there are already 2 separate files for these.

@RElesgoe
Copy link
Member

oops, I didn't see that earlier

@RElesgoe
Copy link
Member

jpJA should be copied

@Danteoriginal
Copy link

yes iam ,harpywar
iam view bug in /con all colapse server,server shutdown

I solved well http://pastebin.com/zu8kvajx

regards,wonderful working

@HarpyWar
Copy link
Member Author

HarpyWar commented Jul 3, 2014

@Danteoriginal, so why Starcraft is Spanish but MOTD is Portuguese on your screenshot?

Please create a pull request for this code and describe what does it fix.

@RElesgoe
Copy link
Member

RElesgoe commented Jul 3, 2014

I think PvPGN is displaying Portuguese because that's the language his OS is set to. I believe that a certain packet sends that piece of info to PvPGN.
https://bnetdocs.org/?op=packet&pid=279

@Danteoriginal
Copy link

harpywar my starcraft is spanish, Error text in the last paragraph in the mod
the other mod text is correct

then describe what is what solved.
Danteoriginal/pvpgn@5cfd759

sorry for my bad english

@HarpyWar
Copy link
Member Author

HarpyWar commented Jul 8, 2014

@xboi209 Yes, game client sends a country from OS. But motd shows by the game language. It works fine for Warcraft 3, but most Starcraft players use English client.
I will create an option in config localize_by_country = true to get language by a country instead of a game. And a new command /language enUS (alias /lang) to allow user force set his language (for example USA people in Russia, or Russian people use English client).

@Danteoriginal Thanks, I fixed the error. Please create a new issue for each bug that you found.

@HarpyWar HarpyWar mentioned this issue Jul 8, 2014
@HarpyWar HarpyWar added high and removed high labels Jul 8, 2014
HarpyWar added a commit that referenced this issue Jul 9, 2014
HarpyWar added a commit that referenced this issue Jul 10, 2014
HarpyWar added a commit that referenced this issue Jul 10, 2014
@HarpyWar
Copy link
Member Author

@xboi209 I removed files that are not translated yet. I see a button Create a new file in Github interface, so translators can create a new files according to original filenames.
news.txt should not be translated.

@RElesgoe
Copy link
Member

Why can the contents of bnmotd.txt be sent to the user without any conversion? Do we really need those conversion functions?

@HarpyWar
Copy link
Member Author

I think it relates only to a russian text due to its non standard encoding.

@RElesgoe
Copy link
Member

Why isn't Diablo 2 and WarCraft 3 included in the last commit?

@HarpyWar
Copy link
Member Author

Diablo 2 and Warcraft 3 use UTF-8 by default - no need to change encoding there.

@HarpyWar
Copy link
Member Author

Localization is complete. Waiting for translations.

@RElesgoe RElesgoe mentioned this issue Feb 11, 2015
Merged
RElesgoe added a commit that referenced this issue May 23, 2016
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