Skip to content

Commit

Permalink
fix bug for new locales and add gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
webaxones committed May 10, 2024
1 parent a13b9cd commit 436cf8b
Show file tree
Hide file tree
Showing 28 changed files with 246 additions and 438 deletions.
12 changes: 12 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/.wordpress-org
/.git
/.github
/.node_modules

.distignore
.gitignore
.composer.json
.composer.lock
.package.json
.package-lock.json
.README.md
14 changes: 14 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Directories
/.wordpress-org export-ignore
/.git export-ignore
/.github export-ignore
/.node_modules export-ignore

# Files
/.gitattributes export-ignore
/.gitignore export-ignore
/.composer.json export-ignore
/.composer.lock export-ignore
/.package.json export-ignore
/.package-lock.json export-ignore
/.README.md export-ignore
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy and Release Plugin
on:
push:
tags:
- "*"
jobs:
tag:
name: New tag
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: |
npm install
npm run build
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: ${{github.workspace}}/${{ github.event.repository.name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
27 changes: 27 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"landingPage": "/wp-admin/post.php?post=1&action=edit",
"preferredVersions": {
"php": "8.0",
"wp": "latest"
},
"features": {
"networking": true
},
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org/plugins",
"slug": "consistency"
},
"options": {
"activate": true
}
}
]
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
44 changes: 22 additions & 22 deletions assets/icon.svg → .wordpress-org/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-components', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-i18n', 'wp-notices', 'wp-plugins'), 'version' => '7d5d683f49ac81de20b5');
<?php return array('dependencies' => array('react', 'wp-components', 'wp-core-data', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-i18n', 'wp-notices', 'wp-plugins'), 'version' => 'a29d6e29e9d190fb2551');
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion consistency.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Consistency
* Plugin URI: https://www.webaxones.com
* Description: Fixes typographical consistency
* Version: 1.5.0
* Version: 1.5.1
* Requires at least: 6.1
* Requires PHP: 7.4
* Author: Loïc Antignac
Expand Down
27 changes: 15 additions & 12 deletions includes/Config/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ class Rules implements ValueInterface
* @var array
*/
protected array $localizedRules = [
'quote' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'ellipsis' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'breakingSpace' => [ 'fr-FR', 'fr-BE' ],
'regularToCurlyQuotes' => [ 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'regularToFrenchQuotes' => [ 'fr-FR', 'fr-BE' ],
'noSpaceBefore' => [ 'fr-FR', 'fr-BE' ],
'spaceBefore' => [ 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'2hyphens' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'ordinalNumberSuffix' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'noBreakingSpaceAfter' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'noNonBreakingSpaceAfter' => [ 'fr-FR', 'fr-BE' ],
'capitalizeFirstSentenceLetter' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'quote' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'ellipsis' => [ 'fr_FR', 'fr_BE', 'en_US', 'en_AU', 'en_CA', 'en_NZ', 'en_ZA', 'en_GB', 'de_DE', 'de_AT', 'de_CH', 'ro_RO' ],
'breakingSpace' => [ 'fr-FR', 'fr-BE' ],
'regularToCurlyQuotes' => [ 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'regularToGermanQuotes' => [ 'de_DE', 'de_AT', 'ro_RO' ],
'regularToGermanBookStyleQuotes' => [ 'de_DE', 'de_AT' ],
'regularToFrenchQuotes' => [ 'fr-FR', 'fr-BE' ],
'regularToFrenchQuotesWithoutSpaces' => [ 'de_CH' ],
'noSpaceBefore' => [ 'fr-FR', 'fr-BE' ],
'spaceBefore' => [ 'en_US', 'en_AU', 'en_CA', 'en_NZ', 'en_ZA', 'en_GB', 'de_DE', 'de_AT', 'de_CH', 'ro_RO' ],
'2hyphens' => [ 'fr_FR', 'fr_BE', 'en_US', 'en_AU', 'en_CA', 'en_NZ', 'en_ZA', 'en_GB', 'de_DE', 'de_AT', 'de_CH', 'ro_RO' ],
'ordinalNumberSuffix' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'noBreakingSpaceAfter' => [ 'fr-FR', 'fr-BE', 'en-US', 'en-AU', 'en-CA', 'en-NZ', 'en-ZA', 'en-GB' ],
'noNonBreakingSpaceAfter' => [ 'fr-FR', 'fr-BE' ],
'capitalizeFirstSentenceLetter' => [ 'fr_FR', 'fr_BE', 'en_US', 'en_AU', 'en_CA', 'en_NZ', 'en_ZA', 'en_GB', 'de_DE', 'de_AT', 'de_CH', 'ro_RO' ],
];

/**
Expand Down
Loading

0 comments on commit 436cf8b

Please sign in to comment.