Skip to content

Commit 3d8a842

Browse files
authored
Fix subcommand localization inheritance (#588)
1 parent 90522c5 commit 3d8a842

File tree

1 file changed

+1
-1
lines changed
  • clikt/src/commonMain/kotlin/com/github/ajalt/clikt/core

1 file changed

+1
-1
lines changed

clikt/src/commonMain/kotlin/com/github/ajalt/clikt/core/Context.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ class Context private constructor(
372372
/**
373373
* Localized strings to use for help output and error reporting.
374374
*/
375-
var localization: Localization = defaultLocalization
375+
var localization: Localization = parent?.localization ?: defaultLocalization
376376

377377
/**
378378
* A function called by Clikt to get a parameter value from a given environment variable

0 commit comments

Comments
 (0)