Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
time_since not translatable! redesign! (1 viewing) (1) Guest
Go to bottom Favoured: 1
TOPIC: time_since not translatable! redesign!
#17567
time_since not translatable! redesign! 1 Year, 1 Month ago  
Hi there!

English is a nice language...
The idea of implementing to differ from singular and plural with a hardcoded "s" is nice for the first view. But as soon as you translate, things get ugly and worse...

In German the current result is:
"7 Stundes, 55 Minutes ago" and thats much worse than a complete english output
correct would be: "vor 7 Stunden, 55 Minuten"
And you have to recognize the different position of the "ago".

There are more than one step to get to this point of translation correct.

First, add separate definitions for singular and plural:
DEFINE('_FB_DATE_YEARS', 'Years';
DEFINE('_FB_DATE_MONTHS', 'Months';
DEFINE('_FB_DATE_WEEKS','Weeks';
DEFINE('_FB_DATE_DAYS', 'Days';
DEFINE('_FB_DATE_HOURS', 'Hours';
DEFINE('_FB_DATE_MINUTES', 'Minutes';

Then correct the output within class.fireboard.php to:
@949 (replace)
$chunks = array(
array(60 * 60 * 24 * 365 , _FB_DATE_YEAR, _FB_DATE_YEARS),
array(60 * 60 * 24 * 30 , _FB_DATE_MONTH, _FB_DATE_MONTHS),
array(60 * 60 * 24 * 7, _FB_DATE_WEEK, _FB_DATE_WEEKS),
array(60 * 60 * 24 , _FB_DATE_DAY, _FB_DATE_DAYS),
array(60 * 60 , _FB_DATE_HOUR, _FB_DATE_HOURS),
array(60 , _FB_DATE_MINUTE, _FB_DATE_MINUTES),
);
@973 (add)
$names = $chunks[$i][2];
@983 (replace)
$output = ($count == 1) ? '1 '.$name : "$count {$names}";
@989 (add)
$names2 = $chunks[$i + 1][2];
@994 (replace)
$output .= ($count2 == 1) ? ', 1 '.$name2 : ", $count2 {$names2}";

That way, foreign pluralization could be done correctly in general.

Attention too:
components/com_fireboard/template/default/message.php
@165
Is containing "ago" as concatenation
Add it to the CONSTs as a format like "%time% ago"
and do a replacement for %time%...
Only that way it is possible to translate this thing correctly!

BTW: Some people are moaning they want the full date back instead of date/time diffs...
Why don't you implement such extensions as Optional things :-?
Its no good idea to change things by default.
(And still that format (currently displayed as title) is un-localized! Still the CONSTs for date format unused

Love to see that changing (no need to say soon )
Graceful GrEeZ!
Miro Dietiker (User)
Expert Boarder
Posts: 155
graphgraph
User Offline Click here to see the profile of this user
Gender: Male miro_dietiker MD Systems miro.dietiker@md-systems.ch Location: Zurich, Switzerland Birthdate: 1980-10-30
Logged Logged
 
Last Edit: 2007/08/09 03:47 By Miro Dietiker.
 
Boarding with FIRE .-) -- Professional OpenSource developer
 
The administrator has disabled public write access.  
#17578
Re:time_since not translatable! redesign! 1 Year, 1 Month ago  
Let's me give a hand.

ago:
Modification:
components/com_fireboard/template/default/message.php
At line 155: ago, you should change to _FB_AGO and included it in the language file.

since time:
I think, It is better to show the posted time (11/7/2007 08:11), not scince (2 weeks 3 days 2hours.. ago):

Line 155:
Find:
time_since($fmessage->time , time() + ($fbConfig['board_ofset'] * 3600));
and replace by
" " . _POSTED_AT ." " .date(_DATETIME,$fmessage->time);
viet4777 (User)
Gold Boarder
Posts: 287
graphgraph
User Offline Click here to see the profile of this user
Luyenkim.NET
Logged Logged
 
Luyenkim.Net
utf-8 Vietnamese language package will be complete in mid of Oct.
luyenkim.net/home9/index.php?option=com_...5&id=282#282
 
The administrator has disabled public write access.  
#17590
Re:time_since not translatable! redesign! 1 Year, 1 Month ago  
My words, viet

Keep going on
Miro Dietiker (User)
Expert Boarder
Posts: 155
graphgraph
User Offline Click here to see the profile of this user
Gender: Male miro_dietiker MD Systems miro.dietiker@md-systems.ch Location: Zurich, Switzerland Birthdate: 1980-10-30
Logged Logged
 
Boarding with FIRE .-) -- Professional OpenSource developer
 
The administrator has disabled public write access.  
#17609
Re:time_since not translatable! redesign! 1 Year, 1 Month ago  
I also reported this issue already. It would be really great to solve it "officially" due to internationalization.

Anyway, many thanks both of you for this hack.
LocaLiceR (User)
FB Translation Team
"Do It Now!"
Moderator
Posts: 335
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Joomla.org.hu Location: Hungary Birthdate: 1958-10-14
Logged Logged
 
Last Edit: 2007/08/09 20:25 By LocaLiceR.
 
Do not give fish to the hungry man teach him how to fish instead
 
The administrator has disabled public write access.  
#17622
Re:time_since not translatable! redesign! 1 Year, 1 Month ago  
Would you please post a reference to your report?

I didn't find it so i posted it here ... (again?)

PS: We didn't hack our install, but are awaiting official correction of this issue!

Hopefully within 1.0.2 (RC3?)

ThX
Miro Dietiker (User)
Expert Boarder
Posts: 155
graphgraph
User Offline Click here to see the profile of this user
Gender: Male miro_dietiker MD Systems miro.dietiker@md-systems.ch Location: Zurich, Switzerland Birthdate: 1980-10-30
Logged Logged
 
Boarding with FIRE .-) -- Professional OpenSource developer
 
The administrator has disabled public write access.  
#17653
Re:time_since not translatable! redesign! 1 Year, 1 Month ago  
Though the word "reported" is linked to my report, here is the link:
www.bestofjoomla.com/component/option,co...d,69/id,16778/#16777
LocaLiceR (User)
FB Translation Team
"Do It Now!"
Moderator
Posts: 335
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Joomla.org.hu Location: Hungary Birthdate: 1958-10-14
Logged Logged
 
Do not give fish to the hungry man teach him how to fish instead
 
The administrator has disabled public write access.  
#17662
Re:time_since not translatable! redesign! 1 Year, 1 Month ago  
Ooops .-)

Thanks...

For blind users (such as me) an other decoration would be useful
Well, in principle i simply should have seen that.
Miro Dietiker (User)
Expert Boarder
Posts: 155
graphgraph
User Offline Click here to see the profile of this user
Gender: Male miro_dietiker MD Systems miro.dietiker@md-systems.ch Location: Zurich, Switzerland Birthdate: 1980-10-30
Logged Logged
 
Boarding with FIRE .-) -- Professional OpenSource developer
 
The administrator has disabled public write access.  
#22279
Re:time_since not translatable! redesign! 12 Months ago  
THX,
Works great for my site!

Joomla 1.0.13
CBE-Beta1-1/2 0.702pk
Fireboard 1.0.3 stable
AdsManager 2.1.8
breaky (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
ICQ#: 1726207 Gender: Male Dorfcommunity Location: 59846 Sundern - Meinkenbracht Birthdate: 1974-01-09
Logged Logged
 
Last Edit: 2007/09/12 20:54 By breaky.
 
The administrator has disabled public write access.  
#23413
Re:time_since not translatable! redesign! 11 Months, 3 Weeks ago  
viet4777 wrote:
Let's me give a hand.

components/com_fireboard/template/default/message.php

I think, It is better to show the posted time (11/7/2007 08:11), not scince (2 weeks 3 days 2hours.. ago):

Find:

time_since($fmessage->time , time() + ($fbConfig['board_ofset'] * 3600));
and replace by
" " . _POSTED_AT ." " .date(_DATETIME,$fmessage->time);

This worked PERFECTLY. Thanks!
jnovice001 (User)
Junior Boarder
Posts: 37
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#24012
Re:time_since not translatable! redesign! 11 Months, 3 Weeks ago  
This issue was committed on svn now (>1.0.3 stable: trunk and release 1.0)

Next release you'll get that functionality.
Miro Dietiker (User)
Expert Boarder
Posts: 155
graphgraph
User Offline Click here to see the profile of this user
Gender: Male miro_dietiker MD Systems miro.dietiker@md-systems.ch Location: Zurich, Switzerland Birthdate: 1980-10-30
Logged Logged
 
Boarding with FIRE .-) -- Professional OpenSource developer
 
The administrator has disabled public write access.  
Go to top
Powered by FireBoard - Creditsget the latest posts directly to your desktop