PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.4.2
Forumax – AI Powered Advanced Community Forum Plugin v2.4.2
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / lib / bbpress / includes / common / locale.php

locale.php in Forumax – AI Powered Advanced Community Forum Plugin 2.4.2, at lib/bbpress/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