Skip to content

Commit

Permalink
Merge pull request #705 from publishpress/fix/#638_string_is_not_tran…
Browse files Browse the repository at this point in the history
…slated_in_italian

fix/#638_string_is_not_translated_in_italian
  • Loading branch information
richaferry authored Jul 29, 2024
2 parents 9a43e85 + 0481698 commit 5719234
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions modules/checklists/assets/js/gutenberg-panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class PPChecklistsPanel extends Component {
return coreSavePost(options);
} else {
wp.data.dispatch('core/edit-post').closePublishSidebar();
notices.createErrorNotice(__("Please complete the required(*) checklists task.", "publishpress-checklists"), {
notices.createErrorNotice(i18n.completeRequirementMessage, {
id: 'publishpress-checklists-validation',
isDismissible: true
});
Expand Down Expand Up @@ -181,7 +181,7 @@ class PPChecklistsPanel extends Component {
target="checklists-sidebar"
icon={<CheckListIcon />}
>
{__("Checklists", "publishpress-checklists")}
{i18n.checklistLabel}
</PluginSidebarMoreMenuItem>
<PluginSidebar
name="checklists-sidebar"
Expand All @@ -192,7 +192,7 @@ class PPChecklistsPanel extends Component {
{requirements.length === 0 ? (
<p>
<em>
{__("You don't have to complete any Checklist tasks.", "publishpress-checklists")}
{i18n.noTaskLabel}
</em>
</p>
) : (
Expand Down Expand Up @@ -239,7 +239,7 @@ class PPChecklistsPanel extends Component {
</ul>
{showRequiredLegend ? (
<em>
(*) {__("required", "publishpress-checklists")}
(*) {i18n.required}
</em>
) : null}
</div>
Expand Down
2 changes: 1 addition & 1 deletion modules/checklists/assets/js/gutenberg-panel.min.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions modules/checklists/checklists.php
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,16 @@ public function enqueue_block_editor_assets()
PPCH_VERSION,
true
);
wp_localize_script(
'pp-checklists-panel-gutenberg',
'i18n',
array(
'completeRequirementMessage' => __("Please complete the required(*) checklists task.", "publishpress-checklists"),
'checklistLabel' => __("Checklists", "publishpress-checklists"),
'noTaskLabel' => __("You don't have to complete any Checklist tasks.", "publishpress-checklists"),
'required' => __("required", "publishpress-checklists"),
)
);
}
}
}
Expand Down

0 comments on commit 5719234

Please sign in to comment.