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

Weathermap 1.3 - php fatal error with internationalization #147

Open
nbz6 opened this issue May 15, 2024 · 7 comments
Open

Weathermap 1.3 - php fatal error with internationalization #147

nbz6 opened this issue May 15, 2024 · 7 comments
Labels

Comments

@nbz6
Copy link

nbz6 commented May 15, 2024

I updated cacti 1.2.26 to 1.2.27 without issue.
But when I updated weathermap 1.2 to 1.3, cacti no longer loads, a blank page.

php error log :
[Wed May 15 12:54:49.309540 2024] [php7:error] [pid 533313] [client x.x.x.x:56625] PHP Fatal error: Uncaught InvalidArgumentException: '/appli/cacti/plugins/weathermap/locales/LC_MESSAGES/fr-FR.mo' is not a readable file in /appli/cacti/include/vendor/gettext/src/Extractors/Extractor.php:41\nStack trace:\n#0 /appli/cacti/include/vendor/gettext/src/Extractors/Extractor.php(16): Gettext\\Extractors\\Extractor::getFiles()\n#1 [internal function]: Gettext\\Extractors\\Extractor::fromFile()\n#2 /appli/cacti/include/vendor/gettext/src/Translations.php(174): call_user_func()\n#3 [internal function]: Gettext\\Translations->__call()\n#4 /appli/cacti/include/vendor/gettext/src/Translations.php(153): call_user_func_array()\n#5 /appli/cacti/include/global_languages.php(411): Gettext\\Translations::__callStatic()\n#6 /appli/cacti/include/global_languages.php(198): load_gettext_oscarotero()\n#7 /appli/cacti/include/global.php(545): include_once('/appli/cacti-pr...')\n#8 /appli/cacti/include/auth.php(27): require_once('/appli/cacti-pr...')\n#9 /appli/cacti/index.php(25): include('/appli/ca in /appli/cacti/include/vendor/gettext/src/Extractors/Extractor.php on line 41

So I renamed the plugins/weathermap/locales/LC_MESSAGES/fr-FR.mo file to be able load Cacti.
I haven't tried with others languages.
PHP 7.4

@TheWitness
Copy link
Member

I meant update weathermap.

@TheWitness
Copy link
Member

Can you go into the locales directory and run the build_gettext.sh script?

@TheWitness
Copy link
Member

No feedback.

@nbz6
Copy link
Author

nbz6 commented Jul 20, 2024

Sorry, I'll try to do this next week at work.
I didn't want to run this on our production environment but I didn't have time to create another environment to test yet.

Also I noticed a problem with the French translation on Cacti 1.2.27, some action links do nothing with the "French" language but work with the "English" language. I will open another ticket on the Cacti side next week too.

@TheWitness
Copy link
Member

TheWitness commented Jul 20, 2024

Yea, the French issues is known. The solution is to run the build_gettext.sh script in the locales folder.

@TheWitness
Copy link
Member

TheWitness commented Jul 20, 2024

You may have to pull a fresh locales directory from the 1.2.x branch and then run it. My memory is failing me.

@TheWitness
Copy link
Member

I've also done the i18n, most of it anyway in the latest develop. Check it out and provide feedback.

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

No branches or pull requests

2 participants