Dominik Schilling
aeb8d2fbad
I18N: Move the `WP_Locale` class to its own file.
...
The new `class-wp-locale.php` file is loaded in `locale.php` for backward compatibility purposes.
See #26511 .
Fixes #37209 .
Built from https://develop.svn.wordpress.org/trunk@37889
git-svn-id: http://core.svn.wordpress.org/trunk@37830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-28 11:53:28 +00:00
Peter Wilson
47d26cd9fb
DOCS: Replace HTTP links with HTTPS.
...
Replaces unsecure links in documentation and translator comments with their secure versions.
Props johnpgreen, netweb
Fixes #36993
Built from https://develop.svn.wordpress.org/trunk@37674
git-svn-id: http://core.svn.wordpress.org/trunk@37640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-10 04:50:33 +00:00
Drew Jaynes
b1804afeaf
Docs: Standardize on 'backward compatibility/compatible' nomenclature in core inline docs.
...
Also use 'back-compat' in some inline comments where backward compatibility is the subject and shorthand feels more natural.
Note: 'backwards compatibility/compatibile' can also be considered correct, though it's primary seen in regular use in British English.
Props ocean90.
Fixes #36835 .
Built from https://develop.svn.wordpress.org/trunk@37431
git-svn-id: http://core.svn.wordpress.org/trunk@37397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 18:41:31 +00:00
Drew Jaynes
ee0335e930
Docs: Add a missing summary to the DocBlock for `WP_Locale::rtl_src_admin_notice()`.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@35967
git-svn-id: http://core.svn.wordpress.org/trunk@35932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-16 18:08:26 +00:00
Sergey Biryukov
c2fcab7d82
I18N: After [35884], remove `html_entity_decode()` for the thousands separator in `WP_Locale::init()`, use the ` ` entity directly.
...
We can't `get_option( 'blog_charset' )` here, because the database may not be available.
Fixes #10373 .
Built from https://develop.svn.wordpress.org/trunk@35951
git-svn-id: http://core.svn.wordpress.org/trunk@35915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-15 21:35:29 +00:00
Sergey Biryukov
e20fb91e54
I18N: In `WP_Locale::init()`, replace space as a thousands separator with a non-breaking space.
...
* If PHP version is 5.4.0 or greater, a regular space as a thousands separator is replaced with a non-breaking space, decoded using the `blog_charset` option.
* If PHP version is 5.2.x or 5.3.x, ` ` or ` ` as a thousands separator is replaced with a regular space, as multiple bytes are not supported there.
Fixes #10373 .
Built from https://develop.svn.wordpress.org/trunk@35884
git-svn-id: http://core.svn.wordpress.org/trunk@35848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 02:06:35 +00:00
Sergey Biryukov
224d20e99b
Revert [35878].
...
See #34967 .
Built from https://develop.svn.wordpress.org/trunk@35879
git-svn-id: http://core.svn.wordpress.org/trunk@35843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 01:41:34 +00:00
Sergey Biryukov
746c697099
I18N: In `wp_maybe_decline_date()`, bail early if translation functions are not available, e.g. in `SHORTINIT` mode.
...
Fixes #34967 for trunk.
Built from https://develop.svn.wordpress.org/trunk@35878
git-svn-id: http://core.svn.wordpress.org/trunk@35842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-12 01:35:35 +00:00
Dominik Schilling
c25efe2d52
Revert [35336] and [35337].
...
See #28344 .
Built from https://develop.svn.wordpress.org/trunk@35685
git-svn-id: http://core.svn.wordpress.org/trunk@35649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 20:30:25 +00:00
Dominik Schilling
600b303668
Revert [35372] because of possible encoding issues, needs more investigation.
...
See #10373 .
Built from https://develop.svn.wordpress.org/trunk@35522
git-svn-id: http://core.svn.wordpress.org/trunk@35486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 21:39:26 +00:00
Sergey Biryukov
5d87e7d2b8
Introduce `wp_maybe_decline_date()` for languages where certain date formats need to be declined, and hook it to the `date_i18n` filter.
...
If the locale specifies that month names require a genitive case in certain formats like `'j F Y'` or `'j. F'`, the month name will be replaced with a correct form.
Fixes #11226 .
Built from https://develop.svn.wordpress.org/trunk@35517
git-svn-id: http://core.svn.wordpress.org/trunk@35481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 21:28:26 +00:00
Sergey Biryukov
c49ada7d75
In `WP_Locale::init()`, replace space as a thousands separator with a non-breaking space.
...
Also replace `' ` and ` ` HTML entities with the actual character, since PHP < 5.4.0 does not allow multiple bytes to be used for decimal points or thousands separators.
Fixes #10373 .
Built from https://develop.svn.wordpress.org/trunk@35372
git-svn-id: http://core.svn.wordpress.org/trunk@35336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-23 11:51:28 +00:00
Dominik Schilling
46a115de61
WP Locale: Add a `start_of_week` property to store the start of the week per locale.
...
Props swissspidy.
See #28344 .
Built from https://develop.svn.wordpress.org/trunk@35336
git-svn-id: http://core.svn.wordpress.org/trunk@35302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 17:28:29 +00:00
Drew Jaynes
de5e9d01a9
Docs: Add a summary, version, and `@access` tag to the property DocBlock for `WP_Locale->number_format`.
...
See [5308] for where the property was initially introduced.
See [31083] for where the property was actually declared.
Props brentvr.
See #30224 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@34489
git-svn-id: http://core.svn.wordpress.org/trunk@34453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 13:26:24 +00:00
Sergey Biryukov
0ffe65cf5c
Use `_x()` instead of string hacks for weekday and month abbreviations.
...
Props johnbillion.
Fixes #33716 .
Built from https://develop.svn.wordpress.org/trunk@34046
git-svn-id: http://core.svn.wordpress.org/trunk@34014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 15:36:25 +00:00
Dominik Schilling
b214be20ad
Make `WP_Locale::rtl_src_admin_notice()` translatable.
...
props jrf.
see #32021 .
Built from https://develop.svn.wordpress.org/trunk@33007
git-svn-id: http://core.svn.wordpress.org/trunk@32978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-30 20:21:24 +00:00
Scott Taylor
40325262ef
Declare visibility for `WP_Locale` methods.
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32961
git-svn-id: http://core.svn.wordpress.org/trunk@32932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 00:32:23 +00:00
Scott Taylor
42d51a4f89
Add doc blocks to functions that are missing them.
...
If the function has no need for `@param` or `@return`, do an archeaological dig to find `@since`.
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32672
git-svn-id: http://core.svn.wordpress.org/trunk@32642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-31 03:18:25 +00:00
Scott Taylor
5845a0c372
Add missing doc blocks to `locale.php`
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32608
git-svn-id: http://core.svn.wordpress.org/trunk@32578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-26 18:59:25 +00:00
Scott Taylor
0a511680f4
Adding a `@return` annotation to constructors is generally not recommended as a constructor does not have a meaningful return value. Constructors do not have meaningful return values, anything that is returned from here is discarded.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31126
git-svn-id: http://core.svn.wordpress.org/trunk@31107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-10 06:54:23 +00:00
Scott Taylor
e029005847
Access Modifiers:
...
* In `WP_Plugin_Install_List_Table`, use `public` instead of `var`
* In `WP_User`, `->data` is accessed directly on an instance if the constructor receives it: make it `public`
* In `WP_Locale`, every property is exported to a global and is already `public` via `var`, half of the properties are accessed directly already, make them all `public`
* In `WP_Rewrite`, several properties are accessed publicly in functions via the `$wp_rewrite` global, make those props `public`.
* In `WP_Rewrite`, the property `->comment_feed_structure` was misspelled as `->comments_feed_structure`
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31078
git-svn-id: http://core.svn.wordpress.org/trunk@31059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:44:23 +00:00
Scott Taylor
ff98cfcf45
Pinking Shears.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31077
git-svn-id: http://core.svn.wordpress.org/trunk@31058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 05:03:23 +00:00
Scott Taylor
2750f0cec7
In `WP_Locale`, declare `$number_format` as a property.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30183
git-svn-id: http://core.svn.wordpress.org/trunk@30183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-03 03:40:22 +00:00
Sergey Biryukov
821c6de4b6
Better description for WP_Locale::_strings_for_pot(). props dimadin. fixes #25937 .
...
Built from https://develop.svn.wordpress.org/trunk@26130
git-svn-id: http://core.svn.wordpress.org/trunk@26042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 14:01:09 +00:00
Andrew Nacin
1e30be32c4
Use CSSJanus via a Grunt task to generate right-to-left CSS.
...
RTL files are now created on build for core CSS files. These files replace the LTR file completely, rather than being in addition to the existing LTR file.
Benefits:
* For the user: less CSS is served in RTL, less HTTP requests on the frontend, and less work for the browser.
* For the core developer: Let the tools do the work.
Notes for core development:
* The file generation task is `grunt rtl`.
* `grunt watch` now handles generating RTL files in /build when a CSS file in /src is saved.
* /src is now locked to LTR. RTL testing must occur via /build. When attempting to run an RTL text direction with /src, an admin notice will display.
Expect RTL bugs. Please report them.
props yoavf.
see #24977 .
Built from https://develop.svn.wordpress.org/trunk@26107
git-svn-id: http://core.svn.wordpress.org/trunk@26022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-12 21:19:15 +00:00
Andrew Nacin
0652398a22
Remove ultimately unnecessary visibility keyword from a WP_Locale method because this file is included when we bail for PHP 4. props ocean90. fixes #24915 . for trunk.
...
git-svn-id: http://core.svn.wordpress.org/trunk@24971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-01 19:47:36 +00:00
Andrew Nacin
06933ac440
Add some localized date/time strings to the main wordpress.pot. These strings appear in the admin only but can be leveraged outside of the admin by design. fixes #22916 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-20 14:27:37 +00:00
nacin
006c6b6b9d
Add a translator's comment. see #19924 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-06 19:43:26 +00:00
nacin
1d5e72a39c
Do RTL detection based on a translated string, rather than a hardcoded list. Makes things a bit cleaner. fixes #19924 , fixes #19600 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-06 19:36:24 +00:00
nacin
ecedc9152f
Only set text_direction based on a locale being RTL if we successfully loaded a locale.mo file. Otherwise we may be in RTL land based on a WPLANG constant but nothing else. fixes #19924 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-31 14:30:36 +00:00
nacin
5f183e52f6
Docs for WP_Locale::is_locale_rtl( $locale ). see #18180 , see #19600 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-26 21:20:19 +00:00
nacin
81ed9a7563
Introduce wp_load_translations_early(), which can be used before the locale is properly loaded in order to translate early error strings. Internationalize setup-config.php -- translators no longer have a reason to modify this file. fixes #18180 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-26 20:34:27 +00:00
nacin
853fa27b53
Initial support for RTL detection in core. props SergeyBiryukov for compiling the list. fixes #19600 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-25 22:41:55 +00:00
nacin
c06c813b46
Remove locale_vars from WP_Locale. Explicitly set the text_direction property from a global, not from an arbitrary list. see #19600 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-25 22:29:33 +00:00
ryan
e3b46b25d3
Lose EOF ?>. Clean up EOF newlines. fixes #12307
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
07ff8b216b
Use one space, not two, after trailing punctuation. fixes #19537
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
ryan
32e25b6aec
phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 22:57:43 +00:00
duck_
2f51b9be0d
Fix typos in documentation (wp-includes/[i-z]). See #18560 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-05 19:08:15 +00:00
nacin
43b0829e19
Remove my debug cruft. No, you're not looking in a mirror. props dcowgill, fixes #17769 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 20:32:39 +00:00
nacin
7542e878f0
UI refresh for Press This. props koopersmith, see #17757 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@18279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 19:37:23 +00:00
ryan
04487fc268
Constructor cleanup. Props ocean90. fixes #16768
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@17771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-29 20:05:12 +00:00
ryan
7b7243d94a
Strip trailing whites.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:26:11 +00:00
nacin
4d7c88f4a4
Introduce is_rtl(). Use it in core. It only becomes defined when locale is loaded, so it's impossible to use it too early. Deprecate the get_bloginfo('text_direction') call. fixes #13206 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@14360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 05:49:19 +00:00
westi
9356c4b72d
Restore support for floating point numbers in number_format_i18n(). Fixes #10555 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@14190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-22 21:39:37 +00:00
westi
da93a92714
Remove unnecessary translations of decimal point character and number of decimal places. Fixes #10555 props nbachiyski.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@14184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-21 21:41:20 +00:00
ryan
699387f747
Remove trailing whitespace
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@12859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-26 22:49:05 +00:00
ryan
94859834fc
i18n fixes. Props nbachiyski. fixes #11954
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@12789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-21 21:37:43 +00:00
ryan
b1222311f7
gettext comments. Props nbachiyski. see #9112
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@10774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-13 03:53:39 +00:00
westi
9e89b4a99e
phpDoc corrections for wp-includes. See #7550 props jacobsantos.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@8782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-30 21:23:43 +00:00
markjaquith
74c46749cb
Cast to array when using foreach(). Props santosj (and thanks for your perseverance!). fixes #2784
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@8572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-06 20:31:54 +00:00