PacketFence - BTS - PacketFence
View Issue Details
0001773PacketFencei18npublic2014-03-04 04:482014-03-06 09:09
liqiang 
 
highminoralways
newopen 
i386CentOS 6.5
4.1.0 
 
0001773: Why multi-language translation fails
I have translated some strings of file that I18N/en.po to Chinese, and change the file type to utf-8.
Part Content:
=============
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
=============
AND:
=============
# html/pfappserver/root/user/create.tt
msgid "Create Users"
msgstr "????"

# html/pfappserver/root/user/create.tt
msgid "Create local users that trigger specific actions."
msgstr "????????????"

# html/pfappserver/lib/pfappserver/Form/Config/Switch.pm
# html/pfappserver/lib/pfappserver/Form/User.pm
# html/pfappserver/lib/pfappserver/Form/User/Create/Import.pm
# html/pfappserver/lib/pfappserver/Form/User/Create/Single.pm
# html/pfappserver/root/admin/login.tt
# html/pfappserver/root/configurator/admin.tt
# html/pfappserver/root/configurator/database.tt
# html/pfappserver/root/user/list_password.tt
# html/pfappserver/root/user/print.tt
msgid "Username"
msgstr "???"

# html/pfappserver/lib/pfappserver/Form/Authentication/Source/LDAP.pm
# html/pfappserver/lib/pfappserver/Form/Config/Switch.pm
# html/pfappserver/lib/pfappserver/Form/User/Create/Import.pm
# html/pfappserver/lib/pfappserver/Form/User/Create/Single.pm
# html/pfappserver/root/admin/login.tt
# html/pfappserver/root/authentication/source/type/AD.tt
# html/pfappserver/root/authentication/source/type/LDAP.tt
# html/pfappserver/root/configurator/admin.tt
# html/pfappserver/root/configurator/database.tt
# html/pfappserver/root/user/list_password.tt
# html/pfappserver/root/user/print.tt
# html/pfappserver/root/user/view.tt
msgid "Password"
msgstr "??"

# html/pfappserver/root/node/create.tt
# html/pfappserver/root/user/create.tt
msgid "Single"
msgstr "??"
=============

But after the restart the service,
WEB pages is not displayed correctly.

COMMAND:
/usr/local/pf/bin/pfcmd service httpd.admin restart

The WEB page have not button of submit.

WHY?

thanks,
No tags attached.
jpg Source Error.jpg (294,000) 2014-03-04 04:48
https://www.packetfence.org/bugs/file_download.php?file_id=202&type=bug
jpg WEB Error..jpg (57,185) 2014-03-04 04:48
https://www.packetfence.org/bugs/file_download.php?file_id=203&type=bug
jpg

? en.po (135,304) 2014-03-04 04:50
https://www.packetfence.org/bugs/file_download.php?file_id=204&type=bug
Issue History
2014-03-04 04:48liqiangNew Issue
2014-03-04 04:48liqiangFile Added: Source Error.jpg
2014-03-04 04:48liqiangFile Added: WEB Error..jpg
2014-03-04 04:50liqiangFile Added: en.po
2014-03-04 04:51liqiangNote Added: 0003513
2014-03-04 04:55liqiangNote Added: 0003514
2014-03-04 08:56francisNote Added: 0003515
2014-03-04 08:56francisNote Edited: 0003515bug_revision_view_page.php?bugnote_id=3515#r4
2014-03-04 08:56francisNote Deleted: 0003514
2014-03-04 20:38liqiangNote Added: 0003516
2014-03-06 09:09liqiangNote Added: 0003517
2014-03-06 09:09liqiangNote Added: 0003518

Notes
(0003513)
liqiang   
2014-03-04 04:51   
I have uploaded en.po and some pictures.
Please help me,

thanks,
(0003515)
francis   
2014-03-04 08:56   
Have you generated the .mo file?

We generate those files when we create the packages. See the .spec file:

https://github.com/inverse-inc/packetfence/blob/stable/addons/packages/packetfence.spec#L306 [^]

(0003516)
liqiang   
2014-03-04 20:38   
I have not created the *.mo file.
I modified the en.po in lib/pfappserver/I18N/en.po.

I find not relationship between conf/locale/$TRANSLATION/LC_MESSAGES/packetfence.po and WEB UI of admin.

Right?

thanks francis.
(0003517)
liqiang   
2014-03-06 09:09   
I have fixed the problem.

Because the catalyst encoding is not currect,and URL:
http://lists.scsys.co.uk/pipermail/catalyst/2007-August/014822.html [^]
http://wiki.catalystframework.org/wiki/tutorialsandhowtos/using_unicode.view#View:_TT_Templates [^]

pfaddserver.pm:
use Catalyst qw/ -Debug ConfigLoader Unicode::Encoding /;

View: TT Templates:
__PACKAGE__->config( {
    ENCODING => 'utf-8',
} );

OK,
thanks,
(0003518)
liqiang   
2014-03-06 09:09   
PLEASE close this bug, thanks.