PacketFence - BTS - PacketFence
View Issue Details
0001470PacketFencei18npublic2012-06-14 19:172012-06-18 08:31
pb1dft 
obilodeau 
normalminorhave not tried
feedbackopen 
3.4.0 
 
0001470: error in guest.pm
on line 271 i18n($_) should be i18n()

Otherwise translations for the field names wil not work
No tags attached.
Issue History
2012-06-14 19:17pb1dftNew Issue
2012-06-15 15:17obilodeauNote Added: 0002802
2012-06-15 15:17obilodeauStatusnew => assigned
2012-06-15 15:17obilodeauAssigned To => obilodeau
2012-06-17 22:05pb1dftNote Added: 0002808
2012-06-18 08:31obilodeauNote Added: 0002809
2012-06-18 08:31obilodeauReproducibilityalways => have not tried
2012-06-18 08:31obilodeauStatusassigned => feedback
2012-06-18 08:31obilodeauTarget Version => +1

Notes
(0002802)
obilodeau   
2012-06-15 15:17   
line 271? the closest i18n() call in pf::web::guest is 290 and is:
return ( $FALSE, $GUEST::ERROR_MISSING_MANDATORY_FIELDS, [ join(", ", map { i18n($_) } @missing_fields) 
] );


is this you are talking about?

If so, I don't understand the mistake. map assigns each array member into $_ and we pass it through i18n which returns it translated and it's joined afterwards.

Pretty sure that if you remove $_ nothing will happen. Can you elaborate?

Thanks
(0002808)
pb1dft   
2012-06-17 22:05   
in my case when i removed $_ it translated as it should with it would not translate. I can retry as the language file i'm using is one big mess and i'm halfway translating it again. In other word i started from scratch to make the text more sensible. I would have to test it again when i'm finished.
(0002809)
obilodeau   
2012-06-18 08:31   
Will need to attempt to reproduce in lab. Before then if you can try again it will be appreciated.