Opened 17 months ago
Closed 17 months ago
#9187 closed defect (bug) (fixed)
Custom BuddyPress translation files are no more loaded since WP 4.6
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 14.0.0 | Priority: | strategic |
| Severity: | major | Version: | 1.0 |
| Component: | Core | Keywords: | has-patch |
| Cc: |
Description
Reviewing @vapvarun's PR about documenting how to use custom labels (etc..) made me remember we lost this very important feature for our plugin when WP's _load_textdomain_just_in_time() function was introduced in version 4.6. I remember I was a bit mad at it!
FWIW, here's the ticket https://core.trac.wordpress.org/ticket/37819 I opened about it 8 years ago.
We need something approaching back: it's a very important way to customize BuddyPress even for en_US communities.
Change History (7)
This ticket was mentioned in PR #316 on buddypress/buddypress by imath.
17 months ago
#1
- Keywords has-patch added; needs-patch removed
17 months ago
#2
FYI, I've also added a function to override default JavaScript translation files used in BP Blocks.
#3
@
17 months ago
- Owner set to imath
- Resolution set to fixed
- Status changed from new to closed
In 13936:
#5
@
17 months ago
We actually need to keep bp_core_load_buddypress_textdomain() so that it's possible to use a custom en_US translation file to customize BuddyPress texts to match specific community needs.
This ticket was mentioned in PR #322 on buddypress/buddypress by imath.
17 months ago
#6
If we don't need bp_core_load_buddypress_textdomain() for the regular translation usage, when an advanced user is using a custom en_US language file for BuddyPress, we absolutely need it to load this specific file.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/9187
Use the
'load_translation_file'filter to check custom file locations for thebuddypresstext domain.NB: this filter was introduced by WordPress in version 6.5.
If there's a
buddypress-xx_XX.mo(where xx_XX is the locale code) file into one of the following directories, it will be used to replace the default one (WordPress.org Plugin Directory / GlotPress):/wp-content/languages/plugins/buddypress(added in 14.0.0)/wp-content/languages/buddypress/wp-content/languagesTrac ticket: https://buddypress.trac.wordpress.org/ticket/9187