diff --git a/.distignore b/.distignore index 2f50f77..4fbdeab 100644 --- a/.distignore +++ b/.distignore @@ -23,6 +23,6 @@ package.json phpcompat.xml.dist phpcs.xml.dist phpmd.xml.dist -phpstan.neon +phpstan.neon.dist postcss.config.js README.md diff --git a/.editorconfig b/.editorconfig index 33ad845..a705c59 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,7 +17,7 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false -[{*.json,*.yml}] +[*.yml] indent_style = space indent_size = 2 diff --git a/.gitattributes b/.gitattributes index 4d45ae0..ab675d9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -22,6 +22,6 @@ /phpcompat.xml.dist export-ignore /phpcs.xml.dist export-ignore /phpmd.xml.dist export-ignore -/phpstan.neon export-ignore +/phpstan.neon.dist export-ignore /postcss.config.js export-ignore /README.md export-ignore diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4eef11b..bd9701d 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -11,7 +11,7 @@ on: # These files configure Composer. Changes could affect the outcome. - 'composer.*' # This file configures PHPStan. Changes could affect the outcome. - - 'phpstan.neon' + - 'phpstan.neon.dist' # Changes to workflow files should always verify all workflows are successful. - '.github/workflows/*.yml' # Allows you to run this workflow manually from the Actions tab. @@ -66,4 +66,4 @@ jobs: run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH - name: Run PHPStan static analysis (PHP ${{ matrix.php-versions }}) - run: phpstan analyse -c phpstan.neon --error-format=checkstyle --memory-limit=1G | cs2pr + run: phpstan analyse -c phpstan.neon.dist --error-format=checkstyle --memory-limit=1G | cs2pr diff --git a/.stylelintrc.json b/.stylelintrc.json index 8a92ad0..4a513f4 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,10 +1,10 @@ { - "extends": [ - "@wordpress/stylelint-config/scss" - ], - "rules": { - "font-family-no-missing-generic-family-keyword": null, - "no-descending-specificity": null, - "max-line-length": null - } + "extends": [ + "@wordpress/stylelint-config/scss" + ], + "rules": { + "font-family-no-missing-generic-family-keyword": null, + "no-descending-specificity": null, + "max-line-length": null + } } diff --git a/README.md b/README.md index 1b2b437..9be604e 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,13 @@ Sure! You are welcome to report any issues or add feature suggestions on the [Gi ## Changelog +### Unreleased + +* Tested up to WP 6.6. +* Update dependencies. +* Fix text domains in GlotPress custom template. +* Include maps for minified assets. + ### 1.4.8 * Tested up to WP 6.5. diff --git a/assets/css/style.css b/assets/css/style.css index c81fe75..199573c 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -27,6 +27,7 @@ table.translations tr td.translation ul li:not(:last-child) { table.translations tr td.translation .translation-text ins { background-color: #68de7c; + -webkit-text-decoration: none; text-decoration: none; display: inline-block; } @@ -58,6 +59,8 @@ table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.g table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):focus span.icon, table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled).active span.icon { color: var(--gp-color-btn-hover-text); + -webkit-transform: rotateZ(180deg); + -ms-transform: rotate(180deg); transform: rotateZ(180deg); } @@ -67,8 +70,6 @@ table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.g table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.icon { -webkit-transition: all 600ms cubic-bezier(0.075, 0.82, 0.165, 1) 0s; - -moz-transition: all 600ms cubic-bezier(0.075, 0.82, 0.165, 1) 0s; - -o-transition: all 600ms cubic-bezier(0.075, 0.82, 0.165, 1) 0s; transition: all 600ms cubic-bezier(0.075, 0.82, 0.165, 1) 0s; } @@ -83,16 +84,32 @@ table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.g table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.updating span.icon { color: var(--gp-color-dark-orange); + -webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; } +@-webkit-keyframes rotation { + + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + @keyframes rotation { 0% { + -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { + -webkit-transform: rotate(360deg); transform: rotate(360deg); } } diff --git a/assets/css/style.min.css b/assets/css/style.min.css index 93f0365..c64de1c 100644 --- a/assets/css/style.min.css +++ b/assets/css/style.min.css @@ -1 +1,2 @@ -table.translations tr td.original,table.translations tr td.translation{vertical-align:middle;width:45%}table.translations tr td.original small,table.translations tr td.translation small{font-size:.75rem}table.translations tr td.original ul,table.translations tr td.translation ul{list-style:none;margin:0;padding:0}table.translations tr td.original ul li:not(:last-child),table.translations tr td.translation ul li:not(:last-child){border-bottom:1px solid #e4e4e4;padding-bottom:.25em}table.translations tr td.translation .translation-text ins{background-color:#68de7c;display:inline-block;text-decoration:none}table.translation-sets tr th.gp-column-locale{min-width:400px;width:45%}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon{color:var(--gp-color-fg-muted);display:inline-block;font-size:1em;line-height:normal;margin-left:.5em;vertical-align:middle}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon.edit-status{display:none}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button{margin-left:.5em;vertical-align:bottom}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled).active span.icon,table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):focus span.icon,table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):hover span.icon{color:var(--gp-color-btn-hover-text);transform:rotate(180deg)}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:disabled{color:var(--gp-color-fg-default)!important}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.icon{-webkit-transition:all .6s cubic-bezier(.075,.82,.165,1) 0s;-moz-transition:all .6s cubic-bezier(.075,.82,.165,1) 0s;-o-transition:all .6s cubic-bezier(.075,.82,.165,1) 0s;transition:all .6s cubic-bezier(.075,.82,.165,1) 0s}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.label{display:inline-block;line-height:normal;margin-left:.5em;margin-right:.5em;text-align:left;vertical-align:middle}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.updating span.icon{animation:rotation 2s linear infinite;color:var(--gp-color-dark-orange)}@keyframes rotation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.success span.icon{color:var(--gp-color-green)}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.fail span.icon{color:var(--gp-color-red)}table.translation-sets tr.variant td:first-child{color:var(--gp-color-accent-fg)}table.translation-sets tr.variant td:first-child:before{content:"\f139";font-family:dashicons;vertical-align:middle}table.translation-sets tr[data-editable=false]{background-color:var(--gp-color-secondary-100)}table.translation-sets tr[data-editable=false]:hover{background-color:var(--gp-color-secondary-200)}table.translation-sets tr[data-editable=false] td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon.edit-status{display:inline-block} \ No newline at end of file +table.translations tr td.original,table.translations tr td.translation{vertical-align:middle;width:45%}table.translations tr td.original small,table.translations tr td.translation small{font-size:.75rem}table.translations tr td.original ul,table.translations tr td.translation ul{list-style:none;margin:0;padding:0}table.translations tr td.original ul li:not(:last-child),table.translations tr td.translation ul li:not(:last-child){border-bottom:1px solid #e4e4e4;padding-bottom:.25em}table.translations tr td.translation .translation-text ins{background-color:#68de7c;display:inline-block;-webkit-text-decoration:none;text-decoration:none}table.translation-sets tr th.gp-column-locale{min-width:400px;width:45%}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon{color:var(--gp-color-fg-muted);display:inline-block;font-size:1em;line-height:normal;margin-left:.5em;vertical-align:middle}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon.edit-status{display:none}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button{margin-left:.5em;vertical-align:bottom}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled).active span.icon,table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):focus span.icon,table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):hover span.icon{color:var(--gp-color-btn-hover-text);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:disabled{color:var(--gp-color-fg-default)!important}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.icon{-webkit-transition:all .6s cubic-bezier(.075,.82,.165,1) 0s;transition:all .6s cubic-bezier(.075,.82,.165,1) 0s}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.label{display:inline-block;line-height:normal;margin-left:.5em;margin-right:.5em;text-align:left;vertical-align:middle}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.updating span.icon{-webkit-animation:rotation 2s linear infinite;animation:rotation 2s linear infinite;color:var(--gp-color-dark-orange)}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.success span.icon{color:var(--gp-color-green)}table.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.fail span.icon{color:var(--gp-color-red)}table.translation-sets tr.variant td:first-child{color:var(--gp-color-accent-fg)}table.translation-sets tr.variant td:first-child:before{content:"\f139";font-family:dashicons;vertical-align:middle}table.translation-sets tr[data-editable=false]{background-color:var(--gp-color-secondary-100)}table.translation-sets tr[data-editable=false]:hover{background-color:var(--gp-color-secondary-200)}table.translation-sets tr[data-editable=false] td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon.edit-status{display:inline-block} +/*# sourceMappingURL=style.min.css.map */ \ No newline at end of file diff --git a/assets/css/style.min.css.map b/assets/css/style.min.css.map new file mode 100644 index 0000000..c1d1d0b --- /dev/null +++ b/assets/css/style.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["style.css"],"names":[],"mappings":"AAGA,uEAGC,qBAAsB,CADtB,SAED,CAEA,mFAEC,gBACD,CAEA,6EAIC,eAAgB,CAFhB,QAAS,CACT,SAED,CAEA,qHAGC,+BAAgC,CADhC,oBAED,CAEA,2DACC,wBAAyB,CAGzB,oBAAqB,CAFrB,4BAA6B,CAC7B,oBAED,CAEA,8CACC,eAAgB,CAChB,SACD,CAEA,kGAMC,8BAA+B,CAF/B,oBAAqB,CADrB,aAAc,CAEd,kBAAmB,CAJnB,gBAAkB,CAClB,qBAKD,CAEA,8GACC,YACD,CAEA,gHACC,gBAAkB,CAClB,qBACD,CAEA,8aAGC,oCAAqC,CACrC,gCAAkC,CAClC,4BAA6B,CAC7B,wBACD,CAEA,yHACC,0CACD,CAEA,0HACC,2DAAoE,CACpE,mDACD,CAEA,2HAKC,oBAAqB,CACrB,kBAAmB,CALnB,gBAAkB,CAClB,iBAAmB,CAEnB,eAAgB,CADhB,qBAID,CAEA,mIAEC,6CAA8C,CAC9C,qCAAsC,CAFtC,iCAGD,CAEA,4BAEC,GACC,8BAA+B,CAC/B,sBACD,CAEA,GACC,+BAAiC,CACjC,uBACD,CACD,CAEA,oBAEC,GACC,8BAA+B,CAC/B,sBACD,CAEA,GACC,+BAAiC,CACjC,uBACD,CACD,CAEA,kIACC,2BACD,CAEA,+HACC,yBACD,CAEA,iDACC,+BACD,CAEA,wDAEC,eAAgB,CADhB,qBAAsB,CAEtB,qBACD,CAEA,+CACC,8CACD,CAEA,qDACC,8CACD,CAEA,mIACC,oBACD","file":"style.min.css","sourcesContent":["/**\n * Temporary override while GlotPress with Variants doesn't have this CSS.\n */\ntable.translations tr td.original,\ntable.translations tr td.translation {\n\twidth: 45%;\n\tvertical-align: middle;\n}\n\ntable.translations tr td.original small,\ntable.translations tr td.translation small {\n\tfont-size: 0.75rem;\n}\n\ntable.translations tr td.original ul,\ntable.translations tr td.translation ul {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\ntable.translations tr td.original ul li:not(:last-child),\ntable.translations tr td.translation ul li:not(:last-child) {\n\tpadding-bottom: 0.25em;\n\tborder-bottom: 1px solid #e4e4e4;\n}\n\ntable.translations tr td.translation .translation-text ins {\n\tbackground-color: #68de7c;\n\t-webkit-text-decoration: none;\n\ttext-decoration: none;\n\tdisplay: inline-block;\n}\n\ntable.translation-sets tr th.gp-column-locale {\n\tmin-width: 400px;\n\twidth: 45%;\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon {\n\tmargin-left: 0.5em;\n\tvertical-align: middle;\n\tfont-size: 1em;\n\tdisplay: inline-block;\n\tline-height: normal;\n\tcolor: var(--gp-color-fg-muted);\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon.edit-status {\n\tdisplay: none;\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button {\n\tmargin-left: 0.5em;\n\tvertical-align: bottom;\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):hover span.icon,\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled):focus span.icon,\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:not(:disabled).active span.icon {\n\tcolor: var(--gp-color-btn-hover-text);\n\t-webkit-transform: rotateZ(180deg);\n\t-ms-transform: rotate(180deg);\n\ttransform: rotateZ(180deg);\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button:disabled {\n\tcolor: var(--gp-color-fg-default) !important;\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.icon {\n\t-webkit-transition: all 600ms cubic-bezier(0.075, 0.82, 0.165, 1) 0s;\n\ttransition: all 600ms cubic-bezier(0.075, 0.82, 0.165, 1) 0s;\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button span.label {\n\tmargin-left: 0.5em;\n\tmargin-right: 0.5em;\n\tvertical-align: middle;\n\ttext-align: left;\n\tdisplay: inline-block;\n\tline-height: normal;\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.updating span.icon {\n\tcolor: var(--gp-color-dark-orange);\n\t-webkit-animation: rotation 2s infinite linear;\n\tanimation: rotation 2s infinite linear;\n}\n\n@-webkit-keyframes rotation {\n\n\t0% {\n\t\t-webkit-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t}\n\n\t100% {\n\t\t-webkit-transform: rotate(360deg);\n\t\ttransform: rotate(360deg);\n\t}\n}\n\n@keyframes rotation {\n\n\t0% {\n\t\t-webkit-transform: rotate(0deg);\n\t\ttransform: rotate(0deg);\n\t}\n\n\t100% {\n\t\t-webkit-transform: rotate(360deg);\n\t\ttransform: rotate(360deg);\n\t}\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.success span.icon {\n\tcolor: var(--gp-color-green);\n}\n\ntable.translation-sets tr td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button.fail span.icon {\n\tcolor: var(--gp-color-red);\n}\n\ntable.translation-sets tr.variant td:first-child {\n\tcolor: var(--gp-color-accent-fg);\n}\n\ntable.translation-sets tr.variant td:first-child::before {\n\tfont-family: dashicons;\n\tcontent: \"\\f139\";\n\tvertical-align: middle;\n}\n\ntable.translation-sets tr[data-editable=\"false\"] {\n\tbackground-color: var(--gp-color-secondary-100);\n}\n\ntable.translation-sets tr[data-editable=\"false\"]:hover {\n\tbackground-color: var(--gp-color-secondary-200);\n}\n\ntable.translation-sets tr[data-editable=\"false\"] td:first-child span.gp-convert-pt-ao90-update span.translation-set-icon.edit-status {\n\tdisplay: inline-block;\n}\n"]} \ No newline at end of file diff --git a/assets/js/scripts.min.js b/assets/js/scripts.min.js index 5815465..5a0a3ff 100644 --- a/assets/js/scripts.min.js +++ b/assets/js/scripts.min.js @@ -1 +1,2 @@ -jQuery(document).ready(function($){var translationSets=[],glotpressAdmin=gpConvertPTAO90.admin,gpUrlProject=gpConvertPTAO90.gp_url_project;$("table.gp-table.translation-sets tr td:first-child a").each(function(){var regexPattern=new RegExp("^"+gpUrlProject+"(.*).*/(.+)/(.+)/$"),regexPattern=$(this).attr("href").match(regexPattern),locale=regexPattern[2],regexPattern=regexPattern[3],editable=gpConvertPTAO90.edit;translationSets.push(locale),$(this).closest("tr").attr("data-locale",locale),$(this).closest("tr").attr("data-slug",regexPattern),"pt-ao90"===locale&&$(this).closest("tr").attr("data-editable",editable)}),translationSets.includes("pt")&&translationSets.includes("pt-ao90")&&($('table.gp-table.translation-sets tr[data-locale="pt-ao90"] td:first-child a').closest("tr").addClass("variant"),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child').children().last().after(''),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child span.gp-convert-pt-ao90-update').html(''),glotpressAdmin)&&$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child span.gp-convert-pt-ao90-update').children().last().after('"),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button').on("click",function(){var locale=$(this).closest("tr").attr("data-locale"),slug=$(this).closest("tr").attr("data-slug"),regexPattern=new RegExp("^"+gpUrlProject+"(.*)/"+locale+"/"+slug+"/$");((projectPath,locale,slug)=>{var button=$('table.gp-table.translation-sets tr[data-locale="'+locale+'"][data-slug="'+slug+'"] td:first-child button.gp-convert-pt-ao90-update-button');$.ajax({url:gpConvertPTAO90.ajaxurl,type:"POST",data:{action:"convert_project",projectPath:projectPath,locale:locale,slug:slug,nonce:gpConvertPTAO90.nonce},beforeSend:function(){button.attr("disabled",!0).removeClass("success fail").addClass("updating").children("span.label").text(wp.i18n.__("Syncing...","gp-convert-pt-ao90"))}}).done(function(response,textStatus,jqXHR){var percent=response.data.percent,current=response.data.current,fuzzy=response.data.fuzzy,untranslated=response.data.untranslated,waiting=response.data.waiting,old=response.data.old,rejected=response.data.rejected,response=response.data.warnings,gpToolboxUpdateHighlight=wp.hooks.hasAction("gpToolboxUpdateHighlight","update_highlight_action"),bubbleMoreThan90=button.closest("td").children("span.bubble.morethan90").length;$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.percent').text(percent+"%"),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.translated a').text(current),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.fuzzy a').text(fuzzy),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.untranslated a').text(untranslated),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.waiting a').text(waiting),gpToolboxUpdateHighlight&&($('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.old a').text(old),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.rejected a').text(rejected),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.warnings a').text(response),wp.hooks.doAction("gpToolboxUpdateHighlight")),90<=percent?bubbleMoreThan90?$(button).closest("td").children("span.bubble.morethan90").text(percent+"%"):$(''+percent+"%").insertAfter(button.closest("td").find("strong")):bubbleMoreThan90&&$(button).closest("td").children("span.bubble.morethan90").remove(),button.removeClass("updating").addClass("success"),button.children("span.icon.dashicons").hide().removeClass("dashicons-update").addClass("dashicons-yes").show(),button.children("span.label").text(wp.i18n.__("Synced!","gp-convert-pt-ao90"))}).fail(function(jqXHR,textStatus){button.removeClass("updating").addClass("fail"),button.children("span.icon.dashicons").hide().removeClass("dashicons-update").addClass("dashicons-warning").show(),button.children("span.label").text(wp.i18n.__("Failed!","gp-convert-pt-ao90"))}).always(function(){setTimeout(function(){button.attr("disabled",!1).removeClass("success fail"),button.children("span.icon.dashicons").hide().removeClass("dashicons-yes dashicons-warning").addClass("dashicons-update").show(),button.children("span.label").text(wp.i18n.__("Sync","gp-convert-pt-ao90"))},3e3)})})($(this).closest("td").find("a").attr("href").match(regexPattern)[1],locale,slug)}),$(".translation-sets").tablesorter({theme:"glotpress",sortList:[[2,1]],cssChildRow:"variant",headers:{0:{sorter:"text"}}})}); \ No newline at end of file +jQuery(document).ready(function($){var translationSets=[],glotpressAdmin=gpConvertPTAO90.admin,gpUrlProject=gpConvertPTAO90.gp_url_project;$("table.gp-table.translation-sets tr td:first-child a").each(function(){var regexPattern=new RegExp("^"+gpUrlProject+"(.*).*/(.+)/(.+)/$"),regexPattern=$(this).attr("href").match(regexPattern),locale=regexPattern[2],regexPattern=regexPattern[3],editable=gpConvertPTAO90.edit;translationSets.push(locale),$(this).closest("tr").attr("data-locale",locale),$(this).closest("tr").attr("data-slug",regexPattern),"pt-ao90"===locale&&$(this).closest("tr").attr("data-editable",editable)}),translationSets.includes("pt")&&translationSets.includes("pt-ao90")&&($('table.gp-table.translation-sets tr[data-locale="pt-ao90"] td:first-child a').closest("tr").addClass("variant"),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child').children().last().after(''),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child span.gp-convert-pt-ao90-update').html(''),glotpressAdmin)&&$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child span.gp-convert-pt-ao90-update').children().last().after('"),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td:first-child span.gp-convert-pt-ao90-update button.gp-convert-pt-ao90-update-button').on("click",function(){var locale=$(this).closest("tr").attr("data-locale"),slug=$(this).closest("tr").attr("data-slug"),regexPattern=new RegExp("^"+gpUrlProject+"(.*)/"+locale+"/"+slug+"/$");((projectPath,locale,slug)=>{var button=$('table.gp-table.translation-sets tr[data-locale="'+locale+'"][data-slug="'+slug+'"] td:first-child button.gp-convert-pt-ao90-update-button');$.ajax({url:gpConvertPTAO90.ajaxurl,type:"POST",data:{action:"convert_project",projectPath:projectPath,locale:locale,slug:slug,nonce:gpConvertPTAO90.nonce},beforeSend:function(){button.attr("disabled",!0).removeClass("success fail").addClass("updating").children("span.label").text(wp.i18n.__("Syncing...","gp-convert-pt-ao90"))}}).done(function(response,textStatus,jqXHR){var percent=response.data.percent,current=response.data.current,fuzzy=response.data.fuzzy,untranslated=response.data.untranslated,waiting=response.data.waiting,old=response.data.old,rejected=response.data.rejected,response=response.data.warnings,gpToolboxUpdateHighlight=wp.hooks.hasAction("gpToolboxUpdateHighlight","update_highlight_action"),bubbleMoreThan90=button.closest("td").children("span.bubble.morethan90").length;$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.percent').text(percent+"%"),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.translated a').text(current),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.fuzzy a').text(fuzzy),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.untranslated a').text(untranslated),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.waiting a').text(waiting),gpToolboxUpdateHighlight&&($('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.old a').text(old),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.rejected a').text(rejected),$('table.gp-table.translation-sets tr[data-locale="pt-ao90"][data-slug="default"] td.stats.warnings a').text(response),wp.hooks.doAction("gpToolboxUpdateHighlight")),90<=percent?bubbleMoreThan90?$(button).closest("td").children("span.bubble.morethan90").text(percent+"%"):$(''+percent+"%").insertAfter(button.closest("td").find("strong")):bubbleMoreThan90&&$(button).closest("td").children("span.bubble.morethan90").remove(),button.removeClass("updating").addClass("success"),button.children("span.icon.dashicons").hide().removeClass("dashicons-update").addClass("dashicons-yes").show(),button.children("span.label").text(wp.i18n.__("Synced!","gp-convert-pt-ao90"))}).fail(function(jqXHR,textStatus){button.removeClass("updating").addClass("fail"),button.children("span.icon.dashicons").hide().removeClass("dashicons-update").addClass("dashicons-warning").show(),button.children("span.label").text(wp.i18n.__("Failed!","gp-convert-pt-ao90"))}).always(function(){setTimeout(function(){button.attr("disabled",!1).removeClass("success fail"),button.children("span.icon.dashicons").hide().removeClass("dashicons-yes dashicons-warning").addClass("dashicons-update").show(),button.children("span.label").text(wp.i18n.__("Sync","gp-convert-pt-ao90"))},3e3)})})($(this).closest("td").find("a").attr("href").match(regexPattern)[1],locale,slug)}),$(".translation-sets").tablesorter({theme:"glotpress",sortList:[[2,1]],cssChildRow:"variant",headers:{0:{sorter:"text"}}})}); +//# sourceMappingURL=scripts.min.js.map \ No newline at end of file diff --git a/assets/js/scripts.min.js.map b/assets/js/scripts.min.js.map new file mode 100644 index 0000000..8528bce --- /dev/null +++ b/assets/js/scripts.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["scripts.js"],"names":["jQuery","document","ready","$","translationSets","glotpressAdmin","gpConvertPTAO90","admin","gpUrlProject","gp_url_project","each","regexPattern","RegExp","match","this","attr","locale","slug","editable","edit","push","closest","includes","addClass","children","last","after","html","wp","i18n","__","on","projectPath","button","ajax","url","ajaxurl","type","data","action","nonce","beforeSend","removeClass","text","done","response","textStatus","jqXHR","percent","current","fuzzy","untranslated","waiting","old","rejected","warnings","gpToolboxUpdateHighlight","hooks","hasAction","bubbleMoreThan90","length","doAction","insertAfter","find","remove","hide","show","fail","always","setTimeout","tablesorter","theme","sortList","cssChildRow","headers","0","sorter"],"mappings":"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"} \ No newline at end of file diff --git a/composer.json b/composer.json index d8791cb..35161fd 100644 --- a/composer.json +++ b/composer.json @@ -1,109 +1,106 @@ { - "name": "pedro-mendonca/gp-convert-pt-ao90", - "description": "GlotPress language tool to convert text according to the Portuguese Language Orthographic Agreement of 1990 (PT AO90).", - "license": "GPL-2.0-or-later", - "type": "wordpress-plugin", - "authors": [ - { - "name": "Pedro Mendonça", - "email": "ped.gaspar@gmail.com", - "homepage": "https://pedromendonca.pt" - } - ], - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/pedro-mendonca" - } - ], - "require": { - "php": ">=7.4", - "pedro-mendonca/convert-pt-ao90": "^1.3.3" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", - "ergebnis/composer-normalize": "^2.43.0", - "johnbillion/wp-compat": "^0.2.1", - "pedro-mendonca/glotpress-stubs": "4.0.1", - "phpcompatibility/phpcompatibility-wp": "^2.1.5", - "phpmd/phpmd": "^2.15.0", - "phpstan/extension-installer": "^1.4.3", - "sirbrillig/phpcs-variable-analysis": "^2.11.19", - "szepeviktor/phpstan-wordpress": "^1.3.5", - "wp-coding-standards/wpcs": "^3.1.0" - }, - "autoload": { - "classmap": [ - "includes/" - ] - }, - "archive": { - "exclude": [ - "composer.*", - "!/vendor" - ] - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, - "ergebnis/composer-normalize": true, - "phpstan/extension-installer": true - }, - "optimize-autoloader": true - }, - "scripts": { - "build": [ - "@lint", - "@compile" - ], - "build:css": "npm run build:css", - "compat:php": "phpcs -v --standard=phpcompat.xml.dist", - "compile": [ - "@compile:js", - "@build:css" - ], - "compile:js": "npm run compile:js", - "format:php": "phpcbf -v --standard=phpcs.xml.dist", - "lint": [ - "@lint:php", - "@compat:php", - "@lint:phpstan", - "@lint:css", - "@lint:js", - "@lint:md:docs", - "@lint:pkg-json" - ], - "lint:css": "npm run lint:css", - "lint:js": "npm run lint:js", - "lint:md:docs": "npm run lint:md:docs", - "lint:php": "phpcs -v --standard=phpcs.xml.dist", - "lint:phpmd": "phpmd . text phpmd.xml.dist", - "lint:phpstan": "phpstan analyse -c phpstan.neon --memory-limit=1G", - "lint:pkg-json": "npm run lint:pkg-json", - "phpcs-i": "phpcs -i", - "scripts-list": "composer run-script --list", - "zip": [ - "composer install --no-dev", - "composer archive --file=gp-convert-pt-ao90 --format=zip", - "composer install" - ] - }, - "scripts-descriptions": { - "build": "Compile all CSS with npm run build", - "compat:php": "Runs the PHPCompatibilityWP code sniffer.", - "compile": "Compile all JavaScript", - "compile:js": "Run npm UglifyJS to compile minified JS.", - "format:php": "Runs the PHP code sniffer and automatically fix errors.", - "lint": "Runs all available code linting (PHP_CodeSniffer, JS and MD lint).", - "lint:css": "Run npm CSS linter.", - "lint:js": "Run npm JS linter.", - "lint:md:docs": "Run npm MD linter.", - "lint:php": "Runs the PHP code sniffer.", - "lint:phpmd": "Runs the PHPMD code static analysis.", - "lint:phpstan": "Runs the PHPStan code static analysis.", - "lint:pkg-json": "Run npm package.json linter.", - "phpcs-i": "Log PHPCS debug information.", - "scripts-list": "List all Composer scripts.", - "zip": "Build production zip archive." - } + "name": "pedro-mendonca/gp-convert-pt-ao90", + "description": "GlotPress language tool to convert text according to the Portuguese Language Orthographic Agreement of 1990 (PT AO90).", + "license": "GPL-2.0-or-later", + "type": "wordpress-plugin", + "authors": [ + { + "name": "Pedro Mendonça", + "email": "ped.gaspar@gmail.com", + "homepage": "https://pedromendonca.pt" + } + ], + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/pedro-mendonca" + } + ], + "require": { + "php": ">=7.4", + "pedro-mendonca/convert-pt-ao90": "^1.3.3" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", + "ergebnis/composer-normalize": "^2.44.0", + "johnbillion/wp-compat": "^0.2.3", + "pedro-mendonca/glotpress-stubs": "4.0.1", + "phpcompatibility/phpcompatibility-wp": "^2.1.5", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.4.3", + "sirbrillig/phpcs-variable-analysis": "^2.11.19", + "szepeviktor/phpstan-wordpress": "^1.3.5", + "wp-coding-standards/wpcs": "^3.1.0" + }, + "autoload": { + "classmap": [ + "includes/" + ] + }, + "archive": { + "exclude": [ + "composer.*", + "!/vendor" + ] + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true, + "phpstan/extension-installer": true + }, + "optimize-autoloader": true + }, + "scripts": { + "build": [ + "@lint", + "@build:css", + "@build:js" + ], + "build:css": "npm run build:css", + "build:js": "npm run build:js", + "compat:php": "phpcs -v --standard=phpcompat.xml.dist", + "format:php": "phpcbf -v --standard=phpcs.xml.dist", + "lint": [ + "@lint:php", + "@compat:php", + "@lint:phpstan", + "@lint:css", + "@lint:js", + "@lint:md:docs", + "@lint:pkg-json" + ], + "lint:css": "npm run lint:css", + "lint:js": "npm run lint:js", + "lint:md:docs": "npm run lint:md:docs", + "lint:php": "phpcs -v --standard=phpcs.xml.dist", + "lint:phpmd": "phpmd . text phpmd.xml.dist", + "lint:phpstan": "phpstan analyse -c phpstan.neon.dist --memory-limit=1G", + "lint:pkg-json": "npm run lint:pkg-json", + "phpcs-i": "phpcs -i", + "scripts-list": "composer run-script --list", + "zip": [ + "composer install --no-dev", + "composer archive --file=gp-convert-pt-ao90 --format=zip", + "composer install" + ] + }, + "scripts-descriptions": { + "build": "Build all CSS and JS.", + "build:css": "Compile SCSS to CSS and build minified CSS.", + "build:js": "Run npm UglifyJS to build minified JS.", + "compat:php": "Runs the PHPCompatibilityWP code sniffer.", + "format:php": "Runs the PHP code sniffer and automatically fix errors.", + "lint": "Runs all available code linting (PHP_CodeSniffer, JS and MD lint).", + "lint:css": "Run npm CSS linter.", + "lint:js": "Run npm JS linter.", + "lint:md:docs": "Run npm MD linter.", + "lint:php": "Runs the PHP code sniffer.", + "lint:phpmd": "Runs the PHPMD code static analysis.", + "lint:phpstan": "Runs the PHPStan code static analysis.", + "lint:pkg-json": "Run npm package.json linter.", + "phpcs-i": "Log PHPCS debug information.", + "scripts-list": "List all Composer scripts.", + "zip": "Build production zip archive." + } } diff --git a/composer.lock b/composer.lock index 4bde51a..6ee2b9e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4f7aa230fc34efcb6a7e770249aa236e", + "content-hash": "9ffbbb72c1f27450668973fafc7f67b7", "packages": [ { "name": "pedro-mendonca/convert-pt-ao90", @@ -1010,16 +1010,16 @@ }, { "name": "php-stubs/wordpress-stubs", - "version": "v6.6.0", + "version": "v6.6.2", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "86e8753e89d59849276dcdd91b9a7dd78bb4abe2" + "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/86e8753e89d59849276dcdd91b9a7dd78bb4abe2", - "reference": "86e8753e89d59849276dcdd91b9a7dd78bb4abe2", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc", + "reference": "f50fd7ed45894d036e4fef9ab7e5bbbaff6a30cc", "shasum": "" }, "require-dev": { @@ -1052,9 +1052,9 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.0" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.6.2" }, - "time": "2024-07-17T08:50:38+00:00" + "time": "2024-09-30T07:10:48+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -1773,16 +1773,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.2", + "version": "3.10.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", - "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", "shasum": "" }, "require": { @@ -1849,7 +1849,7 @@ "type": "open_collective" } ], - "time": "2024-07-21T23:26:44+00:00" + "time": "2024-09-18T10:38:58+00:00" }, { "name": "symfony/config", @@ -1932,16 +1932,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v5.4.43", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "8c946c5c1d1692d5378cb722060969730cebc96d" + "reference": "23eb9f3803a931aef16a65f362a9aeb0640a1374" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/8c946c5c1d1692d5378cb722060969730cebc96d", - "reference": "8c946c5c1d1692d5378cb722060969730cebc96d", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/23eb9f3803a931aef16a65f362a9aeb0640a1374", + "reference": "23eb9f3803a931aef16a65f362a9aeb0640a1374", "shasum": "" }, "require": { @@ -2001,7 +2001,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.43" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.44" }, "funding": [ { @@ -2017,7 +2017,7 @@ "type": "tidelift" } ], - "time": "2024-08-27T00:56:45+00:00" + "time": "2024-09-12T20:01:35+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2088,16 +2088,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.41", + "version": "v5.4.44", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "6d29dd9340b372fa603f04e6df4dd76bb808591e" + "reference": "76c3818964e9d32be3862c9318ae3ba9aa280ddc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/6d29dd9340b372fa603f04e6df4dd76bb808591e", - "reference": "6d29dd9340b372fa603f04e6df4dd76bb808591e", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/76c3818964e9d32be3862c9318ae3ba9aa280ddc", + "reference": "76c3818964e9d32be3862c9318ae3ba9aa280ddc", "shasum": "" }, "require": { @@ -2135,7 +2135,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.41" + "source": "https://github.com/symfony/filesystem/tree/v5.4.44" }, "funding": [ { @@ -2151,7 +2151,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:36:24+00:00" + "time": "2024-09-16T14:52:48+00:00" }, { "name": "symfony/polyfill-ctype", diff --git a/gp-convert-pt-ao90.php b/gp-convert-pt-ao90.php index 7352334..2b1e08d 100644 --- a/gp-convert-pt-ao90.php +++ b/gp-convert-pt-ao90.php @@ -16,8 +16,6 @@ * @wordpress-plugin * Plugin Name: Convert PT AO90 for GlotPress * Plugin URI: https://wordpress.org/plugins/gp-convert-pt-ao90/ - * GitHub Plugin URI: https://github.com/pedro-mendonca/GP-Convert-PT-AO90 - * Primary Branch: main * Description: Language tool for GlotPress to convert text according to the Portuguese Language Orthographic Agreement of 1990 (PT AO90). * Version: 1.4.8 * Requires at least: 5.3 diff --git a/gp-templates/translation-row-preview.php b/gp-templates/translation-row-preview.php index 4cba3d2..2b0f28c 100644 --- a/gp-templates/translation-row-preview.php +++ b/gp-templates/translation-row-preview.php @@ -23,7 +23,6 @@ break; } } - } ?> @@ -40,7 +39,7 @@ - + priority ][0]; @@ -56,34 +55,34 @@ $translation_plural = isset( $translation->plural_glossary_markup ) ? $translation->plural_glossary_markup : wp_kses_post( prepare_original( esc_translation( $translation->plural ) ) ); ?> context ) { ?> - context ); ?> + context ); ?> + ?> have to log in to add a translation.', 'glotpress' ), esc_url( wp_login_url( gp_url_current() ) ) ); + $edit_text = sprintf( /* translators: %s: URL. */ __( 'You have to log in to add a translation.', 'gp-convert-pt-ao90' ), esc_url( wp_login_url( gp_url_current() ) ) ); } $missing_text = "$edit_text"; if ( ! count( array_filter( $translation->translations, 'gp_is_not_null' ) ) ) { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo $missing_text; - } elseif ( ! $translation->plural || 1 === $locale->nplurals ) { + } elseif ( ! $translation->plural || $locale->nplurals === 1 ) { $singular_translation = esc_translation( $translation->translations[0] ); // Check if has root. if ( $is_ptao90 && ( isset( $translation->root_id ) || $has_root ) ) { @@ -96,11 +95,11 @@ } // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo '' . prepare_original( $singular_translation ) . ''; - } elseif ( $translation->plural && 2 === $locale->nplurals && 'n != 1' === $locale->plural_expression ) { + } elseif ( $translation->plural && $locale->nplurals === 2 && $locale->plural_expression === 'n != 1' ) { ?>