Commit Graph

22 Commits

Author SHA1 Message Date
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov
e5ad773194 I18N: Merge duplicate "Your plugins/themes/translations are all up to date" strings.
Props ramiy.
Fixes #47252.
Built from https://develop.svn.wordpress.org/trunk@45647


git-svn-id: http://core.svn.wordpress.org/trunk@45458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-16 22:13:58 +00:00
Gary Pendergast
cf3fa9f7c8 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.


Built from https://develop.svn.wordpress.org/trunk@45583


git-svn-id: http://core.svn.wordpress.org/trunk@45394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 12:52:01 +00:00
Dominik Schilling
7d9f962521 I18N: Enable clear_destination in upgrader for updating/installing language packs.
Introduces `Language_Pack_Upgrader::clear_destination()` to clear existing translations before installing new translations. Ensures that unused translations in JSON format are cleaned up.

Props dd32, swissspidy, ocean90.
Fixes #45468.
Built from https://develop.svn.wordpress.org/trunk@44676


git-svn-id: http://core.svn.wordpress.org/trunk@44507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-21 21:13:48 +00:00
jrf
f4e1cf65c1 I18n: Improve translators comments [3].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Includes minor code layout fixes.

Patch `44360-wp-admin-includes-dir.patch` of the series.

Props flipkeijzer, alvarogois, michielatyoast
See #44360

Built from https://develop.svn.wordpress.org/trunk@43598


git-svn-id: http://core.svn.wordpress.org/trunk@43427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-30 13:36:25 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
John Blackbourn
1b5d6c6971 Docs: Document many more parameters and properties using typed array notation.
See #41756

Built from https://develop.svn.wordpress.org/trunk@42871


git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
Sergey Biryukov
4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +00:00
John Blackbourn
087b52dced Upgrade/Install: Fix the format of the upgrader_process_complete actions after [42343].
More info: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1323

See #41057, #42505

Built from https://develop.svn.wordpress.org/trunk@42786


git-svn-id: http://core.svn.wordpress.org/trunk@42616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 21:44:30 +00:00
Sergey Biryukov
58592b64dc Docs: Use consistent description for $wp_filesystem global.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42777


git-svn-id: http://core.svn.wordpress.org/trunk@42607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:58:30 +00:00
Sergey Biryukov
0fea564b7d Docs: Remove @static notations from method DocBlocks in wp-admin/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42745


git-svn-id: http://core.svn.wordpress.org/trunk@42575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:06:30 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Sergey Biryukov
2b9e8abd8f I18N: Remove <code> tags from translatable strings in Core_Upgrader, Language_Pack_Upgrader, Plugin_Upgrader, Theme_Upgrader.
Props ramiy.
Fixes #41705.
Built from https://develop.svn.wordpress.org/trunk@41908


git-svn-id: http://core.svn.wordpress.org/trunk@41742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-18 17:15:47 +00:00
John Blackbourn
28eda6f4bc General: Improve terminology used when referring to installations of WordPress and its extensions.
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.

This change fixes the usage in user-facing text and in developer documentation.

Fixes #41620

Built from https://develop.svn.wordpress.org/trunk@41289


git-svn-id: http://core.svn.wordpress.org/trunk@41129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 11:52:48 +00:00
Drew Jaynes
1a28ec87e1 Docs: Remove @access notations from method DocBlocks in wp-admin/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

Built from https://develop.svn.wordpress.org/trunk@41161


git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
Pascal Birchler
ac83e26875 Upgrade/Install: After [37687], fix the number of params passed to the upgrade hooks.
`wp_version_check()`, `wp_update_plugins()` and `wp_update_themes()` are all originally hooked to the `upgrader_process_complete` action with zero arguments passed to them. Zero arguments should be passed when re-adding them after translation updates, otherwise the sky will fall.

Props ionutst, gitlost.
Fixes #37731.
Built from https://develop.svn.wordpress.org/trunk@38415


git-svn-id: http://core.svn.wordpress.org/trunk@38356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 10:04:30 +00:00
Dominik Schilling
bdd2199647 Upgrade: Trigger the upgrader_process_complete action for translation updates.
This brings `Language_Pack_Upgrader` in line with the core, theme, and plugin upgrader.

Props ronalfy.
Fixes #36872.
Built from https://develop.svn.wordpress.org/trunk@37687


git-svn-id: http://core.svn.wordpress.org/trunk@37653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-11 17:44:28 +00:00
Dominik Schilling
d8357b76c5 Upgrader: Don't use Language_Pack_Upgrader_Skin::before() and Language_Pack_Upgrader_Skin::after() when translations are up to date.
Avoids a PHP notice since `Language_Pack_Upgrader_Skin::before()` tries to access a non-existent update.
Also, change the `up_to_date` string to use the plural form because translations are only updated in bulk mode.

Fixes #36615.
Built from https://develop.svn.wordpress.org/trunk@37635


git-svn-id: http://core.svn.wordpress.org/trunk@37603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-05 12:22:30 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

Built from https://develop.svn.wordpress.org/trunk@37488


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Dominik Schilling
f81b65688a Upgrader: Add changelog entries for when the classes were moved to its own file.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37432


git-svn-id: http://core.svn.wordpress.org/trunk@37398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-13 20:59:27 +00:00
Dominik Schilling
23e2a486ae Upgrader: Update file headers for new files added in [37409].
Part 5/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37410


git-svn-id: http://core.svn.wordpress.org/trunk@37376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:52:28 +00:00
Dominik Schilling
14e5d77132 Upgrader: Copy WP_Upgrader subclasses into one file per class.
Part 4/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37409


git-svn-id: http://core.svn.wordpress.org/trunk@37375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:45:42 +00:00