Page Index Toggle Pages: [1] 2  ReplyAdd Poll Send Topic
Hot Topic (More than 10 Replies) Suomi Support Mod (Read 17485 times)
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Suomi Support Mod
Jul 18th, 2014 at 3:12am
Mark & QuoteQuote  
Adds the Finnish date suffixes. 
« Last Edit: Jul 28th, 2014 at 1:06pm by Dandello »  

Suomi_date_support_01.zip ( 1 KB | 301 Downloads )

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #1 - Jul 18th, 2014 at 9:16pm
Mark & QuoteQuote  
Improved patch to make month names lowercase when the selected format is day before month

Code
Select All
 Index: cgi-bin/yabb2/Languages/English/Main.lng
 ===================================================================
 --- cgi-bin/yabb2/Languages/English/Main.lng	(revision 1511)
 +++ cgi-bin/yabb2/Languages/English/Main.lng	(working copy)
 @@ -18,6 +18,7 @@

  @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
  @months = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
 +@months_m = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
  @days_short = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); # for smtp

  %maintxt = (
 @@ -129,6 +130,8 @@
  '758' => 'Moved',
  '769' => 'Today',
  '769a'=> 'Yesterday',
 +'770' => '', #month suffix for January 1.
 +'770a' => '', #month suffix for 1. January
  '773' => 'Would you like to print this page now?',
  '900b' => 'Back',
  '900s' => 'Submit',
 Index: cgi-bin/yabb2/Sources/DateTime.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/DateTime.pm	(revision 1511)
 +++ cgi-bin/yabb2/Sources/DateTime.pm	(working copy)
 @@ -205,7 +205,7 @@
      $newmonth     = sprintf '%02d', $newmonth;
      $newshortyear = ( $newyear % 100 );
      $newshortyear = sprintf '%02d', $newshortyear;
 -    if ( $mytimeselected != 4 && $mytimeselected != 8 ) {
 +    if ( $mytimeselected != 4 && $mytimeselected != 6 && $mytimeselected != 8 ) {
          $newday = sprintf '%02d', $newday;
      }
      $newhour   = sprintf '%02d', $newhour;
 @@ -465,7 +465,7 @@
      $ampm = $newhour > 11 ? 'pm' : 'am';
      $newhour2 = $newhour % 12 || 12;
      if   ($use_rfc) { $newmonth2 = $months_rfc[ $newmonth - 1 ]; }
 -    else            { $newmonth2 = $months[ $newmonth - 1 ]; }
 +    else            { $newmonth2 = $months_m[ $newmonth - 1 ]; }
      $newday2 = "$timetxt{'4'}";
      if ( $newday > 10 && $newday < 20 ) {
          $newday2 = "$timetxt{'4'}";
 @@ -481,13 +481,13 @@
          $newformat =
            $daytxt
            ? qq~$daytxt $maintxt{'107'} $newhour2:$newminute$ampm~
 -          : qq~$newmonth2 $newday$newday2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
 +          : qq~$newmonth2$maintxt{'770'} $newday$newday2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
      }
      else {
          $newformat =
            $daytxt
            ? qq~$daytxt $maintxt{'107'} $newhour2:$newminute$ampm~
 -          : qq~$newday$newday2 $newmonth2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
 +          : qq~$newday$newday2 $newmonth2$maintxt{'770a'}, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
      }

      return $newformat;
 @@ -508,11 +508,11 @@
  sub time_6 {
      my ( $daytxt, $newday, $newmonth, $newyear, $newhour, $newminute ) = @_;
      if   ($use_rfc) { $newmonth2 = $months_rfc[ $newmonth - 1 ]; }
 -    else            { $newmonth2 = $months[ $newmonth - 1 ]; }
 +    else            { $newmonth2 = $months_m[ $newmonth - 1 ]; }
      $newformat =
        $daytxt
        ? qq~$daytxt $maintxt{'107'} $newhour:$newminute~
 -      : qq~$newday. $newmonth2 $newyear $maintxt{'107'} $newhour:$newminute~;
 +      : qq~$newday. $newmonth2$maintxt{'770a'} $newyear $maintxt{'107'} $newhour:$newminute~;

      return $newformat;
  }
 @@ -591,7 +591,7 @@
      $ampm = $newhour > 11 ? 'pm' : 'am';
      $newhour2 = $newhour % 12 || 12;
      if   ($use_rfc) { $newmonth2 = $months_rfc[ $newmonth - 1 ]; }
 -    else            { $newmonth2 = $months[ $newmonth - 1 ]; }
 +    else            { $newmonth2 = $months_m[ $newmonth - 1 ]; }
      $newday2 = "$timetxt{'4'}";
      if ( $newday > 10 && $newday < 20 ) {
          $newday2 = "$timetxt{'4'}";
 @@ -606,7 +606,7 @@
      $newformat =
        $daytxt
        ? qq~$daytxt $maintxt{'107'} $newhour2:$newminute$ampm~
 -      : qq~$newday$newday2 $newmonth2, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;
 +      : qq~$newday$newday2 $newmonth2$maintxt{'770a'}, $newyear $maintxt{'107'} $newhour2:$newminute$ampm~;

      return $newformat;
  }
  



I will include the Finnish version of @months_m in the next version of the Finnish language packs.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Suomi Mod
Reply #2 - Jul 18th, 2014 at 9:44pm
Mark & QuoteQuote  
So, in Finnish the months are lowercase if they aren't the first item in the date string?
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #3 - Jul 18th, 2014 at 10:10pm
Mark & QuoteQuote  
Dandello wrote on Jul 18th, 2014 at 9:44pm:
So, in Finnish the months are lowercase if they aren't the first item in the date string?


Yes. There is pretty strict rules about using dates, but I don't want to make it too complicated. I didn't make lower case versions of "Today" and "Yesterday" because it would make the patch too long and complicated to maintain.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Suomi Mod
Reply #4 - Jul 18th, 2014 at 10:50pm
Mark & QuoteQuote  
Maybe that's something that can be revisited if there's another language being translated that has similar grammar rules.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #5 - Jul 18th, 2014 at 11:35pm
Mark & QuoteQuote  
Dandello wrote on Jul 18th, 2014 at 10:50pm:
Maybe that's something that can be revisited if there's another language being translated that has similar grammar rules.


I know quite a few languages where month names are lower case... For example: Estonian, Latvian, Lithuanian, Swedish, Norwegian, Danish, Livonian Wink...
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Suomi Mod
Reply #6 - Jul 19th, 2014 at 12:57am
Mark & QuoteQuote  
I was referring to the Today and Yesterday issue.  Grin
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #7 - Jul 19th, 2014 at 1:29am
Mark & QuoteQuote  
Dandello wrote on Jul 19th, 2014 at 12:57am:
I was referring to the Today and Yesterday issue.  Grin


Today
Estonian = täna
Latvian = šodien
Lithuanian = šiandien
Livonian = tämpõ
Swedish = idag
Norwegian = idag
Danish = i dag

Yesterday
Estonian = eile
Latvian = vakar
Lithuanian = vakar
Livonian = eggiļ
Swedish = igår
Norwegian = igår
Danish = i går

... all lower case
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Suomi Mod
Reply #8 - Jul 19th, 2014 at 2:55am
Mark & QuoteQuote  
Under what circumstances? 
Would it be:
Quote:
Suomi Support Mod
yesterday
at 8:12pm

  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #9 - Jul 19th, 2014 at 6:06am
Mark & QuoteQuote  
Dandello wrote on Jul 19th, 2014 at 2:55am:
Under what circumstances?

Eh?

When it does not start a sentence. As far as I know all words are capitalized if start a sentence. The problem comes down to the fact that how to know inside DateTime.pm if the date string is used standalone or as part of a full sentence. Custom time formats are also pain in the a-s-s.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 852
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Re: Suomi Mod
Reply #10 - Jul 19th, 2014 at 7:46am
Mark & QuoteQuote  
Hi Monni, I have a problem and I can not enter the solution. Can you help me?

http://boardmod.de/cgi-bin/mods/YaBB.pl?num=1405619849/1#1
  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #11 - Jul 19th, 2014 at 8:01am
Mark & QuoteQuote  
pyragony54 wrote on Jul 19th, 2014 at 7:46am:
Hi Monni, I have a problem and I can not enter the solution. Can you help me?

http://boardmod.de/cgi-bin/mods/YaBB.pl?num=1405619849/1#1


Which version of List/AllUtils.pm, List/Util.pm and List/MoreUtils.pm

In meta::cpan it says...

List/AllUtils.pm 0.08
List/Util.pm 1.31
List/MoreUtils.pm 0.28

... belong together.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 852
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Re: Suomi Mod
Reply #12 - Jul 19th, 2014 at 8:16am
Mark & QuoteQuote  
I'll check later. Now I must be abroad. Am back in the afternoon again.
  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Suomi Mod
Reply #13 - Jul 19th, 2014 at 1:45pm
Mark & QuoteQuote  
Monni wrote on Jul 19th, 2014 at 6:06am:
Custom time formats are also pain in the a-s-s.


This is the last version that will have custom time format. (JonB and I discussed this a while back when we started looking at using the time formatting offered by the CPAN DateTime module.)

In terms of knowing when Today/Yesterday start a sentence - I'm pretty sure the only times those would be at the beginning would be for the date of the first post. All the other times those words are (or should be) within a sentence.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Suomi Mod
Reply #14 - Jul 19th, 2014 at 3:56pm
Mark & QuoteQuote  
Dandello wrote on Jul 19th, 2014 at 1:45pm:
Monni wrote on Jul 19th, 2014 at 6:06am:
Custom time formats are also pain in the a-s-s.


This is the last version that will have custom time format. (JonB and I discussed this a while back when we started looking at using the time formatting offered by the CPAN DateTime module.)

In terms of knowing when Today/Yesterday start a sentence - I'm pretty sure the only times those would be at the beginning would be for the date of the first post. All the other times those words are (or should be) within a sentence.


If you want to try adding it to the previous patch... Feel free to test it on this forum and I will notify if I find some spot where it is not what it is supposed to be...
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Suomi Support Mod

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry