Localization #13

Closed
opened 2014-05-04 00:56:56 -06:00 by HarpyWar · 43 comments
HarpyWar commented 2014-05-04 00:56:56 -06:00 (Migrated from github.com)

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

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 commented 2014-05-04 10:23:12 -06:00 (Migrated from github.com)

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.

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 commented 2014-05-04 11:32:36 -06:00 (Migrated from github.com)

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.

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 commented 2014-05-25 04:12:53 -06:00 (Migrated from github.com)

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.

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](https://cloud.githubusercontent.com/assets/1132835/3076690/a2e1e96a-e3f4-11e3-9259-87d723c7ee0e.gif) The same conversion can be made in code. It is needed to write two functions `cp1251_to_cp1252` and `cp1252_to_utf8`.
RElesgoe commented 2014-05-25 09:49:22 -06:00 (Migrated from github.com)

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

I prefer to do convert it by using code to keep the original text, could you write those functions? I could get translators
HarpyWar commented 2014-05-25 23:41:49 -06:00 (Migrated from github.com)

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 */
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 commented 2014-05-26 02:00:41 -06:00 (Migrated from github.com)

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

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 commented 2014-05-26 03:26:19 -06:00 (Migrated from github.com)

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

Very well. I'll let you know when the files for translation will be ready.
RElesgoe commented 2014-05-28 09:42:33 -06:00 (Migrated from github.com)

I found a Japanese translator

I found a Japanese translator
RElesgoe commented 2014-06-01 17:19:04 -06:00 (Migrated from github.com)

I have a Czech translator now

I have a Czech translator now
RElesgoe commented 2014-06-16 14:05:13 -06:00 (Migrated from github.com)

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

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 commented 2014-06-17 01:31:20 -06:00 (Migrated from github.com)

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

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 ![](http://forums.harpywar.com/extensions/hcs_image_uploader/uploads/0/6000/6354/p18otvlt0411na9c91ht4objsgg1.png)
RElesgoe commented 2014-06-17 14:41:37 -06:00 (Migrated from github.com)

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

Odd, I didn't see them when I looked at the language list ![image](https://cloud.githubusercontent.com/assets/1463845/3306279/9662a2e2-f65f-11e3-833b-3ef46681d870.png)
Danteoriginal commented 2014-06-23 09:14:58 -06:00 (Migrated from github.com)

error in compilation
error in compilation

You could solve the error please

Thanks for contributing your wonderful work
Regards

error in compilation ![error in compilation](https://cloud.githubusercontent.com/assets/7907499/3359507/eb901b5e-fae8-11e3-98c2-173e0df456b2.png) You could solve the error please Thanks for contributing your wonderful work Regards
HarpyWar commented 2014-06-23 10:02:12 -06:00 (Migrated from github.com)

@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?

@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 commented 2014-06-28 13:01:19 -06:00 (Migrated from github.com)

@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?

@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 commented 2014-06-28 13:56:28 -06:00 (Migrated from github.com)

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

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 commented 2014-06-28 14:13:09 -06:00 (Migrated from github.com)

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.

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 commented 2014-06-28 14:31:44 -06:00 (Migrated from github.com)

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.

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 commented 2014-06-28 14:40:18 -06:00 (Migrated from github.com)

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.

`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 commented 2014-06-28 17:40:08 -06:00 (Migrated from github.com)

#37

#37
RElesgoe commented 2014-06-28 17:42:53 -06:00 (Migrated from github.com)

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

There needs to be 2 separate files for Chinese Simplified and Chinese Traditional
HarpyWar commented 2014-06-29 02:53:39 -06:00 (Migrated from github.com)

Yes, there are already 2 separate files for these.

Yes, there are already 2 separate files for these.
RElesgoe commented 2014-06-29 03:21:14 -06:00 (Migrated from github.com)

oops, I didn't see that earlier

oops, I didn't see that earlier
RElesgoe commented 2014-06-29 03:22:35 -06:00 (Migrated from github.com)

#38

#38
RElesgoe commented 2014-06-29 17:59:47 -06:00 (Migrated from github.com)

#39

#39
RElesgoe commented 2014-06-29 18:02:03 -06:00 (Migrated from github.com)

Italian, Korean, Chinese Simplified, Chinese Traditional, and possibly Japanese translators are still needed

Italian, Korean, Chinese Simplified, Chinese Traditional, and possibly Japanese translators are still needed
HarpyWar commented 2014-06-29 23:48:45 -06:00 (Migrated from github.com)

I just reorganized localization files structure. Files that are needed for translation are in root of the directory and they should be saved with the same names in a language directory. https://github.com/HarpyWar/pvpgn/tree/master/conf/i18n

Are translators use Github interface to edit files or normal Git program? If first, please specify languages for which language directories should I duplicate these files, so they will be available to edit from Github interface.

I just reorganized localization files structure. Files that are needed for translation are in root of the directory and they should be saved with the same names in a language directory. https://github.com/HarpyWar/pvpgn/tree/master/conf/i18n Are translators use Github interface to edit files or normal Git program? If first, please specify languages for which language directories should I duplicate these files, so they will be available to edit from Github interface.
RElesgoe commented 2014-06-29 23:55:50 -06:00 (Migrated from github.com)

They're using Github's interface

They're using Github's interface
HarpyWar commented 2014-06-29 23:59:31 -06:00 (Migrated from github.com)

I don't know how it works. Is is possible to add many files in pull request there, and how my last commit affected to the current pull requests?

I don't know how it works. Is is possible to add many files in pull request there, and how my last commit affected to the current pull requests?
RElesgoe commented 2014-06-30 00:04:53 -06:00 (Migrated from github.com)

Yes it's possible to add multiple files in a Pull Request. With your last commit, I'm not sure how the Pull Requests will work. I remember having trouble when I was making Pull Requests to this SVN when my local copy and your current copy were out of sync.
Just wait and we'll see what happens, copying and pasting the whole files wouldn't that hard for us anyways if the Pull Requests don't work.

Yes it's possible to add multiple files in a Pull Request. With your last commit, I'm not sure how the Pull Requests will work. I remember having trouble when I was making Pull Requests to this SVN when my local copy and your current copy were out of sync. Just wait and we'll see what happens, copying and pasting the whole files wouldn't that hard for us anyways if the Pull Requests don't work.
HarpyWar commented 2014-06-30 00:19:54 -06:00 (Migrated from github.com)

Well, now I'm copying files into directories csCZ, deDE, esES, frFR, itIT, plPL, ruRU and ignoring bgBG, jpJA, koKR, nlNL, ptBR, svSE, zhCN, zhTW. Right?

Well, now I'm copying files into directories `csCZ, deDE, esES, frFR, itIT, plPL, ruRU` and ignoring `bgBG, jpJA, koKR, nlNL, ptBR, svSE, zhCN, zhTW`. Right?
RElesgoe commented 2014-06-30 00:22:53 -06:00 (Migrated from github.com)

jpJA should be copied

`jpJA` should be copied
Danteoriginal commented 2014-07-03 03:51:28 -06:00 (Migrated from github.com)

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

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

regards,wonderful working

yes iam ,harpywar iam view bug in /con all colapse server,server shutdown I solved well http://pastebin.com/zu8kvajx regards,wonderful working
HarpyWar commented 2014-07-03 16:12:35 -06:00 (Migrated from github.com)

@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.

@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 commented 2014-07-03 17:03:41 -06:00 (Migrated from github.com)

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

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 commented 2014-07-07 02:43:07 -06:00 (Migrated from github.com)

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.
5cfd759942

sorry for my bad english

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. https://github.com/Danteoriginal/pvpgn/commit/5cfd759942576c1cb415fbc7715e21505dcfb19f sorry for my bad english
HarpyWar commented 2014-07-08 01:48:23 -06:00 (Migrated from github.com)

@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.

@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 commented 2014-07-10 14:57:14 -06:00 (Migrated from github.com)

@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.

@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 commented 2014-07-13 14:40:43 -06:00 (Migrated from github.com)

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

Why can the contents of `bnmotd.txt` be sent to the user without any conversion? Do we really need those conversion functions?
HarpyWar commented 2014-07-16 12:41:43 -06:00 (Migrated from github.com)

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

I think it relates only to a russian text due to its non standard encoding.
RElesgoe commented 2014-07-16 16:38:07 -06:00 (Migrated from github.com)

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

Why isn't Diablo 2 and WarCraft 3 included in the last commit?
HarpyWar commented 2014-07-17 00:28:38 -06:00 (Migrated from github.com)

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

Diablo 2 and Warcraft 3 use UTF-8 by default - no need to change encoding there.
HarpyWar commented 2014-07-20 01:45:23 -06:00 (Migrated from github.com)

Localization is complete. Waiting for translations.

Localization is complete. Waiting for translations.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Techwizz/pvpgn-server#13
No description provided.