From 0f1b1646a9b091a0a7dd8cd0c958d82f6ae68477 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 12 Feb 2021 15:01:52 +1300 Subject: [PATCH] be a bit smarter about the locale that gets written to the cloud init config --- subiquity/models/subiquity.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subiquity/models/subiquity.py b/subiquity/models/subiquity.py index 3d6e2c30..0a55c7c5 100644 --- a/subiquity/models/subiquity.py +++ b/subiquity/models/subiquity.py @@ -164,11 +164,14 @@ class SubiquityModel: return groups def _cloud_init_config(self): + locale = self.locale.selected_language + if '.' not in locale and '_' in locale: + locale += '.UTF-8' config = { 'growpart': { 'mode': 'off', }, - 'locale': self.locale.selected_language + '.UTF-8', + 'locale': locale, 'resize_rootfs': False, } if self.identity.hostname is not None: