Commit Graph

69 Commits

Author SHA1 Message Date
Nikolay Bachiyski 94ed154f65 Retain backwards compatiblity for the few plugins using _n_noop()
git-svn-id: https://develop.svn.wordpress.org/trunk@16075 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-29 13:37:03 +00:00
Nikolay Bachiyski 1937c1221d 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: https://develop.svn.wordpress.org/trunk@16073 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-29 13:12:14 +00:00
Andrew Nacin 9494e4ce7e Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@15590 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 11:21:11 +00:00
Ryan Boren b58a019e87 Better ms lang file check. Props ocean90. fixes #13706
git-svn-id: https://develop.svn.wordpress.org/trunk@15138 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-04 12:59:44 +00:00
Ryan Boren c8db4219ea Fix ms lang file check. Props ocean90. fixes #13706
git-svn-id: https://develop.svn.wordpress.org/trunk@15137 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-04 12:53:44 +00:00
Andrew Nacin 285213f7ae Let's not emphasize that multisite might as well be its own language. fixes #13706.
git-svn-id: https://develop.svn.wordpress.org/trunk@15118 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 21:11:37 +00:00
Ryan Boren 0922715668 Cut 'em out, move 'em on, trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@15116 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 20:04:07 +00:00
Nikolay Bachiyski ea4293b291 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: https://develop.svn.wordpress.org/trunk@15064 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-29 20:35:19 +00:00
Nikolay Bachiyski df34727db8 Load multisite strings POT file only on multisite requests. Fixes #13565
git-svn-id: https://develop.svn.wordpress.org/trunk@15053 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-29 15:32:43 +00:00
Ryan Boren aec821c651 Strip trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@14924 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-26 02:42:15 +00:00
Andrew Nacin 47136b319f Introduce _ex(), a hybrid between _e() and _x() -- translate with context, then echo. props westi, see #13395.
git-svn-id: https://develop.svn.wordpress.org/trunk@14647 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-14 21:46:25 +00:00
Nikolay Bachiyski 53e65714a1 Cast the result of glob(), because on some systems it returns false on empty result set. Props ipstenu, fixes #13252
git-svn-id: https://develop.svn.wordpress.org/trunk@14456 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 21:55:34 +00:00
Nikolay Bachiyski c094caee61 Refactor get_available_languages() to use glob() instead of *dir functions. See #13023
git-svn-id: https://develop.svn.wordpress.org/trunk@14417 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 22:07:31 +00:00
Nikolay Bachiyski 0a0ec2ff46 Make the $path argument of load_muplugin_textdomain() functional -- relative to mu-plugins. Props uglyrobot, fixes #12875
git-svn-id: https://develop.svn.wordpress.org/trunk@14186 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-22 11:32:50 +00:00
Andrew Nacin e34ca97ae0 Change @since 3.0 to @since 3.0.0.
git-svn-id: https://develop.svn.wordpress.org/trunk@13827 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-26 19:13:36 +00:00
Ryan Boren e61755c853 Trim trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@13733 602fd350-edb4-49c9-b593-d223f7449a82
2010-03-17 16:27:25 +00:00
Andrew Nacin 2e11ad2c3c Introduce unload_textdomain() and add plugin_locale and theme_locale filters to load_*_textdomain() functions. Fixes #9686 props nbachiyski
git-svn-id: https://develop.svn.wordpress.org/trunk@13330 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-23 11:14:35 +00:00
Andrew Nacin 65ff4db415 Introduce is_textdomain_loaded(). Fixes #10527 props nbachiyski.
git-svn-id: https://develop.svn.wordpress.org/trunk@13304 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-22 19:10:03 +00:00
Andrew Nacin 0470fb90ea 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: https://develop.svn.wordpress.org/trunk@13096 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-13 07:28:19 +00:00
Peter Westwood c45f4d2905 Ignore the continents-cities mo files when searching for the list of installed language packs. Fixes #12019
git-svn-id: https://develop.svn.wordpress.org/trunk@12988 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-06 11:42:20 +00:00
Ryan Boren 529156a002 Introduce get_available_languages(). Validate WPLANG. fixes #11774
git-svn-id: https://develop.svn.wordpress.org/trunk@12946 602fd350-edb4-49c9-b593-d223f7449a82
2010-02-04 18:46:25 +00:00
Ryan Boren 954968abef Integrate mu_locale() into get_locale(). see #11644
git-svn-id: https://develop.svn.wordpress.org/trunk@12900 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-29 19:03:51 +00:00
Ryan Boren 66b9e3666f Move load_muplugin_textdomain() to l10n.php
git-svn-id: https://develop.svn.wordpress.org/trunk@12840 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-26 17:25:31 +00:00
Ryan Boren 8ef8b7bad5 Trailing whitespace cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@12733 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-15 22:11:12 +00:00
Peter Westwood deb8c9097b Mark 2nd param of load_plugin_textdomain() as deprecated. Fixes #11679 props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@12594 602fd350-edb4-49c9-b593-d223f7449a82
2010-01-02 10:28:05 +00:00
Peter Westwood f0a6bb378b Deprecate _nc() as _nx() is a much better was of specifying contexts. Fixes #11404 props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@12459 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-19 10:51:29 +00:00
Peter Westwood 43b9064424 Mark _c() as Deprecated people should use the new _x() instead. Fixes #11225.
git-svn-id: https://develop.svn.wordpress.org/trunk@12257 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-22 12:07:41 +00:00
Peter Westwood 6b92317f98 Allow plugins to override the behaviour of load_textdomain() in a variety of flexible ways. Fixes #11012 props johanee and nbachiyski.
git-svn-id: https://develop.svn.wordpress.org/trunk@12251 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-21 09:28:32 +00:00
Ryan Boren 42a3082c21 Add context to strings. Props nbachiyski. fixes #10738
git-svn-id: https://develop.svn.wordpress.org/trunk@12231 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-19 22:49:16 +00:00
Peter Westwood 813c76d3a2 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: https://develop.svn.wordpress.org/trunk@12179 602fd350-edb4-49c9-b593-d223f7449a82
2009-11-12 21:50:17 +00:00
Peter Westwood a9b546be54 Switch to using NOOP_Translations for untranslated sites. Fixes #10971 props nbachiyski.
git-svn-id: https://develop.svn.wordpress.org/trunk@12080 602fd350-edb4-49c9-b593-d223f7449a82
2009-10-21 07:09:00 +00:00
Peter Westwood dcf3026244 Correct the name of the filter in _nx(). Fixes #10540 props CalebKniffen.
git-svn-id: https://develop.svn.wordpress.org/trunk@11780 602fd350-edb4-49c9-b593-d223f7449a82
2009-08-06 19:27:52 +00:00
Ryan Boren 3090ebd2b5 Update load_textdomain() phpdoc. Props nbachiyski. fixes #10286 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@11680 602fd350-edb4-49c9-b593-d223f7449a82
2009-07-01 20:05:14 +00:00
Ryan Boren f6f03210e4 Fix role translation. fixes #10270 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@11640 602fd350-edb4-49c9-b593-d223f7449a82
2009-06-25 17:18:56 +00:00
Ryan Boren 3a419fbf6d Fix load_plugin_textdomain() phpdoc. Props PotterSys. fixes #9892
git-svn-id: https://develop.svn.wordpress.org/trunk@11411 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-20 18:54:14 +00:00
Mark Jaquith f0336cfa7d deprecate wp_specialchars() in favor of esc_html(). Encode quotes for esc_html() as in esc_attr(), to improve plugin security.
git-svn-id: https://develop.svn.wordpress.org/trunk@11380 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-18 15:11:07 +00:00
Peter Westwood 8f124cb667 phpdoc updates for l10n functions. Fixes #9767 props demetris.
git-svn-id: https://develop.svn.wordpress.org/trunk@11281 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-11 21:15:05 +00:00
Mark Jaquith c638e8d8de _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: https://develop.svn.wordpress.org/trunk@11204 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-05 19:43:53 +00:00
Ryan Boren b16cbfc447 Return fiter result directly. Props Denis-de-Bernardy. fixes #9690
git-svn-id: https://develop.svn.wordpress.org/trunk@11194 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-05 05:32:20 +00:00
Ryan Boren 036a7656f9 attr(), _a(), _ea(), _xa() for shorthand attribute escaping. see #9650
git-svn-id: https://develop.svn.wordpress.org/trunk@11103 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-27 21:58:04 +00:00
Ryan Boren 273df5a466 Fix 'Only variable references should be returned by reference' notices
git-svn-id: https://develop.svn.wordpress.org/trunk@11083 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-24 23:43:32 +00:00
Ryan Boren 8d00b5d37d Trim trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@10810 602fd350-edb4-49c9-b593-d223f7449a82
2009-03-18 02:43:45 +00:00
Ryan Boren 5d8651d6f3 gettext comments. Props nbachiyski. see #9112
git-svn-id: https://develop.svn.wordpress.org/trunk@10774 602fd350-edb4-49c9-b593-d223f7449a82
2009-03-13 03:53:39 +00:00
Ryan Boren 1952e923f8 gettext contexts. Props nbachiyski. see #9112
git-svn-id: https://develop.svn.wordpress.org/trunk@10767 602fd350-edb4-49c9-b593-d223f7449a82
2009-03-10 23:02:29 +00:00
Ryan Boren bc924291b2 Switch to pomo lib. Support gettext contexts. Deprecate long form functions. Props nbachiyski. fixes #9112 #9111
git-svn-id: https://develop.svn.wordpress.org/trunk@10584 602fd350-edb4-49c9-b593-d223f7449a82
2009-02-17 05:03:29 +00:00
Ryan Boren 390984d25d Contextual ngettext from nbachiyski. fixes #8128
git-svn-id: https://develop.svn.wordpress.org/trunk@9887 602fd350-edb4-49c9-b593-d223f7449a82
2008-11-25 22:25:21 +00:00
Ryan Boren 6e4773588a Add optional path arg to load_theme_textdomain(). Props filosofo. fixes #6951
git-svn-id: https://develop.svn.wordpress.org/trunk@9212 602fd350-edb4-49c9-b593-d223f7449a82
2008-10-16 20:44:39 +00:00
Peter Westwood 5f2a75db7b Allow plugins to mangle translations of english strings as well as translated strings. Fixes #6742.
git-svn-id: https://develop.svn.wordpress.org/trunk@9211 602fd350-edb4-49c9-b593-d223f7449a82
2008-10-16 20:27:45 +00:00
Peter Westwood 047ec90dee phpDoc corrections for wp-includes. See #7550 props jacobsantos.
git-svn-id: https://develop.svn.wordpress.org/trunk@8782 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-30 21:23:43 +00:00
Ryan Boren 2272a1a950 Trailing whitespace cleanup
git-svn-id: https://develop.svn.wordpress.org/trunk@8600 602fd350-edb4-49c9-b593-d223f7449a82
2008-08-09 05:36:14 +00:00