diff options
author | Burt P <pburt0@gmail.com> | 2017-07-15 01:31:47 -0500 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-07-19 07:20:33 -0700 |
commit | 0bb72abc462d42af051bebf5f4093bb1735ad448 (patch) | |
tree | 37521ce93db6127ba78c72d5b52ede4eefc217fd /modules/devices/x86/processor.c | |
parent | d42f694add9bcfca56a5d489c5f8f179595b118e (diff) |
Make cache type strings translatable
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/x86/processor.c')
-rw-r--r-- | modules/devices/x86/processor.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/devices/x86/processor.c b/modules/devices/x86/processor.c index 9adfe9c8..f6b9963c 100644 --- a/modules/devices/x86/processor.c +++ b/modules/devices/x86/processor.c @@ -152,7 +152,7 @@ static gchar *__cache_get_info_as_string(Processor *processor) result = h_strdup_cprintf(_("Level %d (%s)=%d-way set-associative, %d sets, %dKB size\n"), result, cache->level, - cache->type, + C_("cache-type", cache->type), cache->ways_of_associativity, cache->number_of_sets, cache->size); @@ -161,6 +161,14 @@ static gchar *__cache_get_info_as_string(Processor *processor) return result; } +/* This is not used directly, but creates translatable strings for + * the type string returned from /sys/.../cache */ +static const char* cache_types[] = { + NC_("cache-type", /*/cache type, as appears in: Level 1 (Data)*/ "Data"), + NC_("cache-type", /*/cache type, as appears in: Level 1 (Instruction)*/ "Instruction"), + NC_("cache-type", /*/cache type, as appears in: Level 2 (Unified)*/ "Unified") +}; + static void __cache_obtain_info(Processor *processor) { ProcessorCache *cache; |