Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n support and spanish es_ES language file #5

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
out/*
/composer.phar
/bin/
/vendor/
99 changes: 97 additions & 2 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,111 @@ Not yet, we're hoping to add templating - all contributions welcome!

## Screenshots

##Development

###Directory structure
Versioned files
```
-+ /
+ doc/ Docs files
+ features/ Behat feature files and bootstrap
+ src/ Module source files
+ css/ Styles
+ languages/ Locale .mo and .po files
+ tools/ Automated plugin packager scripts
```

Not versioned files (autogenerated).
```
-+ /
+ bin/ Behat binaries. Generated by composer.
+ out/ The module package to deploy. Generated by tools/release script.
+ vendor/ Useful libraries. Generated by composer.
```

###Internationalization
Only .po files must be updated. Filename format is **githubembed-*LANGUAGE CODE*.po**, for example: *githubembed-es_ES.po*

To generate .mo files use
```shell
./tools/generate_mo_files
```

###Deploy
Use *release* script to generate the plugin package
```shell
./tools/release
```

The package files .zip and .tar.gz will be in *out/* directory

###Recommended environment
####Testing server
1. Install and configure two english Wordpress sites running at http://localhost/sandbox/wordpress/simply/ and http://localhost/sandbox/wordpress/multisite/

If you prefer other location, change the *behat.yml* file.
```yml
base_url: http://localhost/sandbox/wordpress
```

**Wordpress admin must be in english for BDD tests**

2. Create a admin user named *test* which email *[email protected]* and password *testtest*. Set Administrator profile to this user.

If you prefer other other test user credentials, change the *features/bootstrap/FeatureContext.php*] file.
```php
define('WORDPRESS_ADMIN_USER', 'test');
define('WORDPRESS_ADMIN_PASSWORD', 'testtest');
```

3. Configure the http://localhost/sandbox/wordpress/multisite/ as multisite, check the Codex for more info on this topic: [Create_A_Network](http://codex.wordpress.org/Create_A_Network)

4. Create a blog named *test1* in http://localhost/sandbox/wordpress/multisite/test1/

5. Link src project directory to your Wordperfect site plugins directory
```shell
ln -s /home/developer/projects/wp-github-oembed/src/ /var/www/sandbox/wordpress/simply/wp-content/plugins/github-embed
ln -s /home/developer/projects/wp-github-oembed/src/ /var/www/sandbox/wordpress/multisite/wp-content/plugins/github-embed
```


####BDD
Use [Composer](http://getcomposer.org/) to install [Behat](http://behat.org) and all necesary files.
```shell
curl -s https://getcomposer.org/installer | php
./composer.phar install
```

You can test the development environment configuration
```shell
./bin/behat features/enviroment/
```

Run all tests
```shell
./bin/behat
```

Run all tests for simply wordpress
```shell
./bin/behat features/simply/
```

Run all tests for multisite wordpress
```shell
./bin/behat features/multisite/
```

**Wordpress admin must be in english for BDD tests**

## Changelog

- 1.3
- Expire the oEmbed cache daily

- 1.2
- Support for milestone summaries
- Support for contributor lists
- 1.1
- Default CSS and more styling
- 1.0
- First release
- First release
7 changes: 7 additions & 0 deletions behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://localhost/sandbox/wordpress
goutte: ~
selenium2: ~

12 changes: 12 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"require": {
"behat/behat": "2.4.*@stable",
"behat/mink": "1.4.*@stable",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium2-driver": "*"
},
"config": {
"bin-dir": "bin/"
}
}
Loading