mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
Thread Tools
Unread 2021-08-06, 01:21   #12
Zhangrc
 
"University student"
May 2021
Beijing, China

47 Posts
Default

Quote:
Originally Posted by Prime95 View Post
Prime95/mprime "gave up" on localization as all text messages are hard-wired into the code. Fixed messages would not be terribly hard to place in a central location, but printf messages are much tougher. For example, "roundoff error of %g at iteration %d, rolling back to last save file %s". When localized, the %g, %d, and %s replacements might need to be in a different order.
I've tried to translate (a part of) the source code into Chinese yesterday. However, when I started compilation on VS2019, I saw the error "hwloc.h no such file or directory," repeated dozens of times. Is there a file shortage in Prime95 source code package?

also the "#pragma code_page" command is very difficult to adjust. I'm supposed to change it to 936 for a Chinese version, but even more errors and warnings occurred.
Zhangrc is offline   Reply With Quote
Unread 2021-08-06, 01:59   #13
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

1D7716 Posts
Default

hwloc.h is here: https://www.open-mpi.org/software/hwloc/v2.4/
Prime95 is offline   Reply With Quote
Unread 2021-08-06, 02:14   #14
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

22·32·173 Posts
Default

Quote:
Originally Posted by Prime95 View Post
For example, "roundoff error of %g at iteration %d, rolling back to last save file %s". When localized, the %g, %d, and %s replacements might need to be in a different order.
Make it independent sentences.

English: "Roundoff error of %g. At iteration %d. Rolling back to last save file %s".
Nonglish: "Erreur %g du roundoff. Iteracion du %d. Saviour phile de %s du previour".
retina is offline   Reply With Quote
Unread 2021-08-06, 02:33   #15
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

26·5·17 Posts
Default

Something that occurs to me is English synonyms might translate differently in different languages or different phrases.
at iteration becomes bei iteration,
by iteration (durch Iteration),
to iteration becomes zur iteration in German.
upon iteration (bei iteration)
after iteration (nach der Iteration)
Through iteration (durch Iteration)
on iteration (auf iteration)

But "upon" by itself became "auf".
(Again, google translate. My German is a dim memory.)

Last fiddled with by kriesel on 2021-08-06 at 02:39
kriesel is offline   Reply With Quote
Unread 2021-08-06, 02:41   #16
Zhangrc
 
"University student"
May 2021
Beijing, China

47 Posts
Default

Quote:
Originally Posted by retina View Post
English: "Roundoff error of %g. At iteration %d. Rolling back to last save file %s".
Chinese: "在第%d轮迭代出现%g的取整误差,回退到上一存储文件%s。" Notice that the order of %g and %d has been adjusted.
Zhangrc is offline   Reply With Quote
Unread 2021-08-06, 08:47   #17
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

22·33·5 Posts
Default

Quote:
Originally Posted by kriesel View Post
[…] I make no claims of correctness of the Google translate results, and don't understand the seemingly random capitalization it included. […]
It seems fine. In this case, all nouns are capitalized, which is correct.

Quote:
Originally Posted by kriesel View Post
Something that occurs to me is English synonyms might translate differently in different languages or different phrases. […]
Yes, and in general, prepositions might be translated differently according to the noun or verb used. For example "discriminate against" will turn to "diskriminieren", the "against" part (literally "gegen") has to be omitted.
kruoli is offline   Reply With Quote
Unread 2021-08-06, 08:58   #18
axn
 
axn's Avatar
 
Jun 2003

5,087 Posts
Default

It occurs to me that it would be much more productive to start with translating the readme/undoc/whatsnew files as, presumably, these would be the initial "go to" for users to get help.

BTW, localizing the messages on the program side can have the negative effect of making error reporting (screenshots, etc.) incomprehensible.

axn is offline   Reply With Quote
Unread 2021-08-06, 14:05   #19
xilman
Bamboozled!
 
xilman's Avatar
 
"𒉺𒌌𒇷𒆷𒀭"
May 2003
Down not across

250428 Posts
Default

Quote:
Originally Posted by axn View Post
It occurs to me that it would be much more productive to start with translating the readme/undoc/whatsnew files as, presumably, these would be the initial "go to" for users to get help.

BTW, localizing the messages on the program side can have the negative effect of making error reporting (screenshots, etc.) incomprehensible.

+1
xilman is offline   Reply With Quote
Unread 2021-08-06, 14:24   #20
slandrum
 
Jan 2021
California

2×7×11 Posts
Default

Quote:
Originally Posted by axn View Post
BTW, localizing the messages on the program side can have the negative effect of making error reporting (screenshots, etc.) incomprehensible.
This can be handled by outputting the error messages twice if they are localized - once in the original English (or whatever original language is appropriate for the developer) for whoever is supporting/maintaining the code, and then in the localized language. This probably should be done with everything going to the log files, not just the errors, or have two log files being written.

Last fiddled with by slandrum on 2021-08-06 at 14:25
slandrum is offline   Reply With Quote
Unread 2021-08-06, 15:06   #21
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

26×5×17 Posts
Default

maybe something like a localize-print function lprintf. Original calls to printf get changed to lprintf:

Code:
// skipping the C function definition, externs, whatever, here for brevity
//  sprintf to generate nativemessage string, then
if ( localizationlanguage != authorsnativelanguage ) {
   // a bit of sprintf to assemble the translated phrases and program-generated numbers into localizedmessage
   printf "%s \(%s\)\n", localizedmessage, nativemessage;
   // with due regard for message lengths, line wrap, etc.
} else {
   printf "%s\n", nativemessage; # no point in duplicating same language
}
I would probably put the same construct in a single log file with the relevant date/time stamps & TZ indicators.

If using localized log file and authors-language log file separately, how does the user identify what to collect for an issue report; matching time stamps after consideration of possible UTC offset differences between the log files, and perhaps verifying the result of collection matches up by using online translation, seems unnecessarily tedious, compared to grabbing a single section in a single file that is
Code:
user's selected TZ format time stamp
localized message
(author's language message)

Last fiddled with by kriesel on 2021-08-06 at 15:18
kriesel is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrated graphics processors, how to run GIMPS software on them, and why you may not want to kriesel kriesel 7 2021-06-08 16:10
On the origin of language ... Dr Sardonicus Lounge 28 2018-10-10 19:52
Uninstall GIMPS Software? BillMMar Information & Answers 6 2010-05-02 22:23
Body Language Orgasmic Troll Lounge 2 2005-11-29 16:52
GIMPS software for Sony PS/2 Linux? delta_t Software 5 2002-12-06 17:36

All times are UTC. The time now is 22:32.


Fri Aug 6 22:32:20 UTC 2021 up 14 days, 17:01, 1 user, load averages: 4.21, 3.56, 3.33

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.