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

When changing the game language, only some lines change #45238

Closed
TheLightTwist opened this issue Nov 4, 2020 · 22 comments · Fixed by #48176
Closed

When changing the game language, only some lines change #45238

TheLightTwist opened this issue Nov 4, 2020 · 22 comments · Fixed by #48176
Assignees
Labels
<Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. OS: Windows Issues related to Windows operating system Translation I18n

Comments

@TheLightTwist
Copy link

TheLightTwist commented Nov 4, 2020

Game version: 0.E-2

Operating system: Win 10 ver. 2004

Tiles or curses: Tiles

Mods active: none

Expected behavior

Almost the entire text (at least for the Russian language) should become translated

Actual behavior

image
image

When selecting any language (including the system language) other than English, not the entire text changes, but only some parts.
MOTD and Title change.
Also, when you create a character, in the last menu (where you enter a name), when you press a button for random generation, the generated names also come out translated.
All other text is NOT changed, i.e. the text in the main menu, in the settings, during the game in all windows.
Also, when the \lang directory is completely deleted, the language is still English, but the language of the randomly generated character names remains according to the settings (i.e. the names are generated translated). MOTD and Title also remain translated.

Steps to reproduce the behavior

  1. Install any Russian language with variation for the country in Windows language settings (i.e. there is "Russian", "Russian (Ukraine)", "Russian (Kazakhstan)" - install any Russian with text in brackets);
  2. Make this installed "Russian (anything)" your system language (or move to the top of the list if you have more than one language installed);
  3. After starting the game, you will get a similar problem.

Accordingly, to solve the problem, it is necessary that your system language is ordinary Russian (WITHOUT brackets text).
The problem is NOT affected by:

  • the number of installed languages;
  • presence/absence of ordinary Russian in the system if this language is not selected as the system language;
  • the country of the language you have chosen as the system language (i.e., the problem will be with both the system language "Russian (Ukraine)" and "Russian (Kazakhstan/Belarus, etc.)")

The problem arises on both a stable release and an experimental one (both x86 and x64)

@ZhilkinSerg
Copy link
Contributor

Do not delete lang subdir - translations are there.

@TheLightTwist
Copy link
Author

TheLightTwist commented Nov 4, 2020

Do not delete lang subdir - translations are there.

I am aware of this, I deleted this directory to check the reaction of the game.
Ideally, the game when you delete the directory \lang should become fully English, but for some reason the character names continue to be generated in Russian (if you choose Russian in the settings), perhaps because the name lines are in a different place.

@TheLightTwist
Copy link
Author

By the way, I found a person with the same problem. He did, however, have it under Linux.
https://www.linux.org.ru/forum/games/12726445

@TheLightTwist
Copy link
Author

The problem was solved and a way of its reproduction was found (however, testing was conducted only with Russian and English languages):

  1. Install any Russian language with variation for the country in Windows language settings (i.e. there is "Russian", "Russian (Ukraine)", "Russian (Kazakhstan)" - install any Russian with text in brackets);
  2. Make this installed "Russian (anything)" your system language (or move to the top of the list if you have more than one language installed);
  3. After starting the game, you will get a similar problem.

Accordingly, to solve the problem, it is necessary that your system language is ordinary Russian (WITHOUT brackets text).
The problem is NOT affected by:
the number of installed languages;
presence/absence of ordinary Russian in the system if this language is not selected as the system language;
the country of the language you have chosen as the system language (i.e., the problem will be with both the system language "Russian (Ukraine)" and "Russian (Kazakhstan/Belarus, etc.)")

Soon, I will have access to another device on Windows 10, as well as on Windows 7, and I will try to reproduce the problem on them.

Two images showing the correct and wrong order:

Correct
Верно

Wrong:
Неверно

@TheLightTwist
Copy link
Author

It is better to wait for a response from the developers, and then close.

@ZhilkinSerg
Copy link
Contributor

Select translation language explicitly in game settings instead of using "System" language.

image

image

Obviously if you are using "Russian (Ukraine)" language - translation for it won't be found as there is only "Russian" translation.

@TheLightTwist
Copy link
Author

TheLightTwist commented Nov 4, 2020

@ZhilkinSerg It seems that you have misunderstood me.
I already tried to change the language settings in the game, but no matter which language I chose, only the MOTD and Title languages changed. That is, the localization did not work for all languages at all, not just for Russian. After changing the system language, strange as it may seem, the localization switching started to work not only for Russian, but for all languages as well.

@Aivean
Copy link
Contributor

Aivean commented Nov 5, 2020

Can you please try to reproduce this in the latest experimental build?

@TheLightTwist
Copy link
Author

@Aivean
Yes, the problem is also present in the experimental build (0.E-7347-g20d1078)
All languages have a problem, Chinese is selected in the screenshot:
image

@Aivean
Copy link
Contributor

Aivean commented Nov 5, 2020

Weird, seems to be platform-specific issue, I cannot reproduce it on mac:
language

Must be something in set_language that isn't entirely correct for Windows.

I wonder if the person on arch linux actually encountered the same issue or it just had same symptoms. Seems like their issue was with localization folder path, not with system language.

@Aivean Aivean added (S1 - Need confirmation) Report waiting on confirmation of reproducibility <Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. OS: Windows Issues related to Windows operating system Translation I18n labels Nov 5, 2020
@jbytheway
Copy link
Contributor

@TheLightTwist can you please post the contents of your debug.log when launching the game in one language setting that works and another that doesn't? Some of the things that might go wrong here would lead to error messages in the log.

@TheLightTwist
Copy link
Author

@jbytheway
Sure!
Here they are
fine.log
error.log

@jbytheway
Copy link
Contributor

That's odd. Your logs don't have a [translations] C locale set to message, which should come right after the Language is set to: message. I can't see how you could get one without the other...

@Aivean
Copy link
Contributor

Aivean commented Nov 21, 2020

That's odd. Your logs don't have a [translations] C locale set to message, which should come right after the Language is set to: message. I can't see how you could get one without the other...

Perhaps _WIN32 is not defined for some reason?

@jbytheway
Copy link
Contributor

@TheLightTwist did you compile the code yourself, or use the Windows release binaries? If the former, what environment did you use?

@TheLightTwist
Copy link
Author

@jbytheway

Windows release binaries

@int-ua
Copy link
Contributor

int-ua commented Jan 14, 2021

Not all translations are stored in the lang folder, look at data/names for example. Also I have this [slightly outdated] bash script that I usually run after downloading a new version, it might help the script was deleted as I no longer think it's relevant.

@int-ua
Copy link
Contributor

int-ua commented Jan 14, 2021

Please update the main description to better reflect current status.

@int-ua int-ua removed the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Jan 14, 2021
@TheLightTwist
Copy link
Author

Please update the main description to better reflect current status.

Updated as much as I could and understood

@BrettDong BrettDong self-assigned this Jan 18, 2021
@BrettDong
Copy link
Member

Don't know if this is related but I want to post it there: I was reading Microsoft Windows Language Code Identifier Reference, and found that Russian (Russia) has LCID 0x0x419, but other variants like Russian (Belarus), Russian (Kazakhstan), Russian (Kyrgyzstan), Russian (Ukraine) are recently added in Windows 10 and they do not have a valid LCID, i.e. they are assigned to a dummy LCID 0x1000.

@zimojiang-qitian
Copy link

很奇怪,似乎是特定于平台的问题,我无法在Mac上重现它:
语言

必须是Windows并不完全正确的东西set_language

我想知道arch linux上的人实际上是否遇到了相同的问题,或者只是出现了相同的症状。似乎他们的问题出在本地化文件夹路径,而不是系统语言。

我使用Arch Linux,将游戏中的语言切换为中文(天朝)发现除了标题和MODI,其他部分依然是英文。

@BrettDong
Copy link
Member

我使用Arch Linux,将游戏中的语言切换为中文(天朝)发现除了标题和MODI,其他部分依然是英文。

  1. 你有没有运行lang/compile_mo.sh all编译翻译文件?

  2. LANG=zh_CN ./cataclysm运行游戏能否正常显示汉化?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. OS: Windows Issues related to Windows operating system Translation I18n
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants