Make WordPress Core


Ignore:
Timestamp:
10/14/2020 09:11:09 PM (4 years ago)
Author:
ocean90
Message:

I18N: Use wp.i18n for translatable strings in wp-admin/js/dashboard.js.

  • Deprecate the l10n property on communityEventsData.
  • Introduce version parameter for deprecateL10nObject and backfill the version for deprecated objects in 5.5.0.
  • Add a noop version of deprecateL10nObject for QUnit testing.

Fixes #51498.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r49147 r49151  
    17581758            'cache'       => $events_client->get_cached_events(),
    17591759            'time_format' => get_option( 'time_format' ),
    1760 
    1761             'l10n'        => array(
    1762                 'enter_closest_city'              => __( 'Enter your closest city to find nearby events.' ),
    1763                 'error_occurred_please_try_again' => __( 'An error occurred. Please try again.' ),
    1764                 'attend_event_near_generic'       => __( 'Attend an upcoming event near you.' ),
    1765 
    1766                 /*
    1767                  * These specific examples were chosen to highlight the fact that a
    1768                  * state is not needed, even for cities whose name is not unique.
    1769                  * It would be too cumbersome to include that in the instructions
    1770                  * to the user, so it's left as an implication.
    1771                  */
    1772                 /*
    1773                  * translators: %s is the name of the city we couldn't locate.
    1774                  * Replace the examples with cities related to your locale. Test that
    1775                  * they match the expected location and have upcoming events before
    1776                  * including them. If no cities related to your locale have events,
    1777                  * then use cities related to your locale that would be recognizable
    1778                  * to most users. Use only the city name itself, without any region
    1779                  * or country. Use the endonym (native locale name) instead of the
    1780                  * English name if possible.
    1781                  */
    1782                 'could_not_locate_city'           => __( 'We couldn’t locate %s. Please try another nearby city. For example: Kansas City; Springfield; Portland.' ),
    1783 
    1784                 // This one is only used with wp.a11y.speak(), so it can/should be more brief.
    1785                 /* translators: %s: The name of a city. */
    1786                 'city_updated'                    => __( 'City updated. Listing events near %s.' ),
    1787             ),
    17881760        )
    17891761    );
Note: See TracChangeset for help on using the changeset viewer.