*

Jason

  • **
  • 19 posts
what code includes translation in plugin files and in themes
« on: August 06, 2023, 01:57:03 PM »
MB Themes where to send the translation file so that you can check the plugin blog 1.5.8
I want to find an error in the plugin, but I don't know what code is missing to display the translation.
Osclass 8.1.2
I liked the blog plugin from MB Themes, but the translation is not included.
When I turn on my language and try to enter the translation panel, an error is displayed

   localhost/site.com/oc-admin/index.php?page=translations

<html lang="ru">
   <head>
   <meta charset="utf-8">
   <title><br />
   <b>Fatal error</b>: Uncaught ValueError: Unknown format specifier &quot;�&quot; in C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php:50
   Stack trace:
   #0 C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php(50): sprintf()
   #1 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\classes\Plugins.php(69): customPageTitle()
   #2 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\helpers\hPlugins.php(46): Plugins::applyFilter()
   #3 C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\parts\header.php(6): osc_apply_filter()
   #4 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\helpers\hDefines.php(332): require('C:\\OSPanel\\doma...')
   #5 C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php(59): osc_current_admin_theme_path()
   #6 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\helpers\hDefines.php(332): require('C:\\OSPanel\\doma...')
   #7 C:\OSPanel\domains\localhost\site.com\oc-admin\translations.php(617): osc_current_admin_theme_path()
   #8 C:\OSPanel\domains\localhost\site.com\oc-admin\translations.php(608): CAdminTranslations-&gt;doView()
   #9 C:\OSPanel\domains\localhost\site.com\oc-admin\index.php(165): CAdminTranslations-&gt;doModel()
   #10 {main}
   thrown in <b>C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php</b> on line <b>50</b><br />

If I go to the admin panel with English, then the translation works, but with errors.
Errors when translating from the site admin panel:
  translation is not inserted between empty quotes in strings msgid ""
And it is inserted simply in double quotes.
#: ../oc-content/plugins/Blog/functions.php:460
#: ../oc-content/plugins/Blog/admin/blog.php:199
#: ../oc-content/plugins/Blog/form/publish.php:80
msgid "Public"
msgstr ""
"Публичный\r\n"
""
I also tried poeditor, translated everything correctly, compiled the .mo file, updated the plugin translation, deleted the cache, restarted apache/
My language is not included.
Probably in the Blog plugin the function of returning the translation does not work.
« Last Edit: August 07, 2023, 09:57:25 AM by Jason »

*

MB Themes

Re: what code includes translation in plugin files and in themes
« Reply #1 on: August 06, 2023, 02:07:26 PM »
Sorry, not clear what you mean.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Jason

  • **
  • 19 posts
Re: what code includes translation in plugin files and in themes
« Reply #2 on: August 07, 2023, 08:18:43 AM »
Sorry, not clear what you mean.

Osclass 8.1.2
I liked the blog plugin from MB Themes, but the translation is not included.
When I turn on my language and try to enter the translation panel, an error is displayed

   localhost/site.com/oc-admin/index.php?page=translations

<html lang="ru">
   <head>
   <meta charset="utf-8">
   <title><br />
   <b>Fatal error</b>: Uncaught ValueError: Unknown format specifier &quot;�&quot; in C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php:50
   Stack trace:
   #0 C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php(50): sprintf()
   #1 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\classes\Plugins.php(69): customPageTitle()
   #2 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\helpers\hPlugins.php(46): Plugins::applyFilter()
   #3 C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\parts\header.php(6): osc_apply_filter()
   #4 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\helpers\hDefines.php(332): require('C:\\OSPanel\\doma...')
   #5 C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php(59): osc_current_admin_theme_path()
   #6 C:\OSPanel\domains\localhost\site.com\oc-includes\osclass\helpers\hDefines.php(332): require('C:\\OSPanel\\doma...')
   #7 C:\OSPanel\domains\localhost\site.com\oc-admin\translations.php(617): osc_current_admin_theme_path()
   #8 C:\OSPanel\domains\localhost\site.com\oc-admin\translations.php(608): CAdminTranslations-&gt;doView()
   #9 C:\OSPanel\domains\localhost\site.com\oc-admin\index.php(165): CAdminTranslations-&gt;doModel()
   #10 {main}
   thrown in <b>C:\OSPanel\domains\localhost\site.com\oc-admin\themes\omega\translations\index.php</b> on line <b>50</b><br />

If I go to the admin panel with English, then the translation works, but with errors.
Errors when translating from the site admin panel:
  translation is not inserted between empty quotes in strings msgid ""
And it is inserted simply in double quotes.
#: ../oc-content/plugins/Blog/functions.php:460
#: ../oc-content/plugins/Blog/admin/blog.php:199
#: ../oc-content/plugins/Blog/form/publish.php:80
msgid "Public"
msgstr ""
"Публичный\r\n"
""
I also tried poeditor, translated everything correctly, compiled the .mo file, updated the plugin translation, deleted the cache, restarted apache/
My language is not included.
Probably in the Blog plugin the function of returning the translation does not work.