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 2018-03-29 13:50:22

flonou
Member
Registered: 2018-01-24
Posts: 4

How to repare a plugin for translation ?

Hi !

Following the documentation, it says I should use gettext to make my plugin translatable but it gives not example on how to actually create the pot file
I'm working on the reservation plugin and tried to call
xgettext -L PHP -o locales/reservation.pot */*.php

but it seems nothing is extracted.
In the plugin, the translatable texts have the form __('Current Reservations') or _sx('button','Add') for example

What am I doing wrong ?

Offline

#2 2018-03-29 13:55:13

btry
Moderator
Registered: 2015-10-01
Posts: 588

Re: How to repare a plugin for translation ?

Hi

you may have a look to an other plugin to use an already built shell script which extracts strings and  generate a .pot for you

For example the (dead) plugin Simcards: https://github.com/pluginsGLPI/simcard/ … emplate.sh

Note: Dead because the simcards are now in  the core of GLPI 9.2.1+ .


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

#3 2018-03-29 15:08:25

flonou
Member
Registered: 2018-01-24
Posts: 4

Re: How to repare a plugin for translation ?

That's what I needed !

Thanks !

Offline

Board footer

Powered by FluxBB