Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymcp committed Jul 10, 2024
2 parents 8bf1977 + a492d73 commit b290834
Show file tree
Hide file tree
Showing 21 changed files with 1,001 additions and 1,283 deletions.
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@
}
},
"scripts": {
"lint": "./vendor/bin/phpcs .",
"lang": [
"type msgmerge &> /dev/null || { echo 'Please install gettext'; exit 1; }",
"wp i18n make-pot . ./languages/aip.pot --domain=aip --exclude=private/node_modules,assets,vendor",
"for p in ./languages/*.po; do msguniq \"$p\" -o \"$p\"; done",
"for p in ./languages/*.po; do msgmerge --quiet -o \"$p.tmp\" --no-fuzzy-matching \"$p\" \"./languages/aip.pot\"; done",
"for p in ./languages/*.po; do msgattrib --no-obsolete -o \"$p\" \"$p.tmp\"; done",
"for p in ./languages/*.po.tmp; do rm \"$p\"; done",
"for p in ./languages/*.po; do msgfmt -cv --statistics \"$p\" -o \"${p%.*}.mo\"; done"
"@makePot",
"@updatePoMo"
],
"lint": "./vendor/bin/phpcs .",
"makePot": "wp i18n make-pot . ./languages/aip.pot --domain=aip --exclude=private,vendor",
"updatePoMo": [
"wp i18n update-po ./languages/aip.pot",
"wp i18n make-mo ./languages",
"wp i18n make-json ./languages --no-purge"
]
},
"scripts-descriptions": {
"lang": "Updates the POT file, then updates any PO files, and (re)compiles associated MO files",
"lint": "Runs PHP coding standard checks"
"lang": "Updates the POT file; updates PO files; recompiles MO files; extracts JS strings to JSON files",
"lint": "Runs PHP coding standard checks",
"makePot": "Updates the POT file",
"updatePoMo": "Updates the PO files from the POT file; recompiles MO files; extracts JS strings to JSON files"
}
}
2 changes: 1 addition & 1 deletion includes/class-register-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function register_editor_assets(): void {
wp_enqueue_script( 'amnesty-petitions-editor', plugins_url( 'assets/scripts/editor.js', __DIR__ ), $js_deps, $this->version, true );
wp_set_script_translations( 'amnesty-petitions-editor', 'aip', dirname( Init::$file ) . '/languages' );

$settings = get_option( 'amnesty_petitions_settings' );
$settings = get_option( 'amnesty_petitions_settings' ) ?: [];

$data = [
'terms' => wp_kses_post( wpautop( $settings['terms_text'] ?? '' ) ),
Expand Down
1 change: 1 addition & 0 deletions languages/aip-ar-b40afde4d3616f75d1efed7bf6ceeae6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"translation-revision-date":"2023-02-13 09:33+0000","generator":"WP-CLI\/2.10.0","source":"assets\/scripts\/editor.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"ar","plural-forms":"nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);"},"Petition":["\u0627\u0644\u062a\u0645\u0627\u0633"],"Thank You URL":["\u0634\u0643\u0631\u064b\u0627 \u0639\u0644\u0649 \u0639\u0646\u0648\u0627\u0646 URL"],"Thank You Title":["\u0634\u0643\u0631\u0627 \u0639\u0646\u0648\u0627\u0646"],"Thank You Sub-title":["\u0634\u0643\u0631\u0627 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0641\u0631\u0639\u064a"],"Thank You Content":["\u0634\u0643\u0631\u0627 \u0627\u0644\u0645\u062d\u062a\u0648\u0649"],"Form":["\u0646\u0645\u0648\u0630\u062c"],"Iframe":["\u202bIframe"],"Act Now":["\u062a\u062d\u0631\u0643\u0648\u0627 \u0627\u0644\u0622\u0646"],"Sign the petition":["\u0648\u0642\u0639 \u0639\u0644\u0649 \u0627\u0644\u0639\u0631\u064a\u0636\u0629"],"Yes, I agree":["\u0646\u0639\u0645\u060c \u0623\u0648\u0627\u0641\u0642"],"No, I do not agree":["\u0644\u0627\u060c \u0623\u0646\u0627 \u0644\u0627 \u0623\u0648\u0627\u0641\u0642"],"%s has signed.":["\u202b%s \u0648\u0642\u0639\u062a","\u200f\u202b%s \u0648\u0642","\u200f\u202b%s \u0648\u0642","\u200f\u202b%s \u0648\u0642","\u200f\u202b%s \u0648\u0642","\u200f\u202b%s \u0648\u0642"],"Petition target signatory count\u0004Let's get to %s":["\u0644\u0646\u0635\u0644 \u0625\u0644\u0649 %s"],"Email":["\u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a"],"Petition Form Source":[""],"Source":[""],"Petition Settings":[""],"Show petition content":[""],"Petition content initially visible":[""],"Whether the petition content is expanded by default":[""],"Newsletter Settings":[""],"Show newsletter signup fields":[""],"Label for acceptance":[""],"Label text for newsletter signup acceptance":[""],"Label for rejection":[""],"Label text for newsletter signup rejection":[""],"Thank You Settings":[""],"Override the global redirect URL for this petition, if desired":[""],"Show Thank You Content fields":[""],"Override the global Thank You Title for this petition, if desired":[""],"Override the global Thank You Sub-title for this petition, if desired":[""],"Override the global Thank You Content for this petition, if desired":[""],"Target Settings":[""],"Target signature count":[""],"Show target reached text":[""],"Show additional text on petition when signature target has been reached":[""],"Target reached text":[""],"Replace progress indicator":[""],"Replace the progress indicator with the above text when the target is reached":[""],"Subtitle":[""],"See the petition content":[""],"Petition content":[""],"First name":[""],"Last name":[""],"Phone":[""],"Iframe URL":[""],"Enter the URL for the iframe":[""],"Example petition iframe URL\u0004https:\/\/join.amnesty.org\/page\/12345\/action\/1?locale=en-US":[""],"Apply UTM parameters to iframe URI":[""],"Iframe Height":[""],"Enter the height for the iframe":[""],"Add a petition":[""],"Default":[""],"Dark grey background":[""],"Hide from curation blocks and index pages":[""],"Petition Container":[""],"The container for a petition":[""]}}}
Binary file modified languages/aip-ar.mo
Binary file not shown.
Loading

0 comments on commit b290834

Please sign in to comment.