PluginProbe
bbPress / 2.6.6
bbPress v2.6.6
trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.2.2 All 71 releases
bbpress / includes / common / locale.php

locale.php in bbPress 2.6.6, at includes/common/locale.php

58 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * bbPress Localization
5 *
6 * @package bbPress
7 * @subpackage Localization
8 */
9
10 // Exit if accessed directly
11 defined( 'ABSPATH' ) || exit;
12
13 /**
14 * Translates role name.
15 *
16 * Since the role names are in the database and not in the source there
17 * are dummy gettext calls to get them into the POT file and this function
18 * properly translates them back.
19 *
20 * The before_last_bar() call is needed, because older installs keep the roles
21 * using the old context format: 'Role name|User role' and just skipping the
22 * content after the last bar is easier than fixing them in the DB. New installs
23 * won't suffer from that problem.
24 *
25 * @see translate_user_role()
26 *
27 * @since 2.6.0 bbPress
28 *
29 * @param string $name The role name.
30 * @return string Translated role name on success, original name on failure.
31 */
32 function bbp_translate_user_role( $name ) {
33 return translate_with_gettext_context( before_last_bar( $name ), 'User role', 'bbpress' );
34 }
35
36 /**
37 * Dummy gettext calls to get strings in the catalog.
38 *
39 * @since 2.6.0 bbPress
40 */
41 function bbp_dummy_role_names() {
42
43 /* translators: user role */
44 _x( 'Keymaster', 'User role', 'bbpress' );
45
46 /* translators: user role */
47 _x( 'Moderator', 'User role', 'bbpress' );
48
49 /* translators: user role */
50 _x( 'Participant', 'User role', 'bbpress' );
51
52 /* translators: user role */
53 _x( 'Spectator', 'User role', 'bbpress' );
54
55 /* translators: user role */
56 _x( 'Blocked', 'User role', 'bbpress' );
57 }
58