Commit Graph

80 Commits

Author SHA1 Message Date
nacin
6e411a5ea9 Load the admin MO file on repair.php. props SergeyBiryukov. see #21039 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-25 20:00:31 +00:00
ryan
f6b643e971 Exclude admin pot files when calculating the list of installed languages in get_available_languages(). fixes #20676
git-svn-id: http://core.svn.wordpress.org/trunk@20788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-14 17:58:06 +00:00
nacin
c22a2e2d7a Allow nooped plurals to receive a textdomain on registration to then be used on translation.
This is good for when the code registering the plural is not also translating it. This occurs
in core with register_post_status(), which accepts a nooped plural as an argument, and then
calls translate_nooped_plural() without a domain.

translate_nooped_plural() can still be called with a domain. The argument will just be overridden
if the nooped plural contains a domain key.

fixes #20188.



git-svn-id: http://svn.automattic.com/wordpress/trunk@20648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-30 16:18:35 +00:00
ryan
b2d61dab8a Load the new admin and network admin mo files, if present. see #19852
git-svn-id: http://svn.automattic.com/wordpress/trunk@19772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-27 22:19:56 +00:00
nacin
935a533eb6 Check get_site_option(WPLANG) when WP_INSTALLING in mulitiste, just not the blog's option. fixes #18783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-25 05:09:03 +00:00
nacin
89c0895887 new does not require by reference.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-18 20:20:59 +00:00
ryan
a0f6c4469d Introduce wp_get_db_schema() for rerieving the various flavors of the WP db schema. Eliminates need to use global. Allows multiple calls to wpmu_create_blog(). see #12028
git-svn-id: http://svn.automattic.com/wordpress/trunk@18899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-06 00:21:24 +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
westi
65e341d0cb Fix typos and inconsistencies in PHPdoc / function declarations. See #17414 props duck_
git-svn-id: http://svn.automattic.com/wordpress/trunk@17925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-14 09:50:20 +00:00
ryan
847499e531 Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@16438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-11-17 18:47:34 +00:00
nbachiyski
c6491e5db4 Retain backwards compatiblity for the few plugins using _n_noop()
git-svn-id: http://svn.automattic.com/wordpress/trunk@16075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-29 13:37:03 +00:00
nbachiyski
9f5c506a9f Introduce and use translate_nooped_plural(). Fixes #13996
* _n_noop() and _nx_noop() now return associative arrays for greater clarity
 * translate_nooped_plural() takes one such associative array and translates it
 * it works on both the result from _n_noop() and from _nx_noop()
 * this breaks backwards compatibility, but I doubt any plugin uses it (I will do a global grep to confirm)
 * translate_nooped_plural() is applied where applicable


git-svn-id: http://svn.automattic.com/wordpress/trunk@16073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-29 13:12:14 +00:00
nacin
5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
ryan
5a4c8048f7 Better ms lang file check. Props ocean90. fixes #13706
git-svn-id: http://svn.automattic.com/wordpress/trunk@15138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-04 12:59:44 +00:00
ryan
1084f71a34 Fix ms lang file check. Props ocean90. fixes #13706
git-svn-id: http://svn.automattic.com/wordpress/trunk@15137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-04 12:53:44 +00:00
nacin
6789149d20 Let's not emphasize that multisite might as well be its own language. fixes #13706.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 21:11:37 +00:00
ryan
17129fb62e Cut 'em out, move 'em on, trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@15116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 20:04:07 +00:00
nbachiyski
22342a502d Better detection whether we are on the Network page. Use custom constant to tell us. See #13565, props nacin
We used to load multisite translations each time WP_ALLOW_MULTISITE was defined, but
it could lead to alot of false positives. Generic config files can include to allow
users to updgrade to multisite without further editing the config file.


git-svn-id: http://svn.automattic.com/wordpress/trunk@15064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-29 20:35:19 +00:00
nbachiyski
ad5f0e1b02 Load multisite strings POT file only on multisite requests. Fixes #13565
git-svn-id: http://svn.automattic.com/wordpress/trunk@15053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-29 15:32:43 +00:00
ryan
1a552dd029 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@14924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:42:15 +00:00
nacin
c6d21e7fbb Introduce _ex(), a hybrid between _e() and _x() -- translate with context, then echo. props westi, see #13395.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 21:46:25 +00:00
nbachiyski
8ff9331f75 Cast the result of glob(), because on some systems it returns false on empty result set. Props ipstenu, fixes #13252
git-svn-id: http://svn.automattic.com/wordpress/trunk@14456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 21:55:34 +00:00
nbachiyski
7ee70968ce Refactor get_available_languages() to use glob() instead of *dir functions. See #13023
git-svn-id: http://svn.automattic.com/wordpress/trunk@14417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 22:07:31 +00:00
nbachiyski
7c1255e433 Make the $path argument of load_muplugin_textdomain() functional -- relative to mu-plugins. Props uglyrobot, fixes #12875
git-svn-id: http://svn.automattic.com/wordpress/trunk@14186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-22 11:32:50 +00:00
nacin
a7feaed0e6 Change @since 3.0 to @since 3.0.0.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:13:36 +00:00
ryan
e25a65b36a Trim trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@13733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 16:27:25 +00:00
nacin
c5128bb074 Introduce unload_textdomain() and add plugin_locale and theme_locale filters to load_*_textdomain() functions. Fixes #9686 props nbachiyski
git-svn-id: http://svn.automattic.com/wordpress/trunk@13330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-23 11:14:35 +00:00
nacin
2c52c876de Introduce is_textdomain_loaded(). Fixes #10527 props nbachiyski.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-22 19:10:03 +00:00
nacin
b76d0dc22e Deprecate old l10n and sanitization APIs. Deprecate __ngettext() for _n(), __ngettext_noop() for _n_noop(), translate_with_context() for _x(). Deprecate sanitize_url for esc_url_raw, js_escape for esc_js, wp_specialchars for esc_html, attribute_escape for esc_attr. See #11388
git-svn-id: http://svn.automattic.com/wordpress/trunk@13096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-13 07:28:19 +00:00
westi
df792469b4 Ignore the continents-cities mo files when searching for the list of installed language packs. Fixes #12019
git-svn-id: http://svn.automattic.com/wordpress/trunk@12988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-06 11:42:20 +00:00
ryan
cf7da6eab8 Introduce get_available_languages(). Validate WPLANG. fixes #11774
git-svn-id: http://svn.automattic.com/wordpress/trunk@12946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-04 18:46:25 +00:00
ryan
1de8e037c8 Integrate mu_locale() into get_locale(). see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-29 19:03:51 +00:00
ryan
692cdf0c7b Move load_muplugin_textdomain() to l10n.php
git-svn-id: http://svn.automattic.com/wordpress/trunk@12840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-26 17:25:31 +00:00
ryan
6da55f7792 Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@12733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-15 22:11:12 +00:00
westi
befa36c379 Mark 2nd param of load_plugin_textdomain() as deprecated. Fixes #11679 props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-02 10:28:05 +00:00
westi
10a6d0e916 Deprecate _nc() as _nx() is a much better was of specifying contexts. Fixes #11404 props nacin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-12-19 10:51:29 +00:00
westi
6ba5006153 Mark _c() as Deprecated people should use the new _x() instead. Fixes #11225.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-22 12:07:41 +00:00
westi
5994455911 Allow plugins to override the behaviour of load_textdomain() in a variety of flexible ways. Fixes #11012 props johanee and nbachiyski.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-21 09:28:32 +00:00
ryan
c831a9e3ef Add context to strings. Props nbachiyski. fixes #10738
git-svn-id: http://svn.automattic.com/wordpress/trunk@12231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-19 22:49:16 +00:00
westi
9c682f5a33 Add load_child_theme_textdomain() to allow child themes to have there own translation files. Fixes #11033 props load_child_theme_textdomain.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-12 21:50:17 +00:00
westi
8a7d717bb5 Switch to using NOOP_Translations for untranslated sites. Fixes #10971 props nbachiyski.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-10-21 07:09:00 +00:00
westi
91e47a25d8 Correct the name of the filter in _nx(). Fixes #10540 props CalebKniffen.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-08-06 19:27:52 +00:00
ryan
a5786f5730 Update load_textdomain() phpdoc. Props nbachiyski. fixes #10286 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@11680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-07-01 20:05:14 +00:00
ryan
82472f5474 Fix role translation. fixes #10270 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@11640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-06-25 17:18:56 +00:00
ryan
5a6cd2b356 Fix load_plugin_textdomain() phpdoc. Props PotterSys. fixes #9892
git-svn-id: http://svn.automattic.com/wordpress/trunk@11411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-20 18:54:14 +00:00
markjaquith
119b39cec2 deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-18 15:11:07 +00:00
westi
a53a13efa4 phpdoc updates for l10n functions. Fixes #9767 props demetris.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-11 21:15:05 +00:00
markjaquith
6c2ffddf31 _a(), _ea(), _xa(), attr() are now esc_attr__(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650
git-svn-id: http://svn.automattic.com/wordpress/trunk@11204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-05 19:43:53 +00:00
ryan
4f40b6e5ff Return fiter result directly. Props Denis-de-Bernardy. fixes #9690
git-svn-id: http://svn.automattic.com/wordpress/trunk@11194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-05-05 05:32:20 +00:00