mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
@ -33,8 +33,8 @@ allprojects {
|
|||||||
version = '1.0.1'
|
version = '1.0.1'
|
||||||
ext {
|
ext {
|
||||||
appName = "Unciv"
|
appName = "Unciv"
|
||||||
appCodeNumber = 421
|
appCodeNumber = 422
|
||||||
appVersion = "3.8.4"
|
appVersion = "3.8.4-patch1"
|
||||||
|
|
||||||
gdxVersion = '1.9.10'
|
gdxVersion = '1.9.10'
|
||||||
roboVMVersion = '2.3.1'
|
roboVMVersion = '2.3.1'
|
||||||
|
@ -143,17 +143,19 @@ class Translations : LinkedHashMap<String, TranslationEntry>(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// we don't need to allocate different memory for these every time we .tr() - or recompile them.
|
// We don't need to allocate different memory for these every time we .tr() - or recompile them.
|
||||||
|
// Please note: The extra \] and \} are NOT removable, despite what Android Studio might recommend -
|
||||||
|
// they are necessary for Android Java 6 phones to parse the regex properly!
|
||||||
|
|
||||||
// Expect a literal [ followed by a captured () group and a literal ].
|
// Expect a literal [ followed by a captured () group and a literal ].
|
||||||
// The group may contain any number of any character except ] - pattern [^]]
|
// The group may contain any number of any character except ] - pattern [^]]
|
||||||
val squareBraceRegex = Regex("""\[([^]]*)]""")
|
val squareBraceRegex = Regex("""\[([^]]*)\]""")
|
||||||
|
|
||||||
// Just look for either [ or ]
|
// Just look for either [ or ]
|
||||||
val eitherSquareBraceRegex = Regex("""\[|]""")
|
val eitherSquareBraceRegex = Regex("""\[|\]""")
|
||||||
|
|
||||||
// Analogous as above: Expect a {} pair with any chars but } in between and capture that
|
// Analogous as above: Expect a {} pair with any chars but } in between and capture that
|
||||||
val curlyBraceRegex = Regex("""\{([^}]*)}""")
|
val curlyBraceRegex = Regex("""\{([^}]*)\}""")
|
||||||
|
|
||||||
|
|
||||||
fun String.tr(): String {
|
fun String.tr(): String {
|
||||||
|
Reference in New Issue
Block a user