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

Fixed width calculation of translatable strings in the sidebar #30121

Merged

Conversation

AMurkin
Copy link
Contributor

@AMurkin AMurkin commented Apr 30, 2019

Summary

SUMMARY: Bugfixes "Fixed width calculation of translatable strings in the sidebar"

Purpose of change

string.length() used to get lengths of translatable strings made them use empty space in the sidebar.
utf8_width should've been used on them.

Describe the solution

Use utf8_width for translatable strings.
No changes for the sidebar view with language set to English.

Place Before After
Temp/Arrow - EN image image
Temp/Arrow - RU image image
Thermometer - EN image image
Thermometer - RU image image
Hint - EN image image
Hint - RU image image

Describe alternatives you've considered

None

Additional context

Translation of the wind description on the images is unrelated to this PR but shows the difference.
There is no difference in the "Thermometer - RU" because this string in Russian translation is the same as untranslated string.

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) Info / User Interface Game - player communication, menus, etc. Translation I18n labels Apr 30, 2019
@ZhilkinSerg ZhilkinSerg merged commit 43b8e97 into CleverRaven:master Apr 30, 2019
@AMurkin AMurkin deleted the fix-width-for-printable-strings branch May 1, 2019 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Info / User Interface Game - player communication, menus, etc. Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants