Localized strings doesn'tfit in the available place

Bug #1371905 reported by megaus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

Operating system: Linux/XFCE
OS-language: Hungarian
WideLands version: build 18(Release)

If Widelands interface language is switched to a non-English language then some strings does/may not fit in the available place (e.g. on buttons).
On the attached screenshot you can see the buggy appearance of New Map window of Map Editor (Hungarian). The screenshot is only an example of the issue, the problem exist in several places...

The dynamic sizing (in runtime) of windows, buttons, statictexts and other controls depending on calculated text-width would be a good solution.

Related branches

Revision history for this message
megaus (megaus) wrote :
Revision history for this message
GunChleoc (gunchleoc) wrote :

Can you give me a list of the affected windows, so I can track them down faster?

Since we don't have dynamic sizing yet, I can make these wider for everybody.

Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: New → Confirmed
Revision history for this message
megaus (megaus) wrote :

I found the below listed windows problematic with the main menu font selected by Widelands: DejaVuSerif (Default)

Widelands:
  --> Options: If "Try system language" is localized it's end may be covered (e.g. for Hungarian)
      --> Advanced Options: the end of "Main menu font" names are partially covered
  --> Multi Player
      --> Internet game: not enough (e.g. for Hungarian). This window should be full screen (similar to LAN game setup) instead of a "in-game"-like window
Map Editor:
  --> Main menu : It is barely enough (e.g. for Hungarian, but for English too)
      --> New map: not enough width (e.g. for Hungarian)
      --> Random map: map id cannot fit in the space, this is for all languages beacause the id is not language relataed text
      --> Load map: the end of some (English) map names are covered, this is for all languages beacause names can be in any language
      --> Save map: the end of some (English) map names are covered, this is for all languages beacause names can be in any language;
                    also the button for directory creation is not enough (e.g. for Hungarian, but English too)
      --> Map setting: barely enough (e.g. for Hungarian)

After all I think that font settings may need some review: to allow to select font size by the user would be a good option.

Revision history for this message
megaus (megaus) wrote :

Problematic windows while playing:

  --> Settings
      --> Sound settings: not enough (e.g for Hungarian)
  --> Statistics
    --> Building statistics: not enough column width of names, barely enough for column headers (e.g for Hungarian, but English too)
    --> Ware statistics: times on the bottom doesn't fit (e.g. for Hungarian, but English too)
  --> Ware help: caption of "Quantity" button doesn't fit (e.g. for Hungarian, but English too)
  --> Building ptoperties (after clicking on a building): barely enough

... and may be others.

Again: I am using the default font selected by Widelands: DejaVuSerif (Default)

Changed in widelands:
status: Confirmed → Invalid
status: Invalid → Confirmed
Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for the list!

I have fixed New Map, Save Map and Load Map in the editor.

For the rest some of them still need fixing, a lot have already been fixed afte Build 18. Since you're on Linux, it would be best for testing to compile yourself if you know how to do that. Instructions here:

https://wl.widelands.org/wiki/Building%20Widelands/

Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
megaus (megaus) wrote :

compile.sh executed without error, but with a lot of warnings related to source code
make install executed without error

widelands starts from ~/widelands-test
but when I'm trying to start a new game or the map editor the following message appears (in terminal too):

Game data error
reading basic info for tribe "atlanteans": [/home/widelands/src/scripting/lua_errors.h:29] [string "tribes/atlanteans/scripting/sc00_headquarters..."]:5: attempt to call global 'use' (a nil value)

In terminal I see the following line:
Adding directory:/usr/share/games/widelands

Is it possible that the installed stable 18 release confuses the development/test version?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Most of the compiler warnings are about the annoying printf with %p thing that shouldn't be a warning.

You could try deleting build18 and cleaning ~/.widelands

How did you start Widelands? I usally do:

./compile.sh
./widelands

I don't do make install at all.

Revision history for this message
SirVer (sirver) wrote :

The problem you run into here is https://bugs.launchpad.net/bugs/1342228. Feel free to fix that first :P.

Or use --datadir= to point to your bzr working directory.

Revision history for this message
megaus (megaus) wrote :

SirVer:
 Thanks for the information!

GunChleoc:
I tried "make install" using CMAKE_INSTALL_PREFIX because I've got the above message after the start of the freshly compiled widelands.
After testing (bzr7184) I can say what you said about the windows: "some of them still need fixing, a lot have already been fixed"

Revision history for this message
GunChleoc (gunchleoc) wrote :

I have done some more tweaks for the editor load/save game dialogs. How do we wish to handle map names in the editor, localize them or keep them as they are?

I think it might be a good idea to keep them in English here, because that's the name they will be published with. The user can still choose any language for their personal maps.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Remaining issues are fixed in https://code.launchpad.net/~widelands-dev/widelands/bug-1371905_2. Thanks for reporting and testing!

Resizeable fonts is a good idea, but as long as we don't have full dynamic width according to string length, this would create too many complications with strings not fitting.

Would you be interested in helping with the Hungarian translation? Instructions are here: https://wl.widelands.org/wiki/TranslatingWidelands/

There have been some recent changes with building and ware names, so the best thing for you would probably be to update the translation dictionary first. https://wl.widelands.org/wiki/TranslationDictionaryHungarian/

A list of the recent name changes can be found here: https://wl.widelands.org/wiki/Terminology%20Correspondence%20Table/

Revision history for this message
megaus (megaus) wrote :

I tested the branch bug-1371905_2 and I found fitting/sizing issue in widelands /options:
- "Maximum FPS:" decrease/increase buttons seems to be too small and the number is below them
- "Save game automaticaly every" decrease/increase buttons are too close and covers the string between them
- "Remove replays older than" decrease/increase buttons are too close and covers the string between them

Revision history for this message
GunChleoc (gunchleoc) wrote :

I can't reproduce that, for me it looks like the attached screenshot

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
GunChleoc (gunchleoc) wrote :

@megaus: Do you still get your problem?

You can go on testing this on trunk now, since the branches have been merged.

Changed in widelands:
milestone: none → build19-rc1
Revision history for this message
megaus (megaus) wrote :

The results now is the same as I mentioned earlier in the #12 comment (+ one more). Then I was testing the bug-resolving branch merged with the trunk (using bzr merge command). A similar merged version seems to be in the trunk now: bzr7194(Debug).

Take a look at the attached screen shot(s)!

Revision history for this message
megaus (megaus) wrote :

In this dialog the height of buttons are not enough or the fonts size used in the program everywhere is too big. This is a matter of opinion. If a font size looks good and is readable on a big resolution (1920x1080) will be annoying on 1024x768... This is why I said that to allow to select font size by the user would be a good option.

Revision history for this message
GunChleoc (gunchleoc) wrote :

#16 is a problem at any resolution - I see what you're getting at now. The labels need to be higher, which shouldn't be a problem once I find the code responsible.

I can't test #15, because my screen is too small, so I've created a new bug for it:

https://bugs.launchpad.net/widelands/+bug/1375869

GunChleoc (gunchleoc)
Changed in widelands:
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.