squentin / gmusicbrowser

jukebox for large collections of music
http://gmusicbrowser.org
GNU General Public License v3.0
194 stars 42 forks source link

Fix the warning: Use of uninitialized value $thousandsep in substitut… #213

Closed demanuel closed 2 years ago

demanuel commented 2 years ago

…ion (s///) at gmusicbrowser.pl line 234.

Not all locales have thousand_sep as demonstrated by the following code on my computer:

perl -MData::Dumper -MPOSIX -e 'print Dumper(POSIX::localeconv())' $VAR1 = { 'p_sep_by_space' => 1, 'int_p_sep_by_space' => 1, 'n_sep_by_space' => 1, 'decimal_point' => ',', 'frac_digits' => 2, 'p_cs_precedes' => 0, 'int_frac_digits' => 2, 'n_cs_precedes' => 0, 'int_p_cs_precedes' => 0, 'int_n_sign_posn' => 1, 'mon_grouping' => '', 'int_p_sign_posn' => 1, 'int_curr_symbol' => 'EUR ', 'int_n_cs_precedes' => 0, 'mon_thousands_sep' => '.', 'negative_sign' => '-', 'currency_symbol' => "\x{20ac}", 'mon_decimal_point' => ',', 'int_n_sep_by_space' => 1, 'p_sign_posn' => 1, 'n_sign_posn' => 1 };

And also addresses #207

First PR! :-D

EDIT: Sorry for two fixes being in the same PR. I pretended to make only one fix that i forgot to change branch.