ClassicPress Development with GitHub: Series Index

GitHubI have been using ClassicPress to run this blog, and several other sites, since early last year. I have also created new versions of all of my plugins for ClassicPress.

When I was working with plugins for WordPress, I used their Plugin Repository for source control which was based off SVN. This wasn’t really the ideal way of doing things, as I should have had my own source control for development purposes.

At the start of 2019, GitHub announced new unlimited repositories (amongst some other changes) which made GitHub a viable source control tool for me.

The added bonus of using GitHub is that ClassicPress mean to use it for their Plugin Directory which is scheduled for inclusion in version 2. Development of this is in the early stages now, but using GitHub for my own development means I am at least part way to being compatible with the directory when it is launched.

I have over a hundred repositories now on GitHub (although you’ll see a much smaller number as quite a few are private). I took some screenshots when I started and meant to blog about it and then got sidetracked. In this series of posts I am going back to my intended posts, in which I am going to cover the basics of using GitHub for development of ClassicPress plugins.

This is a weekend series of posts with new posts going live over the next few weeks. If you’re reading this on azurecurve|Ramblings of a Dynamics GP Consultant the index will update automatically.

Separately compress all sub folders

7-ZipI started using WordPress for this blog when it launched in June 2011 until last year when, with Gutenberg on the horizon, I migrated to ClassicPress. This migration was easy as ClassicPress is a hard-fork of WordPress 4.9. As part od the migration I opted to rewrite all of my plugins to improve them and make them more secure.

I have 32 publically available plugins for ClassicPress. I’ve recently made changes to all of the plugins which means I need to make a release of them.

This partly done by committing the changes to Git Hub and making a tag, but you also need to add a zip file. There are commands to do this automatically on GitHub, but I am quote new so am opting to create the zips myself and upload them.

To do this I wanted to automatically compress all of the plugin folders, but exclude any hidden folders (such as the .git folder). I did some exploring and found the required command on Stack Overflow using 7-zip:

for /d %%X in (*) do "c:\Program Files\7-Zip\7z.exe" a -xr!.git\ -xr!*~ "%%X.zip" "%%X\"

The question which had previously been asked was this one and the two answers I used were this and this.

azurecurve ClassicPress Plugins updated

ClassicPress PluginsI migrated to ClassicPress last year and created ClassicPress versions of all of my plugins. This wasn;t just a case of creating an alternate versions, but extensively rewriting them in order to both add new functionality and to improve their security.

I’ve recently made changes to them all again to further improve them. If you use any of my plugins list on my Development site, you should download and install the latest version.

ClassicPress v2 is to include a Plugin Directory which is meant to be available in the second-half of 2020 which will mean automatic updates will then be available.

Translating a ClassicPress plugin with GlotPress: Export translations

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin with GlotPress which is part of the Translating a ClassicPress plugin with GlotPress series.

Once you have translation sets created for your plugins or themes, you will, at some point, need to download them. You can do this one at a time or in bulk depending on why you’re downloading them; if downloading to make a new version package, you can do the bulk download, or a user can do a single download to get a new translation which isn’t part of the current released package.

To download a single translation set, open the project, drill into the required translation set and scroll to the bottom of the page. Click the Export button to download the translation set:

Download single translation set

Continue reading “Translating a ClassicPress plugin with GlotPress: Export translations”

Translating a ClassicPress plugin with GlotPress: Import translations

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin which is part of the Translating a ClassicPress plugin series.

If translations have been created outside of GlotPress, perhaps by a user of your plugin, they can be imported into GlotPress. Do this by opening the project, selecting the translation set you want to update and then clicking Import Translations.

Choose your file to import, set the Format and click Import:

Import Translations page

Continue reading “Translating a ClassicPress plugin with GlotPress: Import translations”

Translating a ClassicPress plugin with GlotPress: Create new translation set

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin with GlotPress which is part of the Translating a ClassicPress plugin with GlotPress series.

GlotPress allows plugins or themes to be translated into many different languages. To translate the text, you need to create a new translation set. TO do this, open the project, expand the project actions and select New Translation Set:

Create new translation set

Continue reading “Translating a ClassicPress plugin with GlotPress: Create new translation set”

Translating a ClassicPress plugin with GlotPress: Import translation template

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin with GlotPress which is part of the Translating a ClassicPress plugin with GlotPress series.

With the project created, the template file can be imported. Load the project and expand the Project axctions; click Import Originals:

Project import originals

Continue reading “Translating a ClassicPress plugin with GlotPress: Import translation template”

Translating a ClassicPress plugin with GlotPress: Create a project

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin with GlotPress which is part of the Translating a ClassicPress plugin with GlotPress series.

With GlotPress installed, the next step is to create a project. Do this by navigating to the GlotPress page on the site with the plugin installed. The URL will be https://{yourdomain}/glotpress/ (switch out the highlighted section for your websites URL.

Click the Create a New Project link:

GlotPress Projects page

Continue reading “Translating a ClassicPress plugin with GlotPress: Create a project”

Translating a ClassicPress plugin with GlotPress: Creating administrators

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin which is part of the Translating a ClassicPress plugin series.

Wth the GlotPress plugin installed, it is now availabe for use. Anyone can create a translation set, but users can be designated as administrators and have the ability to administer projects. Before we create a project, we’ll take a quick diversion to create an administrator.

Do this by editing a user; if you scroll down to the bottom of their profile, there is a GlotPress section under which you can mark the Grant this user administrative privileges in GlotPress:

Edit user profile

Translating a ClassicPress plugin

Translating a ClassicPress plugin
What is Internationalization and Localization?
Why is Internationalization and Localization important?
When should a plugin be internationalized?
Internationalizing a ClassicPress plugin: How does internationalization work?
Internationalizing a ClassicPress plugin: What is a Text Domain and how is it specified?
Internationalizing a ClassicPress plugin: Localization functions
Internationalizing a ClassicPress plugin: Which localization functions to use?
Internationalizing a ClassicPress plugin: Localizing a string
Internationalizing a ClassicPress plugin: Don't paramaterize your text domain
Internationalizing a ClassicPress plugin: Localizing a string containing a parameter
Internationalizing a ClassicPress plugin: Localizing a string including plurals
Internationalizing a ClassicPress plugin: Localizing a string including notes for the translator
Internationalizing a ClassicPress plugin: Don't include HTML markup in localization
Internationalizing a ClassicPress plugin: Don't localize URLs
Internationalizing a ClassicPress plugin: Localizing a string including line breaks
Internationalizing a ClassicPress plugin: Load plugin translations
Translating a ClassicPress plugin with Poedit: What is Poedit?
Translating a ClassicPress plugin with Poedit: Download Poedit
Translating a ClassicPress plugin with Poedit: Install Poedit
Translating a ClassicPress plugin with Poedit: Create New Translation Template
Translating a ClassicPress plugin with Poedit: Create Translations
Translating a ClassicPress plugin with GlotPress: What is GlotPress?
Translating a ClassicPress plugin with GlotPress: Download and install GlotPress
Translating a ClassicPress plugin with GlotPress: Creating administrators
Translating a ClassicPress plugin with GlotPress: Create a project
Translating a ClassicPress plugin with GlotPress: Import translation template
Translating a ClassicPress plugin with GlotPress: Import translations
Translating a ClassicPress plugin with GlotPress: Create new translation set
Translating a ClassicPress plugin with GlotPress: Export translations
Translating a ClassicPress plugin with GlotPress
What is GlotPress?
Download and install GlotPress
Creating administrators
Create a project
Import translation template
Import translations
Create new translation set
Export translations

Translating a ClassicPress plugin with GlotPress: Download and install GlotPress

ClassicPress PluginsThis post is part of the sub-series on Translating a ClassicPress plugin which is part of the Translating a ClassicPress plugin series.

The plugin version of GlotPress is easy to install on ClassicPress; on the ClassicPress site it is to be installed into, navigate to the Add New page of the Plugins.

Enter glotpress in the search field; the first result should be the plugin, so click the Install Now button:

Add Plugins page showing the GlotPress plugin ready for install

Continue reading “Translating a ClassicPress plugin with GlotPress: Download and install GlotPress”