Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#4190 closed defect (bug) (fixed)

Several problems with i18n and fixes

Reported by: slaFFik Owned by:
Milestone: 1.6 Priority: normal
Severity: major Version:
Component: I18N Keywords: has-patch
Cc:

Description

Hi,

1) bp_core_load_buddypress_textdomain() -> $mofile_local:
It has two slashes in the path. Reason: BP_PLUGIN_DIR is already trailingslahit'd and you are adding one more slash:

$mofile_local = BP_PLUGIN_DIR . '/bp-languages/' . $mofile;

mofile_local.patch fixes this.

2) On this url wp-admin/admin.php?page=bp-page-settings names of directories are not translatable. Currently didn't find how to fix.
The code is loading data from BP_Activity_Component::_construct() (for example) - where the description string is translatable, although not translated on front-end.

3) Settings -> BuddyPress -> Components:
This text:

All (10) | Active (10) | Inactive (0) | Must-Use (2)

is untranslatable. There is an error in using _n/_nx functions for displaying plurals there.

components_numbers.patch fixes this.

4) Settings -> BuddyPress -> Permalinks:
"View" and "New page" were untranslatable.

uni18n.patch fixes this.

Attachments (7)

components_numbers.patch (3.6 KB) - added by slaFFik 9 years ago.
mofile_local.patch (608 bytes) - added by slaFFik 9 years ago.
uni18n.patch (2.1 KB) - added by slaFFik 9 years ago.
n_fix.patch (559 bytes) - added by slaFFik 9 years ago.
Fixes on more place with untranslatable _n()
buddpress_type.patch (1.1 KB) - added by slaFFik 9 years ago.
Fixing type in locale: buddpress->buddypress
theme_change.patch (1004 bytes) - added by slaFFik 9 years ago.
Untranslatable word "Change" in buddypress/bp-themes/bp-default/members/single/profile/edit.php
load_textdomain.patch (467 bytes) - added by slaFFik 9 years ago.
Fix issue 2) - translation was loaded not in the right time

Download all attachments as: .zip

Change History (19)

@slaFFik
9 years ago

@slaFFik
9 years ago

Fixes on more place with untranslatable _n()

@slaFFik
9 years ago

Fixing type in locale: buddpress->buddypress

@slaFFik
9 years ago

Untranslatable word "Change" in buddypress/bp-themes/bp-default/members/single/profile/edit.php

#1 @slaFFik
9 years ago

  • Component changed from Core to All Components
  • Summary changed from Several problems with i18n to Several problems with i18n and fixes

#2 @slaFFik
9 years ago

  • Keywords needs-patch added

About 2)
Perhaps code from bp-{$component_id}-loader.php is loaded before bp_init is initialized. Translation is loaded in such way:

add_action('bp_init', '{func_that_loads_translation}', 2);

I tried to change this - no success.

#3 @DJPaul
9 years ago

  • Milestone changed from Awaiting Review to 1.6

#4 @djpaul
9 years ago

(In [6015]) Correct several mistakes with i18n in strings. See #4190, props slaFFik

#5 @DJPaul
9 years ago

  • Keywords has-patch removed

#6 @DJPaul
9 years ago

Thanks for the patches, slaFFik. Leaving ticket open for the directory name issue that you report.

#7 @slaFFik
9 years ago

  • Keywords has-patch added; needs-patch removed

Found how to easily fix it.

@slaFFik
9 years ago

Fix issue 2) - translation was loaded not in the right time

#8 @DJPaul
9 years ago

  • Keywords dev-feedback added

#9 @DJPaul
9 years ago

  • Keywords dev-feedback removed

I looked into this a bit more, and it seems the right solution. Thanks for the patch, slaFFik!

#10 @djpaul
9 years ago

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

(In [6028]) Load .mo files before init to fix strings being missed in components' loader classes. Fixes #4190, props slaFFik

#11 @johnjamesjacoby
7 years ago

  • Component changed from Component - Any/All to Locale

#12 @DJPaul
5 years ago

  • Component changed from Locale to I18N
Note: See TracTickets for help on using tickets.