-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Russian translation for number of civilizations too long #11440
Comments
Sounds like this can be solved with a shorter translation for min/max number of civilizations - any suggestions? |
I am grateful to you for consulting with me :) I am more used to relying on developers, they better understand how to fix the flaw. I think that a shorter translation of some settings would be the best solution to this problem |
Translators often do not really search for the context, so in a way they're not to blame. Possibilities:
Footnotes
|
If this shortcoming cannot be corrected in any way, then it’s not scary :) |
Index: core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt b/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt
--- a/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt (revision 2193e24364612b177ae61db889dacea5946f2939)
+++ b/core/src/com/unciv/ui/screens/newgamescreen/GameOptionsTable.kt (date 1713520566927)
@@ -30,6 +30,7 @@
import com.unciv.ui.components.widgets.ExpanderTab
import com.unciv.ui.components.widgets.TranslatedSelectBox
import com.unciv.ui.components.widgets.UncivSlider
+import com.unciv.ui.components.widgets.WrappableLabel
import com.unciv.ui.images.ImageGetter
import com.unciv.ui.popups.Popup
import com.unciv.ui.screens.basescreen.BaseScreen
@@ -273,6 +274,8 @@
update() // To see the changed sliders
}
+ private fun getColumnWidth() = previousScreen.stage.width * (if (isPortrait) 1f else 0.333f)
+
private fun Table.addLinkedMinMaxSliders(
minValue: Int, maxValue: Int,
minText: String, maxText: String,
@@ -304,9 +307,15 @@
}
maxSlider.isDisabled = locked
- add(minText.toLabel()).left().expandX()
+ val wrapWidth = getColumnWidth() * 0.6f
+ fun addWrappedLabel(text: String) {
+ val label = WrappableLabel(text, wrapWidth)
+ add(label).maxWidth(wrapWidth).left().expandX()
+ label.wrap = true
+ }
+ addWrappedLabel(minText)
add(minSlider).padTop(10f).row()
- add(maxText.toLabel()).left().expandX()
+ addWrappedLabel(maxText)
add(maxSlider).padTop(10f).row()
} ... the usual Label in Table and wrap will report prefWidth 0 which in turn ... That old kludge class just happened to work. Should try calling its optimizePrefWidth though, that's not automatic. Also maybe try a cleverer wrap width, with 60% column the sliders are still incomplete, haven't looked for what determines their min width... Opinions? |
Is there an existing issue for this?
Game Version
4.11.3
Describe the bug
The game menu interface in Russian is displayed incorrectly and inconveniently. When you go to Unciv and click create a new game, the columns for choosing parameters: basic set of rules, difficulty, game speed, initial era, as well as the minimum and maximum number of civilizations, city-states, begin to shift. You have to swipe your finger to the left to scroll the menu to the side. In this case, you must select the Russian interface language.
If you switch the menu language to English, this problem also appears, but not so much. This applies to the first two columns when setting up the game.
Steps to Reproduce
Screenshots
Link to save file
No response
Operating System
Android
Additional Information
No response
The text was updated successfully, but these errors were encountered: