Skip to content

Commit

Permalink
Merge pull request #7152 from Automattic/add/i18n-pot
Browse files Browse the repository at this point in the history
i18n: Switch to POT generation
  • Loading branch information
akirk authored Aug 5, 2016
2 parents 80962ea + 55be500 commit 75ce703
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ env-config.sh
*.rdb
*.db

/calypso-strings.php
/calypso-strings.pot
cover.html
.test.log
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ SASS ?= $(NODE_BIN)/node-sass --include-path 'client'
RTLCSS ?= $(NODE_BIN)/rtlcss
AUTOPREFIXER ?= $(NODE_BIN)/postcss -r --use autoprefixer --autoprefixer.browsers "last 2 versions, > 1%, Safari >= 8, iOS >= 8, Firefox ESR, Opera 12.1"
RECORD_ENV ?= $(BIN)/record-env
LIST_ASSETS ?= $(BIN)/list-assets
ALL_DEVDOCS_JS ?= server/devdocs/bin/generate-devdocs-index
COMPONENTS_USAGE_STATS_JS ?= server/devdocs/bin/generate-components-usage-stats.js

Expand Down Expand Up @@ -172,10 +171,9 @@ clean:
distclean:
@rm -rf node_modules

# create list of translations, saved as `./calypso-strings.php`
# create list of translations, saved as `./calypso-strings.pot`
translate: node_modules $(CLIENT_CONFIG_FILE)
@CALYPSO_ENV=stage $(BUNDLER)
@CALYPSO_ENV=stage $(LIST_ASSETS) | xargs $(I18N_CALYPSO) --format php --output-file ./calypso-strings.php --array-name calypso_i18n_strings
$(I18N_CALYPSO) --format pot --output-file ./calypso-strings.pot $(JS_FILES)

# install all git hooks
githooks: githooks-commit githooks-push
Expand Down
2 changes: 1 addition & 1 deletion bin/get-circle-string-artifact-url
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ https.get( options, ( response ) => {

response.on( 'end', () => {
const artifacts = JSON.parse( body );
const artifact = artifacts.filter( ( artifact ) => artifact.pretty_path === '$CIRCLE_ARTIFACTS/translate/calypso-strings.php' ).shift();
const artifact = artifacts.filter( ( artifact ) => artifact.pretty_path === '$CIRCLE_ARTIFACTS/translate/calypso-strings.pot' ).shift();
if( ! artifact ) {
console.error( 'failed to get latest build artifact information from circle ci', artifacts );
process.exit( 1 );
Expand Down
1 change: 0 additions & 1 deletion bin/list-assets

This file was deleted.

2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ test:
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/ && find . -type f -regex "./test-results.*\.xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;:
parallel: true
- if [[ $CIRCLE_BRANCH == "master" ]]; then make translate; mkdir $CIRCLE_ARTIFACTS/translate; cp calypso-strings.php $CIRCLE_ARTIFACTS/translate/calypso-strings.php; fi;
- if [[ $CIRCLE_BRANCH == "master" ]]; then make translate; mkdir $CIRCLE_ARTIFACTS/translate; cp calypso-strings.pot $CIRCLE_ARTIFACTS/translate/calypso-strings.pot; fi;
33 changes: 18 additions & 15 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"flux": "2.1.1",
"he": "0.5.0",
"html-loader": "0.4.0",
"i18n-calypso": "1.4.1",
"i18n-calypso": "1.6.0",
"immutable": "3.8.1",
"imports-loader": "0.6.5",
"inherits": "2.0.1",
Expand Down Expand Up @@ -129,7 +129,7 @@
"wpcom-oauth": "0.3.3",
"wpcom-proxy-request": "2.0.0",
"wpcom-xhr-request": "0.5.0",
"xgettext-js": "0.3.0"
"xgettext-js": "1.0.0"
},
"engines": {
"node": "5.11.1",
Expand Down
11 changes: 0 additions & 11 deletions server/bundler/bin/list-assets.js

This file was deleted.

0 comments on commit 75ce703

Please sign in to comment.