Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: "downloads" can be translated two ways Jul 20th, 2014 at 12:50pm Mark & QuoteQuote Code Index: cgi-bin/yabb2/Languages/English/FA.lng =================================================================== --- cgi-bin/yabb2/Languages/English/FA.lng (revision 1513) +++ cgi-bin/yabb2/Languages/English/FA.lng (working copy) @@ -89,6 +89,7 @@ '41' => 'File Size', '41a' => 'Downloads', '41b' => 'Download', +'41c' => 'Downloads', # n downloads '42' => 'Posted By', '42a' => 'Attached By', '43' => 'Date', Index: cgi-bin/yabb2/Sources/Display.pm =================================================================== --- cgi-bin/yabb2/Sources/Display.pm (revision 1513) +++ cgi-bin/yabb2/Sources/Display.pm (working copy) @@ -870,7 +870,7 @@ my $filesize = -s "$uploaddir/$_"; $urlname = $_; $urlname =~ s/([^A-Za-z0-9])/sprintf('%%%02X', ord($1))/egxsm; - $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41a'}; + $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41c'}; if ($filesize) { if ( $_ =~ /\.(bmp|jpe|jpg|jpeg|gif|png)$/ixsm && $amdisplaypics == 1 ) Index: cgi-bin/yabb2/Sources/Printpage.pm =================================================================== --- cgi-bin/yabb2/Sources/Printpage.pm (revision 1513) +++ cgi-bin/yabb2/Sources/Printpage.pm (working copy) @@ -676,7 +676,7 @@ : "$micon_bg{'paperclip'}"; } my $filesize = -s "$uploaddir/$_"; - $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41a'}; + $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41c'}; if ($filesize) { if ( $_ =~ /\.(bmp|jpe|jpg|jpeg|gif|png)$/ixsm && $amdisplaypics == 1 ) GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2234 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: "downloads" can be translated two ways Reply #1 - Jul 20th, 2014 at 1:55pm Mark & QuoteQuote If we make it (as a mod in this case) Code (Perl)if ($fatxt{'41c'}) {$fatxt{'41a'} = $fatxt{'41c'};} $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41a'}; That way other languages that don't need it won't be affected. Perfection is not possible. Excellence, however, is excellent. WWW IP Logged
Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: Re: "downloads" can be translated two ways Reply #2 - Jul 20th, 2014 at 1:59pm Mark & QuoteQuote Dandello wrote on Jul 20th, 2014 at 1:55pm:If we make it (as a mod in this case) Code (Perl)if ($fatxt{'41c'}) {$fatxt{'41a'} = $fatxt{'41c'};} $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41a'}; That way other languages that don't need it won't be affected. Overwriting variables at run-time is something I try to avoid... Can cause weird bugs that are hard to trace... Instead you should try something like this: Code $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : (($fatxt{'41c'}) ? $fatxt{'41c'} : $fatxt{'41a'}); GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2234 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: "downloads" can be translated two ways Reply #3 - Jul 20th, 2014 at 3:01pm Mark & QuoteQuote This is why it's good to have more than one coder onboard. Perfection is not possible. Excellence, however, is excellent. WWW IP Logged
Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: Re: "downloads" can be translated two ways Reply #4 - Jul 20th, 2014 at 4:53pm Mark & QuoteQuote Dandello wrote on Jul 20th, 2014 at 3:01pm:This is why it's good to have more than one coder onboard. I'm not a coder, I'm a hacker... That's a difference... GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2234 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: "downloads" can be translated two ways Reply #5 - Jul 20th, 2014 at 5:19pm Mark & QuoteQuote Monni wrote on Jul 20th, 2014 at 4:53pm:I'm not a coder, I'm a hacker... That's a difference... This is Perl - we're all hackers. Perfection is not possible. Excellence, however, is excellent. WWW IP Logged
Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: Re: "downloads" can be translated two ways Reply #6 - Jul 20th, 2014 at 5:30pm Mark & QuoteQuote Dandello wrote on Jul 20th, 2014 at 5:19pm:Monni wrote on Jul 20th, 2014 at 4:53pm:I'm not a coder, I'm a hacker... That's a difference... This is Perl - we're all hackers. lol... the forum logged me out in middle of reply... Eh... I thought this was Perl code that outputs JavaScript and html... Just like I used to also write TCL code that did output PHP code that did output... eh... GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2234 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: "downloads" can be translated two ways Reply #7 - Jul 20th, 2014 at 5:49pm Mark & QuoteQuote YaBB has the distinction of being one of the first Perl software forum packages (if not THE first Perl software forum package) that uses a framework. (Which outputs html and javascript. And one of the issues JonB has been having in getting the BoardMod.org code to work is that IT was outputting some sections to PHP.) Perfection is not possible. Excellence, however, is excellent. WWW IP Logged
Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: Re: "downloads" can be translated two ways Reply #8 - Jul 20th, 2014 at 5:58pm Mark & QuoteQuote Dandello wrote on Jul 20th, 2014 at 5:49pm:YaBB has the distinction of being one of the first Perl software forum packages (if not THE first Perl software forum package) that uses a framework. (Which outputs html and javascript. And one of the issues JonB has been having in getting the BoardMod.org code to work is that IT was outputting some sections to PHP.) The first Perl code ever I was working on was SMB2WWW... For some weird reason I decided I wanted it to be internationalized Since then I have been working on internationalization projects... GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2234 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: "downloads" can be translated two ways Reply #9 - Jul 20th, 2014 at 7:17pm Mark & QuoteQuote Monni wrote on Jul 20th, 2014 at 5:58pm:Since then I have been working on internationalization projects... Keep up the good work. Perfection is not possible. Excellence, however, is excellent. WWW IP Logged
Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: Re: "downloads" can be translated two ways Reply #10 - Aug 31st, 2014 at 10:35am Mark & QuoteQuote Using the new isempty(): Code Index: cgi-bin/yabb2/Sources/Display.pm =================================================================== --- cgi-bin/yabb2/Sources/Display.pm (revision 1557) +++ cgi-bin/yabb2/Sources/Display.pm (working copy) @@ -870,7 +870,7 @@ my $filesize = -s "$uploaddir/$_"; $urlname = $_; $urlname =~ s/([^A-Za-z0-9])/sprintf('%%%02X', ord($1))/egxsm; - $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41a'}; + $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : isempty( $fatxt{'41c'}, $fatxt{'41a'} ); if ($filesize) { if ( $_ =~ /\.(bmp|jpe|jpg|jpeg|gif|png)$/ixsm && $amdisplaypics == 1 ) Index: cgi-bin/yabb2/Sources/Printpage.pm =================================================================== --- cgi-bin/yabb2/Sources/Printpage.pm (revision 1557) +++ cgi-bin/yabb2/Sources/Printpage.pm (working copy) @@ -676,7 +676,7 @@ : "$micon_bg{'paperclip'}"; } my $filesize = -s "$uploaddir/$_"; - $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : $fatxt{'41a'}; + $download_txt = ( $attach_count{$_} == 1 ) ? $fatxt{'41b'} : isempty( $fatxt{'41c'}, $fatxt{'41a'} ); if ($filesize) { if ( $_ =~ /\.(bmp|jpe|jpg|jpeg|gif|png)$/ixsm && $amdisplaypics == 1 ) GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged