CLB Update
This commit is contained in:
@@ -18,6 +18,38 @@ languages := [
|
||||
is_plane : match@(match: "(?i)Plane(?!swalker)")
|
||||
word_list : "word_list"
|
||||
],
|
||||
"English (British)": [
|
||||
code : "en",
|
||||
spellcheck_code : "en_GB",
|
||||
pt_separator : "/",
|
||||
type_separator : " — ",
|
||||
subtype_separator : " ",
|
||||
is_creature : match@(match: "(?i)Creature")
|
||||
is_tribal : match@(match: "(?i)Tribal")
|
||||
is_artifact : match@(match: "(?i)Artifact")
|
||||
is_land : match@(match: "(?i)Land")
|
||||
is_enchantment : match@(match: "(?i)Enchantment")
|
||||
is_spell : match@(match: "(?i)Instant|Sorcery")
|
||||
is_planeswalker : match@(match: "(?i)Planeswalker|Emblem")
|
||||
is_plane : match@(match: "(?i)Plane(?!swalker)")
|
||||
word_list : "word_list"
|
||||
],
|
||||
"English (Canadian)": [
|
||||
code : "en",
|
||||
spellcheck_code : "en_CA",
|
||||
pt_separator : "/",
|
||||
type_separator : " — ",
|
||||
subtype_separator : " ",
|
||||
is_creature : match@(match: "(?i)Creature")
|
||||
is_tribal : match@(match: "(?i)Tribal")
|
||||
is_artifact : match@(match: "(?i)Artifact")
|
||||
is_land : match@(match: "(?i)Land")
|
||||
is_enchantment : match@(match: "(?i)Enchantment")
|
||||
is_spell : match@(match: "(?i)Instant|Sorcery")
|
||||
is_planeswalker : match@(match: "(?i)Planeswalker|Emblem")
|
||||
is_plane : match@(match: "(?i)Plane(?!swalker)")
|
||||
word_list : "word_list"
|
||||
],
|
||||
Russian: [
|
||||
code : "ru",
|
||||
spellcheck_code : "ru_RU",
|
||||
@@ -50,6 +82,22 @@ languages := [
|
||||
is_plane : match@(match: "(?i)Plane(?!swalker)")
|
||||
word_list : "word_list_it"
|
||||
],
|
||||
"Português do Brasil" : [
|
||||
code : "pt-br",
|
||||
spellcheck_code : "pt_BR",
|
||||
pt_separator : "/",
|
||||
type_separator : " — ",
|
||||
subtype_separator : " ",
|
||||
is_creature : match@(match: "(?i)Criatura")
|
||||
is_tribal : match@(match: "(?i)Tribal")
|
||||
is_artifact : match@(match: "(?i)Artefato")
|
||||
is_land : match@(match: "(?i)Terreno")
|
||||
is_enchantment : match@(match: "(?i)Encantamento")
|
||||
is_spell : match@(match: "(?i)Mágica Instantânea|Feitiço")
|
||||
is_planeswalker : match@(match: "(?i)Planeswalker|Emblem")
|
||||
is_plane : match@(match: "(?i)Plane(?!swalker)")
|
||||
word_list : "word_list_pt"
|
||||
],
|
||||
Français: [
|
||||
code : "fr",
|
||||
spellcheck_code : "fr_FR",
|
||||
@@ -69,7 +117,7 @@ languages := [
|
||||
]
|
||||
|
||||
# The selected language
|
||||
language := { languages[set.card_language] or else language.English }
|
||||
language := { languages[set.card_language] or else languages.English }
|
||||
spanish_number := {
|
||||
input := remove_tags(input)
|
||||
espanol_ones_array := ["cero", "uno", "dos", "tres", "cuatro", "cinco", "seis", "siete", "ocho", "nueve", "diez", "once", "doce", "trece", "catorce", "quince"]
|
||||
@@ -91,6 +139,26 @@ spanish_number := {
|
||||
else if input < 100 then function_map["large"]()
|
||||
else function_map["oversized"]()
|
||||
}
|
||||
portuguese_number := {
|
||||
input := remove_tags(input)
|
||||
portugues_ones_array := ["zero", "um", "dois", "três", "quatro", "cinco", "seis", "sete", "oito", "nove", "dez", "onze", "doze", "treze", "catorze", "quinze", "dezesseis", "dezessete", "dezoito", "dezenove"]
|
||||
portugues_tens_array := ["zero", "deze", "vinte", "trinta", "quarenta", "cinquenta", "sessenta", "setenta", "oitenta", "noventa"]
|
||||
function_map := [
|
||||
small: {portugues_ones_array[input]},
|
||||
large: {
|
||||
ones := input mod 10
|
||||
tens := (input - ones) / 10
|
||||
final_answer := portugues_tens_array[tens] + " e " + portugues_ones_array[ones]
|
||||
final_answer := replace(final_answer, match:" e zero", replace:"") ##remove redundant "and zero"
|
||||
final_answer
|
||||
},
|
||||
oversized: {input}
|
||||
]
|
||||
if input == "number" then ""
|
||||
else if input < 20 then function_map["small"]()
|
||||
else if input < 100 then function_map["large"]()
|
||||
else function_map["oversized"]()
|
||||
}
|
||||
french_number := {
|
||||
input := remove_tags(input)
|
||||
francais_ones_array := ["zéro", "un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "nuef", "dix", "onze", "douze", "treize", "quatorze", "quinze", "seize","dix-sept","dix-huit","dix-neuf"]
|
||||
|
||||
Reference in New Issue
Block a user