diff --git a/format/desktop_entry/desktop_entry.ha b/format/desktop_entry/desktop_entry.ha index 1ca1478..a438f49 100644 --- a/format/desktop_entry/desktop_entry.ha +++ b/format/desktop_entry/desktop_entry.ha @@ -30,7 +30,7 @@ export type entry = struct { value: value, }; -// A localized entry. +// A localized key/value pair. // Specification: §5 export type localized_entry = struct { key: str, @@ -43,8 +43,8 @@ export type localized_entry = struct { // this module are called, so [[value_dup]] is required to extend its lifetime. export type value = (str | bool | f32); -// Gets a non-localized value from a file. If the group does not exist, or the -// group exists but the key isn't in it, it returns void. +// Gets a non-localized value from a [[file]]. If the group does not exist, or +// the group exists but the key isn't in it, it returns void. export fn file_get(fil: *file, group_name: str, key: str) (value | void) = { let grou = match (file_find_group(fil, group_name)) { case let index: size => yield &fil.groups[index]; @@ -60,10 +60,12 @@ export fn file_get(fil: *file, group_name: str, key: str) (value | void) = { }; }; -// Gets a localized value from a file. If the group does not exist, or the group -// exists but the key isnt in it, it returns void. If the key is in the group -// but is not localized to the specified locale, the non-localized value is -// returned. +// Gets a localized [[value]] from a [[file]]. If the group does not exist, or +// the group exists but the key isnt in it, it returns void. If the key is in +// the group but is not localized to the specified [[locale::locale]], the +// non-localized value is returned. Refer to the specification for the exact way +// which the locale is matched. +// Specification: §5 export fn file_get_localized( fil: *file, group_name: str,