A mistake on the phpBB source-code regarding a month?

This is an archive of the phpBB 2.0.x translations forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

A mistake on the phpBB source-code regarding a month?

Post by Linda Carter » Wed Mar 12, 2008 3:52 am

I have contacted the Brazilian support forum on this address:

http://www.suportephpbb.org/forum/viewt ... 52&t=38803

And they were unable to find the reason for this problem.

Warning: This problem is affecting phpBB 2 versions. Tested on phpBB 2.0.23 and it's still there.

I will try to explain.

We are using this PHP date format on the Admin CP and all profiles:

D, d/m/Y, H:i

And all registration dates are listed like that:

Registered on: 25 of January of 2000 (Portuguese Brazilian language uses Day-Month-Year instead of Month-Day-Year).

So, no matter what I do, all registration dates have the 5th month of the year (May) listed like that on the lang_main.php. See the bold area:
$lang['datetime']['Sunday'] = 'Domingo';
$lang['datetime']['Monday'] = 'Segunda-Feira';
$lang['datetime']['Tuesday'] = 'Terça-Feira';
$lang['datetime']['Wednesday'] = 'Quarta-Feira';
$lang['datetime']['Thursday'] = 'Quinta-Feira';
$lang['datetime']['Friday'] = 'Sexta-Feira';
$lang['datetime']['Saturday'] = 'Sábado';
$lang['datetime']['Sun'] = 'Dom';
$lang['datetime']['Mon'] = 'Seg';
$lang['datetime']['Tue'] = 'Ter';
$lang['datetime']['Wed'] = 'Qua';
$lang['datetime']['Thu'] = 'Qui';
$lang['datetime']['Fri'] = 'Sex';
$lang['datetime']['Sat'] = 'Sáb';
$lang['datetime']['January'] = 'Janeiro';
$lang['datetime']['February'] = 'Fevereiro';
$lang['datetime']['March'] = 'Março';
$lang['datetime']['April'] = 'Abril';
$lang['datetime']['May'] = 'Maio';
$lang['datetime']['June'] = 'Junho';
$lang['datetime']['July'] = 'Julho';
$lang['datetime']['August'] = 'Agosto';
$lang['datetime']['September'] = 'Setembro';
$lang['datetime']['October'] = 'Outubro';
$lang['datetime']['November'] = 'Novembro';
$lang['datetime']['December'] = 'Dezembro';
$lang['datetime']['Jan'] = 'Jan';
$lang['datetime']['Feb'] = 'Fev';
$lang['datetime']['Mar'] = 'Mar';
$lang['datetime']['Apr'] = 'Abr';
$lang['datetime']['May'] = 'Mai';
$lang['datetime']['Jun'] = 'Jun';
$lang['datetime']['Jul'] = 'Jul';
$lang['datetime']['Aug'] = 'Ago';
$lang['datetime']['Sep'] = 'Set';
$lang['datetime']['Oct'] = 'Out';
$lang['datetime']['Nov'] = 'Nov';
$lang['datetime']['Dec'] = 'Dez';
"Maio" is the translation of the english word "May". The brazilian short word is "Mai".

The same goes for January, which is represented on the short three words: Jan in both languages.

Like I said, somehow phpBB is not listing "Maio" as "Maio", and it's only using "Mai".

All 11 months are listed like that, on the registration dates:

$lang['datetime']['January'] = 'Janeiro';
$lang['datetime']['February'] = 'Fevereiro';
$lang['datetime']['March'] = 'Março';
$lang['datetime']['April'] = 'Abril';
$lang['datetime']['June'] = 'Junho';
$lang['datetime']['July'] = 'Julho';
$lang['datetime']['August'] = 'Agosto';
$lang['datetime']['September'] = 'Setembro';
$lang['datetime']['October'] = 'Outubro';
$lang['datetime']['November'] = 'Novembro';
$lang['datetime']['December'] = 'Dezembro';

But that's not happening with "Maio".

Is there anything that can be done to solve this issue? I told them to fill the short term "Mai" with "O", but that will solve the problem and break the code in the process (if someone chooses to use a different PHP date format).

If you want to check this, here's the Portuguese-Brazilian language, not modified and taken from them.

http://rapidshare.com/files/98872741/la ... l.zip.html

Any questions, please ask. :)
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50699
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: A mistake on the phpBB source-code regarding a month?

Post by Brf » Wed Mar 12, 2008 3:56 am

That is because the first and second $lang['datetime']['May'] are pointing to the same array cell.
This should be reported as a bug.

User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Re: A mistake on the phpBB source-code regarding a month?

Post by Linda Carter » Wed Mar 12, 2008 4:02 am

Well, BrF, finally someone get my point! :)

Where should I go to report this as a bug? Is there a place where we can do this? :oops:

I always saw that mistake on phpBB forums and never thought about that. In the end, that was not some set used on PHP format dates, it was a mistake on the phpBB source code, preventing the 5th month of year to be listed correctly. :(
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50699
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: A mistake on the phpBB source-code regarding a month?

Post by Brf » Wed Mar 12, 2008 4:07 am

It should be reported on Bugtracker on the Development tab.

Explain that
$lang['datetime']['January'] and $lang['datetime']['Jan'] point to different array-cells, but
$lang['datetime']['May'] and $lang['datetime']['May'] are the same cell, therefore you cannot store both a long translation for May, as well as its abbreviation.

User avatar
John Hjorth
Registered User
Posts: 603
Joined: Sun Aug 07, 2005 8:24 am
Location: Odense, Denmark, EU
Contact:

Re: A mistake on the phpBB source-code regarding a month?

Post by John Hjorth » Wed Mar 12, 2008 11:37 am

A fully similar bug ticket was reported in phpBB 3.0 some time ago, when phpBB 3.0 was in Beta or RC stage.
John Hjorth • Official Danish phpBB language package maintainer and translator
The Danish Olympus & Ascreaus translation projectDanish phpBB support site

User avatar
Linda Carter
Registered User
Posts: 514
Joined: Fri Feb 15, 2008 6:45 am

Re: A mistake on the phpBB source-code regarding a month?

Post by Linda Carter » Wed Mar 12, 2008 8:40 pm

I have one answer from the dev member:

It is fixed within phpBB3. phpBB2 will see no such fix. :roll:

Well, at least I have fixed myself by changing this thing.
"Whoever has not known himself has known nothing. But whoever has known himself has simultaneously achieved knowledge about the depth of all things."

Locked

Return to “[2.0.x] Translations”

Who is online

Users browsing this forum: No registered users and 1 guest