You are not logged in.
What does this error mean?
PHP User Warning (512): Missing mandatory locale headers in "/var/www/glpi/locales/......."
I see this post in php-errors.log.
The error appeared after I edited in the special program the ".po" file by generating a ".mo" file. New files put in locales.
Offline
The PO file is missing the required information about the language. At the start of the file, after the comments and before the first real translation should be an entry with a msgid of "" followed by several strings in a "Key: Value" format. The error you are getting appears if there are no "Language: " or "Plural-Forms: " lines.
The lines for example in en_GB.po:
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
There should be other lines here, but those are the two that will trigger the error if they are missing.
GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.
Offline
Hello!
Thanks for the answer!
I checked everything you wrote is in place.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-11-03 08:42+0000\n"
"PO-Revision-Date: 2023-02-22 11:01+0300\n"
"Last-Translator: Nick Pryazhnikov, 2022\n"
"Language-Team: Russian (Russia) (link)\n"
"Language: ru_RU\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : "
"n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
"X-Generator: Poedit 3.2.2\n"
the error was in this lines - extra quotes:
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 :
n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
Last edited by Infinium (2023-07-17 19:40:56)
Offline