Skip to content

Commit

Permalink
translations added to js files
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai committed Apr 23, 2024
1 parent 6e70937 commit 345c8d7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint PHP
on:
pull_request:
types: [ opened, edited, reopened, ready_for_review ]
types: [ opened, edited, reopened, ready_for_review, synchronize ]
paths:
- '**.php'

Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
if: "!! env.GIT_DIFF"

- name: Cache Composer vendor directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: '@newfold-labs'
- name: Setup Registry for NPM Install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/satis-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.WEBHOOK_TOKEN }}
repository: newfold-labs/satis
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "7.0.0"
"php": "7.3.0"
},
"preferred-install": {
"newfold-labs/*": "source",
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"lint": "wp-scripts lint-js ./src/index.js",
"start": "wp-scripts start ./src/index.js --config ./scripts/webpack.config.js"
},
"engines": {
"node": ">=20",
"npm": ">=10"
},
"repository": {
"type": "git",
"url": "git+https://github.com/newfold-labs/wp-module-migration.git"
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="Project Rules">
<rule ref="Newfold"/>
<config name="testVersion" value="7.0-"/>
<config name="minimum_supported_wp_version" value="5.8"/>
<config name="testVersion" value="7.3-"/>
<config name="minimum_supported_wp_version" value="6.2"/>
<exclude-pattern>./assets</exclude-pattern>
<exclude-pattern>./build</exclude-pattern>
<rule ref="WordPress-Core">
Expand Down
33 changes: 17 additions & 16 deletions src/components/DashboardMigrate.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
import { ArrowLongRightIcon } from '@heroicons/react/24/outline';
import { __ } from "@wordpress/i18n";

const content = {
title: __( "Let's migrate your existing site to your new account", "wp-module-migration" ),
description: __( "Migrating your site is easy with our free site import tool. Or, you can pay to have our Migrations Team experts handle your transfer for you.", "wp-module-migration" ),
learnMoreText: __( "Learn more", "wp-module-migration" ),
dismissButtonText: __( "Dismiss this card", "wp-module-migration" ),
buttonText: __( "Migrate your site", "wp-module-migration" )
}

const DashboardMigrate = ( {} ) => {
const connectMigrate = () => {
// eslint-disable-next-line no-console
getMigrateRedirectUrl().then( ( res ) => {
// eslint-disable-next-line no-console
getMigrateRedirectUrl().then( (res) => {
window.open( res?.data?.redirect_url, '_self' );
} );
});
};
return (
<div className=" nfd-rounded nfd-border nfd-p-4 nfd-grid nfd-grid-cols-2 nfd-gap-4">
<div className="nfd-grid nfd-grid-rows-[repeat(2,_min-content)] nfd-gap-6">
<div>
<h1 className="nfd-title nfd-title--2">
{
" Let's migrate your existing site to your new account"
}
{ content.title }
</h1>
<p>
Migrating your site is easy with our free site import
tool. Or, you can pay to have our Migrations Team
experts handle your transfer for you.{ ' ' }
<a href="testing" target="_blank">
Learn more
</a>
.
<a href="#" target="_blank">
{ content.learnMoreText }
</a>.
</p>
</div>
<button className="nfd-text-primary nfd-text-left">
Dismiss this card
{ content.dismissButtonText }
</button>
</div>
<div className="nfd-flex nfd-items-center nfd-justify-end">
Expand All @@ -37,7 +38,7 @@ const DashboardMigrate = ( {} ) => {
onClick={ () => connectMigrate() }
className="nfd-button nfd-button--primary nfd-flex nfd-gap-2"
>
Migrate your site{ ' ' }
{ content.buttonText }
<ArrowLongRightIcon className="nfd-w-[1.125rem]" />
</button>
</div>
Expand Down

0 comments on commit 345c8d7

Please sign in to comment.