Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOINC Manager crashes when language is Spanish #2165

Closed
Ageless93 opened this issue Oct 10, 2017 · 11 comments
Closed

BOINC Manager crashes when language is Spanish #2165

Ageless93 opened this issue Oct 10, 2017 · 11 comments

Comments

@Ageless93
Copy link
Contributor

Ageless93 commented Oct 10, 2017

BOINC 7.8.2, 7.8.3
From https://boinc.berkeley.edu/dev/forum_thread.php?id=11871
System Windows 10 x64 v1703 v15063
When BOINC Manager language is set in Spanish, BOINC Manager will crash when the Notices tab is opened.

@davidpanderson
Copy link
Contributor

I couldn't repro this (Win 7, 7.8.3 64-bit)

@Ageless93
Copy link
Contributor Author

Ageless93 commented Oct 12, 2017

Excuse me, I read his post wrong. It's when he switches to the properties of the project that his BOINC Manager crashes. I can reproduce that with 7.8.3 on Windows 7 x64
When set to Spanish, Selecting Seti@Home, then clicking Propiedades, I lose control over BOINC Manager, eventually the Windows 'busy' swirling mouse-icon comes up and after 2 minutes the manager crashes completely. The client keeps running.

It doesn't matter which project is selected, it crashes the manager always.

@Ageless93
Copy link
Contributor Author

stderrgui-spanish-crash.txt
Adding the stderrgui.txt about this crash

@JuhaSointusalo
Copy link
Contributor

There's quite a few bad format strings besides the Spanish one. I'll put the ones in Manager and Setup below. Client didn't have any critically bad translations. pofilter doesn't understand %1 style placeholders so it can't check web translations and I don't know how to make it check Android translations.

The strings are from master. Some of the po files have not been updated for several years and some of the bad translations may already be obsolete.

Manager
el

# (pofilter) printf: Missing printf variable: %s
#: AccountInfoPage.cpp:453
#, c-format
msgid "Are you already running %s?"
msgstr "Εκτελείτε ήδη %;"

es

#: clientgui/DlgAdvPreferencesBase.cpp:594
#, c-format
msgid ""
"Limit the percentage of disk space used by %s on the volume where it stores "
"data."
msgstr "Limita el porcentaje de disco usado por $s en la unidad donde se almacena la información."
# (pofilter) printf: Different number of printf variables
#: clientgui/DlgItemProperties.cpp:300 clientgui/DlgItemProperties.cpp:308
#, c-format
msgid "%s total, %s average"
msgstr "%s total, % medio"

fr

# (pofilter) printf: Different number of printf variables
#: clientgui/DlgOptions.cpp:710
#, c-format
msgid ""
"The %s's language has been changed.  In order for this change to take "
"effect, you must restart the %s."
msgstr "La langue par défaut du %s a été modifiée. Pour que le changement prenne effet, vous devez le redémarrer."

gl

# (pofilter) printf: Different number of printf variables
#: clientgui/AdvancedFrame.cpp:459
msgid "&Run always"
msgstr "E%xecutar sempre"
# (pofilter) printf: Different printf variable: %s
#: clientgui/sg_DlgPreferences.cpp:762
#, c-format
msgid "%d%%"
msgstr "%s%%"

he

# (pofilter) printf: Different number of printf variables
#: DlgExitMessage.cpp:135
#, c-format
msgid ""
"This will shut down %s and its tasks until either the\n"
"%s or the %s screen saver is run again.\n"
"\n"
"In most cases, it is better just to close the %s window\n"
"rather than to exit the application; that will allow %s to run its\n"
"tasks at the times you selected in your preferences."
msgstr ""
"אפשרות זו תכבה את %s ואת המשימות לגמרי עד\n"
"אשר אפליקציית %s או שומר המסך ירוץ שוב.\n"
"\n"
"ברוב המקרים, עדיף פשוט לסגור את חלון ה-%s\n"
"מאשר לצאת מהיישום; דבר זה יאפשר ל-%s להריץ את\n"
"היישומים בזמנים שבחרת בהעדפות."
# (pofilter) printf: Missing printf variable: %s
#: mac/Mac_GUI.cpp:144
#, c-format
msgid "Hide %s"
msgstr "הסתר את $s"

hu

# (pofilter) printf: Different number of printf variables
#: clientgui/DlgAdvPreferencesBase.cpp:602
#, no-c-format
msgid "% of total"
msgstr "%-a a teljesnek"

pt_BR

# (pofilter) printf: Different number of printf variables
#: clientgui/ProjectProcessingPage.cpp:321
#: clientgui/ProjectPropertiesPage.cpp:334
msgid ""
"Communicating with project\n"
"Please wait..."
msgstr "Comunicando-se com project %s\nPor favor, espere..."
# (pofilter) printf: Missing printf variable: %.0f
#: clientgui/ViewStatistics.cpp:1331
#, c-format
msgid "Last update: %.0f days ago"
msgstr "Última atualização: %.Of Dias atrás"

uk

# (pofilter) printf: Missing printf variable: %s
#: DlgEventLog.cpp:219
#, c-format
msgid "%s - Event Log"
msgstr "% s - Перегляд подій"
# (pofilter) printf: Missing printf variable: %s
#: ValidateURL.cpp:104 ValidateURL.cpp:108
#, c-format
msgid "'%s' does not contain a valid host name."
msgstr "Комп'ютер (хост) з назвою: '% s' не знайдений."
# (pofilter) printf: Missing printf variable: %s
#: ValidateURL.cpp:111
#, c-format
msgid "'%s' does not contain a valid path."
msgstr "Вказаного шляху: '% s' не існує."
# (pofilter) printf: Missing printf variable: %s
#: ViewProjects.cpp:496 sg_ProjectCommandPopup.cpp:251
#, c-format
msgid "Are you sure you want to remove project '%s'?"
msgstr "Ви справді хочете видалити проект '% s'?"

Setup
nb

# (pofilter) printf: Different number of printf variables
#: PostInstall.cpp:131 PostInstall.cpp:1137 uninstall.cpp:1619
msgid "No"
msgstr "Brukere med tillatelse til å administrere denne datamaskinen vil automatisk få tilgang til å kjøre og kontrollere %s.\n\nØnsker du også at brukere uten administratorrettigheter skal kunne kjøre og kontrollere %s på denne Mac'en?"
# (pofilter) printf: Different number of printf variables
#: PostInstall.cpp:133
msgid "Should BOINC run even when no user is logged in?"
msgstr "Brukere som har tillatelse til å administrere denne datamaskinen vil automatisk få tilgang til å kjøre og kontrollere %s.\n\nØnsker du at brukere uten administratorrettigheter skal kunne kjøre og kontrollere %s på denne Mac'en?"

@davidpanderson
Copy link
Contributor

The problem is in es/BOINC-Manager.po:
#: clientgui/DlgItemProperties.cpp:300 clientgui/DlgItemProperties.cpp:308
#, c-format
msgid "%s total, %s average"
msgstr "%s total, % medio"

The "s" is missing.

@ChristianBeer
Copy link
Member

I checked all languages for the Manager resource on transifex for this kind of error. I fixed the spanish and greek translations by adding the missing %s. I had to delete a string from the korean translation as I was not able to insert the missing %s in the right place. I activated the translation checks so that in the future an incomplete translation (missing %s) can not be saved.

I also checked and fixed the strings Juha reported above that where not already fixed on transifex.

@JuhaSointusalo could you please send me the pofilter command (or other) you used to create the above list? I would like to incorporate that into the translation update process so that we get alerted of such problems when updating translations.

@JuhaSointusalo
Copy link
Contributor

@ChristianBeer

Manager
for a in */BOINC-Manager.po; do echo $a; pofilter --language ${a%%/*} --wx --test printf --nofuzzy $a ; done

Client and others
for a in */BOINC-Client.po; do echo $a; pofilter --language ${a%%/*} --test printf --nofuzzy $a ; done

Setting language is needed so that pofilter doesn't complain about Spanish ¿. Although now it complains about Romanian using outdated cedillas. Tests is limited to printf because those bugs should be the only ones that can crash BOINC and there are so many minor issues that it would take a month to go through all of them.

pofilter might not be the best tool for automation. It has a problem with false positives and it doesn't set exit code. msgfmt sets exit code but the error message it gives is not the best possible:

$ msgfmt -c  es/BOINC-Manager.po
es/BOINC-Manager.po:1427: number of format specifications in 'msgid' and 'msgstr' does not match
es/BOINC-Manager.po:1995: number of format specifications in 'msgid' and 'msgstr' does not match
msgfmt: found 2 fatal errors

There could be other tools to check translations. I found those by googling for "po file check".

@Ageless93
Copy link
Contributor Author

I've tested the BOINC-Manager.mo file from Transifex after Christian gave it to me (thanks!). It has fixed the problem. I've also posted in https://boinc.berkeley.edu/dev/forum_thread.php?id=11871&postid=82074 how people can fix it for their own BOINC for now, a workaround until the new translations are available in newer BOINC versions. My test was for the Spanish only, so the file I link to in that post only has the fix for Spanish, not any other language mentioned in this issue.

I'll wait until the other fixes are done before closing this issue.

ChristianBeer added a commit that referenced this issue Oct 18, 2017
Fixes issues with format strings in various languages. I checked the translations with pofilter and fixed the obvious mistakes myself in transifex. I then forced an update of translations also for languages that are incomplete because the bad format strings are crashing the Manager.

See #2165
@AenBleidd
Copy link
Member

I believe this issue might have been already fixed. Could someone verify it and close this issue?

@AenBleidd
Copy link
Member

Could this issue be closed now?

CC: @Ageless93, @RichardHaselgrove

@ChristianBeer
Copy link
Member

I added a pofilter check for all languages to the script that processes the files from transifex that creates a log the translation manager has to go through. That's the best I could do so far to avoid the same problem in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants