~canonical-sysadmins/wordpress/5.0

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-language-pack-upgrader.php

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
         * Result of the language pack upgrade.
23
23
         *
24
24
         * @since 3.7.0
25
 
         * @access public
26
25
         * @var array|WP_Error $result
27
26
         * @see WP_Upgrader::$result
28
27
         */
29
28
        public $result;
30
29
 
31
30
        /**
32
 
         * Whether a bulk upgrade/install is being performed.
 
31
         * Whether a bulk upgrade/installation is being performed.
33
32
         *
34
33
         * @since 3.7.0
35
 
         * @access public
36
34
         * @var bool $bulk
37
35
         */
38
36
        public $bulk = true;
43
41
         * Hooked to the {@see 'upgrader_process_complete'} action by default.
44
42
         *
45
43
         * @since 3.7.0
46
 
         * @access public
47
44
         * @static
48
45
         *
49
46
         * @param false|WP_Upgrader $upgrader Optional. WP_Upgrader instance or false. If `$upgrader` is
63
60
                }
64
61
 
65
62
                /*
66
 
                 * Avoid messing with VCS installs, at least for now.
 
63
                 * Avoid messing with VCS installations, at least for now.
67
64
                 * Noted: this is not the ideal way to accomplish this.
68
65
                 */
69
66
                $check_vcs = new WP_Automatic_Updater;
110
107
         * Initialize the upgrade strings.
111
108
         *
112
109
         * @since 3.7.0
113
 
         * @access public
114
110
         */
115
111
        public function upgrade_strings() {
116
112
                $this->strings['starting_upgrade'] = __( 'Some of your translations need updating. Sit tight for a few more seconds while we update them as well.' );
117
113
                $this->strings['up_to_date'] = __( 'The translations are up to date.' );
118
114
                $this->strings['no_package'] = __( 'Update package not available.' );
119
 
                $this->strings['downloading_package'] = __( 'Downloading translation from <span class="code">%s</span>&#8230;' );
 
115
                /* translators: %s: package URL */
 
116
                $this->strings['downloading_package'] = sprintf( __( 'Downloading translation from %s&#8230;' ), '<span class="code">%s</span>' );
120
117
                $this->strings['unpack_package'] = __( 'Unpacking the update&#8230;' );
121
118
                $this->strings['process_failed'] = __( 'Translation update failed.' );
122
119
                $this->strings['process_success'] = __( 'Translation updated successfully.' );
126
123
         * Upgrade a language pack.
127
124
         *
128
125
         * @since 3.7.0
129
 
         * @access public
130
126
         *
131
127
         * @param string|false $update Optional. Whether an update offer is available. Default false.
132
128
         * @param array        $args   Optional. Other optional arguments, see
151
147
         * Bulk upgrade language packs.
152
148
         *
153
149
         * @since 3.7.0
154
 
         * @access public
155
150
         *
156
151
         * @global WP_Filesystem_Base $wp_filesystem Subclass
157
152
         *
307
302
         * Language_Pack_Upgrader::bulk_upgrade().
308
303
         *
309
304
         * @since 3.7.0
310
 
         * @access public
311
305
         *
312
306
         * @global WP_Filesystem_Base $wp_filesystem Subclass
313
307
         *
349
343
         * Get the name of an item being updated.
350
344
         *
351
345
         * @since 3.7.0
352
 
         * @access public
353
346
         *
354
347
         * @param object $update The data for an update.
355
348
         * @return string The name of the item being updated.