Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare the plugin for localization #384

Closed
stefan-cotitosu opened this issue Sep 16, 2024 · 5 comments · Fixed by #392 or #398
Closed

Prepare the plugin for localization #384

stefan-cotitosu opened this issue Sep 16, 2024 · 5 comments · Fixed by #392 or #398
Assignees
Labels
new feature Request for a new feature or functionality to be added to the project.

Comments

@stefan-cotitosu
Copy link

What problem does this address?

We decided to translate the plugin to German, and to achieve this, the following changes need to be applied to the plugin.

What is your proposed solution?

Localize all the strings

  • Review all the strings within the PHP and JS files of the plugin to make sure they are fully localized and not hardcoded
  • Implement the PHPCS sniff to check for translator comments in the code. Rule to be added: WordPress.WP.I18n.MissingTranslatorsComment

Will this feature require documentation? (Optional)

No.

@stefan-cotitosu stefan-cotitosu added the new feature Request for a new feature or functionality to be added to the project. label Sep 16, 2024
@Soare-Robert-Daniel Soare-Robert-Daniel linked a pull request Oct 9, 2024 that will close this issue
6 tasks
@stefan-cotitosu
Copy link
Author

stefan-cotitosu commented Oct 30, 2024

@Soare-Robert-Daniel, please check the following files, as there are many occurrences without the text domain:

  • Missing text domain - please check the entire file

? __( 'Installing' )
: __( 'Activating' ) ) }


  • The text domain here is template-patterns-collection and not templates-patterns-collection. The word template needs to be templates

error: __( 'There was a problem submitting your feedback.', 'template-patterns-collection' ),


  • Missing text domain - please check the entire file

<div className="sorting-label">{ __( 'Sort by' ) }</div>


  • Missing text domain - please check the entire file

? __( 'Please refresh the page and try again.' )


  • Incorrect text domain - use templates instead of template

{ __( 'I already have a key', 'template-patterns-collection' ) }


  • Missing text domain - please review the entire file

__( 'Are you sure you want to delete this template?' )


  • Missing text domain

const iframeTitle = title || __( 'Preview' );


@stefan-cotitosu
Copy link
Author

stefan-cotitosu commented Oct 30, 2024

  • Incorrect text domain - it should be templates not template

name: __( 'Plugin version', 'template-patterns-collection' ),

Incorrect text domain

name: __( 'Feedback Details', 'otter-blocks' ),


  • Missing text domain


  • Missing text domain


  • Missing text domain


  • [ ]

@stefan-cotitosu
Copy link
Author

stefan-cotitosu commented Oct 30, 2024

@stefan-cotitosu
Copy link
Author

stefan-cotitosu commented Oct 30, 2024

{ 'No templates available. Try adding few templates.' }

@stefan-cotitosu
Copy link
Author

stefan-cotitosu commented Oct 30, 2024

  • It should be patterns instead of pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Request for a new feature or functionality to be added to the project.
Projects
None yet
2 participants