lpereira / hardinfo

System profiler and benchmark tool for Linux systems
http://hardinfo.org
GNU General Public License v2.0
770 stars 130 forks source link

Untranslatable strings #38

Open TotalCaesar659 opened 7 years ago

TotalCaesar659 commented 7 years ago

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

lpereira commented 7 years ago

Nice finds. I'll take a look later.

mckaygerhard commented 7 years ago

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

TotalCaesar659 commented 7 years ago

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.

mckaygerhard commented 7 years ago

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!

TotalCaesar659 commented 7 years ago

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

mckaygerhard commented 7 years ago

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..

lpereira commented 7 years ago

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.)

TotalCaesar659 commented 7 years ago

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

mckaygerhard commented 7 years ago

how's the progress of this?

mckaygerhard commented 7 years ago

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 commented 7 years ago

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

bp0 commented 7 years ago

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

TotalCaesar659 commented 7 years ago

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

mckaygerhard commented 7 years ago

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

bp0 commented 7 years ago

@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.

mckaygerhard commented 7 years ago

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 commented 7 years ago

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

bp0 commented 7 years ago

[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.

mckaygerhard commented 7 years ago

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?

bp0 commented 7 years ago

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

TotalCaesar659 commented 7 years ago

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 :-)

bp0 commented 7 years ago

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.

TotalCaesar659 commented 7 years ago

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

bp0 commented 7 years ago

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.

TotalCaesar659 commented 4 years ago

@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?

bp0 commented 4 years ago

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.

lpereira commented 4 years ago

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}?

bp0 commented 4 years ago

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 < notifications@github.com> 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 .

TotalCaesar659 commented 2 years ago

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