Skip to content

Instantly share code, notes, and snippets.

View fxbenard's full-sized avatar
🏠
Working from home

FX Bénard fxbenard

🏠
Working from home
View GitHub Profile
@fxbenard
fxbenard / EDD Coming Soon Filtre
Last active August 29, 2015 14:21
Divers filtres pour personnaliser l'extensin EDD Coming Soon
function edd_coming_soon_modify_default_status_text() {
return 'Not long now!';
}
add_filter( 'edd_cs_coming_soon_text', 'edd_coming_soon_modify_default_status_text' );
@fxbenard
fxbenard / woo-load-textdomain-child-theme
Last active August 29, 2015 14:07
WooThemes load textdomain in child theme my own way
<?php
/*
* Load my own woo-load-textdomain function
* Thanks to @grabbler for is help
*/
add_action( 'after_setup_theme', 'woo_load_textdomain', 10 );
function woo_load_textdomain(){
$locale = get_locale();
@fxbenard
fxbenard / Translations_Included.md
Last active January 22, 2024 12:13
A list of all the languages supported by WP-Translations, for devs to add to theirs WordPress plugins/themes readme.txt

== Translations ==

Thanks to all the WP-Translations Team Members.

  • catalonia Català (Catalan),
  • 🇨🇿 čeština (Czech),
  • 🇩🇰 Dansk (Danish),
  • 🇳🇱 Nederlands (België) Dutch (Belgium),
  • 🇳🇱 Nederlands (Dutch),
  • 🇦🇺 English (Australia) (English (Australia))
<?php
/**
* Plugin Row Meta
*
* Adds GitHub and translate links below the plugin description on the plugins page.
* Author: benhuson, tweaked by fxbenard for WP-Translations
* Replace references to 'my-plugin' to reflect your plugin folder and file name.
* Update the GitHub Repo and Translation links.
*
@fxbenard
fxbenard / getrmpomakemo.sh
Created March 5, 2014 14:06
Pull translations with Transifex client, create the mo and remove the po
#! /bin/sh
# Pull all files from Transifex;
# 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 && rm $file ; done
@fxbenard
fxbenard / getpomakemo.sh
Last active November 9, 2016 14:53
Script to pull translations with Transifex client and create the mo files.
#! /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
@fxbenard
fxbenard / potomo.sh
Created January 14, 2014 14:10
po2mo script
#! /bin/sh
for file in `find . -name "*.po"` ; do msgfmt -o ${file/.po/.mo} $file && rm $file ; done
@fxbenard
fxbenard / Gruntfile.js
Created January 4, 2014 16:38
Transifex integration into my Gruntfile.js
var shell = require('shelljs');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
po2mo: {
files: {
src: 'lang/*.po',
@fxbenard
fxbenard / pulls
Last active November 9, 2016 14:50
TX Client command lines
/* 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
@fxbenard
fxbenard / makepot
Last active December 27, 2015 02:09
Command line to execute the WordPress i18n tool: makepot.php
/* From a command line tool opened in last-svn/tools/i18n */
php makepot.php wp-plugin /path/to/my/plugin-dir plugin-slug.pot