Skip to content

Commit

Permalink
Move .pot file location. Fixes #12.
Browse files Browse the repository at this point in the history
  • Loading branch information
cowgill committed Aug 11, 2016
1 parent a95db4d commit 4772a98
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 98 deletions.
19 changes: 9 additions & 10 deletions appthemes-updater.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php
/*
Plugin Name: AppThemes Updater
Description: Automatically notifies you when AppThemes and Marketplace product updates are available.
Version: 1.4.0
Author: AppThemes
Author URI: https://www.appthemes.com
AppThemes ID: appthemes-updater
Network: true
Text Domain: appthemes-updater
* Plugin Name: AppThemes Updater
* Description: Automatically notifies you when AppThemes and Marketplace product updates are available.
* Version: 1.4.0
* Author: AppThemes
* Author URI: https://www.appthemes.com
* AppThemes ID: appthemes-updater
* Network: true
* Text Domain: appthemes-updater
* Domain Path: /languages
*/

function is_app_updater_network_activated() {
Expand Down Expand Up @@ -42,8 +43,6 @@ function app_extra_headers( $headers ) {
}

function app_updater_init() {
$locale = apply_filters( 'plugin_locale', get_locale(), 'appthemes-updater' );
load_textdomain( 'appthemes-updater', WP_LANG_DIR . "/plugins/appthemes-updater-$locale.mo" );

This comment has been minimized.

Copy link
@meloniq

meloniq Aug 11, 2016

Member

Loading language files is still needed, the "Text Domain" and "Domain Path" headers is more like for translations API, to update the translation files when the plugin is disabled...
so, lower call still needed:
load_plugin_textdomain( 'appthemes-updater', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );

This comment has been minimized.

Copy link
@cowgill

cowgill Aug 11, 2016

Author Member

You sure? I didn't actually test but looking at this WP core code, I don't think we need it any longer.

This comment has been minimized.

Copy link
@meloniq

meloniq Aug 11, 2016

Member

I wasn't sure also, so I did a quick test before writing above comment, and after removing call to load_plugin_textdomain() translation has gone ("Text Domain" and "Domain Path" headers was present in the plugin)


require_once( dirname( __FILE__ ) . '/updater-class.php' );
require_once( dirname( __FILE__ ) . '/updater-ui.php' );
Expand Down
88 changes: 0 additions & 88 deletions appthemes-updater.pot

This file was deleted.

100 changes: 100 additions & 0 deletions languages/appthemes-updater.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Copyright (C) 2016 AppThemes Updater
# This file is distributed under the same license as the AppThemes Updater package.
msgid ""
msgstr ""
"Project-Id-Version: AppThemes Updater 1.4.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/appthemes-"
"updater\n"
"POT-Creation-Date: 2016-08-11 04:55:58+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"

#: appthemes-updater.php:82
msgid "Settings"
msgstr ""

#: appthemes-updater.php:83
msgid "Docs"
msgstr ""

#: appthemes-updater.php:84
msgid "Support"
msgstr ""

#: templates/admin-page.php:3
msgid "AppThemes Updater Settings"
msgstr ""

#: templates/admin-page.php:6
msgid ""
"Enter your unique API key. This can be found within your <a href=\"%1$s\" "
"target=\"_blank\">AppThemes customer account</a>."
msgstr ""

#: templates/admin-page.php:16
msgid "API Key:"
msgstr ""

#: templates/admin-page.php:26
msgid "Save Settings"
msgstr ""

#: templates/api-key-notice.php:3
msgid "The AppThemes Updater plugin is almost ready."
msgstr ""

#: templates/api-key-notice.php:4
msgid ""
"You must <a href=\"%1$s\">enter your API key</a> first before it will work."
msgstr ""

#: templates/check-for-updates.php:2
msgid "Check for Latest Versions"
msgstr ""

#: templates/check-for-updates.php:3
msgid ""
"Manually check for updates (includes WordPress core, themes, plugins, "
"AppThemes and Marketplace products)."
msgstr ""

#: templates/check-for-updates.php:4
msgid "Check Now"
msgstr ""

#: updater-class.php:256
msgid ""
"<strong>IMPORTANT</strong>: If you have made any modifications to the "
"AppThemes files, they will be overwritten if you proceed with the automatic "
"update. Those with modified theme files should do a manual update instead. "
"Visit your <a href=\"%1$s\" target=\"_blank\">customer dashboard</a> to "
"download the latest version."
msgstr ""

#: updater-ui.php:18
msgid "Saved Changes."
msgstr ""

#. #-#-#-#-# appthemes-updater.pot (AppThemes Updater 1.4.0) #-#-#-#-#
#. Plugin Name of the plugin/theme
#: updater-ui.php:71 updater-ui.php:92
msgid "AppThemes Updater"
msgstr ""

#. Description of the plugin/theme
msgid ""
"Automatically notifies you when AppThemes and Marketplace product updates "
"are available."
msgstr ""

#. Author of the plugin/theme
msgid "AppThemes"
msgstr ""

#. Author URI of the plugin/theme
msgid "https://www.appthemes.com"
msgstr ""

0 comments on commit 4772a98

Please sign in to comment.