1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin */
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.
/** * Class to print out the translatable strings for the Add Keyword modal. * * @deprecated 15.5 */ class WPSEO_Add_Keyword_Modal {
/** * Returns the translations for the Add Keyword modal. * * These strings are not escaped because they're meant to be used with React * which already takes care of that. If used in PHP, they should be escaped. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Add Keyword modal. */ public function get_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' );
return [ 'title' => __( 'Would you like to add more than one keyphrase?', 'wordpress-seo' ), 'intro' => sprintf( /* translators: %s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */ __( 'Great news: you can, with %s!', 'wordpress-seo' ), '{{link}}Yoast SEO Premium{{/link}}' ), 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ), 'other' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ), 'buy' => sprintf( /* translators: %s expands to 'Yoast SEO Premium'. */ __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ), 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ), 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ), ]; }
/** * Passes translations to JS for the Add Keyword modal component. * * @deprecated 15.5 * @codeCoverageIgnore * * @return array Translated text strings for the Add Keyword modal component. */ public function get_translations_for_js() { _deprecated_function( __METHOD__, 'WPSEO 15.5' );
$translations = $this->get_translations(); return [ 'locale' => \get_user_locale(), 'intl' => $translations, ]; }
/** * Prints the localized Add Keyword modal translations for JS. * * @deprecated 15.5 * @codeCoverageIgnore */ public function enqueue_translations() { _deprecated_function( __METHOD__, 'WPSEO 15.5' );
wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastAddKeywordModalL10n', $this->get_translations_for_js() ); } }
|