Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Mar 26, 2024
1 parent 6ba4471 commit 59fea5b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions I18n/PO/Write.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ Write all collected untranslated strings into a template file.
-/
def createTemplate : CommandElabM Unit := do
let projectName ← liftCoreM getProjectName

-- read config instead of `languageState` because that state only
-- gets initialised if `set_language` is used in the document.
let langConfig ← readLanguageConfig

let sourceLang := langConfig.sourceLang.toString
let langState ← getLanguageState
let ending := if langState.useJson then "json" else "po"
let ending := if langConfig.useJson then "json" else "po"
let fileName := s!"{projectName}.{ending}"
let path := (← IO.currentDir) / ".i18n" / sourceLang
IO.FS.createDirAll path
Expand Down

0 comments on commit 59fea5b

Please sign in to comment.