Minor changes

This commit is contained in:
KAYT33N 2024-08-07 10:29:47 +03:30
parent 80666da563
commit 5d5297c2f4
3 changed files with 21 additions and 2 deletions

View File

@ -4,6 +4,7 @@ const LocaleChars = Lang.LocaleChars;
const X = Lang.X;
const O = Lang.O;
// zig fmt: off
pub const locale_chars = LocaleChars{
.ZERO = [_]u21{
X,X,X,X,X,
@ -89,4 +90,5 @@ pub const locale_chars = LocaleChars{
O,O,O,O,O,
O,O,O,O,O,
},
};
};
// zig fmt: on

View File

@ -4,6 +4,7 @@ const LocaleChars = Lang.LocaleChars;
const X = Lang.X;
const O = Lang.O;
// zig fmt: off
pub const locale_chars = LocaleChars{
.ZERO = [_]u21{
O,O,O,O,O,
@ -89,4 +90,5 @@ pub const locale_chars = LocaleChars{
O,O,O,O,O,
O,O,O,O,O,
},
};
};
// zig fmt: on

View File

@ -85,6 +85,21 @@ pub fn configFieldHandler(_: std.mem.Allocator, field: ini.IniField) ?ini.IniFie
return null;
}
if (std.mem.eql(u8, field.key, "bigclock")) {
// The option now uses a string (which then gets converted into an enum) instead of an boolean
// It also includes the ability to change active bigclock's language
var mapped_field = field;
if (std.mem.eql(u8, field.value, "true"))
mapped_field.value = "en";
if (std.mem.eql(u8, field.value, "false"))
mapped_field.value = "none";
mapped_config_fields = true;
return mapped_field;
}
return field;
}