Fatal error in polish version

Started by Paweł, November 07, 2023, 08:28:56 AM

Previous topic - Next topic
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...

November 07, 2023, 10:29:30 AM #1 Last Edit: November 07, 2023, 10:31:20 AM by msi
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.


  • Languages where the string isn't (yet) translated, work, for example German
  • Languages where the string is translated, but the link to the documentation (at the end) is missing, work. for example French
  • Languages where the string is translated, and the link to the documentation (at the end) is formatted, also work. For example Italian.

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

  • Clone the repo
  • Follow the readme describing the installation of dependencies
  • Ignore 'make fetch' since I wanted to use the current .p files (but did 'make test')
  • I edited the line, issued a 'make test', then 'make install'
  • Restarted all services from the console menu ('11')

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

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

Thanks a lot... will be updated in 23.7.8.


Cheers,
Franco