Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
GlotPress as a WordPress plugin, first pass.
This initial pass switches from using the BackPress external to a WordPress install via `require 'wp-load.php';`. This took about 2 hours. With some additional work, it can be pivoted fully to a plugin. This would result in the deletion of additional code (more than has already been deleted here), given that WordPress can handle authentication, users, etc., most initialization that's currently happening in both gp-settings.php and wp-load.php, and such. I don't see a need to abandon GlotPress's routes, things, or templates in any kind of switch to WP_Rewrite, custom post types, or a theme. That it "just works" by swapping out some files is pretty killer in and of itself. It will make it easier for people to contribute, work with it, and such. There are surely some little issues that will be caught in a second pass. As I said, this was done in just two hours (and yes, I got it fully working locally in that time). As an example todo: we need to merge some POMO changes to upstream WordPress; some hook names like `plugins_loaded` also clash. As for performance: locally, I was seeing 3 MB (GlotPress standalone) vs 6 MB (GlotPress with WordPress). That's peanuts and is well worth bringing GlotPress into the comfort zone that is WordPress. Additionally, this will provide significant benefits for feature development and general integration between GlotPress and WordPress.
- Loading branch information
Showing
with
306 additions
and 2,200 deletions.
- +12 −22 gp-includes/assets-loader.php
- +0 −46 gp-includes/class.bp-options.php
- +4 −57 gp-includes/install-upgrade.php
- +0 −127 gp-includes/l10n.php
- +4 −14 gp-includes/meta.php
- +27 −0 gp-includes/misc.php
- +0 −2 gp-includes/routes/login.php
- +118 −189 gp-includes/schema.php
- +0 −26 gp-includes/system.php
- +0 −8 gp-includes/template.php
- +16 −4 gp-includes/thing.php
- +1 −0 gp-includes/things/glossary-entry.php
- +1 −1 gp-includes/things/glossary.php
- +1 −0 gp-includes/things/original.php
- +1 −1 gp-includes/things/permission.php
- +2 −2 gp-includes/things/project.php
- +1 −0 gp-includes/things/translation-set.php
- +4 −3 gp-includes/things/translation.php
- +28 −30 gp-includes/things/user.php
- +14 −202 gp-settings.php
- +1 −2 gp-templates/glossary-view.php
- +1 −1 gp-templates/locales.php
- +1 −1 gp-templates/project.php
- +2 −2 gp-templates/translations.php
- +1 −1 install.php
- +0 −6 js/jquery/jquery-ui.js
- +0 −5 js/jquery/jquery.js
- +22 −0 phpunit.xml.dist
- +0 −78 pomo/entry.php
- +0 −261 pomo/mo.php
- +0 −416 pomo/po.php
- +0 −209 pomo/streams.php
- +0 −275 pomo/translations.php
- +0 −26 t/all.php
- +16 −9 t/lib/bootstrap.php
- +1 −1 t/lib/factory.php
- +5 −80 t/lib/testcase.php
- +0 −23 t/phpunit.xml.dist
- 0 {pomo/sample → t/pomo-sample}/app.php
- 0 {pomo/sample → t/pomo-sample}/languages/app-side.pot
- 0 {pomo/sample → t/pomo-sample}/languages/app.pot
- BIN {pomo/sample → t/pomo-sample}/languages/bg-side.mo
- 0 {pomo/sample → t/pomo-sample}/languages/bg-side.po
- BIN {pomo/sample → t/pomo-sample}/languages/bg.mo
- 0 {pomo/sample → t/pomo-sample}/languages/bg.po
- +3 −3 t/tests/test_format_android.php
- +3 −3 t/tests/test_format_resx.php
- +3 −3 t/tests/test_format_strings.php
- +6 −6 t/tests/test_mo.php
- +3 −4 t/tests/test_permissions.php
- +3 −3 t/tests/test_po.php
- +1 −3 t/tests/tests_things/test_thing_translation_set.php
- +0 −45 t/unittests-config-sample.php
Oops, something went wrong.