Skip to content

Latest commit

 

History

History
59 lines (46 loc) · 2.28 KB

README.md

File metadata and controls

59 lines (46 loc) · 2.28 KB

Git Updater Translations

Official Language Pack Repository for Git Updater plugin

Translators, please make PRs here. You only need to submit PRs for the .po files, .mo files will be generated automatically. Please add the .po files to the languages folder. Thanks.

Uses Language_Pack_Maker installed via composer to create a directory of zip archives of translation .mo/.po/.json files and a language-pack.json file containing data to pass to GitHub Updater.

The format of the generated JSON file is as follows.

[
  {
    "translations": [
      {
        "type": "(plugin|theme) from Git Updater",
        "slug": "{$slug}",
        "language": "en_US",
        "version": "from Git Updater",
        "updated": "PO-Revision-Date from .po file header",
        "package": "/packages/git-updater-en_US.zip",
        "autoupdate": "1"
      }
    ]
  }
]

The update transient expects the $transient->translations in the following format.

$transient->translations( array(
	0 => array(
		'type'       => 'plugin',
		'slug'       => 'akismet',
		'language'   => 'de_CH',
		'version'    => '3.1.11',
		'updated'    => '2016-05-12 18:04:38',
		'package'    => 'https://downloads.wordpress.org/translation/plugin/akismet/3.1.11/de_CH.zip',
		'autoupdate' => 1,

	),
) );

Git Updater merges the correlative plugin or theme data with the data retrieved from the language-pack.json to add data to the update transient.

Add-On Translations

Translation repositories for the Add-Ons are located in the following individual repositories. The above instructions apply.