[tools] testbot/SetWinLocale: Windows omits the country for some locales.

Francois Gouget fgouget at codeweavers.com
Tue Jan 11 12:21:07 CST 2022


For instance one finds the hi-IN information in the "User Profile\hi"
subkey.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/SetWinLocale | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale
index b2da673eda..a6e95a2758 100755
--- a/testbot/bin/SetWinLocale
+++ b/testbot/bin/SetWinLocale
@@ -663,6 +663,12 @@ sub GetWinKeyboardIds($)
   # Look for that locale's keyboard id.
   # Its first component is the locale's LCID.
   my $Values = RegGetValues("$HKCU_USER_PROFILE\\$Locale", "*:*");
+  if (!%$Values)
+  {
+    my $Lang = $Locale;
+    $Lang =~ s/-.*$//;
+    $Values = RegGetValues("$HKCU_USER_PROFILE\\$Lang", "*:*");
+  }
   foreach my $VName (keys %$Values)
   {
     next if ($VName !~ /^[0-9A-F]{4}:/);
-- 
2.30.2



More information about the wine-devel mailing list