Skip to content

Commit

Permalink
finish renaming from afch-rewrite to afc-helper (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae authored Apr 13, 2024
1 parent 0d4a144 commit 4bd6a40
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
afch-rewrite [![Build Status](https://github.com/WPAFC/afch-rewrite/actions/workflows/unit_tests.yml/badge.svg)]
afc-helper [![Build Status](https://github.com/wikimedia-gadgets/afc-helper/actions/workflows/unit_tests.yml/badge.svg)]
============

A tool for reviewing Articles for Creation submissions on the English Wikipedia, rewritten using clear, object-oriented JavaScript with a focus on killing bloat while adding value.
Expand All @@ -7,7 +7,7 @@ A tool for reviewing Articles for Creation submissions on the English Wikipedia,
The script can be installed on the English Wikipedia by following the instructions at [WP:AFCH](https://en.wikipedia.org/wiki/WP:AFCH).

### Contributing
*Looking for detailed instructions about how to contribute to afch-rewrite? Check out the [Contributing](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script/Contributing) page on Wikipedia!*
*Looking for detailed instructions about how to contribute to afc-helper? Check out the [Contributing](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script/Contributing) page on Wikipedia!*

Your contributions are welcome! Please add feature requests and bug reports to [WT:AFCH](https://en.wikipedia.org/wiki/WT:AFCH) on enwiki to keep discussions centralized; GitHub also works.

Expand All @@ -18,7 +18,7 @@ To serve the script locally for development, use `npm start` and follow the inst
**Protip for developers**: AFCH running using `npm start` will run in silent mode by default. That is, it will not edit any pages, but instead will output API queries to your browser console. To turn this off, add `window.afchSuppressDevEdits = false;` to your common.js file, or open a browser console and type `AFCH.consts.mockItUp = false;`

### Testing
We have unit tests! `afch-rewrite` uses [Jest](https://github.com/facebook/jest) for testing, a framework built on top of Jasmine that offers dead-simple mocking, built-in simulated DOM manipulation using [jsdom](https://github.com/tmpvar/jsdom), and more.
We have unit tests! `afc-helper` uses [Jest](https://github.com/facebook/jest) for testing, a framework built on top of Jasmine that offers dead-simple mocking, built-in simulated DOM manipulation using [jsdom](https://github.com/tmpvar/jsdom), and more.

Tests are stored in the `tests` directory and are run automatically on new commits via GitHub Actions.

Expand All @@ -40,4 +40,4 @@ Below is a list of dependencies and what they are involved with, so you know wha

### License

`afch-rewrite` is licensed under the GNU General Public License version 3; see LICENSE for more information.
`afc-helper` is licensed under the GNU General Public License version 3; see LICENSE for more information.
10 changes: 5 additions & 5 deletions contrib/loader.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Since AFCH is currently stored in the userspace, this script should be used
// to load AFCH from another place (e.g., the core Gadget file).

///////////////////////////////////////////////
//////// Yet Another AfC Helper Script ////////
//// https://en.wikipedia.org/wiki/WP:AFCH ////
//// https://github.com/WPAFC/afch-rewrite ////
///////////////////////////////////////////////
/////////////////////////////////////////////////////////
/////////////////// AfC Helper Script ///////////////////
///////// https://en.wikipedia.org/wiki/WP:AFCH /////////
//// https://github.com/wikimedia-gadgets/afc-helper ////
/////////////////////////////////////////////////////////

( function ( mw, importScript ) {
if ( /^(?:User:|Draft:|Wikipedia(?:_talk)?:Articles_for_creation)/.test( mw.config.get( 'wgPageName' ) ) ) {
Expand Down
4 changes: 2 additions & 2 deletions contrib/old-afch-whitelist-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
function getText( pageTitle ) {
var deferred = $.Deferred();

// Use afch-rewrite `AFCH.Page` if possible to utilize cache
// Use afc-helper `AFCH.Page` if possible to utilize cache
if ( window.AFCH ) {
return ( new AFCH.Page( pageTitle ) ).getText( true );
}
Expand Down Expand Up @@ -71,7 +71,7 @@
if ( !userAllowed ) {
destroyOldAfch();

// Show the error message. If afch-rewrite is installed,
// Show the error message. If afc-helper is installed,
// don't show the error message twice.
if ( !window.AFCH ) {
showNotListedError( userName );
Expand Down
6 changes: 3 additions & 3 deletions scripts/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Usage
=====
Run this script from the main afch-rewrite directory using Python 3:
Run this script from the main afc-helper directory using Python 3:
>>> python scripts/upload.py SITE ROOT [--force] [--mwclient USERNAME]
Expand Down Expand Up @@ -71,7 +71,7 @@
command += ' --force'
sys.argv.remove('--force')

print('Building afch-rewrite using `{}`...'.format(command))
print('Building afc-helper using `{}`...'.format(command))

try:
process = subprocess.Popen(command.split(), stdout=subprocess.PIPE)
Expand Down Expand Up @@ -135,7 +135,7 @@ def setPageText(title, text, summary):
sha1 = branch.commit.id

# Prepend this to every page
header = '/* Uploaded from https://github.com/WPAFC/afch-rewrite, commit: {} ({}) */\n'.format(sha1, branch)
header = '/* Uploaded from https://github.com/wikimedia-gadgets/afc-helper, commit: {} ({}) */\n'.format(sha1, branch)

isMainGadget = (wiki == 'en') and (root == 'MediaWiki:Gadget-afchelper')

Expand Down
4 changes: 2 additions & 2 deletions src/modules/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@

// Add the launch link
$afchLaunchLink = $( mw.util.addPortletLink( AFCH.prefs.launchLinkPosition, '#', 'Review (AFCH)',
'afch-launch', 'Review submission using afch-rewrite', '1' ) );
'afch-launch', 'Review submission using afc-helper', '1' ) );

if ( AFCH.prefs.autoOpen &&
// Don't autoload in userspace -- too many false positives
Expand Down Expand Up @@ -883,7 +883,7 @@
} );

// Add feedback and preferences links
// FIXME: Feedback temporarily disabled due to https://github.com/WPAFC/afch-rewrite/issues/71
// FIXME: Feedback temporarily disabled due to https://github.com/wikimedia-gadgets/afc-helper/issues/71
// AFCH.initFeedback( $afch.find( 'span.feedback-wrapper' ), '[your topic here]', 'give feedback' );
AFCH.preferences.initLink( $afch.find( 'span.preferences-wrapper' ), 'preferences' );

Expand Down

0 comments on commit 4bd6a40

Please sign in to comment.