All Projects → afragen → translations-updater

afragen / translations-updater

Licence: MIT license
A WordPress library to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted language packs.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to translations-updater

Update
Update is a new developer framework and CLI for automating updates of any kind in code projects. If you know how to use assemble, generate or verb, you'll know how to use update.
Stars: ✭ 106 (+523.53%)
Mutual labels:  updater
Unified Hosts Autoupdate
Quickly and easily install, uninstall, and set up automatic updates for any of Steven Black's unified hosts files.
Stars: ✭ 185 (+988.24%)
Mutual labels:  updater
MacOS-All-In-One-Update-Script
Mac update shell script (Appstore, macOS, Homebrew and others)
Stars: ✭ 39 (+129.41%)
Mutual labels:  updater
Kymsu
Keep Your macOs Stuff Updated (KYMSU)
Stars: ✭ 119 (+600%)
Mutual labels:  updater
Firupdater
Fir.im通道APK更新器,使用简单,让自己的demo快速具备升级功能
Stars: ✭ 148 (+770.59%)
Mutual labels:  updater
script-updater-for-php
A MIT Licensed script updater for projects
Stars: ✭ 24 (+41.18%)
Mutual labels:  updater
Generic Auto Updater
Generic Auto-Updater: a robust, user-friendly, clean and efficient Auto-Updater to maintain any client patched.
Stars: ✭ 95 (+458.82%)
Mutual labels:  updater
Kaju
Xojo code for implementing self-updating apps
Stars: ✭ 52 (+205.88%)
Mutual labels:  updater
Laravel Selfupdater
This package provides some basic methods to implement a self updating functionality for your Laravel application. Already bundled are some methods to provide a self-update mechanism via Github or some private repository via http.
Stars: ✭ 170 (+900%)
Mutual labels:  updater
silk
A modern API for WordPress.
Stars: ✭ 62 (+264.71%)
Mutual labels:  wordpress-php-library
Update Notifier
The idea for this module came from the desire to apply the browser update strategy to CLI tools, where everyone is always on the latest version. We first tried automatic updating, which we discovered wasn't popular. This is the second iteration of that idea, but limited to just update notifications.
Stars: ✭ 1,594 (+9276.47%)
Mutual labels:  updater
Aerialcompanion
A companion app for the Aerial screen saver for macOS that takes care of install and auto-updates.
Stars: ✭ 144 (+747.06%)
Mutual labels:  updater
MoalemYar
A personal project for class management, using various technologies like WPF, Entityframwork, CodeFirst, Sqlite, Migration and more
Stars: ✭ 53 (+211.76%)
Mutual labels:  updater
Electron Release Server
A fully featured, self-hosted release server for electron applications, compatible with auto-updater.
Stars: ✭ 1,600 (+9311.76%)
Mutual labels:  updater
PATCH
The PATCH repository for issues tracking, wiki and shared material.
Stars: ✭ 34 (+100%)
Mutual labels:  updater
Ouroboros
Automatically update running docker containers with newest available image
Stars: ✭ 1,474 (+8570.59%)
Mutual labels:  updater
sonar-l10n-ru
Russian Language Pack for SonarQube
Stars: ✭ 33 (+94.12%)
Mutual labels:  language-packs
blade
🏃 A library for using Laravel Blade templates in WordPlate.
Stars: ✭ 28 (+64.71%)
Mutual labels:  wordpress-php-library
auto-updater
Node.js auto-update plugin
Stars: ✭ 71 (+317.65%)
Mutual labels:  updater
AppMan
A portable AppImage manager that installs, removes, updates and manages software (locally) like APT or Pacman do.
Stars: ✭ 36 (+111.76%)
Mutual labels:  updater

Translations Updater

Description

This framework allows for decoupled language pack updates for your WordPress plugins or themes that are hosted on public repositories in GitHub, Bitbucket, GitLab, or Gitea.

The URI should point to a repository that contains the translations files. Refer to GitHub Updater Translations as an example. It is created using the Language Pack Maker. The repo must be a public repo.

Usage

Install via Composer: composer require afragen/translations-updater:dev-master

Prior to release use the following command composer require afragen/translations-updater:dev-<branch> currently dev-master

Add require_once __DIR__ . '/vendor/autoload.php'; to the main plugin file or theme's functions.php file.

A configuration array with the following format is needed. All array elements are required.

add_action( 'admin_init', function() {
	$config = [
		'git'       => '(github|bitbucket|gitlab|gitea)',
		'type'      => '(plugin|theme)',
		'slug'      => 'my-repo-slug',
		'version'   => 'my-repo-version', // Current version of plugin|theme.
		'languages' => 'https://my-path-to/language-packs',
	];

	( new \Fragen\Translations_Updater\Init() )->run( $config );
} );

If you wish to delete the data stored in the options table associated with this framework you will need to issue the following command.

( new \Fragen\Translations_Updater\Init() )->delete_cached_data();

EDD Software Licensing Usage

If using this framework with EDD Software Licensing you will need to update to the latest versions of the updaters in the EDD Software Licensing sample code to ensure the appropriate action hooks are present.

You will need to add two key/value pairs to your setup array similar to the following,

'git'       => 'github',
'languages' => 'https://github.com/<USER>/my-language-pack',

You will need to include the following command to your bootstrap file to activate the updater.

( new \Fragen\Translations_Updater\Init( __NAMESPACE__ ) )->edd_run();

Plugins

You must add two additional key/value pairs to the setup array in your EDD_SL_Plugin_Updater setup. The array will be similar to the following from the edd-sample-plugin.php file.

	$edd_updater = new EDD_SL_Plugin_Updater( EDD_SAMPLE_STORE_URL, __FILE__, array(
			'version'   => '1.0',                // current version number
			'license'   => $license_key,         // license key (used get_option above to retrieve from DB)
			'item_name' => EDD_SAMPLE_ITEM_NAME, // name of this plugin
			'author'    => 'Pippin Williamson',  // author of this plugin
			'beta'      => false,
			'git'       => 'bitbucket',
			'languages' => 'https://bitbucket.org/afragen/test-language-pack',
		)

Themes

You must add two additional key/value pairs to the setup array in your EDD_Theme_Updater_Admin setup. The array will be similar to the following from the edd-sample-theme/updater/theme-updater.php file.

$updater = new EDD_Theme_Updater_Admin(

	// Config settings
	$config = array(
		'remote_api_url' => 'https://easydigitaldownloads.com', // Site where EDD is hosted
		'item_name'      => 'Theme Name', // Name of theme
		'theme_slug'     => 'theme-slug', // Theme slug
		'version'        => '1.0.0', // The current version of this theme
		'author'         => 'Easy Digital Downloads', // The author of this theme
		'download_id'    => '', // Optional, used for generating a license renewal link
		'renew_url'      => '', // Optional, allows for a custom license renewal link
		'beta'           => false, // Optional, set to true to opt into beta versions
		'git'            => 'github',
		'languages'      => 'https://github.com/<USER>/my-language-pack',
	),
	...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].