You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-05-11 17:11:12

tatoun59
Member
Registered: 2011-10-18
Posts: 31

Problème pour internationaliser un plugin

Bonjour,

J'ai commencé à écrire un plugin.
J'ai lu la doc sur le dev et j'applique les consignes : tout en anglais.
Avec le script extract_template.sh, je génére un fichier .pot
et avec POEdit, je fais une traduction fr_FR.
J'obtiens bien mes fichiers fr_FR.po et fr_FR.mo (mis dans \locales)

Si je mets l'interface en anglais => tout est en anglais. Normal.
Si je switche en français, tout passe en français, sauf mon plugin. Il reste en anglais
Etrangement, si je switche en Deutsch, mon plugin passe en français (donc ma traduction est bien appelée) et évidemment le reste de l'interface est en allemand.
Je précise que je n'ai pas de traduction allemande. J'ai uniquement des fichiers fr_FR.po et fr_FR.mo dans mon dossier locales.

Auriez-vous une idée de ce que j'ai loupé ?
Merci pour l'aide

Offline

#2 2019-05-20 14:23:59

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Problème pour internationaliser un plugin

dans l'en-tête du fichier fr_FR.po, vous avez la bonne langue de définie ? ("Language: fr_FR\n")


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2019-05-20 20:00:08

tatoun59
Member
Registered: 2011-10-18
Posts: 31

Re: Problème pour internationaliser un plugin

oui, 

Voici l'intégralité de mon fichier :

# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-05-11 16:30+0200\n"
"PO-Revision-Date: 2019-05-11 18:48+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"Language: fr_FR\n"

#: setup.php:98
msgid "Installed / not configured"
msgstr "Installé / non configuré"

#: front/properties.form.php:21
msgid "Properties of GLPI"
msgstr "Propriétés de GLPI"

#: front/properties.form.php:51
msgid "Yes"
msgstr "Oui"

#: front/properties.form.php:55
msgid "No"
msgstr "Non"

#: inc/menu.class.php:8 inc/profile.class.php:53 inc/profile.class.php:140
msgid "Properties"
msgstr "Propriétés"

#: inc/profile.class.php:149
msgctxt "button"
msgid "Save"
msgstr "Sauvegarder"

Offline

#4 2019-05-22 15:07:15

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Problème pour internationaliser un plugin

Vous avez essayé de redémarrer Apache pour vider le cache ?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

Board footer

Powered by FluxBB