Skip to:
Content

bbPress.org

Opened 14 months ago

Closed 12 months ago

Last modified 12 months ago

#3398 closed defect (fixed)

Topics modification date

Reported by: nabilmoqbel Owned by: johnjamesjacoby
Milestone: 2.6.6 Priority: high
Severity: normal Version: 2.0
Component: API - Formatting Keywords: has-screenshots has-patch
Cc:

Description

👋🏻 Hello!

We have been noticing a wired issue recently in the localized support forums. The topics modification date always shown as Now or Right Now in the forums archive, even if nothing actually got modified (Screenshots Attached).

I tried searching with formatting.php term, maybe one of us mistranslated one of the constants! But I couldn't find:

https://translate.wordpress.org/projects/wp-plugins/bbpress/stable/ar/default/?filters%5Bterm%5D=formatting.php&filters%5Bterm_scope%5D=scope_any&filters%5Bstatus%5D=either&filters%5Buser_login%5D=&filter=Apply+Filters&sort%5Bby%5D=translation_date_added&sort%5Bhow%5D=desc

Attachments (3)

support-forum-topic-date.png (323.1 KB) - added by nabilmoqbel 14 months ago.
translation-forum-ar.jpg (87.9 KB) - added by nabilmoqbel 14 months ago.
3398.patch (655 bytes) - added by johnjamesjacoby 12 months ago.

Download all attachments as: .zip

Change History (9)

#1 @johnjamesjacoby
14 months ago

  • Milestone set to 2.6.6
  • Owner set to johnjamesjacoby
  • Priority changed from normal to high
  • Status changed from new to assigned

That is pretty weird. I wonder if maybe it's related to the timezone setting somehow?

Can you link me to your forums so I may take a better look?
Can you post here your timezone settings, and any other relevant information?

I'll install the Arabic language pack and do some testing here.

Thanks for reporting this! We'll get it figured out together!

#2 @nabilmoqbel
14 months ago

Hello @johnjamesjacoby
Thank you!

Timezone settings are not showing up in local forums:
https://ar.wordpress.org/support/forums

#3 @johnjamesjacoby
12 months ago

  • Component changed from Locale - i18n/l10n to API - Formatting
  • Keywords has-patch added; needs-patch removed
  • Version set to 2.0

Hello @nabilmoqbel, I've attached a patch that fixes this bug.

I'll be committing it shortly, after which I'll deploy it to WordPress.org. The dates in the forums will all be correct after that.

Thank you, very much, for creating this bug here!

#4 @johnjamesjacoby
12 months ago

In 7159:

Formatting: fix output of bbp_get_time_since() in some languages.

This commit changes how the "right now" fallback is calculated to avoid trimming and type-casting a translated string value, by checking the two count values (I.E. 1 year, 1 day) for emptiness - "0, 0" will now correctly fallback to "right now".

In branches/2.6, for 2.6.6. See #3398.

#5 @johnjamesjacoby
12 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 7160:

Formatting: fix output of bbp_get_time_since() in some languages.

This commit changes how the "right now" fallback is calculated to avoid trimming and type-casting a translated string value, by checking the two count values (I.E. 1 year, 1 day) for emptiness - "0, 0" will now correctly fallback to "right now".

In trunk, for 2.7. Fixes #3398.

#6 @nabilmoqbel
12 months ago

Hello @johnjamesjacoby,
Great! Thank you very much, John.

Note: See TracTickets for help on using tickets.