Fix floodfill abbreviation translation showing on fortify key tooltips (#6909)

* Fix floodfill abbreviation translation showing on fortify key tooltips

* Fix floodfill abbreviation translation - fix case

* Fix floodfill abbreviation translation - existing and comment
This commit is contained in:
SomeTroglodyte 2022-05-25 18:39:08 +02:00 committed by GitHub
parent 392a8d5de9
commit e1b76e776d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 12 deletions

View File

@ -881,9 +881,8 @@ Land or water only =
# Requires translation! # Requires translation!
Brush ([size]): = Brush ([size]): =
# The letter shown in the [size] parameter above for setting "Floodfill" # The letter shown in the [size] parameter above for setting "Floodfill"
# Requires translation! Floodfill_Abbreviation = F
F = # Requires translation!
# Requires translation!
Error loading map! = Error loading map! =
# Requires translation! # Requires translation!
Map saved successfully! = Map saved successfully! =

View File

@ -485,7 +485,7 @@ Land or water only = Terre ou eau seulement
## Labels/messages ## Labels/messages
Brush ([size]): = Pinceau ([size]) : Brush ([size]): = Pinceau ([size]) :
# The letter shown in the [size] parameter above for setting "Floodfill" # The letter shown in the [size] parameter above for setting "Floodfill"
F = R Floodfill_Abbreviation = R
Error loading map! = Erreur de chargement de la carte ! Error loading map! = Erreur de chargement de la carte !
Map saved successfully! = Carte sauvegardée avec succès ! Map saved successfully! = Carte sauvegardée avec succès !
Current map RNG seed: [amount] = Graine RNG de la carte actuelle : [amount] Current map RNG seed: [amount] = Graine RNG de la carte actuelle : [amount]

View File

@ -485,7 +485,7 @@ Land or water only = Nur Land/Wasser
## Labels/messages ## Labels/messages
Brush ([size]): = Pinsel ([size]): Brush ([size]): = Pinsel ([size]):
# The letter shown in the [size] parameter above for setting "Floodfill" # The letter shown in the [size] parameter above for setting "Floodfill"
F = A Floodfill_Abbreviation = A
Error loading map! = Fehler beim Laden der Karte Error loading map! = Fehler beim Laden der Karte
Map saved successfully! = Karte erfolgreich gespeichert! Map saved successfully! = Karte erfolgreich gespeichert!
Current map RNG seed: [amount] = Seed der aktuellen Karte: [amount] Current map RNG seed: [amount] = Seed der aktuellen Karte: [amount]

View File

@ -485,7 +485,7 @@ Land or water only = Darat atau air saja
## Labels/messages ## Labels/messages
Brush ([size]): = Kuas ([size]): Brush ([size]): = Kuas ([size]):
# The letter shown in the [size] parameter above for setting "Floodfill" # The letter shown in the [size] parameter above for setting "Floodfill"
F = I Floodfill_Abbreviation = I
Error loading map! = Pemuatan peta tidak berhasil! Error loading map! = Pemuatan peta tidak berhasil!
Map saved successfully! = Peta berhasil tersimpan! Map saved successfully! = Peta berhasil tersimpan!
Current map RNG seed: [amount] = RNG benih peta ini: [amount] Current map RNG seed: [amount] = RNG benih peta ini: [amount]

View File

@ -486,7 +486,7 @@ Land or water only = Doar pământ sau apă
## Labels/messages ## Labels/messages
Brush ([size]): = Pensulă ([size]): Brush ([size]): = Pensulă ([size]):
# The letter shown in the [size] parameter above for setting "Floodfill" # The letter shown in the [size] parameter above for setting "Floodfill"
F = U Floodfill_Abbreviation = U
Error loading map! = Eroare la încarcarea harții! Error loading map! = Eroare la încarcarea harții!
Map saved successfully! = Harta salvata cu succes! Map saved successfully! = Harta salvata cu succes!
Current map RNG seed: [amount] = Harta curentă RNG seed:[amount] Current map RNG seed: [amount] = Harta curentă RNG seed:[amount]

View File

@ -486,7 +486,7 @@ Land or water only = Solo tierra y agua
## Labels/messages ## Labels/messages
Brush ([size]): = Pincel ([size]): Brush ([size]): = Pincel ([size]):
# The letter shown in the [size] parameter above for setting "Floodfill" # The letter shown in the [size] parameter above for setting "Floodfill"
F = C Floodfill_Abbreviation = C
Error loading map! = ¡Error al cargar mapa! Error loading map! = ¡Error al cargar mapa!
Map saved successfully! = ¡Mapa guardado exitosamente! Map saved successfully! = ¡Mapa guardado exitosamente!
Current map RNG seed: [amount] = Semilla aleatoria actuál del mapa: [amount] Current map RNG seed: [amount] = Semilla aleatoria actuál del mapa: [amount]

View File

@ -486,8 +486,9 @@ Land or water only =
## Labels/messages ## Labels/messages
Brush ([size]): = Brush ([size]): =
# The letter shown in the [size] parameter above for setting "Floodfill" # The single letter shown in the [size] parameter above for setting "Floodfill".
F = # Please do not make this longer, the associated slider will not handle well.
Floodfill_Abbreviation =
Error loading map! = Error loading map! =
Map saved successfully! = Map saved successfully! =
It looks like your map can't be saved! = It looks like your map can't be saved! =

View File

@ -75,7 +75,7 @@ class MapEditorEditTab(
brushCell = add().padLeft(0f) brushCell = add().padLeft(0f)
brushSlider = UncivSlider(1f,6f,1f, initial = 1f, getTipText = { getBrushTip(it).tr() }) { brushSlider = UncivSlider(1f,6f,1f, initial = 1f, getTipText = { getBrushTip(it).tr() }) {
brushSize = if (it > 5f) -1 else it.toInt() brushSize = if (it > 5f) -1 else it.toInt()
brushLabel.setText("Brush ([${getBrushTip(it).take(1)}]):".tr()) brushLabel.setText("Brush ([${getBrushTip(it, true)}]):".tr())
} }
add(brushSlider).padLeft(0f) add(brushSlider).padLeft(0f)
} }
@ -320,6 +320,10 @@ class MapEditorEditTab(
} }
companion object { companion object {
private fun getBrushTip(value: Float) = if (value > 5f) "Floodfill" else value.toInt().toString() private fun getBrushTip(value: Float, abbreviate: Boolean = false) = when {
value <= 5f -> value.toInt().toString()
abbreviate -> "Floodfill_Abbreviation"
else -> "Floodfill"
}
} }
} }