hardinfo icon indicating copy to clipboard operation
hardinfo copied to clipboard

Untranslatable strings

Open TotalCaesar659 opened this issue 9 years ago • 29 comments

Hello! When I fixed Russian translation, I tried to add some untranslated strings to ru.po, converted to MO and launched the program with it. But the strings hasn't been translated, even if they was added in ru.po. Here is the screenshots of some of that untranslatable places. 2016-12-28-003048_1280x974_scrot 2016-12-28-003104_1280x974_scrot 2016-12-28-003124_1280x974_scrot 2016-12-28-003144_1280x974_scrot

TotalCaesar659 avatar Dec 27 '16 23:12 TotalCaesar659

Nice finds. I'll take a look later.

lpereira avatar Dec 28 '16 10:12 lpereira

hi @TotalCaesar659 , please can u confirm that the memory amount are displayed correctly, in computer->Resume->Memory (please revise it in russian env, not in english) to confirm a bug in my translated po file or in code

mckaygerhard avatar Dec 28 '16 19:12 mckaygerhard

Hi @mckaygerhard, I don't see "Resume" in program. Which point I have to check on these pictures? 2016-12-28-221951_1280x974_scrot 2016-12-28-222104_1280x974_scrot I can reboot system to Russian and send a screenshot.

TotalCaesar659 avatar Dec 28 '16 19:12 TotalCaesar659

sorry my fault, in Computer->summary->memory , in spanish i cannot see the amount but in english amount of memory appears! can u confirm if in russnik appears correctly the translated stringa nd also the amount? also double-chek in devices->memory too, send screenshot if u can but its optionally

mi interes its that if the string memory are translated and shows amount of ram!

mckaygerhard avatar Dec 28 '16 20:12 mckaygerhard

Here is the screenshot in Russian. Look at the Memory, it can't be translated, because the value disappears with it. There is the comment "//Load Average is not updated if locale is not C, switch locale to C" in /modules/computer.c (https://github.com/lpereira/hardinfo/blob/master/modules/computer.c). Maybe it has an influence to "Memory" too. 2016-12-28-233502_1280x974_scrot 2016-12-28-233511_1280x974_scrot 2016-12-28-233517_1280x974_scrot

TotalCaesar659 avatar Dec 28 '16 20:12 TotalCaesar659

as i suspect, its not translatable, i have a patch to solve it (a little nasty but works) in the pull resquests 28 thanks for confirmation..

mckaygerhard avatar Dec 28 '16 21:12 mckaygerhard

Hello @TotalCaesar659 -- the last commit in HEAD should be slightly better in handling most of these fields. If it's still not working, please report back.

(Also, some of the Devices -> Memory fields can be translated; some of them won't be as they come directly from the system.)

lpereira avatar Dec 30 '16 09:12 lpereira

After commit https://github.com/lpereira/hardinfo/commit/907a6249077745aa6d19eb7280823dd769223a29, Hardinfo shows "Unknown field: Memory" in Russian. 2016-12-30-194556_1280x974_scrot In English, it's alright. 2016-12-30-195427_1280x974_scrot

TotalCaesar659 avatar Dec 30 '16 19:12 TotalCaesar659

how's the progress of this?

mckaygerhard avatar Apr 09 '17 13:04 mckaygerhard

lasted commits from bp0 solved that issue, now can be closed! i tested in debian older squeeze : works, and debian newer jeesie/sid works!

this issue can be closed!

the non translated its due are missing from pó file.. later i can translated

hardinfomemetranslatable

mckaygerhard avatar Jul 12 '17 19:07 mckaygerhard

now with #86 this issue are already fixed , close it!

mckaygerhard avatar Jul 13 '17 13:07 mckaygerhard

All instances mentioned here are now translatable, but this work continues as part of #100.

bp0 avatar Jul 20 '17 17:07 bp0

After translating latest master build, I found some bugs.

  1. headbar is not full in translated version;
  2. translated version has no counters of processors, their cores and threads; 1 2
  3. there are many untranslatable strings left. 2 3 4 5

TotalCaesar659 avatar Aug 15 '17 02:08 TotalCaesar659

i have spanish and russian, i'll test russian and report feedback later..

mckaygerhard avatar Aug 15 '17 02:08 mckaygerhard

@TotalCaesar659

Procs / Cores / Threads

Strings with the c-format tag need to have their %s, %d, %.2f, etc strings put in appropriate places. So each string needs to have the %d where the number should go. I've done this now for this case, but please review it: https://github.com/lpereira/hardinfo/pull/151/commits/76e9013cb0f302e75a14aa47e0950d3711130bbe. Also, https://github.com/bp0/hardinfo/blob/76e9013cb0f302e75a14aa47e0950d3711130bbe/po/ru.po#L1847 is the string that pulls them together. So if something other than ; is appropriate, please change it.

Computer -> Summary

This is a messy one. The string you're looking for looks like this: "<b>%s \342\206\222 Summary</b>" Edit: Found here: https://github.com/bp0/hardinfo/blob/76e9013cb0f302e75a14aa47e0950d3711130bbe/po/ru.po#L526

Benchmark Results

The strings are stored in benchmark.conf translated! This is a known issue. See https://github.com/lpereira/hardinfo/pull/147#issuecomment-322165709. I've fixed the problem for CPU Config strings and missing details in bfaabaff1e53fa3310eeb179731cdec583f8e7c8.

Network stats

The strings are directly from netstat, and so there is not an easy way to translate them. They don't appear anywhere in the hardinfo code.

Others

The OpenGL Renderer: Unknown string and the total memory kB string should be translatable, I'll look into that now. Edit: These are both fixed in #159.

bp0 avatar Aug 15 '17 03:08 bp0

i can confirm some of the inconsistences reported by @TotalCaesar659 but differs in spanish respect russian.. in russian i have same problems reported by @TotalCaesar659

but in spanish i have strange behavior, in computer info the printing information sub-titile are duplicate: hardinfo-impresoras-duplicate

and: hardinfo-procesaor

mckaygerhard avatar Aug 15 '17 13:08 mckaygerhard

with lasted build today russian are fixed but spanish dont: hardinfo-russian

mckaygerhard avatar Aug 15 '17 13:08 mckaygerhard

[spanish procs/cores/threads]

You haven't translated those strings yet: https://github.com/lpereira/hardinfo/blob/master/po/es.po#L1803 They were added after your Spanish translation work was done.

but in spanish i have strange behavior, in computer info the printing information [sub-title] are duplicate:

That is because of the recent change from printf()s to info_*() functions. It is not a translation related problem. Will be fixed in #156.

bp0 avatar Aug 15 '17 14:08 bp0

how i must do that:

#: modules/devices.c:151 #, c-format msgid "%d physical processor" msgid_plural "%d physical processors" msgstr[0] "" msgstr[1] ""

only put in the two followed lines and that's all?

mckaygerhard avatar Aug 15 '17 15:08 mckaygerhard

msgstr[0] is the singular form, msgstr[1] is the plural form

bp0 avatar Aug 15 '17 15:08 bp0

Strings with the c-format tag need to have their %s, %d, %.2f, etc strings put in appropriate places.

Yeah, I've just forgot to add them. I have to sleep more. And I've found more bugs:

  1. Menu -> Help -> About modules. Descriptions are untranslatable, but they're in ru.po. 1 2 3 4

  2. Look at windows' headbars. These programs are called in English as "Computer module", "Network module" etc. But some well-wisher created them as addition of two strings, "*"+"module". Of course, he hasn't thought about another languages and their rules of word combinations (e.g. cases). So, it looks horrible in Russian, like "Компьютер модуль" instead of "Модуль компьютера", "Сеть модуль" instead of "Модуль сети" etc. Hollywood-movie style as it is :-)

TotalCaesar659 avatar Aug 16 '17 00:08 TotalCaesar659

The descriptions are fixed by 9086f4f89b408e70476bb89a75e1b6de7b37faed.

The dialog title is composed with a format string "% Module". There are two ways we could fix it. Easy way is to change it to something like "Module: %s" or "%s (Module)", which might make more sense in all languages. The harder way is to put the text "Module" in each module's name, and translate each one independently.

bp0 avatar Aug 16 '17 14:08 bp0

It would be better to use the last way with separate names. Colon looks allogenic in the headbar.

TotalCaesar659 avatar Aug 16 '17 21:08 TotalCaesar659

I agree, but there will still be "About X", so it is still being constructed using English word order rules. Let's see what everyone thinks of #167.

bp0 avatar Aug 16 '17 21:08 bp0

@lpereira When I open my result in any benchmark, my CPU specs ("That Machine") are translated correctly. 1 But other ones aren't. 2 Looks like Hardinfo reads whole string from benchmark.conf. Could you fix it?

TotalCaesar659 avatar Feb 10 '20 20:02 TotalCaesar659

Yes, the CPU config string is also stored, but actually gets retranslated, because the format is always the same, but the description is not. For example on arm, you might see it say 2x ARM Cortex-A72 + 4x ARM Cortex-A53, instead of packs/cores/threads.

bp0 avatar Feb 10 '20 20:02 bp0

As part of converting benchmark.conf to JSON, I'll just store the numbers and generate the strings as we display them. This will save some space in the server, too, and avoid translation issues (e.g. if the benchmark is submitted in, say, a French locale, it should display this information in Russian if the current locale is Russian.)

I don't know how AMP systems like the one mentioned by @bp0 would be structured though. Maybe "Cpu": {"ARM Cortex A-72": {"Cores": 2}, "ARM Cortex-A53": {"Cores": 4}?

lpereira avatar Feb 10 '20 20:02 lpereira

Yeah, alright, although the existing format actually does store them as numbers already, but along with the CPU description string. I guess the idea was that description is platform dependent. What does 6 cores, 6 threads tell you on that 2Big.4little machine? Do any ARM have SMT yet? That kind of thing.

On Mon, Feb 10, 2020, 2:50 PM Leandro A. F. Pereira < [email protected]> wrote:

As part of converting benchmark.conf to JSON, I'll just store the numbers and generate the strings as we display them. This will save some space in the server, too, and avoid translation issues (e.g. if the benchmark is submitted in, say, a French locale, it should display this information in Russian if the current locale is Russian.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lpereira/hardinfo/issues/38?email_source=notifications&email_token=AANNHCVIQ6Z6TVQRSS6HWP3RCG4XRA5CNFSM4C22JQC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKG4EY#issuecomment-584347155, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANNHCQNZEWBAZADHGCPVKLRCG4XRANCNFSM4C22JQCQ .

bp0 avatar Feb 10 '20 20:02 bp0

@lpereira This strings consequence (346-350) can not be translated. https://github.com/lpereira/hardinfo/blob/c9d5ec9fff4076e7c625f8d12ad011d3a6460482/modules/devices/storage.c#L346

TotalCaesar659 avatar Nov 22 '21 16:11 TotalCaesar659