Skip to content

Commit

Permalink
Load language from config fil
Browse files Browse the repository at this point in the history
  • Loading branch information
serivesmejia committed Nov 7, 2024
1 parent 17e1e1d commit 8a8b429
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ class PaperVision(

config.load()

if(!langManager.availableLangs.contains(config.fields.lang)) {
langManager.lang = config.fields.lang
} else {
logger.warn("Configured language ${config.fields.lang} is not available, defaulting")
}

textureProcessorQueue = TextureProcessorQueue(textureFactory)
textureProcessorQueue.subscribeTo(onUpdate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class PlatformConfig {
abstract fun save()
}

val defaultConfigPath = System.getProperty("user.home") + "/.papervision/config.json"
val defaultConfigPath = System.getProperty("user.home") + File.separator + ".papervision" + File.separator + "config.json"

class DefaultFilePlatformConfig : FilePlatformConfig(defaultConfigPath) {
init {
Expand Down

0 comments on commit 8a8b429

Please sign in to comment.