i18n: add finnish to menus

This commit is contained in:
Tyler Wilding 2024-07-31 15:38:32 -04:00
parent 3a67f40098
commit 1e307c8a9e
No known key found for this signature in database
GPG Key ID: BF7B068C2FEFD7EF
4 changed files with 67 additions and 17 deletions

View File

@ -1,6 +1,7 @@
{
"1a3": "138",
"1b5": "161",
"133a": "1113",
"1200": "1031",
"1201": "1032",
"1202": "1034",

View File

@ -232,5 +232,6 @@
"1336": "Fast Progress Menu",
"1337": "PS2 LOD Distance",
"1338": "Off",
"1339": "Display"
"1339": "Display",
"133a": "Suomi"
}

View File

@ -28,14 +28,28 @@
(defenum language-enum
:type int64
(english)
(french)
(german)
(spanish)
(italian)
(japanese)
(korean)
(uk-english)
(english 0)
(french 1)
(german 2)
(spanish 3)
(italian 4)
(japanese 5)
(korean 6)
(uk-english 7)
;; custom
(portuguese 8)
(finnish 9)
(swedish 10)
(danish 11)
(norwegian 12)
(dutch 13)
(br-portuguese 14)
(hungarian 15)
(catalan 16)
(icelandic 17)
(russian 18)
(polish 19)
(lithuanian 20)
)
(defenum runtime-exit-status

View File

@ -347,10 +347,27 @@ This gives us more freedom to write code how we want.
(text-id language-name-italian)
(text-id language-name-japanese)
(text-id language-name-korean)
(text-id language-name-english-uk))
:get-item-index-fn (lambda () (-> *setting-control* user-default subtitle-language))
(text-id language-name-english-uk)
(text-id language-name-finnish))
:get-item-index-fn (lambda ()
;; workaround until all languages are added
(if (<= (-> *setting-control* user-default subtitle-language) (language-enum uk-english))
(-> *setting-control* user-default subtitle-language)
(case (-> *setting-control* user-default subtitle-language)
(((language-enum finnish)) 8)
(else
(format 0 "PROGRESS: Forgot to add subtitle language to workaround switch case, defaulting to english")
0))))
:on-confirm (lambda ((index int) (the-progress progress))
(set! (-> *setting-control* user-default subtitle-language) (the-as language-enum index)))))
;; workaround until all languages are added
(if (<= index (language-enum uk-english))
(set! (-> *setting-control* user-default subtitle-language) (the-as language-enum index))
(set! (-> *setting-control* user-default subtitle-language)
(case index
((8) (language-enum finnish))
(else
(format 0 "PROGRESS: Forgot to add subtitle language to workaround switch case, defaulting to english")
(language-enum english))))))))
(defmacro game-options-pc-sound-language ()
`(new 'static 'menu-generic-carousel-option
@ -378,13 +395,30 @@ This gives us more freedom to write code how we want.
(text-id language-name-italian)
(text-id language-name-japanese)
(text-id language-name-korean)
(text-id language-name-english-uk))
:get-item-index-fn (lambda () (-> *pc-settings* text-language))
(text-id language-name-english-uk)
(text-id language-name-finnish))
:get-item-index-fn (lambda ()
;; workaround until all languages are added
(if (<= (-> *pc-settings* text-language) (pc-language uk-english))
(-> *pc-settings* text-language)
(case (-> *pc-settings* text-language)
(((pc-language finnish)) 8)
(else
(format 0 "PROGRESS: Forgot to add text language to workaround switch case, defaulting to english")
(pc-language english)))))
:on-confirm (lambda ((index int) (the-progress progress))
;; workaround until all languages are added
(if (<= index (pc-language uk-english))
(set! (-> *pc-settings* text-language) (the-as pc-language index))
;; NOTE - this doesn't actually work (naughty dog tried it too in their progress code)
(load-level-text-files (the-as int (-> *pc-settings* text-language)))
(pc-settings-save))))
(set! (-> *pc-settings* text-language)
(case index
((8) (pc-language finnish))
(else
(format 0 "PROGRESS: Forgot to add text language to workaround switch case, defaulting to english")
(pc-language english)))))
;; NOTE - this doesn't actually work (naughty dog tried it too in their progress code)
(load-level-text-files (the-as int (-> *pc-settings* text-language)))
(pc-settings-save))))
(defmacro misc-options-pc-discord-rpc ()
`(new 'static 'menu-generic-boolean-option