Skip to:
Content

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#765 closed defect (fixed)

Localization problems when intergating

Reported by: livibetter Owned by:
Milestone: 1.0 Priority: normal
Severity: normal Version: 0.8.3
Component: Integration Keywords:
Cc:

Description

A post shows the problems. Should be fixed in the core.

When integrating, WordPress loads first, then bbPress. libraries stream.php and gettext.php are not the problem. But both l10n.phps are. WordPress loads first, so those functions in l10n.php will be WordPress's version. Then when try to load a .mo will search in WordPress' directories only.

For bbPress Plugins:
If it runs load_plugin_textdomain() without path, then the language file may not be found. Maybe a bb_load_plugin_textdomain would be better?

For bbPress own language file:
load_default_textdomain won't work for bbPress. First, it uses same textdomain default as WordPress does. Second, even bbPress use different textdomain, the gettext functions __ and _e still can't recognize who is calling it? WordPress or bbPress?
A silly solution is to add bb__ and bb_e. But needs to change many codes.

If we can merge bbPress' translation into WordPress' translation in runtime, that might work smoothly.
Or modify __ and _e of WordPress, when get default textdomain for searching, search in bbPress' translations first, then WordPress' translation if can't find. But this will need to change WordPress code.

Maybe I just think too much? There is already a quick and simple solution?

Change History (5)

comment:1 sambauers6 years ago

  • Milestone set to 0.8.5 & XML-RPC

comment:2 sambauers6 years ago

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

(In [1594]) Merge similarly named gettext domains. Fixes #765 if we can get changes into WordPress as well.

comment:3 sambauers6 years ago

(In [1595]) Existing translations take precedence, see #765

comment:4 anonymous5 years ago

  • Milestone 1.0-beta deleted

Milestone 1.0-beta deleted

comment:5 sambauers5 years ago

  • Milestone set to 1.0
Note: See TracTickets for help on using tickets.