OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: Paweł on November 07, 2023, 08:28:56 AM

Title: Fatal error in polish version
Post by: Paweł on November 07, 2023, 08:28:56 AM
When trying to save the configuration (System=>Konfiguracja=>Kopie zapasowe), the following fatal error appears:

Fatal error: Uncaught ValueError: Unknown format specifier "t" in /usr/local/opnsense/mvc/app/library/OPNsense/Backup/GDrive.php:64 Stack trace: #0 /usr/local/opnsense/mvc/app/library/OPNsense/Backup/GDrive.php(64): sprintf('Do korzystania ...', '

I have been sending a "crash report" for several months, but the error has not been corrected.
Maybe this forum post will be noticed...
Title: Re: Fatal error in polish version
Post by: msi on November 07, 2023, 10:29:30 AM
Hi Pawel

Interesting, definitely reproducible, here is what I saw:
The source of the polish translation is located here in the 'lang' repository: https://github.com/opnsense/lang - however translations happens on translate.opnsense.org / poeditor.com.


I think I found the culprit! The source currently says:

#. File: /usr/core/src/opnsense/mvc/app/library/OPNsense/Backup/GDrive.php, line: 68
#:
msgid "You need a private key in p12 format to use Google Drive, instructions on how to acquire one can be found %shere%s."
msgstr "Do korzystania z Dysku Google potrzebny jest klucz prywatny w formacie p12, instrukcje jak go zdobyć można znaleźć %tutaj%s."


The last line is missing an opening markup to the documentation (%s):

msgstr "Do korzystania z Dysku Google potrzebny jest klucz prywatny w formacie p12, instrukcje jak go zdobyć można znaleźć %stutaj%s."


In order to (hackishly) update languages I had to do the following

The later was required since switching the language in the UI didn't fully reload the translations.
Can you confirm it fixes your issue to?

I'd have directly contributed the fix on translate.opnsense.org, but currently I can't join the project on poeditor.com ("This project can't accept new contributors a this time. Please try again later")
Title: Re: Fatal error in polish version
Post by: msi on November 07, 2023, 01:05:22 PM
Hi Pawel, consider it fixed!

I've notified the maintainers about the issue with poeditor.com and thus opened a PR for this single-line bugfix instead, which just got merged. You can expect a bump to the opnsense-lang "soon-ish".
Title: Re: Fatal error in polish version
Post by: franco on November 07, 2023, 01:08:17 PM
Thanks a lot... will be updated in 23.7.8.


Cheers,
Franco
Title: Re: Fatal error in polish version
Post by: Paweł on November 10, 2023, 03:58:20 PM
Fixed in 2.7.8.
Thx a lot...