Solved: 2 Years, 11 Months, 2 Weeks ago Post header date is not displayed.
#1
Solved: 2 Years, 11 Months, 2 Weeks ago
Hello !
I have this problem. It was supposed to show the date and time. But only the time is being displayed (image attached).
Thanks for your attention and help.

   
Reply
#2
Solved: 2 Years, 11 Months, 2 Weeks ago
Might be a language pack entry issue or a wrong board configuration.

Check:
- Language entries rel_* in global.lang.php of the used language.
- Various settings in Board Settings » Date and Time Formats from AdminCP.
Could be wrong but worth a try.
Email me at: [email protected]
Reply
#3
Solved: 2 Years, 11 Months, 2 Weeks ago
(2022-01-30, 01:57 PM)noyle Wrote: Might be a language pack entry issue or a wrong board configuration.

Check:
- Language entries rel_* in global.lang.php of the used language.
- Various settings in Board Settings » Date and Time Formats from AdminCP.

Hi...thanks for the feeback.

global.lang.php (portuguese)

$l['rel_in'] = 'Em';

$l['rel_ago'] = 'atrás';
$l['rel_less_than'] = 'Menos que ';
$l['rel_time'] = '<span title="{5}{6}">{1}{2} {3} {4}</span>';
$l['rel_minutes_single'] = 'minuto';
$l['rel_minutes_plural'] = 'minutos';
$l['rel_hours_single'] = 'hora';
$l['rel_hours_plural'] = 'horas';

The same happens here

English
$l['welcome_back'] = "<strong>Welcome back, {1}</strong>. You last visited: {2}";

Portuguese
$l['welcome_back'] = '<strong>Bem-vindo, {1}</strong>. Última Visita: {2}';


All over the forum, everything that mentions date and time looks like this:

, hour

or

, 05:10

I didn't change anything in the ACP. Just the time zone.

Where is {2} located?
In English, date and time work perfectly.
But when I select the Portuguese language pack, the problem occurs again.

Thank you!
Reply
#4
Solved: 2 Years, 11 Months, 2 Weeks ago
Portuguese has single quote delimiter.
Maybe that's it.

(2022-01-31, 12:34 PM)HLFadmin Wrote: Portuguese has single quote delimiter.
Maybe that's it.

I note that the original distribution of the translation uses both single and double quotes in different language files, so that may not be a problem.

In the postbit template, {$post['postdate']} displays the date. That data is derived from the my_date function which is used extensively.

So the first thing I would do is look to see if the problem exists where other dates are displayed, like in PMs, in the last post data in the main forum, or forumdisplay, and elsewhere.

If recent dates are malformed but older dates are not, that might narrow it down to relative or absolute.

But I also note my_date function has a plugin hook, so I would also look into a problem related to a plugin.

It might help to look for details with a URL and a test account.
Reply
#5
Solved: 2 Years, 11 Months, 2 Weeks ago
(2022-01-31, 12:34 PM)HLFadmin Wrote: Portuguese has single quote delimiter.
Maybe that's it.

(2022-01-31, 12:34 PM)HLFadmin Wrote: Portuguese has single quote delimiter.
Maybe that's it.

I note that the original distribution of the translation uses both single and double quotes in different language files, so that may not be a problem.

In the postbit template, {$post['postdate']} displays the date. That data is derived from the my_date function which is used extensively.

So the first thing I would do is look to see if the problem exists where other dates are displayed, like in PMs, in the last post data in the main forum, or forumdisplay, and elsewhere.

If recent dates are malformed but older dates are not, that might narrow it down to relative or absolute.

But I also note my_date function has a plugin hook, so I would also look into a problem related to a plugin.

It might help to look for details with a URL and a test account.

Hi. Thanks for the feedback.
I disabled all plugins and even so the error remains in Portuguese language.
If I choose the English language in ACP, the error does not occur. Just change to Portuguese and the error returns.
I've already checked all the .php files in Portuguese and haven't found anything.
Can I translate all .php files in the inc/languages/english folder to Portuguese? Are there any issues I will encounter during translation, such as encoding?
Thank you very much !
Reply
#6
Solved: 2 Years, 11 Months, 2 Weeks ago
If your installation is later than the one Brazilian language pack is current for, your English language is default for that version.
I'm told (thank you @Laird) that if a language variable is called for but is not included in the language pack, the result will be blank.
Brazilian language pack may need an update.
I can help compare the language files to find the missing variables.

What version of MyBB are you running?
Reply
#7
Solved: 2 Years, 11 Months, 2 Weeks ago
(2022-02-02, 02:00 AM)HLFadmin Wrote: If your installation is later than the one Brazilian language pack is current for, your English language is default for that version.
I'm told (thank you @Laird) that if a language variable is called for but is not included in the language pack, the result will be blank.
Brazilian language pack may need an update.
I can help compare the language files to find the missing variables.

What version of MyBB are you running?

Hello.
I'm using MyBB version 1.8.27.
I decided to translate all the files rather than looking for errors in files from another previous version.
The current version of the Portuguese language plugin is full of spelling errors, grammar errors etc... it was very poorly translated.
My problem will be with the characters of the Portuguese language, like Ç, ç, â, ã, õ, á, é, í, ó, ú etc... how do I fix this? Or will these characters be accepted normally?
Thanks for your attention and help.
Reply
#8
Solved: 2 Years, 11 Months, 2 Weeks ago
Noinha Wrote:My problem will be with the characters of the Portuguese language, like Ç, ç, â, ã, õ, á, é, í, ó, ú etc... how do I fix this? Or will these characters be accepted normally?

As MyBB is running in UTF-8 encoding, you can use all these language dependent characters with no issue.
When creating new .lang.php files, mind the UTF-8 encoding of the file as well - so use an editor with support of encodings.

Are you willing to share your translations as a new language pack for downloading? I guess this is really appreciated by other Poruguese members and webmasters.

Good luck!
[ExiTuS]
Reply
#9
Solved: 2 Years, 11 Months, 2 Weeks ago
While translating all the files is worthwhile because there are many differences, some removed, some added,
these are the two you need which are missing.
$l['yesterday_rel'] = "<span title=\"{1}\">Yesterday</span>";
$l['today_rel'] = "<span title=\"{1}\">Today</span>";

But you really cannot rely on the old language pack. There are too many differences. And I was just looking at global.lang.php

Your solution is the better one.
Reply
#10
Solved: 2 Years, 11 Months, 2 Weeks ago
what you could do is going to postbit templates in your theme and search for the postbit template and line 22 and add this:
<span class="post_date">{$post['postdate']} <span class="post_edit" id="edited_by_{$post['pid']}">{$post['editedmsg']}</span></span>
[Image: vissenforumlogo.png]
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)