Discussion:
[PacketFence-users] Language strings in .pm files
Kandalaft George
2017-05-29 14:23:40 UTC
Permalink
Hello

We are using Packetfence in French and there are language string in some .pm file which appear in English, for example in /captive-portal/lib/captiveportal/Controller/Activate/Email.pm

How can we add those strings to the language file as they are not called with i18n.

Thank you

George
Fabrice Durand
2017-05-29 15:22:39 UTC
Permalink
Hello George,

which version are you running and do you have any example ?

Regards

Fabrice
Post by Kandalaft George
Hello
We are using Packetfence in French and there are language string in
some .pm file which appear in English, for example in
/captive-portal/lib/captiveportal/Controller/Activate/Email.pm
How can we add those strings to the language file as they are not called with i18n.
Thank you
George
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
https://lists.sourceforge.net/lists/listinfo/packetfence-users
--
Fabrice Durand
***@inverse.ca :: +1.514.447.4918 (x135) :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence (http://packetfence.org)
Kandalaft George
2017-05-30 08:10:50 UTC
Permalink
Hi Fabrice

We are running version 6.2.1 and here is a string from
/captive-portal/lib/captiveportal/PacketFence/Controller/Activate/Email.pm:

$self->showError($c,
"The activation code provided is invalid."
. " Reasons could be: it never existed, it was already used or has expired."
);

Thanks

George

-----Original Message-----

Date: Mon, 29 May 2017 11:22:39 -0400
From: Fabrice Durand <***@inverse.ca>
To: packetfence-***@lists.sourceforge.net
Subject: Re: [PacketFence-users] Language strings in .pm files
Message-ID: <a02541ed-5156-53c9-870e-***@inverse.ca>
Content-Type: text/plain; charset="windows-1252"

Hello George,

which version are you running and do you have any example ?

Regards

Fabrice
Fabrice Durand
2017-05-31 19:14:21 UTC
Permalink
Hello George,

sorry for the delay.


In fact it suppose to be localized but our script to extract string
missed all the lines that contain showError.

I did a fix in github for the newer version but you can patch your setup
to make it work.

So do what i have modified in Email.pm
(https://github.com/inverse-inc/packetfence/commit/07cab346e13a5c9ee8e7cf56bba591aeaccb1baa)
then edit conf/locale/fr/LC_MESSAGES/packetfence.po

and add that:

# html/captive-
# portal/lib/captiveportal/PacketFence/Controller/Activate/Email.pm
msgid ""
"The activation code provided is invalid. Reasons could be: it never
existed,"
" it was already used or has expired."
msgstr "Le code d'activation entré est invalide. Les raisons pourraient
être: il n'a jamais existé, il a déja êté utilisé ou expiré. "

Then do:

for TRANSLATION in de en es fr he_IL it nl pl_PL pt_BR; do
/usr/bin/msgfmt conf/locale/$TRANSLATION/LC_MESSAGES/packetfence.po \
--output-file conf/locale/$TRANSLATION/LC_MESSAGES/packetfence.mo
done


Or wait for the 7.1 version.

Regards

Fabrice
Post by Kandalaft George
Hi Fabrice
We are running version 6.2.1 and here is a string from
$self->showError($c,
"The activation code provided is invalid."
. " Reasons could be: it never existed, it was already used or has expired."
);
Thanks
George
-----Original Message-----
Date: Mon, 29 May 2017 11:22:39 -0400
Subject: Re: [PacketFence-users] Language strings in .pm files
Content-Type: text/plain; charset="windows-1252"
Hello George,
which version are you running and do you have any example ?
Regards
Fabrice
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
https://lists.sourceforge.net/lists/listinfo/packetfence-users
--
Fabrice Durand
***@inverse.ca :: +1.514.447.4918 (x135) :: www.inverse.ca
Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence (http://packetfence.org)
Kandalaft George
2017-06-01 11:54:46 UTC
Permalink
Hi Fabrice

It works

Thanks

George

-----Original Message-----
From: Fabrice Durand [mailto:***@inverse.ca]
Sent: Wednesday, May 31, 2017 9:14 PM
To: packetfence-***@lists.sourceforge.net
Subject: Re: [PacketFence-users] Language strings in .pm files

Hello George,

sorry for the delay.


In fact it suppose to be localized but our script to extract string missed all the lines that contain showError.

I did a fix in github for the newer version but you can patch your setup to make it work.

So do what i have modified in Email.pm
(https://github.com/inverse-inc/packetfence/commit/07cab346e13a5c9ee8e7cf56bba591aeaccb1baa)
then edit conf/locale/fr/LC_MESSAGES/packetfence.po

and add that:

# html/captive-
# portal/lib/captiveportal/PacketFence/Controller/Activate/Email.pm
msgid ""
"The activation code provided is invalid. Reasons could be: it never existed,"
" it was already used or has expired."
msgstr "Le code d'activation entré est invalide. Les raisons pourraient
être: il n'a jamais existé, il a déja êté utilisé ou expiré. "

Then do:

for TRANSLATION in de en es fr he_IL it nl pl_PL pt_BR; do
/usr/bin/msgfmt conf/locale/$TRANSLATION/LC_MESSAGES/packetfence.po \
--output-file conf/locale/$TRANSLATION/LC_MESSAGES/packetfence.mo
done


Or wait for the 7.1 version.

Regards

Fabrice
Post by Kandalaft George
Hi Fabrice
We are running version 6.2.1 and here is a string from
$self->showError($c,
"The activation code provided is invalid."
. " Reasons could be: it never existed, it was already used or has expired."
);
Thanks
George
-----Original Message-----
Date: Mon, 29 May 2017 11:22:39 -0400
Subject: Re: [PacketFence-users] Language strings in .pm files
Content-Type: text/plain; charset="windows-1252"
Hello George,
which version are you running and do you have any example ?
Regards
Fabrice
----------------------------------------------------------------------
-------- Check out the vibrant tech community on one of the world's
most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
https://lists.sourceforge.net/lists/listinfo/packetfence-users
--
Fabrice Durand
***@inverse.ca :: +1.514.447.4918 (x135) :: www.inverse.ca Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence (http://packetfence.org)



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
PacketFence-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-users
Continue reading on narkive:
Loading...