This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Do theme setup on the 'after_setup_theme' hook. */ | |
add_action( 'after_setup_theme', 'cascade_child_theme_setup', 11 ); | |
/** | |
* Theme setup function. This function adds support for theme features and defines the default theme | |
* actions and filters. | |
* | |
* @since 0.1.0 | |
*/ | |
function cascade_child_theme_setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private $defaultCapabilities = array( | |
'connections_view_dashboard' => 'View Dashboard', | |
'connections_manage' => 'View List (Manage)', | |
'connections_add_entry' => 'Add Entry', | |
'connections_add_entry_moderated' => 'Add Entry Moderated', | |
'connections_edit_entry' => 'Edit Entry', | |
'connections_edit_entry_moderated' => 'Edit Entry Moderated', | |
'connections_delete_entry' => 'Delete Entry', | |
'connections_view_public' => 'View Public Entries', | |
'connections_view_private' => 'View Private Entries', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tx init | |
Creating .tx folder... | |
Transifex instance [https://www.transifex.com]: | |
Creating skeleton... | |
Creating config file... | |
No configuration file found. | |
No entry found for host https://www.transifex.com. Creating... | |
Please enter your transifex username: user | |
Password: <...> | |
Updating /home/username/.transifexrc file... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sprintf( __( 'If you like my plugin, please <a href="%s">give it a good rating and leave a review</a>.','yourtextdomain'), | |
esc_url( 'http://wordpress.org/support/view/plugin-reviews/myplugin" target="blank' ) ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[main] | |
host = https://www.transifex.com | |
[project_slug.pot_slug] | |
file_filter = languages/pot_slug-<lang>.po | |
source_file = languages/pot_slug.pot | |
source_lang = en_US | |
type = PO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* From a command line tool opened in last-svn/tools/i18n */ | |
php makepot.php wp-plugin /path/to/my/plugin-dir plugin-slug.pot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pull source and language from TX */ | |
$tx pull -s -t | |
/* Pull languages from TX over a percentage */ | |
$tx pull -a --minimum-perc=number | |
/* Pull a specific language from TX, eg.French */ | |
$tx pull -l fr_FR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shell = require('shelljs'); | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
po2mo: { | |
files: { | |
src: 'lang/*.po', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
for file in `find . -name "*.po"` ; do msgfmt -o ${file/.po/.mo} $file && rm $file ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Pull all files; | |
# Minimum percentage change to whatever you want | |
tx pull -a --minimum-perc=100 | |
# Create .mo files from .po files. | |
# Twisted by WP-Translations.org, created by grappler. | |
for file in `find . -name "*.po"` ; do msgfmt -o ${file/.po/.mo} $file ; done |
OlderNewer