-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1521ed2
commit ec0b4fb
Showing
27 changed files
with
129 additions
and
718 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
FOLDER := custom-xml | ||
|
||
include ../makefile | ||
|
2 changes: 1 addition & 1 deletion
2
tests/playground/xml/phpunuhi.xml → tests/playground/custom-xml/phpunuhi.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,5 @@ | ||
# Makefile Project | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
FOLDER := ini | ||
|
||
include ../makefile | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
status: ## Status command | ||
cd ../../.. && php bin/phpunuhi status --configuration=./tests/playground/ini/phpunuhi.xml | ||
|
||
list: ## List available translation IDs | ||
cd ../../.. && php bin/phpunuhi list:translations --configuration=./tests/playground/ini/phpunuhi.xml | ||
|
||
validate: ## Validate command | ||
cd ../../.. && php bin/phpunuhi validate --configuration=./tests/playground/ini/phpunuhi.xml --report-format=junit --report-output=./tests/playground/ini/.exports | ||
|
||
structure: ## Fix Structure | ||
cd ../../.. && php bin/phpunuhi fix:structure --configuration=./tests/playground/ini/phpunuhi.xml | ||
|
||
html: ## Exports a HTML | ||
cd ../../.. && php bin/phpunuhi export --configuration=./tests/playground/ini/phpunuhi.xml --format=html --dir=./tests/playground/ini/.exports | ||
|
||
csv: ## Exports a CSV | ||
cd ../../.. && php bin/phpunuhi export --configuration=./tests/playground/ini/phpunuhi.xml --format=csv --dir=./tests/playground/ini/.exports | ||
|
||
list: ## List Translate | ||
cd ../../.. && php bin/phpunuhi list:translations --configuration=./tests/playground/ini/phpunuhi.xml | ||
|
||
translate: ## Translate | ||
cd ../../.. && php bin/phpunuhi translate --configuration=./tests/playground/ini/phpunuhi.xml --service=googleweb | ||
|
||
migrate: ## Migrate command | ||
cd ../../.. && php bin/phpunuhi migrate --configuration=./tests/playground/ini/phpunuhi.xml --output=json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,5 @@ | ||
# Makefile Project | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
FOLDER := json | ||
|
||
include ../makefile | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
status: ## Status command | ||
cd ../../.. && php bin/phpunuhi status --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
list: ## List Translate | ||
cd ../../.. && php bin/phpunuhi list:translations --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
validate: ## Validate command | ||
cd ../../.. && php bin/phpunuhi validate:all --configuration=./tests/playground/json/phpunuhi.xml --report-format=junit --report-output=./tests/playground/json/.exports/junit.xml | ||
|
||
validate-mess: ## Validate mess command | ||
cd ../../.. && php bin/phpunuhi validate:mess --configuration=./tests/playground/json/phpunuhi.xml --report-format=junit --report-output=./tests/playground/json/.exports/junit.xml | ||
|
||
fix-mess: ## Fix mess command | ||
cd ../../.. && php bin/phpunuhi fix:mess --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
validate-json: ## Validate command with json report | ||
cd ../../.. && php bin/phpunuhi validate --configuration=./tests/playground/json/phpunuhi.xml --report-format=json --report-output=./tests/playground/json/.exports/report.json | ||
|
||
validate-structure: ## Fix Structure | ||
cd ../../.. && php bin/phpunuhi validate:structure --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
validate-spelling: ## Validate Spelling | ||
cd ../../.. && php bin/phpunuhi validate:spelling --service=aspell --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
validate-similarity: ## Validate Similarity | ||
cd ../../.. && php bin/phpunuhi validate:similarity --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
fix-structure: ## Fix Structure | ||
cd ../../.. && php bin/phpunuhi fix:structure --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
fix-spelling: ## Fix Spelling | ||
cd ../../.. && php bin/phpunuhi fix:spelling --service=aspell --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
keys: ## Fix Keys | ||
cd ../../.. && php bin/phpunuhi fix:structure --configuration=./tests/playground/json/phpunuhi.xml | ||
|
||
html: ## Exports a HTML | ||
cd ../../.. && php bin/phpunuhi export --configuration=./tests/playground/json/phpunuhi.xml --format=html --empty --dir=./tests/playground/json/.exports | ||
|
||
csv: ## Exports a CSV | ||
cd ../../.. && php bin/phpunuhi export --configuration=./tests/playground/json/phpunuhi.xml --format=csv --empty --dir=./tests/playground/json/.exports | ||
|
||
csvimport: ## Imports a CSV | ||
cd ../../.. && php bin/phpunuhi import --configuration=./tests/playground/json/phpunuhi.xml --format=csv --set=json --file=./tests/playground/json/.exports/json.csv | ||
|
||
htmlimport: ## Imports a HTML | ||
cd ../../.. && php bin/phpunuhi import --configuration=./tests/playground/json/phpunuhi.xml --format=html --set=json --file=./tests/playground/json/import.html.txt | ||
|
||
translate: ## Translate | ||
cd ../../.. && php bin/phpunuhi translate --configuration=./tests/playground/json/phpunuhi.xml --service=googleweb | ||
|
||
migrate: ## Migrate command | ||
cd ../../.. && php bin/phpunuhi migrate --configuration=./tests/playground/json/phpunuhi.xml --output=ini | ||
|
||
scan: ## Scans all TWIG files | ||
cd ../../.. && php bin/phpunuhi scan:usage --configuration=./tests/playground/json/phpunuhi.xml --dir=./tests/playground/json/templates --scanner=mjml --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Central Makefile | ||
|
||
MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
|
||
#-------------------------------------------------------------------------------- | ||
#-------------------------------------------------------------------------------- | ||
TEST_FOLDER := ./tests/playground/$(FOLDER)/phpunuhi.xml | ||
|
||
BINARY := cd ../../.. && php bin/phpunuhi | ||
DOCKER := docker run --rm -it -v $(MAKEFILE_DIR)$(FOLDER):/app boxblinkracer/phpunuhi:dev-main | ||
#-------------------------------------------------------------------------------- | ||
#-------------------------------------------------------------------------------- | ||
# TOGGLE BETWEEN BINARY OR DOCKER | ||
EXECUTE := $(BINARY) --configuration=$(TEST_FOLDER) | ||
# EXECUTE := $(DOCKER) --configuration=./phpunuhi.xml | ||
|
||
REPORT_FORMAT := junit | ||
EXPORT_FORMAT := html | ||
SPELLING_SERVICE := aspell | ||
TRANSLATION_SERVICE := googleweb | ||
#-------------------------------------------------------------------------------- | ||
#-------------------------------------------------------------------------------- | ||
|
||
help: | ||
@printf "\033[33mStatus:\033[0m\n" | ||
@grep -Eh '^[a-zA-Z_-]+:.*?##1 .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?##1 "}; {printf "\033[33m - %-30s\033[0m %s\n", $$1, $$2}' | ||
@echo "--------------------------------------------------------------------------------------------" | ||
@printf "\033[36mValidation:\033[0m\n" | ||
@grep -Eh '^[a-zA-Z_-]+:.*?##2 .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?##2 "}; {printf "\033[36m - %-30s\033[0m %s\n", $$1, $$2}' | ||
@echo "--------------------------------------------------------------------------------------------" | ||
@printf "\033[32mReports:\033[0m\n" | ||
@grep -Eh '^[a-zA-Z_-]+:.*?##3 .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?##3 "}; {printf "\033[32m - %-30s\033[0m %s\n", $$1, $$2}' | ||
@echo "--------------------------------------------------------------------------------------------" | ||
@printf "\033[35mOthers:\033[0m\n" | ||
@grep -Eh '^[a-zA-Z_-]+:.*?##4 .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?##4 "}; {printf "\033[35m - %-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
#-------------------------------------------------------------------------------- | ||
|
||
services: ##1 services | ||
$(EXECUTE) services | ||
|
||
status: ##1 status | ||
$(EXECUTE) status | ||
|
||
list-translations: ##1 list:translations | ||
$(EXECUTE) list:translations | ||
|
||
list-translation-keys: ##1 list:translation-keys | ||
$(EXECUTE) list:translation-keys | ||
|
||
#-------------------------------------------------------------------------------- | ||
|
||
validate-all: ##2 validate:all | ||
$(EXECUTE) validate:all --report-format=$(REPORT_FORMAT) --report-output=./tests/playground/$(FOLDER)/.exports | ||
|
||
validate-mess: ##2 validate:mess | ||
$(EXECUTE) validate:mess --report-format=$(REPORT_FORMAT) --report-output=./tests/playground/$(FOLDER)/.exports | ||
|
||
validate-coverage: ##2 validate:coverage | ||
$(EXECUTE) validate:coverage | ||
|
||
validate-structure: ##2 validate:structure | ||
$(EXECUTE) validate:structure | ||
|
||
validate-spelling: ##2 validate:spelling | ||
$(EXECUTE) validate:spelling --service=$(SPELLING_SERVICE) | ||
|
||
validate-similarity: ##2 validate:similarity | ||
$(EXECUTE) validate:similarity | ||
|
||
#-------------------------------------------------------------------------------- | ||
|
||
export: ##3 export | ||
$(EXECUTE) export --format=$(EXPORT_FORMAT) --dir=./tests/playground/$(FOLDER)/.exports | ||
|
||
import: ##3 import | ||
$(EXECUTE) import --format=$(EXPORT_FORMAT) --dir=./tests/playground/$(FOLDER)/.exports | ||
|
||
#-------------------------------------------------------------------------------- | ||
|
||
fix-structure: ##4 fix:structure | ||
$(EXECUTE) fix:structure | ||
|
||
fix-mess: ##4 fix:mess | ||
$(EXECUTE) fix:mess | ||
|
||
fix-spelling: ## fix:spelling | ||
$(EXECUTE) fix:spelling --service=$(SPELLING_SERVICE) | ||
|
||
translate: ##4 translate | ||
$(EXECUTE) translate --service=$(TRANSLATION_SERVICE) | ||
|
||
migrate: ##4 migrate | ||
$(EXECUTE) migrate --output=json | ||
|
||
scan: ##4 scan | ||
$(EXECUTE) scan:usage --dir=./tests/playground/json/templates --scanner=mjml --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,5 @@ | ||
# Makefile Project | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
FOLDER := php | ||
|
||
include ../makefile | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
status: ## Status command | ||
cd ../../.. && php bin/phpunuhi status --configuration=./tests/playground/php/phpunuhi.xml | ||
|
||
list: ## List available translation IDs | ||
cd ../../.. && php bin/phpunuhi list:translations --configuration=./tests/playground/ini/phpunuhi.xml | ||
|
||
validate: ## Validate command | ||
cd ../../.. && php bin/phpunuhi validate --configuration=./tests/playground/php/phpunuhi.xml --report-format=junit --report-output=./tests/playground/php/.exports/junit.xml | ||
|
||
validate-json: ## Validate command with json report | ||
cd ../../.. && php bin/phpunuhi validate --configuration=./tests/playground/php/phpunuhi.xml --report-format=json --report-output=./tests/playground/php/.exports/report.json | ||
|
||
csv: ## Exports a CSV | ||
cd ../../.. && php bin/phpunuhi export --configuration=./tests/playground/php/phpunuhi.xml --format=csv --dir=./tests/playground/php/.exports | ||
|
||
structure: ## Fix Structure | ||
cd ../../.. && php bin/phpunuhi fix:structure --configuration=./tests/playground/php/phpunuhi.xml | ||
|
||
html: ## Exports a HTML | ||
cd ../../.. && php bin/phpunuhi export --configuration=./tests/playground/php/phpunuhi.xml --format=html --dir=./tests/playground/php/.exports | ||
|
||
translate: ## Translate | ||
cd ../../.. && php bin/phpunuhi translate --configuration=./tests/playground/php/phpunuhi.xml --service=googleweb | ||
|
||
migrate: ## Migrate command | ||
cd ../../.. && php bin/phpunuhi migrate --configuration=./tests/playground/php/phpunuhi.xml --output=json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,5 @@ | ||
# Makefile Project | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
FOLDER := po | ||
|
||
include ../makefile | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
status: ## Status command | ||
cd ../../.. && php bin/phpunuhi status --configuration=./tests/playground/po/phpunuhi.xml | ||
|
||
list: ## List Translate | ||
cd ../../.. && php bin/phpunuhi list:translations --configuration=./tests/playground/po/phpunuhi.xml | ||
|
||
validate: ## Validate command | ||
cd ../../.. && php bin/phpunuhi validate --configuration=./tests/playground/po/phpunuhi.xml --report-format=junit --report-output=./tests/playground/po/.exports/junit.xml | ||
|
||
structure: ## Fix Structure | ||
cd ../../.. && php bin/phpunuhi fix:structure --configuration=./tests/playground/po/phpunuhi.xml | ||
|
||
translate: ## Translate | ||
cd ../../.. && php bin/phpunuhi translate --configuration=./tests/playground/po/phpunuhi.xml --service=googleweb | ||
|
||
migrate: ## Migrate command | ||
cd ../../.. && php bin/phpunuhi migrate --configuration=./tests/playground/po/phpunuhi.xml --output=json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,5 @@ | ||
# Makefile Project | ||
|
||
.PHONY: help | ||
.DEFAULT_GOAL := help | ||
FOLDER := resx | ||
|
||
include ../makefile | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
#------------------------------------------------------------------------------------------------ | ||
|
||
status: ## Status command | ||
cd ../../.. && php bin/phpunuhi status --configuration=./tests/playground/resx/phpunuhi.xml | ||
|
||
list: ## List available translation IDs | ||
cd ../../.. && php bin/phpunuhi list:translations --configuration=./tests/playground/resx/phpunuhi.xml | ||
|
||
fix-structure: ## Fix Keys | ||
cd ../../.. && php bin/phpunuhi fix:structure --configuration=./tests/playground/resx/phpunuhi.xml | ||
|
||
validate: ## Validate command | ||
cd ../../.. && php bin/phpunuhi validate --configuration=./tests/playground/resx/phpunuhi.xml --report-format=junit --report-output=./tests/playground/resx/.exports/junit.xml | ||
|
||
translate: ## Translate | ||
cd ../../.. && php bin/phpunuhi translate --configuration=./tests/playground/resx/phpunuhi.xml --service=googleweb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.