Jump to content

Custom localization: item/food names in building internal storage are truncated to 2–3 characters due to specific prefix


Maris
  • Branch: Live Branch Version: Windows Fixed

When using a custom localization (via strings.po, it's attached), item and food names displayed in the internal storage panel of buildings are severely truncated, showing only 2–3 visible characters instead of the full name.

The root cause appears to be that a <sub>x</sub> tag (where x is a single letter) is prepended to each item name in this localization. This issue **only** affects the internal storage view of buildings.
image.png.5b8d463c311269e2712fba0e9e2a77d6.png
image.png.456ad3828902a7671d6a21319e86d800.png
image.png.db832a5280ded1717967a20fa9830044.png


Steps to Reproduce

1. Apply a custom localization that uses translated item/food names (load the attached strings.po).
2. Start a new game (or load the attached save file, doesn't matter).
3. Open a building's internal storage panel.
4. Observe that item/food names are truncated to 2–3 characters.

Expected result: Item names are displayed in full (or truncated reasonably).
Actual result: Names are reduced to 2–3 visible characters.




User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

Note that there are full category names, but truncated element names.
image.png.c7a2872618e8f2b6ce652149d4808589.png

This is a bug for sure.

Share this comment


Link to comment
Share on other sites

Russian localization from Klei:
image.png.3bff8cbb1cfbc462cf0f7e9ff4e744c5.png

I guess the length is counted by bytes, not by visible characters.
(Russian UTF8 letter are counted as 2 bytes)
ALSO any tags like <sub> or <sup> are counted as 5 bytes each.

I think the proper way is to count line width, not bytes and not even letters.

Again, localization from Klei:

image.png.6e643f047e7c065b59533f82b31e8c45.png

Share this comment


Link to comment
Share on other sites

This really does seem like an issue: some names don't fit in the line, even though there is still space in the card for the characters and the name of the dropdown list fits completely. It looks strange, and it would be great if you could fix this.

image1.png.d66797f98d9a1f434f822948984d116b.pngimage2.png.4b035ad6c7b335a2b898ced55e18eb0f.png

  • Like 1

Share this comment


Link to comment
Share on other sites

The fonts in the game have changed, but the bug that affects all localizations (including English) remains. Hm...

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...